API reference

The named GraphQL queries and mutations at /api/graphql.

The GraphQL endpoint is /api/graphql. Generic Keystone queries exist for lists that allow them. The custom operations below are registered in features/keystone/mutations/index.ts. Consequential mutations take reason and attested, and many take an idempotencyKey.

Example: dispense

mutation Dispense($prescriptionId: ID!, $prescriptionItemId: ID!, $lotId: ID!) {
  recordPrescriptionDispensing(
    prescriptionId: $prescriptionId
    prescriptionItemId: $prescriptionItemId
    lotId: $lotId
    quantity: 30
    cashReceivedAmount: 1500
    auxiliaryWarnings: ["Take with food"]
    counselingOutcome: "offered_accepted"
    idempotencyKey: "rx-1042-fill-1"
    reason: "Verified label and lot"
    attested: true
  ) { success prescriptionId status }
}

Public and customer queries

publicPharmacyTenant, publicPharmacyLocations, publicPharmacyCatalog, publicPharmacyCategories, pharmacyCart, activePharmacyPaymentProviders, guestPharmacyOrder, lookupPharmacyOrder, pharmacyCustomerAccount, pharmacyCustomerOrder, pharmacyCustomerOrderDetails, pharmacyCustomerPrescriptionRequests, pharmacyPatientPortal, redirectToInit.

Operator queries

pharmacyOperationalSummary, pharmacyOnboardingState, pharmacyOperatorLocations, pharmacyCatalogQueue, pharmacyPosCatalog, pharmacyPosCustomers, pharmacyPosCashReceipt, pharmacyPrescriberDirectory, pharmacyPrescriptionIntakeOptions, pharmacyPrescriptionQueue, pharmacyPrescriptionWorklist, pharmacyPrescriptionTask, pharmacyPrescriptionRequestQueue, pharmacyFillPolicy, pharmacyFillWorkbench, pharmacyFillHistory, pharmacyInventoryReceiptOptions, pharmacyInventoryReceiptProductWorklist, pharmacyInventoryQueue, pharmacyInventoryLotTask, pharmacyRecallOpenOptions, pharmacyRecallQueue, pharmacyRecallWorklist, pharmacyRecallTask, pharmacyOrderQueue, pharmacyOrderTask, pharmacyPatientRecordOptions, pharmacyPatientAccountCandidates, pharmacyPatientDirectory, pharmacyPatientSafeView, pharmacyCredentialReviewOptions, pharmacyIntegrationStatus, pharmacyAuditTimeline, pharmacyOutboxTimeline, pharmacyOutboxQueue.

Mutations by area

AreaMutations
CustomerregisterPharmacyCustomer, updateActiveUser, createPharmacyCart, addPharmacyCartItem, updatePharmacyCartItem, removePharmacyCartItem, initiatePharmacyPaymentSession, submitPharmacyOrder, submitPharmacyPrescriptionRequest, requestPrescriptionRefill
PatientscreatePharmacyPatient, updatePharmacyPatientContact, recordPharmacyPatientAllergy, recordPharmacyPatientMedication, recordPharmacyPatientNoneKnown, linkPharmacyPatientAccount, resolvePharmacyPrescriptionRequest
PrescriptionsintakePharmacyPrescription, recordPrescriptionClinicalSafetyReview, holdPrescriptionForClinicalReReview, recordPrescriptionReview, authorizePrescriptionDispensing, recordPrescriptionDispensing
Fills and refillsrecordPharmacyFillPolicy, reservePharmacyPrescriptionFill, releasePharmacyPrescriptionFill, resolvePrescriptionRefill, requestPrescriptionTransfer, approvePrescriptionTransfer
CredentialsrecordPharmacyStaffCredentialReview, recordPharmacyPrescriberCredentialReview, recordPharmacyDrugReferenceReview
Inventory and recallsreceivePharmacyInventoryLot, adjustPharmacyInventoryLot, openPharmacyRecall, quarantineRecallLots, recordRecallExposureAction, disposeRecallLot, closePharmacyRecall
Orders and paymentstransitionOrderFulfillment, submitPharmacyPosCashOrder, recordPharmacyCashPolicy, refundPharmacyPayment, refundPharmacyCashPayment, reconcilePharmacyPaymentSession, handlePaymentProviderWebhook
Integrations and setupconfigurePharmacyIntegrationProvider, validatePharmacyPrescriber, submitPharmacyExternalWorkflow, refreshPharmacyExternalWorkflow, ingestPharmacyIntegrationWebhook, replayPharmacyOutboxEvent, runPharmacyOnboarding, setPharmacyOnboardingStatus

Patient-safe and guest projections leave out guest-token hashes, provider credentials, audit metadata, and outbox payloads. Requesting an omitted field fails at the schema.

HTTP routes

RoutePurpose
POST /api/graphqlGraphQL
POST /api/payment-webhooks/[providerId]Payment webhooks
POST /api/webhooks/integrations/[providerKey]eRx and insurance webhooks
/api/mcp-transport/[transport]MCP server
/api/completionDashboard AI chat

On this page