Skip to content

Latest commit

 

History

History
7833 lines (5448 loc) · 107 KB

reference.md

File metadata and controls

7833 lines (5448 loc) · 107 KB

Reference

Locations

client.locations.listPracticeLocations(practiceId) -> ListPracticeLocationsResponse

📝 Description

Requires locations:read on a practice key or an authorized platform key. Lists active and archived locations by name, with cursor pagination. Use status to filter. Location records are shared between Test and Live for the same practice.

🔌 Usage

client.locations().listPracticeLocations(
    "prac_01j2y8m6jcc9tt24af5pw9x1bc",
    ListPracticeLocationsRequest
        .builder()
        .startingAfter("loc_01j2y8m6jcc9tt24af5pw9x1bc")
        .endingBefore("loc_01j2y8m6jcc9tt24af5pw9x1bc")
        .build()
);

⚙️ Parameters

practiceId: String

limit: Optional<Integer>

startingAfter: Optional<String>

endingBefore: Optional<String>

status: Optional<ListPracticeLocationsRequestStatus>

client.locations.createPracticeLocation(practiceId, request) -> CreatePracticeLocationResponse

📝 Description

Requires locations:write and Idempotency-Key for API keys. Creates an active location with a unique name in this practice. Locations are shared between Test and Live. Use the returned ID for Team location access.

🔌 Usage

client.locations().createPracticeLocation(
    "prac_01j2y8m6jcc9tt24af5pw9x1bc",
    CreatePracticeLocationRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .name("name")
        .build()
);

⚙️ Parameters

practiceId: String

idempotencyKey: String

city: Optional<String>

country: Optional<String>

line1: Optional<String>

line2: Optional<String>

name: String

phone: Optional<String>

postalCode: Optional<String>

state: Optional<String>

timezone: Optional<String> — Optional IANA timezone override. Omit to leave unchanged; null clears it. No timezone is inferred when creating a record.

client.locations.getPracticeLocation(practiceId, locationId) -> GetPracticeLocationResponse

📝 Description

Requires locations:read. Returns one active or archived location in the authorized practice.

🔌 Usage

client.locations().getPracticeLocation(
    "prac_01j2y8m6jcc9tt24af5pw9x1bc",
    "loc_01j2y8m6jcc9tt24af5pw9x1bc",
    GetPracticeLocationRequest
        .builder()
        .build()
);

⚙️ Parameters

practiceId: String

locationId: String

client.locations.updatePracticeLocation(practiceId, locationId, request) -> UpdatePracticeLocationResponse

📝 Description

Requires locations:write and Idempotency-Key for API keys. Updates only supplied fields; null clears optional contact and address fields. Archived locations cannot be updated. Changes apply to both Test and Live.

🔌 Usage

client.locations().updatePracticeLocation(
    "prac_01j2y8m6jcc9tt24af5pw9x1bc",
    "loc_01j2y8m6jcc9tt24af5pw9x1bc",
    UpdatePracticeLocationRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .build()
);

⚙️ Parameters

practiceId: String

locationId: String

idempotencyKey: String

city: Optional<String>

country: Optional<String>

line1: Optional<String>

line2: Optional<String>

name: Optional<String>

phone: Optional<String>

postalCode: Optional<String>

state: Optional<String>

timezone: Optional<String> — Optional IANA timezone override. Omit to leave unchanged; null clears it. No timezone is inferred when creating a record.

client.locations.archivePracticeLocation(practiceId, locationId) -> ArchivePracticeLocationResponse

📝 Description

Requires locations:write and Idempotency-Key for API keys. Retains the location and historical associations. Archived locations cannot receive new Team assignments. Repeating archive returns the archived location. Changes apply to both Test and Live.

🔌 Usage

client.locations().archivePracticeLocation(
    "prac_01j2y8m6jcc9tt24af5pw9x1bc",
    "loc_01j2y8m6jcc9tt24af5pw9x1bc",
    ArchivePracticeLocationRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .build()
);

⚙️ Parameters

practiceId: String

locationId: String

idempotencyKey: String

API Keys

client.apiKeys.createPlatformPracticeApiKey(practiceId, request) -> CreatePlatformPracticeApiKeyResponse

📝 Description

Creates a practice API key for a connected practice. Requires a platform key with service_keys:write and every requested scope. The practice key uses the platform key's Test or Live mode and cannot outlive it. Requires Idempotency-Key for safe retries; the secret is returned in the encrypted replay response for 24 hours.

🔌 Usage

client.apiKeys().createPlatformPracticeApiKey(
    "practiceId",
    CreatePlatformPracticeApiKeyRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .name("name")
        .build()
);

⚙️ Parameters

practiceId: String

idempotencyKey: String

allowedIps: Optional<List<String>>

expiresAt: Optional<String>

name: String

scopes: Optional<List<CreatePlatformPracticeApiKeyRequestScopesItem>>

client.apiKeys.getApiAccess() -> GetApiAccessResponse

📝 Description

Returns the subject, mode, and scopes for the API key.

🔌 Usage

client.apiKeys().getApiAccess();

Account

client.account.getAccount() -> GetAccountResponse

📝 Description

Returns the platform organization, request livemode, and effective access. API keys report scopes and the service_key role; dashboard sessions report membership permissions. operatingMode describes organization Live access, not the credential's Test/Live mode.

🔌 Usage

client.account().getAccount(
    GetAccountRequest
        .builder()
        .orgId("acct_01j2y8m6jcc9tt24af5pw9x1bc")
        .build()
);

⚙️ Parameters

orgId: Optional<String>

Catalog

client.catalog.listCatalogItems() -> ListCatalogItemsResponse

📝 Description

Lists catalog items for the authenticated account and mode. Use view=medications for priced prescription groups with offer counts, pharmacy counts, and strengths; the default view=offers returns individual offers. Use relatedToCatalogItemId to find offers for the same medication and route. When practiceId is supplied, a practice price overrides the platform price and missing overrides inherit the platform price.

🔌 Usage

client.catalog().listCatalogItems(
    ListCatalogItemsRequest
        .builder()
        .relatedToCatalogItemId("cat_01j2y8m6jcc9tt24af5pw9x1bc")
        .catalogItemId("cat_01j2y8m6jcc9tt24af5pw9x1bc")
        .pharmacyIds(
            ListCatalogItemsRequestPharmacyIds.of("pharm_01j2y8m6jcc9tt24af5pw9x1bc")
        )
        .endingBefore("cat_01j2y8m6jcc9tt24af5pw9x1bc")
        .orgId("acct_01j2y8m6jcc9tt24af5pw9x1bc")
        .practiceId("prac_01j2y8m6jcc9tt24af5pw9x1bc")
        .startingAfter("cat_01j2y8m6jcc9tt24af5pw9x1bc")
        .build()
);

⚙️ Parameters

view: Optional<ListCatalogItemsRequestView>

relatedToCatalogItemId: Optional<String>

catalogKind: Optional<ListCatalogItemsRequestCatalogKind>

sort: Optional<ListCatalogItemsRequestSort>

catalogItemId: Optional<String>

availability: Optional<ListCatalogItemsRequestAvailability>

pharmacyIds: Optional<ListCatalogItemsRequestPharmacyIds>

dosageForms: Optional<ListCatalogItemsRequestDosageForms>

endingBefore: Optional<String>

hideControlledSubstances: Optional<Boolean>

hideUnpriced: Optional<Boolean>

limit: Optional<Integer>

orgId: Optional<String>

practiceId: Optional<String>

query: Optional<String>

requirement: Optional<ListCatalogItemsRequestRequirement>

routes: Optional<ListCatalogItemsRequestRoutes>

startingAfter: Optional<String>

client.catalog.listPharmacies() -> ListPharmaciesResponse

📝 Description

Lists pharmacies available to the authenticated account, including approved invite-only relationships.

🔌 Usage

client.catalog().listPharmacies(
    ListPharmaciesRequest
        .builder()
        .endingBefore("pharm_01j2y8m6jcc9tt24af5pw9x1bc")
        .orgId("acct_01j2y8m6jcc9tt24af5pw9x1bc")
        .pharmacyId("pharm_01j2y8m6jcc9tt24af5pw9x1bc")
        .startingAfter("pharm_01j2y8m6jcc9tt24af5pw9x1bc")
        .build()
);

⚙️ Parameters

endingBefore: Optional<String>

limit: Optional<Integer>

orgId: Optional<String>

pharmacyId: Optional<String>

query: Optional<String>

shipsToState: Optional<String>

startingAfter: Optional<String>

client.catalog.listShippingOptions(catalogItemId) -> List&lt;ListShippingOptionsResponseItem&gt;

📝 Description

Returns an array of at most 50 reviewed shipping services eligible for a catalog item, destination, and API mode. destinationState must be a USPS state or territory code. Each option has one temperature; pharmacy catalog summaries list all supported temperatures.

🔌 Usage

client.catalog().listShippingOptions(
    "cat_01j2y8m6jcc9tt24af5pw9x1bc",
    ListShippingOptionsRequest
        .builder()
        .destinationState("destinationState")
        .build()
);

⚙️ Parameters

catalogItemId: String

destinationState: String

destinationType: Optional<ListShippingOptionsRequestDestinationType>

client.catalog.retrievePrescribingOptions(catalogItemId) -> RetrievePrescribingOptionsResponse

📝 Description

Requires catalog:read. Returns reviewed SIG presets, guided patterns, quantity constraints and product requirements for a practice and mode. Revisions identify changed defaults. No patient-specific rationale or diagnosis is inferred.

🔌 Usage

client.catalog().retrievePrescribingOptions(
    "cat_01j2y8m6jcc9tt24af5pw9x1bc",
    RetrievePrescribingOptionsRequest
        .builder()
        .practiceId("prac_01j2y8m6jcc9tt24af5pw9x1bc")
        .build()
);

⚙️ Parameters

catalogItemId: String

practiceId: String

Orders

client.orders.listOrders() -> ListOrdersResponse

🔌 Usage

client.orders().listOrders(
    ListOrdersRequest
        .builder()
        .endingBefore("ord_01j2y8m6jcc9tt24af5pw9x1bc")
        .orderId("ord_01j2y8m6jcc9tt24af5pw9x1bc")
        .patientId("pat_01j2y8m6jcc9tt24af5pw9x1bc")
        .practiceId("prac_01j2y8m6jcc9tt24af5pw9x1bc")
        .startingAfter("ord_01j2y8m6jcc9tt24af5pw9x1bc")
        .build()
);

⚙️ Parameters

query: Optional<String>

externalOrderId: Optional<String>

createdAfter: Optional<String>

createdBefore: Optional<String>

endingBefore: Optional<String>

limit: Optional<Integer>

orderId: Optional<String>

patientId: Optional<String>

patientExternalId: Optional<String>

practiceId: Optional<String>

sort: Optional<ListOrdersRequestSort>

startingAfter: Optional<String>

status: Optional<ListOrdersRequestStatus>

affinityActorId: Optional<String> — Required for user actors and optional for system actors. Omit both actor headers to use the authenticated service account as a system actor.

affinityActorType: Optional<String> — Use user when a person initiated the action and system for autonomous work. Omit both actor headers to default to system.

client.orders.createOrder(request) -> CreateOrderResponse

📝 Description

Creates one unsigned order with 1–20 prescriptions for one patient in one practice. Supply patientId or patient; inline patient creation requires patients:write. Prescriber is optional: select by npi, provider id, or integration-scoped externalId, or leave the draft unassigned until signing. First-use prescriber registration requires team:write. Legacy userId is supported but cannot be combined with prescriber. Idempotency-Key is required.

🔌 Usage

client.orders().createOrder(
    CreateOrderRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .practiceId("prac_01j2y8m6jcc9tt24af5pw9x1bc")
        .prescriptions(
            Arrays.asList(
                CreateOrderRequestPrescriptionsItem
                    .builder()
                    .daysSupply(1)
                    .dispensing(
                        CreateOrderRequestPrescriptionsItemDispensing
                            .builder()
                            .build()
                    )
                    .directions("directions")
                    .medicationId("cat_01j2y8m6jcc9tt24af5pw9x1bc")
                    .quantity(
                        CreateOrderRequestPrescriptionsItemQuantity.of(CreateOrderRequestPrescriptionsItemQuantityOne.INFINITY)
                    )
                    .quantityUnit("quantityUnit")
                    .refills(1)
                    .build()
            )
        )
        .build()
);

⚙️ Parameters

idempotencyKey: String

affinityActorId: Optional<String> — Required for user actors and optional for system actors. Omit both actor headers to use the authenticated service account as a system actor.

affinityActorType: Optional<String> — Use user when a person initiated the action and system for autonomous work. Omit both actor headers to default to system.

practiceId: String

userId: Optional<String>

prescriber: Optional<CreateOrderRequestPrescriber>

otcItems: Optional<List<CreateOrderRequestOtcItemsItem>>

externalOrderId: Optional<String>

metadata: Optional<Map<String, Optional<CreateOrderRequestMetadataValue>>>

patientId: Optional<String>

patient: Optional<CreateOrderRequestPatient>

shippingAddressId: Optional<String>

prescriptions: List<CreateOrderRequestPrescriptionsItem>

client.orders.getOrder(orderId) -> GetOrderResponse

🔌 Usage

client.orders().getOrder(
    "ord_01j2y8m6jcc9tt24af5pw9x1bc",
    GetOrderRequest
        .builder()
        .build()
);

⚙️ Parameters

orderId: String

affinityActorId: Optional<String> — Required for user actors and optional for system actors. Omit both actor headers to use the authenticated service account as a system actor.

affinityActorType: Optional<String> — Use user when a person initiated the action and system for autonomous work. Omit both actor headers to default to system.

client.orders.cancelOrder(orderId, request) -> CancelOrderResponse

📝 Description

Requests cancellation. HTTP 200 means the request was handled; check cancellation.status for confirmed, pending, partial, or failed. Only confirmed means the entire order is cancelled. Shipment possession makes a fulfillment cancellation too late.

🔌 Usage

client.orders().cancelOrder(
    "ord_01j2y8m6jcc9tt24af5pw9x1bc",
    CancelOrderRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .reason("reason")
        .build()
);

⚙️ Parameters

orderId: String

idempotencyKey: String

affinityActorId: Optional<String> — Required for user actors and optional for system actors. Omit both actor headers to use the authenticated service account as a system actor.

affinityActorType: Optional<String> — Use user when a person initiated the action and system for autonomous work. Omit both actor headers to default to system.

reason: String

client.orders.actOnOrderException(orderId, exceptionId, request) -> ActOnOrderExceptionResponse

📝 Description

Acknowledge, retry, contact, or resolve an order exception in the credential's Test/Live mode. assign_to_me requires a signed-in dashboard user; API keys receive 400 and may use acknowledge instead. Actor headers do not create a dashboard assignee.

🔌 Usage

client.orders().actOnOrderException(
    "ord_01j2y8m6jcc9tt24af5pw9x1bc",
    "fex_01j2y8m6jcc9tt24af5pw9x1bc",
    ActOnOrderExceptionRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .action(ActOnOrderExceptionRequestAction.ACKNOWLEDGE)
        .build()
);

⚙️ Parameters

orderId: String

exceptionId: String

idempotencyKey: String

affinityActorId: Optional<String> — Required for user actors and optional for system actors. Omit both actor headers to use the authenticated service account as a system actor.

affinityActorType: Optional<String> — Use user when a person initiated the action and system for autonomous work. Omit both actor headers to default to system.

action: ActOnOrderExceptionRequestAction

note: Optional<String>

client.orders.listOrderEvents(orderId) -> ListOrderEventsResponse

🔌 Usage

client.orders().listOrderEvents(
    "ord_01j2y8m6jcc9tt24af5pw9x1bc",
    ListOrderEventsRequest
        .builder()
        .endingBefore("evt_01j2y8m6jcc9tt24af5pw9x1bc")
        .startingAfter("evt_01j2y8m6jcc9tt24af5pw9x1bc")
        .build()
);

⚙️ Parameters

orderId: String

endingBefore: Optional<String>

limit: Optional<Integer>

startingAfter: Optional<String>

affinityActorId: Optional<String> — Required for user actors and optional for system actors. Omit both actor headers to use the authenticated service account as a system actor.

affinityActorType: Optional<String> — Use user when a person initiated the action and system for autonomous work. Omit both actor headers to default to system.

client.orders.getOrderTestSimulation(orderId) -> GetOrderTestSimulationResponse

📝 Description

Requires orders:write. Available only in Test mode.

🔌 Usage

client.orders().getOrderTestSimulation(
    "ord_01j2y8m6jcc9tt24af5pw9x1bc",
    GetOrderTestSimulationRequest
        .builder()
        .build()
);

⚙️ Parameters

orderId: String

client.orders.updateOrderTestSimulation(orderId, request) -> UpdateOrderTestSimulationResponse

📝 Description

Requires orders:write and Idempotency-Key. Configure before submission or queue a valid pharmacy event in manual mode. Events use normal order history and Test webhooks. Live requests are rejected.

🔌 Usage

client.orders().updateOrderTestSimulation(
    "ord_01j2y8m6jcc9tt24af5pw9x1bc",
    UpdateOrderTestSimulationRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .mode(UpdateOrderTestSimulationRequestMode.AUTOMATIC)
        .scenario(UpdateOrderTestSimulationRequestScenario.SUCCESSFUL)
        .build()
);

⚙️ Parameters

orderId: String

idempotencyKey: String

mode: UpdateOrderTestSimulationRequestMode

scenario: UpdateOrderTestSimulationRequestScenario

action: Optional<UpdateOrderTestSimulationRequestAction>

client.orders.previewOrder(request) -> PreviewOrderResponse

📝 Description

Requires orders:write and catalog:read. Supply exactly one of patientId, patientExternalId, or inline patient details. External-ID lookup additionally requires patients:read; inline details require patients:write. Resolves defaults and explicit edits for 1–20 prescriptions. Reuses stored patient details when identifiers match; otherwise previews inline details without creating a patient. Complete previews contain an orders.create input. Does not create records, reserve prices, sign, charge or transmit. No idempotency key is required. Creation and signing recheck current requirements.

🔌 Usage

client.orders().previewOrder(
    PreviewOrderRequest
        .builder()
        .practiceId("prac_01j2y8m6jcc9tt24af5pw9x1bc")
        .prescriptions(
            Arrays.asList(
                PreviewOrderRequestPrescriptionsItem
                    .builder()
                    .medicationId("cat_01j2y8m6jcc9tt24af5pw9x1bc")
                    .build()
            )
        )
        .build()
);

⚙️ Parameters

otcItems: Optional<List<PreviewOrderRequestOtcItemsItem>>

practiceId: String

patientId: Optional<String>

patientExternalId: Optional<String>

patient: Optional<PreviewOrderRequestPatient>

userId: Optional<String>

prescriber: Optional<PreviewOrderRequestPrescriber>

shippingAddressId: Optional<String>

externalOrderId: Optional<String>

prescriptions: List<PreviewOrderRequestPrescriptionsItem>

shipping: Optional<PreviewOrderRequestShipping>

client.orders.signOrder(orderId, request) -> SignOrderResponse

📝 Description

Requires orders:sign, Idempotency-Key, signatureAttestation, and expectedRevision from the reviewed order. Existing integrations may send expectedVersions instead; supply exactly one. A stale revision returns 409 and requires renewed clinician review. Select prescriber by npi, provider id, or integration-scoped externalId, or inherit the draft's prescriber. First-use registration requires team:write. Actor headers are optional audit metadata with prescriber; legacy userId requires matching clinician actor headers. Signing does not submit to a pharmacy.

🔌 Usage

client.orders().signOrder(
    "ord_01j2y8m6jcc9tt24af5pw9x1bc",
    SignOrderRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .practiceId("prac_01j2y8m6jcc9tt24af5pw9x1bc")
        .signatureAttestation(true)
        .build()
);

⚙️ Parameters

orderId: String

idempotencyKey: String

practiceId: String

userId: Optional<String>

prescriber: Optional<SignOrderRequestPrescriber>

signatureAttestation: Boolean

expectedRevision: Optional<String> — Opaque revision of the complete order prescription set. Send the revision you reviewed as expectedRevision; never replace it automatically after a conflict.

expectedVersions: Optional<List<SignOrderRequestExpectedVersionsItem>>

client.orders.signAndSubmitOrder(orderId, request) -> SignAndSubmitOrderResponse

📝 Description

Requires orders:sign, Idempotency-Key, signatureAttestation, and expectedRevision from the reviewed order. Existing integrations may send expectedVersions instead; supply exactly one. A stale revision returns 409 and requires renewed clinician review. Select prescriber by npi, provider id, or externalId, or inherit the draft's prescriber. First-use registration requires team:write. Actor headers are optional with prescriber; legacy userId requires matching clinician actor headers. Signs the complete order, then attempts each submission. Signing remains committed if submission fails. Replay the same key after an uncertain response; retry reported submission failures through Submit order with a new key. Submitted means queued, not pharmacy acceptance.

🔌 Usage

client.orders().signAndSubmitOrder(
    "ord_01j2y8m6jcc9tt24af5pw9x1bc",
    SignAndSubmitOrderRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .practiceId("prac_01j2y8m6jcc9tt24af5pw9x1bc")
        .signatureAttestation(true)
        .build()
);

⚙️ Parameters

orderId: String

idempotencyKey: String

practiceId: String

userId: Optional<String>

prescriber: Optional<SignAndSubmitOrderRequestPrescriber>

signatureAttestation: Boolean

expectedRevision: Optional<String> — Opaque revision of the complete order prescription set. Send the revision you reviewed as expectedRevision; never replace it automatically after a conflict.

expectedVersions: Optional<List<SignAndSubmitOrderRequestExpectedVersionsItem>>

client.orders.submitOrder(orderId, request) -> SubmitOrderResponse

📝 Description

Requires orders:sign and Idempotency-Key. Queues signed prescriptions after rechecking authorization, signature integrity, billing, and fulfillment eligibility. Track pharmacy acceptance through order reads and webhooks. After a partial failure, retry submission with a new idempotency key; already queued prescriptions are not duplicated.

🔌 Usage

client.orders().submitOrder(
    "ord_01j2y8m6jcc9tt24af5pw9x1bc",
    SubmitOrderRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .practiceId("prac_01j2y8m6jcc9tt24af5pw9x1bc")
        .build()
);

⚙️ Parameters

orderId: String

idempotencyKey: String

practiceId: String

userId: Optional<String>

prescriber: Optional<SubmitOrderRequestPrescriber>

client.orders.rejectOrder(orderId, request) -> RejectOrderResponse

📝 Description

Requires orders:sign and Idempotency-Key. Select a prescriber or inherit the draft's prescriber. Legacy userId requires matching clinician actor headers. Supply expectedRevision from the reviewed order, or expectedVersions for existing integrations. Permanently rejects the complete unsigned order after checking its revision.

🔌 Usage

client.orders().rejectOrder(
    "ord_01j2y8m6jcc9tt24af5pw9x1bc",
    RejectOrderRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .practiceId("prac_01j2y8m6jcc9tt24af5pw9x1bc")
        .reason("reason")
        .build()
);

⚙️ Parameters

orderId: String

idempotencyKey: String

practiceId: String

userId: Optional<String>

prescriber: Optional<RejectOrderRequestPrescriber>

reason: String

expectedRevision: Optional<String> — Opaque revision of the complete order prescription set. Send the revision you reviewed as expectedRevision; never replace it automatically after a conflict.

expectedVersions: Optional<List<RejectOrderRequestExpectedVersionsItem>>

client.orders.addOrderPrescription(orderId, request) -> AddOrderPrescriptionResponse

📝 Description

Requires orders:write, Idempotency-Key and expectedRevision from the order being edited. Existing integrations may send expectedVersions instead; supply exactly one. Adds a complete prescription to an unsigned Order and returns all new versions. Omitted actor context defaults to the authenticated service account as a system actor. Patient and prescriber attribution stay fixed. Signed orders cannot be amended through this endpoint. Signing and submission require orders:sign through their separate endpoints.

🔌 Usage

client.orders().addOrderPrescription(
    "ord_01j2y8m6jcc9tt24af5pw9x1bc",
    AddOrderPrescriptionRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .practiceId("prac_01j2y8m6jcc9tt24af5pw9x1bc")
        .prescription(
            AddOrderPrescriptionRequestPrescription
                .builder()
                .daysSupply(1)
                .dispensing(
                    AddOrderPrescriptionRequestPrescriptionDispensing
                        .builder()
                        .build()
                )
                .directions("directions")
                .medicationId("cat_01j2y8m6jcc9tt24af5pw9x1bc")
                .quantity(
                    AddOrderPrescriptionRequestPrescriptionQuantity.of(AddOrderPrescriptionRequestPrescriptionQuantityOne.INFINITY)
                )
                .quantityUnit("quantityUnit")
                .refills(1)
                .build()
        )
        .build()
);

⚙️ Parameters

orderId: String

idempotencyKey: String

affinityActorId: Optional<String> — Required for user actors and optional for system actors. Omit both actor headers to use the authenticated service account as a system actor.

affinityActorType: Optional<String> — Use user when a person initiated the action and system for autonomous work. Omit both actor headers to default to system.

metadata: Optional<Map<String, Optional<AddOrderPrescriptionRequestMetadataValue>>>

practiceId: String

expectedRevision: Optional<String> — Opaque revision of the complete order prescription set. Send the revision you reviewed as expectedRevision; never replace it automatically after a conflict.

expectedVersions: Optional<List<AddOrderPrescriptionRequestExpectedVersionsItem>>

prescription: AddOrderPrescriptionRequestPrescription

client.orders.updateOrderPrescription(orderId, prescriptionId, request) -> UpdateOrderPrescriptionResponse

📝 Description

Requires orders:write, Idempotency-Key and expectedRevision from the order being edited. Existing integrations may send expectedVersions instead; supply exactly one. Replaces one prescription with complete medication instructions and returns all new versions. Omitted actor context defaults to the authenticated service account as a system actor. Patient and prescriber attribution stay fixed. Signed orders cannot be amended through this endpoint. Signing and submission require orders:sign through their separate endpoints.

🔌 Usage

client.orders().updateOrderPrescription(
    "ord_01j2y8m6jcc9tt24af5pw9x1bc",
    "rx_01j2y8m6jcc9tt24af5pw9x1bc",
    UpdateOrderPrescriptionRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .practiceId("prac_01j2y8m6jcc9tt24af5pw9x1bc")
        .prescription(
            UpdateOrderPrescriptionRequestPrescription
                .builder()
                .daysSupply(1)
                .dispensing(
                    UpdateOrderPrescriptionRequestPrescriptionDispensing
                        .builder()
                        .build()
                )
                .directions("directions")
                .medicationId("cat_01j2y8m6jcc9tt24af5pw9x1bc")
                .quantity(
                    UpdateOrderPrescriptionRequestPrescriptionQuantity.of(UpdateOrderPrescriptionRequestPrescriptionQuantityOne.INFINITY)
                )
                .quantityUnit("quantityUnit")
                .refills(1)
                .build()
        )
        .build()
);

⚙️ Parameters

orderId: String

prescriptionId: String

idempotencyKey: String

affinityActorId: Optional<String> — Required for user actors and optional for system actors. Omit both actor headers to use the authenticated service account as a system actor.

affinityActorType: Optional<String> — Use user when a person initiated the action and system for autonomous work. Omit both actor headers to default to system.

metadata: Optional<Map<String, Optional<UpdateOrderPrescriptionRequestMetadataValue>>>

practiceId: String

expectedRevision: Optional<String> — Opaque revision of the complete order prescription set. Send the revision you reviewed as expectedRevision; never replace it automatically after a conflict.

expectedVersions: Optional<List<UpdateOrderPrescriptionRequestExpectedVersionsItem>>

prescription: UpdateOrderPrescriptionRequestPrescription

client.orders.createOrderBatch(request) -> CreateOrderBatchResponse

📝 Description

Creates 1–20 orders for distinct patients in one practice, each with 1–20 prescriptions. Each accepts patientId or inline patient details. Orders and newly created patients commit atomically; any failure saves none. Requires orders:write and Idempotency-Key; inline patients also require patients:write. Omitted actor context defaults to the authenticated service account as a system actor. Sign and submit each resulting order separately using orders:sign.

🔌 Usage

client.orders().createOrderBatch(
    CreateOrderBatchRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .practiceId("prac_01j2y8m6jcc9tt24af5pw9x1bc")
        .orders(
            Arrays.asList(
                CreateOrderBatchRequestOrdersItem
                    .builder()
                    .prescriptions(
                        Arrays.asList(
                            CreateOrderBatchRequestOrdersItemPrescriptionsItem
                                .builder()
                                .daysSupply(1)
                                .dispensing(
                                    CreateOrderBatchRequestOrdersItemPrescriptionsItemDispensing
                                        .builder()
                                        .build()
                                )
                                .directions("directions")
                                .medicationId("cat_01j2y8m6jcc9tt24af5pw9x1bc")
                                .quantity(
                                    CreateOrderBatchRequestOrdersItemPrescriptionsItemQuantity.of(CreateOrderBatchRequestOrdersItemPrescriptionsItemQuantityOne.INFINITY)
                                )
                                .quantityUnit("quantityUnit")
                                .refills(1)
                                .build()
                        )
                    )
                    .build()
            )
        )
        .build()
);

⚙️ Parameters

idempotencyKey: String

affinityActorId: Optional<String> — Required for user actors and optional for system actors. Omit both actor headers to use the authenticated service account as a system actor.

affinityActorType: Optional<String> — Use user when a person initiated the action and system for autonomous work. Omit both actor headers to default to system.

practiceId: String

userId: Optional<String>

prescriber: Optional<CreateOrderBatchRequestPrescriber>

orders: List<CreateOrderBatchRequestOrdersItem>

Webhooks

client.webhooks.listWebhookEndpoints() -> ListWebhookEndpointsResponse

📝 Description

Requires webhooks:read. Returns endpoints owned by the key organization, or the organization selected with X-Affinity-Organization-Id. Platform delegation requires a webhook grant in the key's mode.

🔌 Usage

client.webhooks().listWebhookEndpoints(
    ListWebhookEndpointsRequest
        .builder()
        .endingBefore("whe_01j2y8m6jcc9tt24af5pw9x1bc")
        .startingAfter("whe_01j2y8m6jcc9tt24af5pw9x1bc")
        .build()
);

⚙️ Parameters

endingBefore: Optional<String>

limit: Optional<Integer>

startingAfter: Optional<String>

affinityOrganizationId: Optional<String> — Defaults to the API key organization. A platform may select a practice or pharmacy only with an explicit webhook grant in this mode. This changes the webhook owner, not the caller or event subscriptions.

client.webhooks.createWebhookEndpoint(request) -> CreateWebhookEndpointResponse

📝 Description

Requires webhooks:write and Idempotency-Key. Defaults to the API key organization. A platform can select a practice or pharmacy owner with X-Affinity-Organization-Id and an explicit webhook grant. For platform-owned endpoints, practiceIds narrows delivery to selected connected practices. An empty filter receives all otherwise-authorized events.

🔌 Usage

client.webhooks().createWebhookEndpoint(
    CreateWebhookEndpointRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .url("url")
        .build()
);

⚙️ Parameters

affinityOrganizationId: Optional<String> — Defaults to the API key organization. A platform may select a practice or pharmacy only with an explicit webhook grant in this mode. This changes the webhook owner, not the caller or event subscriptions.

idempotencyKey: String

practiceIds: Optional<List<String>>

description: Optional<String>

payloadStyle: Optional<CreateWebhookEndpointRequestPayloadStyle>

subscribedEvents: Optional<List<CreateWebhookEndpointRequestSubscribedEventsItem>>

url: String

client.webhooks.deleteWebhookEndpoint(endpointId) -> DeleteWebhookEndpointResponse

🔌 Usage

client.webhooks().deleteWebhookEndpoint(
    "whe_01j2y8m6jcc9tt24af5pw9x1bc",
    DeleteWebhookEndpointRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .build()
);

⚙️ Parameters

endpointId: String

affinityOrganizationId: Optional<String> — Defaults to the API key organization. A platform may select a practice or pharmacy only with an explicit webhook grant in this mode. This changes the webhook owner, not the caller or event subscriptions.

idempotencyKey: String

client.webhooks.updateWebhookEndpoint(endpointId, request) -> UpdateWebhookEndpointResponse

📝 Description

Requires webhooks:write and Idempotency-Key. Updates an endpoint in the selected organization and mode. Omitted practiceIds preserves the filter; an empty array removes the practice filter. Subscription changes apply to newly generated events.

🔌 Usage

client.webhooks().updateWebhookEndpoint(
    "whe_01j2y8m6jcc9tt24af5pw9x1bc",
    UpdateWebhookEndpointRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .build()
);

⚙️ Parameters

endpointId: String

affinityOrganizationId: Optional<String> — Defaults to the API key organization. A platform may select a practice or pharmacy only with an explicit webhook grant in this mode. This changes the webhook owner, not the caller or event subscriptions.

idempotencyKey: String

practiceIds: Optional<List<String>>

description: Optional<String>

payloadStyle: Optional<UpdateWebhookEndpointRequestPayloadStyle>

status: Optional<UpdateWebhookEndpointRequestStatus>

subscribedEvents: Optional<List<UpdateWebhookEndpointRequestSubscribedEventsItem>>

url: Optional<String>

client.webhooks.rotateWebhookEndpointSecret(endpointId) -> RotateWebhookEndpointSecretResponse

🔌 Usage

client.webhooks().rotateWebhookEndpointSecret(
    "whe_01j2y8m6jcc9tt24af5pw9x1bc",
    RotateWebhookEndpointSecretRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .build()
);

⚙️ Parameters

endpointId: String

affinityOrganizationId: Optional<String> — Defaults to the API key organization. A platform may select a practice or pharmacy only with an explicit webhook grant in this mode. This changes the webhook owner, not the caller or event subscriptions.

idempotencyKey: String

client.webhooks.testWebhookEndpoint(endpointId) -> TestWebhookEndpointResponse

🔌 Usage

client.webhooks().testWebhookEndpoint(
    "whe_01j2y8m6jcc9tt24af5pw9x1bc",
    TestWebhookEndpointRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .build()
);

⚙️ Parameters

endpointId: String

affinityOrganizationId: Optional<String> — Defaults to the API key organization. A platform may select a practice or pharmacy only with an explicit webhook grant in this mode. This changes the webhook owner, not the caller or event subscriptions.

idempotencyKey: String

client.webhooks.listWebhookEvents() -> ListWebhookEventsResponse

🔌 Usage

client.webhooks().listWebhookEvents(
    ListWebhookEventsRequest
        .builder()
        .endingBefore("evt_01j2y8m6jcc9tt24af5pw9x1bc")
        .startingAfter("evt_01j2y8m6jcc9tt24af5pw9x1bc")
        .build()
);

⚙️ Parameters

endingBefore: Optional<String>

limit: Optional<Integer>

status: Optional<ListWebhookEventsRequestStatus>

startingAfter: Optional<String>

affinityOrganizationId: Optional<String> — Defaults to the API key organization. A platform may select a practice or pharmacy only with an explicit webhook grant in this mode. This changes the webhook owner, not the caller or event subscriptions.

client.webhooks.getWebhookEvent(eventId) -> GetWebhookEventResponse

🔌 Usage

client.webhooks().getWebhookEvent(
    "evt_01j2y8m6jcc9tt24af5pw9x1bc",
    GetWebhookEventRequest
        .builder()
        .build()
);

⚙️ Parameters

eventId: String

affinityOrganizationId: Optional<String> — Defaults to the API key organization. A platform may select a practice or pharmacy only with an explicit webhook grant in this mode. This changes the webhook owner, not the caller or event subscriptions.

client.webhooks.replayWebhookEvent(eventId) -> ReplayWebhookEventResponse

🔌 Usage

client.webhooks().replayWebhookEvent(
    "evt_01j2y8m6jcc9tt24af5pw9x1bc",
    ReplayWebhookEventRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .build()
);

⚙️ Parameters

eventId: String

affinityOrganizationId: Optional<String> — Defaults to the API key organization. A platform may select a practice or pharmacy only with an explicit webhook grant in this mode. This changes the webhook owner, not the caller or event subscriptions.

idempotencyKey: String

client.webhooks.listWebhookGrants() -> ListWebhookGrantsResponse

📝 Description

Requires webhooks:read on the owning practice or pharmacy key. Lists platform webhook grants in the key's mode. Platforms cannot list or grant themselves delegated access.

🔌 Usage

client.webhooks().listWebhookGrants(
    ListWebhookGrantsRequest
        .builder()
        .startingAfter("acct_01j2y8m6jcc9tt24af5pw9x1bc")
        .endingBefore("acct_01j2y8m6jcc9tt24af5pw9x1bc")
        .build()
);

⚙️ Parameters

limit: Optional<Integer>

startingAfter: Optional<String>

endingBefore: Optional<String>

client.webhooks.saveWebhookGrant(platformId, request) -> SaveWebhookGrantResponse

📝 Description

Requires webhooks:write on the owning practice or pharmacy key and Idempotency-Key. Grants or replaces a platform's webhook permissions in this mode. A practice must already be connected to that platform. The grant does not give the platform access to other API resources.

🔌 Usage

client.webhooks().saveWebhookGrant(
    "acct_01j2y8m6jcc9tt24af5pw9x1bc",
    SaveWebhookGrantRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .scopes(
            Arrays.asList(SaveWebhookGrantRequestScopesItem.WEBHOOKS_READ)
        )
        .build()
);

⚙️ Parameters

platformId: String

idempotencyKey: String

scopes: List<SaveWebhookGrantRequestScopesItem>

client.webhooks.revokeWebhookGrant(platformId) -> RevokeWebhookGrantResponse

📝 Description

Requires webhooks:write on the owning practice or pharmacy key and Idempotency-Key. Removes platform webhook access in this mode. Existing endpoints remain owned by the practice or pharmacy and continue operating.

🔌 Usage

client.webhooks().revokeWebhookGrant(
    "acct_01j2y8m6jcc9tt24af5pw9x1bc",
    RevokeWebhookGrantRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .build()
);

⚙️ Parameters

platformId: String

idempotencyKey: String

Team

client.team.registerUser(practiceId, request) -> RegisterUserResponse

📝 Description

Requires team:write and Idempotency-Key. Registers a practice member without an invitation. Test requires synthetic .test emails and Affinity Test NPIs. Live requires approved integration and practice access. Identity attestation records the integration's assertion; it does not verify login email or clinical credentials. Existing memberships and verified provider records are preserved. Use the returned user ID for orders and signing.

🔌 Usage

client.team().registerUser(
    "prac_01j2y8m6jcc9tt24af5pw9x1bc",
    RegisterUserRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .externalId("externalId")
        .email("email")
        .name("name")
        .role(RegisterUserRequestRole.ADMINISTRATOR)
        .identityAttestation(true)
        .build()
);

⚙️ Parameters

practiceId: String

idempotencyKey: String

externalId: String

email: String

name: String

role: RegisterUserRequestRole

roles: Optional<List<RegisterUserRequestRolesItem>>

profileDetails: Optional<RegisterUserRequestProfileDetails>

npi: Optional<String>

licenses: Optional<List<RegisterUserRequestLicensesItem>>

legalName: Optional<String>

displayName: Optional<String>

credentials: Optional<String>

address: Optional<RegisterUserRequestAddress>

phone: Optional<String>

locationIds: Optional<List<String>>

identityAttestation: Boolean

client.team.listPracticeTeamInvitations(practiceId) -> ListPracticeTeamInvitationsResponse

📝 Description

Requires team:read. Lists practice invitations, including invitations sent in Clinic. Filter by pending, expired, accepted, declined, or revoked status, exact email, or your integration externalId. Only your integration and API key mode can see its external identity and onboarding state. Follow person.nextActions after invitation acceptance.

🔌 Usage

client.team().listPracticeTeamInvitations(
    "prac_01j2y8m6jcc9tt24af5pw9x1bc",
    ListPracticeTeamInvitationsRequest
        .builder()
        .startingAfter("invite_01j2y8m6jcc9tt24af5pw9x1bc")
        .endingBefore("invite_01j2y8m6jcc9tt24af5pw9x1bc")
        .build()
);

⚙️ Parameters

practiceId: String

limit: Optional<Integer>

startingAfter: Optional<String>

endingBefore: Optional<String>

status: Optional<ListPracticeTeamInvitationsRequestStatus>

email: Optional<String>

externalId: Optional<String> — Match this integration's external identity in the API key's mode.

client.team.invitePracticeTeamPerson(practiceId, request) -> InvitePracticeTeamPersonResponse

📝 Description

Requires team:write on the practice key or its platform key. Use roles to combine administrator, prescriber, clinical_staff, billing, or developer presets. Ownership uses the protected owner designation. The singular role field remains available for single-role assignments. Creates a real organization invitation and optional prescriber setup. The recipient must accept with their Affinity account. Repeating the same external identity retries pending invitation delivery. Accepted invitations do not change existing access. Team membership is shared between Test and Live; the external identity is mode-scoped. Keys cannot accept invitations. Headless registration and signing use separate endpoints.

🔌 Usage

client.team().invitePracticeTeamPerson(
    "prac_01j2y8m6jcc9tt24af5pw9x1bc",
    InvitePracticeTeamPersonRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .externalId("externalId")
        .email("email")
        .name("name")
        .build()
);

⚙️ Parameters

practiceId: String

idempotencyKey: String

externalId: String

email: String

name: String

role: Optional<InvitePracticeTeamPersonRequestRole>

roles: Optional<List<InvitePracticeTeamPersonRequestRolesItem>>

profileDetails: Optional<InvitePracticeTeamPersonRequestProfileDetails>

npi: Optional<String>

licenses: Optional<List<InvitePracticeTeamPersonRequestLicensesItem>>

legalName: Optional<String>

displayName: Optional<String>

credentials: Optional<String>

address: Optional<InvitePracticeTeamPersonRequestAddress>

phone: Optional<String>

locationIds: Optional<List<String>>

client.team.getPracticeTeam(practiceId) -> GetPracticeTeamResponse

📝 Description

Requires team:read. Returns counts of members, invitations, and prescribers. Use the paginated members, prescribers, and invitations collections for individual records. Team access and clinician credentials are shared between Test and Live.

🔌 Usage

client.team().getPracticeTeam(
    "prac_01j2y8m6jcc9tt24af5pw9x1bc",
    GetPracticeTeamRequest
        .builder()
        .build()
);

⚙️ Parameters

practiceId: String

client.team.listPracticeTeamMembers(practiceId) -> ListPracticeTeamMembersResponse

📝 Description

Requires team:read. Search the roster by name or email, and filter by role or membership status. Includes members invited in Clinic, location access, and account-specific prescriber connections. Memberships are shared between Test and Live.

🔌 Usage

client.team().listPracticeTeamMembers(
    "prac_01j2y8m6jcc9tt24af5pw9x1bc",
    ListPracticeTeamMembersRequest
        .builder()
        .startingAfter("mbr_01j2y8m6jcc9tt24af5pw9x1bc")
        .endingBefore("mbr_01j2y8m6jcc9tt24af5pw9x1bc")
        .build()
);

⚙️ Parameters

practiceId: String

limit: Optional<Integer>

startingAfter: Optional<String>

endingBefore: Optional<String>

search: Optional<String>

role: Optional<ListPracticeTeamMembersRequestRole>

status: Optional<ListPracticeTeamMembersRequestStatus>

client.team.listPracticeTeamPrescribers(practiceId) -> ListPracticeTeamPrescribersResponse

📝 Description

Requires team:read. Filter practice prescribers by name, NPI, state, and practice status. Records include submitted licenses and their IDs. Signing authority also requires an active account connection, Live practice access, and prescription eligibility.

🔌 Usage

client.team().listPracticeTeamPrescribers(
    "prac_01j2y8m6jcc9tt24af5pw9x1bc",
    ListPracticeTeamPrescribersRequest
        .builder()
        .startingAfter("prov_01j2y8m6jcc9tt24af5pw9x1bc")
        .endingBefore("prov_01j2y8m6jcc9tt24af5pw9x1bc")
        .build()
);

⚙️ Parameters

practiceId: String

limit: Optional<Integer>

startingAfter: Optional<String>

endingBefore: Optional<String>

search: Optional<String>

npi: Optional<String>

state: Optional<String> — Match a submitted license jurisdiction. This does not establish signing eligibility.

status: Optional<ListPracticeTeamPrescribersRequestStatus>

client.team.getPracticeTeamMember(practiceId, memberId) -> GetPracticeTeamMemberResponse

📝 Description

Requires team:read. Returns current account membership, roles, location access, and prescriber connection. The member ID identifies practice access; it is not the integration user ID used by orders.

🔌 Usage

client.team().getPracticeTeamMember(
    "prac_01j2y8m6jcc9tt24af5pw9x1bc",
    "mbr_01j2y8m6jcc9tt24af5pw9x1bc",
    GetPracticeTeamMemberRequest
        .builder()
        .build()
);

⚙️ Parameters

practiceId: String

memberId: String

client.team.updatePracticeTeamMember(practiceId, memberId, request) -> UpdatePracticeTeamMemberResponse

📝 Description

Requires team:write. Supply role, status, or locationIds; omitted values stay unchanged. A role replaces existing roles. Disable access with status disabled. An empty locationIds array grants all practice locations. Ownership changes require an active practice owner using a personal API key; service keys manage non-owner memberships. The final active owner cannot be removed. Changes apply to both Test and Live. Sign-in email and account security remain account settings.

🔌 Usage

client.team().updatePracticeTeamMember(
    "prac_01j2y8m6jcc9tt24af5pw9x1bc",
    "mbr_01j2y8m6jcc9tt24af5pw9x1bc",
    UpdatePracticeTeamMemberRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .build()
);

⚙️ Parameters

practiceId: String

memberId: String

idempotencyKey: String

role: Optional<UpdatePracticeTeamMemberRequestRole>

roles: Optional<List<UpdatePracticeTeamMemberRequestRolesItem>>

status: Optional<UpdatePracticeTeamMemberRequestStatus>

locationIds: Optional<List<String>> — Replace location access. An empty array grants access to all practice locations.

client.team.getPracticeTeamPrescriber(practiceId, prescriberId) -> GetPracticeTeamPrescriberResponse

📝 Description

Requires team:read. Returns the clinical profile and submitted licenses, including license IDs. This is setup information, not a signing authorization.

🔌 Usage

client.team().getPracticeTeamPrescriber(
    "prac_01j2y8m6jcc9tt24af5pw9x1bc",
    "prov_01j2y8m6jcc9tt24af5pw9x1bc",
    GetPracticeTeamPrescriberRequest
        .builder()
        .build()
);

⚙️ Parameters

practiceId: String

prescriberId: String

client.team.updatePracticeTeamPrescriber(practiceId, prescriberId, request) -> UpdatePracticeTeamPrescriberResponse

📝 Description

Requires team:write. Set practiceStatus to inactive to remove prescribing access in this practice, or active to restore an existing association. This does not create membership or signing authority. Practice status applies to Test and Live. Shared identity and license edits require Affinity support.

🔌 Usage

client.team().updatePracticeTeamPrescriber(
    "prac_01j2y8m6jcc9tt24af5pw9x1bc",
    "prov_01j2y8m6jcc9tt24af5pw9x1bc",
    UpdatePracticeTeamPrescriberRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .build()
);

⚙️ Parameters

practiceId: String

prescriberId: String

idempotencyKey: String

displayName: Optional<String>

legalName: Optional<String>

credentials: Optional<String>

phone: Optional<String>

address: Optional<UpdatePracticeTeamPrescriberRequestAddress>

practiceStatus: Optional<UpdatePracticeTeamPrescriberRequestPracticeStatus>

client.team.createPracticeTeamLicense(practiceId, prescriberId, request) -> CreatePracticeTeamLicenseResponse

📝 Description

Requires team:write and an active accepted prescriber account connection in this practice. Adds a license. Expiration is optional, but must be in the future when supplied. An exact repeat returns the existing license; update an existing license with PATCH and its license ID. Licenses are shared across practices and Test/Live. Other licenses stay unchanged.

🔌 Usage

client.team().createPracticeTeamLicense(
    "prac_01j2y8m6jcc9tt24af5pw9x1bc",
    "prov_01j2y8m6jcc9tt24af5pw9x1bc",
    CreatePracticeTeamLicenseRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .state("state")
        .licenseNumber("licenseNumber")
        .build()
);

⚙️ Parameters

practiceId: String

prescriberId: String

idempotencyKey: String

state: String

licenseNumber: String

expiresAt: Optional<String>

client.team.updatePracticeTeamLicense(practiceId, prescriberId, licenseId, request) -> UpdatePracticeTeamLicenseResponse

📝 Description

Requires team:write and an active accepted prescriber account connection in this practice. Correct the state or license number, or set or clear the optional expiresAt value. A supplied expiration must be in the future. Other licenses stay unchanged. Changes apply across practices and Test/Live.

🔌 Usage

client.team().updatePracticeTeamLicense(
    "prac_01j2y8m6jcc9tt24af5pw9x1bc",
    "prov_01j2y8m6jcc9tt24af5pw9x1bc",
    "lic_01j2y8m6jcc9tt24af5pw9x1bc",
    UpdatePracticeTeamLicenseRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .build()
);

⚙️ Parameters

practiceId: String

prescriberId: String

licenseId: String

idempotencyKey: String

state: Optional<String>

licenseNumber: Optional<String>

expiresAt: Optional<String>

client.team.getPracticeTeamInvitation(practiceId, invitationId) -> GetPracticeTeamInvitationResponse

📝 Description

Requires team:read. Returns invitation status and current onboarding state for your integration. An accepted invitation can still have disabled membership or pending clinical review. Invitation tokens are never returned.

🔌 Usage

client.team().getPracticeTeamInvitation(
    "prac_01j2y8m6jcc9tt24af5pw9x1bc",
    "invite_01j2y8m6jcc9tt24af5pw9x1bc",
    GetPracticeTeamInvitationRequest
        .builder()
        .build()
);

⚙️ Parameters

practiceId: String

invitationId: String

client.team.revokePracticeTeamInvitation(practiceId, invitationId) -> RevokePracticeTeamInvitationResponse

📝 Description

Requires team:write. Revokes a pending or expired invitation and its pending prescriber account connection. Repeating the revoke returns the revoked invitation. Accepted invitations return 409; disable the member instead. Retains invitation history.

🔌 Usage

client.team().revokePracticeTeamInvitation(
    "prac_01j2y8m6jcc9tt24af5pw9x1bc",
    "invite_01j2y8m6jcc9tt24af5pw9x1bc",
    RevokePracticeTeamInvitationRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .build()
);

⚙️ Parameters

practiceId: String

invitationId: String

idempotencyKey: String

client.team.resendPracticeTeamInvitation(practiceId, invitationId) -> ResendPracticeTeamInvitationResponse

📝 Description

Requires team:write. Resends a pending or expired invitation with the same ID, recipient, roles, and locations. The previous link stops working and the new link expires in seven days. Accepted and revoked invitations return 409. A 502 means the invitation was saved but email delivery could not be confirmed; retry this operation.

🔌 Usage

client.team().resendPracticeTeamInvitation(
    "prac_01j2y8m6jcc9tt24af5pw9x1bc",
    "invite_01j2y8m6jcc9tt24af5pw9x1bc",
    ResendPracticeTeamInvitationRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .build()
);

⚙️ Parameters

practiceId: String

invitationId: String

idempotencyKey: String

Patients

client.patients.listPatientAddresses(practiceId, patientId) -> ListPatientAddressesResponse

🔌 Usage

client.patients().listPatientAddresses(
    "prac_01j2y8m6jcc9tt24af5pw9x1bc",
    "pat_01j2y8m6jcc9tt24af5pw9x1bc",
    ListPatientAddressesRequest
        .builder()
        .startingAfter("addr_01j2y8m6jcc9tt24af5pw9x1bc")
        .endingBefore("addr_01j2y8m6jcc9tt24af5pw9x1bc")
        .build()
);

⚙️ Parameters

practiceId: String

patientId: String

status: Optional<ListPatientAddressesRequestStatus>

startingAfter: Optional<String>

endingBefore: Optional<String>

limit: Optional<Integer>

affinityActorId: Optional<String> — Required for user actors and optional for system actors. Omit both actor headers to use the authenticated service account as a system actor.

affinityActorType: Optional<String> — Use user when a person initiated the action and system for autonomous work. Omit both actor headers to default to system.

client.patients.createPatientAddress(practiceId, patientId, request) -> CreatePatientAddressResponse

📝 Description

Returns the existing active address for a normalized duplicate. The first address becomes the default. API keys require Idempotency-Key.

🔌 Usage

client.patients().createPatientAddress(
    "prac_01j2y8m6jcc9tt24af5pw9x1bc",
    "pat_01j2y8m6jcc9tt24af5pw9x1bc",
    CreatePatientAddressRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .address(
            CreatePatientAddressRequestAddress
                .builder()
                .city("city")
                .line1("line1")
                .postalCode("postalCode")
                .state("state")
                .build()
        )
        .build()
);

⚙️ Parameters

practiceId: String

patientId: String

idempotencyKey: String

affinityActorId: Optional<String> — Required for user actors and optional for system actors. Omit both actor headers to use the authenticated service account as a system actor.

affinityActorType: Optional<String> — Use user when a person initiated the action and system for autonomous work. Omit both actor headers to default to system.

address: CreatePatientAddressRequestAddress

label: Optional<String>

preferredShipping: Optional<Boolean>

recipientName: Optional<String>

client.patients.archivePatientAddress(practiceId, patientId, addressId) -> ArchivePatientAddressResponse

📝 Description

Preserves the address ID and history. Archiving the default selects the oldest remaining active address. Existing orders remain unchanged.

🔌 Usage

client.patients().archivePatientAddress(
    "prac_01j2y8m6jcc9tt24af5pw9x1bc",
    "pat_01j2y8m6jcc9tt24af5pw9x1bc",
    "addr_01j2y8m6jcc9tt24af5pw9x1bc",
    ArchivePatientAddressRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .build()
);

⚙️ Parameters

practiceId: String

patientId: String

addressId: String

idempotencyKey: String

affinityActorId: Optional<String> — Required for user actors and optional for system actors. Omit both actor headers to use the authenticated service account as a system actor.

affinityActorType: Optional<String> — Use user when a person initiated the action and system for autonomous work. Omit both actor headers to default to system.

client.patients.updatePatientAddress(practiceId, patientId, addressId, request) -> UpdatePatientAddressResponse

🔌 Usage

client.patients().updatePatientAddress(
    "prac_01j2y8m6jcc9tt24af5pw9x1bc",
    "pat_01j2y8m6jcc9tt24af5pw9x1bc",
    "addr_01j2y8m6jcc9tt24af5pw9x1bc",
    UpdatePatientAddressRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .build()
);

⚙️ Parameters

practiceId: String

patientId: String

addressId: String

idempotencyKey: String

affinityActorId: Optional<String> — Required for user actors and optional for system actors. Omit both actor headers to use the authenticated service account as a system actor.

affinityActorType: Optional<String> — Use user when a person initiated the action and system for autonomous work. Omit both actor headers to default to system.

address: Optional<UpdatePatientAddressRequestAddress>

label: Optional<String>

recipientName: Optional<String>

preferredShipping: Optional<Boolean>

client.patients.setDefaultPatientAddress(practiceId, patientId, addressId) -> SetDefaultPatientAddressResponse

📝 Description

Changes delivery selection for future drafts, without changing patient clinical location or existing signed orders.

🔌 Usage

client.patients().setDefaultPatientAddress(
    "prac_01j2y8m6jcc9tt24af5pw9x1bc",
    "pat_01j2y8m6jcc9tt24af5pw9x1bc",
    "addr_01j2y8m6jcc9tt24af5pw9x1bc",
    SetDefaultPatientAddressRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .build()
);

⚙️ Parameters

practiceId: String

patientId: String

addressId: String

idempotencyKey: String

affinityActorId: Optional<String> — Required for user actors and optional for system actors. Omit both actor headers to use the authenticated service account as a system actor.

affinityActorType: Optional<String> — Use user when a person initiated the action and system for autonomous work. Omit both actor headers to default to system.

client.patients.listPatients(practiceId) -> ListPatientsResponse

📝 Description

Lists patients in one practice and mode. Use externalId for an exact match in the calling integration's namespace. Use externalIdentitySource with externalIdentityValue to search an explicit alias. Identity matching is case-sensitive after trimming whitespace. Other filters also apply.

🔌 Usage

client.patients().listPatients(
    "prac_01j2y8m6jcc9tt24af5pw9x1bc",
    ListPatientsRequest
        .builder()
        .endingBefore("pat_01j2y8m6jcc9tt24af5pw9x1bc")
        .startingAfter("pat_01j2y8m6jcc9tt24af5pw9x1bc")
        .build()
);

⚙️ Parameters

practiceId: String

endingBefore: Optional<String>

externalId: Optional<String>

externalIdentitySource: Optional<String>

externalIdentityValue: Optional<String>

gender: Optional<ListPatientsRequestGender>

lastOrderAfter: Optional<String>

lastOrderBefore: Optional<String>

limit: Optional<Integer>

program: Optional<String>

query: Optional<String>

sort: Optional<ListPatientsRequestSort>

startingAfter: Optional<String>

states: Optional<String>

status: Optional<ListPatientsRequestStatus>

affinityActorId: Optional<String> — Required for user actors and optional for system actors. Omit both actor headers to use the authenticated service account as a system actor.

affinityActorType: Optional<String> — Use user when a person initiated the action and system for autonomous work. Omit both actor headers to default to system.

client.patients.createPatient(practiceId, request) -> CreatePatientResponse

📝 Description

Creates a patient or resolves a matching externalId or external identity within this practice and mode. externalId belongs to the calling integration; externalIdentities holds aliases from other systems. Resolution preserves existing demographics; use PATCH to update them. Conflicting identifiers return 409. Email never merges patients. API keys require Idempotency-Key.

🔌 Usage

client.patients().createPatient(
    "prac_01j2y8m6jcc9tt24af5pw9x1bc",
    CreatePatientRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .dateOfBirth("dateOfBirth")
        .name(
            CreatePatientRequestName
                .builder()
                .first("first")
                .last("last")
                .build()
        )
        .build()
);

⚙️ Parameters

practiceId: String

idempotencyKey: String

affinityActorId: Optional<String> — Required for user actors and optional for system actors. Omit both actor headers to use the authenticated service account as a system actor.

affinityActorType: Optional<String> — Use user when a person initiated the action and system for autonomous work. Omit both actor headers to default to system.

address: Optional<CreatePatientRequestAddress>

clinicalProfile: Optional<CreatePatientRequestClinicalProfile>

dateOfBirth: String

email: Optional<String>

externalId: Optional<String>

externalIdentities: Optional<List<CreatePatientRequestExternalIdentitiesItem>>

addresses: Optional<List<CreatePatientRequestAddressesItem>>

encounters: Optional<List<CreatePatientRequestEncountersItem>>

gender: Optional<CreatePatientRequestGender>

locationId: Optional<String>

metadata: Optional<Map<String, Object>>

medicalRecordNumber: Optional<String>

measurements: Optional<List<CreatePatientRequestMeasurementsItem>>

name: CreatePatientRequestName

phone: Optional<String>

programs: Optional<List<CreatePatientRequestProgramsItem>>

client.patients.getPatient(practiceId, patientId) -> GetPatientResponse

📝 Description

Returns one patient in the authorized practice and mode.

🔌 Usage

client.patients().getPatient(
    "prac_01j2y8m6jcc9tt24af5pw9x1bc",
    "pat_01j2y8m6jcc9tt24af5pw9x1bc",
    GetPatientRequest
        .builder()
        .build()
);

⚙️ Parameters

practiceId: String

patientId: String

affinityActorId: Optional<String> — Required for user actors and optional for system actors. Omit both actor headers to use the authenticated service account as a system actor.

affinityActorType: Optional<String> — Use user when a person initiated the action and system for autonomous work. Omit both actor headers to default to system.

client.patients.deletePatient(practiceId, patientId) -> DeletePatientResponse

📝 Description

Requires patients:write and Idempotency-Key for API keys. Permanently deletes a patient with no order history. Any order history returns 409; use Update patient with status archived instead. Available to practice keys and authorized platform keys. Reusing the same idempotency key returns the original deletion result.

🔌 Usage

client.patients().deletePatient(
    "prac_01j2y8m6jcc9tt24af5pw9x1bc",
    "pat_01j2y8m6jcc9tt24af5pw9x1bc",
    DeletePatientRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .build()
);

⚙️ Parameters

practiceId: String

patientId: String

idempotencyKey: String

affinityActorId: Optional<String> — Required for user actors and optional for system actors. Omit both actor headers to use the authenticated service account as a system actor.

affinityActorType: Optional<String> — Use user when a person initiated the action and system for autonomous work. Omit both actor headers to default to system.

client.patients.updatePatient(practiceId, patientId, request) -> UpdatePatientResponse

📝 Description

Updates a patient in the current practice and mode. Omitted fields remain unchanged; null clears an optional field. externalId updates the calling integration's identifier. externalIdentities replaces its explicit aliases. Identifiers cannot be reassigned from another patient. API keys require Idempotency-Key.

🔌 Usage

client.patients().updatePatient(
    "prac_01j2y8m6jcc9tt24af5pw9x1bc",
    "pat_01j2y8m6jcc9tt24af5pw9x1bc",
    UpdatePatientRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .build()
);

⚙️ Parameters

practiceId: String

patientId: String

idempotencyKey: String

affinityActorId: Optional<String> — Required for user actors and optional for system actors. Omit both actor headers to use the authenticated service account as a system actor.

affinityActorType: Optional<String> — Use user when a person initiated the action and system for autonomous work. Omit both actor headers to default to system.

address: Optional<UpdatePatientRequestAddress>

clinicalProfile: Optional<UpdatePatientRequestClinicalProfile>

dateOfBirth: Optional<String>

email: Optional<String>

externalId: Optional<String>

externalIdentities: Optional<List<UpdatePatientRequestExternalIdentitiesItem>>

addresses: Optional<List<UpdatePatientRequestAddressesItem>>

encounters: Optional<List<UpdatePatientRequestEncountersItem>>

gender: Optional<UpdatePatientRequestGender>

locationId: Optional<String>

metadata: Optional<Map<String, Object>>

medicalRecordNumber: Optional<String>

measurements: Optional<List<UpdatePatientRequestMeasurementsItem>>

name: Optional<UpdatePatientRequestName>

programs: Optional<List<UpdatePatientRequestProgramsItem>>

phone: Optional<String>

status: Optional<UpdatePatientRequestStatus>

client.patients.getPatientAllergies(practiceId, patientId) -> GetPatientAllergiesResponse

📝 Description

Returns the patient's structured allergy entries and review status. A not_reviewed status is not a no-known-allergies assertion and blocks clinical review and signing.

🔌 Usage

client.patients().getPatientAllergies(
    "prac_01j2y8m6jcc9tt24af5pw9x1bc",
    "pat_01j2y8m6jcc9tt24af5pw9x1bc",
    GetPatientAllergiesRequest
        .builder()
        .build()
);

⚙️ Parameters

practiceId: String

patientId: String

affinityActorId: Optional<String> — Required for user actors and optional for system actors. Omit both actor headers to use the authenticated service account as a system actor.

affinityActorType: Optional<String> — Use user when a person initiated the action and system for autonomous work. Omit both actor headers to default to system.

client.patients.replacePatientAllergies(practiceId, patientId, request) -> ReplacePatientAllergiesResponse

📝 Description

Replaces the patient's structured allergy record. Sending no_known is the explicit no-known-allergies acknowledgement; recorded requires at least one entry. Idempotency-Key is required.

🔌 Usage

client.patients().replacePatientAllergies(
    "prac_01j2y8m6jcc9tt24af5pw9x1bc",
    "pat_01j2y8m6jcc9tt24af5pw9x1bc",
    ReplacePatientAllergiesRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .reviewStatus(ReplacePatientAllergiesRequestReviewStatus.NOT_REVIEWED)
        .allergies(
            Arrays.asList(
                ReplacePatientAllergiesRequestAllergiesItem
                    .builder()
                    .category(ReplacePatientAllergiesRequestAllergiesItemCategory.DRUG)
                    .source(ReplacePatientAllergiesRequestAllergiesItemSource.DOCTOR)
                    .substance("substance")
                    .verificationStatus(ReplacePatientAllergiesRequestAllergiesItemVerificationStatus.UNCONFIRMED)
                    .reactions(
                        Arrays.asList(
                            ReplacePatientAllergiesRequestAllergiesItemReactionsItem
                                .builder()
                                .display("display")
                                .build()
                        )
                    )
                    .type(
                        Nullable.ofNull()
                    )
                    .build()
            )
        )
        .build()
);

⚙️ Parameters

practiceId: String

patientId: String

idempotencyKey: String

affinityActorId: Optional<String> — Required for user actors and optional for system actors. Omit both actor headers to use the authenticated service account as a system actor.

affinityActorType: Optional<String> — Use user when a person initiated the action and system for autonomous work. Omit both actor headers to default to system.

allergies: List<ReplacePatientAllergiesRequestAllergiesItem>

reviewStatus: ReplacePatientAllergiesRequestReviewStatus

Practices

client.practices.listPractices() -> ListPracticesResponse

📝 Description

Returns the practices that belong to the platform. The default Affinity-Version is 2026-09-28.

🔌 Usage

client.practices().listPractices(
    ListPracticesRequest
        .builder()
        .endingBefore("prac_01j2y8m6jcc9tt24af5pw9x1bc")
        .startingAfter("prac_01j2y8m6jcc9tt24af5pw9x1bc")
        .build()
);

⚙️ Parameters

search: Optional<String> — Case-insensitive search by practice name or external ID.

endingBefore: Optional<String>

limit: Optional<Integer>

startingAfter: Optional<String>

client.practices.createPractice(request) -> CreatePracticeResponse

📝 Description

Creates a practice owned by the platform. Set liveEnabled to true to enable Live access at creation with an approved platform and a Live request. Defaults to false. Requires practices:write. Send Idempotency-Key when you retry the same request.

🔌 Usage

client.practices().createPractice(
    CreatePracticeRequest
        .builder()
        .address(
            CreatePracticeRequestAddress
                .builder()
                .city("Los Angeles")
                .line1("100 Practice Way")
                .postalCode("90001")
                .state("CA")
                .country("US")
                .build()
        )
        .attestations(
            CreatePracticeRequestAttestations
                .builder()
                .authorizedPracticeRelationship(true)
                .authorizedPhiTransfer(true)
                .minimumNecessaryPhi(true)
                .providerDataAccuracy(true)
                .build()
        )
        .name("Example Medical Group")
        .externalId("practice_123")
        .legalName("Example Medical Group PLLC")
        .metadata(
            new HashMap<String, Object>() {{
                put("key", "value");
            }}
        )
        .prescribers(
            Optional.of(
                Arrays.asList(
                    CreatePracticeRequestPrescribersItem
                        .builder()
                        .name("Alex Morgan")
                        .npi("1234567893")
                        .credentials("MD")
                        .licenseStates(
                            Arrays.asList("CA")
                        )
                        .build()
                )
            )
        )
        .primaryContact(
            CreatePracticeRequestPrimaryContact
                .builder()
                .email("operations@example-practice.com")
                .name("Jordan Lee")
                .build()
        )
        .supportEmail("support@example-practice.com")
        .build()
);

⚙️ Parameters

idempotencyKey: Optional<String>

liveEnabled: Optional<Boolean> — Enable Live access at creation. Requires an approved platform and a Live request. Defaults to false.

address: CreatePracticeRequestAddress

attestations: CreatePracticeRequestAttestations

complianceContact: Optional<CreatePracticeRequestComplianceContact>

externalId: Optional<String>

legalName: Optional<String>

metadata: Optional<Map<String, Object>>

name: String

prescribers: Optional<List<CreatePracticeRequestPrescribersItem>>

primaryContact: Optional<CreatePracticeRequestPrimaryContact>

supportEmail: Optional<String>

supportPhone: Optional<String>

timezone: Optional<String> — Optional IANA timezone override. Omit to leave unchanged; null clears it. No timezone is inferred when creating a record.

client.practices.getPractice(practiceId) -> GetPracticeResponse

📝 Description

Returns one practice that belongs to the platform.

🔌 Usage

client.practices().getPractice(
    "prac_01j2y8m6jcc9tt24af5pw9x1bc",
    GetPracticeRequest
        .builder()
        .build()
);

⚙️ Parameters

practiceId: String

client.practices.updatePractice(practiceId, request) -> UpdatePracticeResponse

📝 Description

Updates one practice owned by the platform. Set liveEnabled to true or false to control Live access with an approved platform and a Live request. Affinity Admin decisions take precedence. Requires practices:write. Send Idempotency-Key when you retry the same request.

🔌 Usage

client.practices().updatePractice(
    "prac_01j2y8m6jcc9tt24af5pw9x1bc",
    UpdatePracticeRequest
        .builder()
        .build()
);

⚙️ Parameters

practiceId: String

idempotencyKey: Optional<String>

liveEnabled: Optional<Boolean> — Enable or disable Live access for an owned practice. Requires an approved platform and a Live request. Affinity Admin decisions take precedence.

address: Optional<UpdatePracticeRequestAddress>

attestations: Optional<UpdatePracticeRequestAttestations>

complianceContact: Optional<UpdatePracticeRequestComplianceContact>

externalId: Optional<String>

legalName: Optional<String>

metadata: Optional<Map<String, Object>>

name: Optional<String>

prescribers: Optional<List<UpdatePracticeRequestPrescribersItem>>

primaryContact: Optional<UpdatePracticeRequestPrimaryContact>

supportEmail: Optional<String>

supportPhone: Optional<String>

timezone: Optional<String> — Optional IANA timezone override. Omit to leave unchanged; null clears it. No timezone is inferred when creating a record.

Platform Pricing

client.platformPricing.platformPublicApiSellingPricesReadSellingPrice(catalogItemId) -> PlatformPublicApiSellingPricesReadSellingPriceResponse

📝 Description

Requires selling_prices:read. Omit practiceId for the platform default, or supply a managed practice. A null amount inherits the next applicable price. Amounts use the catalog pricing basis, in USD cents. purchaseAmountCents is the platform's Affinity purchase price for that same basis. requiresReview indicates changed product pricing terms, not a below-purchase-price discount.

🔌 Usage

client.platformPricing().platformPublicApiSellingPricesReadSellingPrice(
    "cat_01j2y8m6jcc9tt24af5pw9x1bc",
    PlatformPublicApiSellingPricesReadSellingPriceRequest
        .builder()
        .practiceId("prac_01j2y8m6jcc9tt24af5pw9x1bc")
        .build()
);

⚙️ Parameters

catalogItemId: String

practiceId: Optional<String>

client.platformPricing.platformPublicApiSellingPricesUpdateSellingPrice(catalogItemId, request) -> PlatformPublicApiSellingPricesUpdateSellingPriceResponse

📝 Description

Requires selling_prices:write. Sets a platform default or managed practice override in the current Test/Live mode. Send baseVersion from Read selling price. Null removes the override. Prices use the catalog pricing basis. Intentional discounts below purchaseAmountCents are allowed; compare these amounts to warn about selling below your Affinity purchase price. This does not change the platform's Affinity purchase price or collect practice payments.

🔌 Usage

client.platformPricing().platformPublicApiSellingPricesUpdateSellingPrice(
    "cat_01j2y8m6jcc9tt24af5pw9x1bc",
    PlatformPublicApiSellingPricesUpdateSellingPriceRequest
        .builder()
        .idempotencyKey("Idempotency-Key")
        .baseVersion(1)
        .build()
);

⚙️ Parameters

catalogItemId: String

idempotencyKey: String

practiceId: Optional<String>

amountCents: Optional<Integer>

baseVersion: Integer