API Documentation: S2S DOH API V 1.6Interactive API documentation

DOH Endpoints

Card-limit and medical-dispense-history integrations for the Department of Health.

All endpoints require an administrative authorization token in the Authorization: Bearer <token> header.
GET/v1/doh/connection/statusCheck the DOH API connection↑ Back to top

Reports whether the DOH API is reachable and whether the supplied authorization token is accepted. Use it to confirm connectivity and token validity before calling the card-limit or purchase-history operations. The request takes no parameters other than the authorization header.

Parameters

NameInDescription
Authorization
required
header
Bearer token
Administrative authorization token. No query parameters are required.

Try it out

This operation takes no parameters. Supply the bearer token above and execute the request.

Request URL

Server response

Successful Response

The endpoint returns the standard { status, message, data } envelope. A status of ok means the DOH API accepted the token and answered the request.

{
  "status": "ok",
  "message": "",
  "data": {
    "organizationId": 3682,
    "organizationName": "POS Sandbox - Test 7A",
    "locationId": 5102,
    "address": "300 Test 7A Medical Retail Way",
    "city": "Las Cruces",
    "posApiConnectionStatus": "prepared"
  }
}

Response Fields

FieldTypeDescription
statusstringok when the connection check succeeded; error otherwise.
messagestringEmpty on success; carries the failure reason when status is error.
datastringConnection-status payload. Currently returned empty; treat the envelope status as the connection indicator.

Unauthorized

Returned with HTTP 401 when the bearer token is missing, malformed, expired, or fails verification.

{
  "status": "error",
  "message": "Unauthorized.",
  "data": null
}

Endpoint-Specific Errors

Error codeTypical message or conditionMeaning
UNAUTHORIZEDUnauthorized.The authorization token was missing, expired, or rejected.
CONNECTION_STATUS_FAILEDUnable to process request. DOH API request timed out.The DOH API did not answer within the request timeout.
CONNECTION_STATUS_FAILEDUnable to process request. DOH API authorization failed.The DOH API rejected the service credentials configured for this environment.



GET/v1/doh/cardPurchaseHistoryGet purchase history↑ Back to top

Returns medical dispense history for the requested cannabis card.

Parameters

NameInDescription
medicalCannabisCardId
required
query
string
Medical cannabis card identifier whose history will be returned.
Authorization
required
header
Bearer token
Administrative authorization token.

Try it out

Request URL

Server response

Successful Response

{
  "status": "ok",
  "message": "",
  "data": {
    "medicalCannabisCardId": "2Q78Q47AJF",
    "patientMedicalIdentifierId": "2Q78Q47AJF",
    "cardType": "Patient",
    "patient": {
      "firstName": "Dave",
      "lastName": "Isda",
      "expirationDate": "2028-04-27T00:00:00.000Z",
      "applicationId": "2Q78Q47AJF",
      "customerId": "165-patient",
      "dob": "01/01/2000"
    },
    "caregiver": null,
    "units": {
      "limit": 425,
      "usedLast90Days": 13,
      "remaining": 412,
      "milligramsPerUnit": 200
    },
    "dispenseTicketCount": 2,
    "dispenseItemCount": 2,
    "dispenseRows": [
      {
        "retailDispenseTicketId": 103,
        "orderNumber": "7253347155997584",
        "organizationId": 3637,
        "locationId": 5005,
        "createdDateTime": "2026-07-17 19:52:49",
        "dispenseDateTime": "2026-07-17 19:52:49",
        "dispenseType": "delivery",
        "deliveryFulfillmentType": "retailer",
        "ticketTotalItems": 1,
        "ticketMedicalUnitsTotal": 5,
        "retailDispenseTicketItemId": 125,
        "inventoryId": 509,
        "inventoryBarCode": "0803060206011198",
        "productTypeId": 36,
        "productType": "Cannabis Packaged",
        "productName": null,
        "strainName": "OG Ravens #1",
        "quantity": 1,
        "unit": "pkg",
        "medicalCalculationType": "gram_units",
        "itemMedicalUnits": 5,
        "delta9ThcMgDispensed": 100,
        "cannabisGramsPerPackage": 5,
        "delta9ThcMgPerPackage": 100,
        "plantCount": 0
      },
      {
        "retailDispenseTicketId": 108,
        "orderNumber": "4651517319134044",
        "organizationId": 3663,
        "locationId": 5064,
        "createdDateTime": "2026-07-22 23:13:39",
        "dispenseDateTime": "2026-07-22 23:13:39",
        "dispenseType": "in-store",
        "deliveryFulfillmentType": null,
        "ticketTotalItems": 1,
        "ticketMedicalUnitsTotal": 8,
        "retailDispenseTicketItemId": 131,
        "inventoryId": 1549,
        "inventoryBarCode": "0719303830336053",
        "productTypeId": 36,
        "productType": "Cannabis Packaged",
        "productName": null,
        "strainName": "GG#1",
        "quantity": 1,
        "unit": "pkg",
        "medicalCalculationType": "gram_units",
        "itemMedicalUnits": 8,
        "delta9ThcMgDispensed": 80,
        "cannabisGramsPerPackage": 8,
        "delta9ThcMgPerPackage": 80,
        "plantCount": 0
      }
    ]
  }
}

Response Fields

FieldTypeDescription
medicalCannabisCardIdstringCard ID submitted with the lookup request.
cardTypestringIndicates whether the submitted card belongs to a Patient or Caregiver.
patientobjectPatient information associated with the card.
caregiverobject or nullCaregiver information when the submitted card is a caregiver card. Otherwise null.
unitsobjectCurrent Medical-unit information for the patient.
dispenseTicketCount numberTotal number of dispense tickets associated with the patient.
dispenseItemCount numberTotal number of dispense items associated with the patient.
dispenseRows objectList of dispense records associated with the patient.

Patient Fields

FieldTypeDescription
firstNamestringPatient's first name.
lastNamestringPatient's last name.
expirationDatedate/time or nullPatient's card expiration date.
applicationIdstringPatient's application ID.
customerId stringCustomer identifier associated with the patient.
dobstringPatient's date of birth.

Caregiver Fields

FieldTypeDescription
firstNamestringCaregiver's first name.
lastNamestringCaregiver's last name.
expirationDatedate/time or nullCaregiver's card expiration date.
applicationIdstringCaregiver's application ID.
customerId stringCustomer identifier associated with the caregiver.
dobstringCaregiver's date of birth.

The caregiver object is returned only when cardType is Caregiver.

Unit Fields

FieldTypeDescription
limitnumberMaximum Medical units allowed during the applicable 90-day period.
usedLast90DaysnumberMedical units recorded as used by the patient during the previous 90 days.
remainingnumberMedical units currently available to the patient.
milligramsPerUnit numberNumber of milligrams represented by one medical unit.

Dispense Row Fields

FieldTypeDescription
createdDateTimedate/timeDate and time when the dispense ticket was created.
dispenseDateTimedate/timeDate and time when the item was dispensed.
dispenseTypestringIndicates how the dispense was completed, such as in-store or delivery.
deliveryFulfillmentTypestring or nullFulfillment type for a delivery dispense. Returns null when not applicable.
ticketTotalItemsnumberTotal number of items included in the dispense ticket.
ticketMedicalUnitsTotalnumberTotal medical units associated with the dispense ticket.
retailDispenseTicketItemIdnumberUnique identifier for the dispense ticket item.
inventoryIdnumberIdentifier of the inventory item dispensed.
inventoryBarCodestringBarcode associated with the dispensed inventory item.
productTypeIdnumberIdentifier of the product type.
productTypestringType or category of the dispensed product.
productNamestring or nullName of the dispensed product, when available.
strainNamestringStrain name of the dispensed cannabis product.
quantitynumberQuantity of the product dispensed.
unitstringUnit of measurement for the quantity.
medicalCalculationTypestringMedical-unit calculation method used for the dispensed product.
itemMedicalUnitsnumberNumber of medical units associated with the dispense item.
delta9ThcMgDispensednumberAmount of Delta-9 THC, in milligrams, dispensed for the item.
cannabisGramsPerPackagenumberAmount of cannabis, in grams, contained in the package.
delta9ThcMgPerPackagenumberAmount of Delta-9 THC, in milligrams, contained in the package.
plantCountnumberNumber of plants associated with the dispensed item.

Endpoint-Specific Errors

Error codeTypical message or conditionMeaning
INVALID_MEDICAL_CANNABIS_CARD_IDMedical Cannabis Card ID cannot exceed 100 characters.The top-level dispense object was missing or malformed.
MEDICAL_CARD_LOOKUP_FAILEDUnable to process request. Medical Cannabis Card ID not found.The logical sale identifier was already stored; reconcile through order lookup.
MEDICAL_CARD_LOOKUP_FAILEDUnable to process request. DOH API authorization failed.A request-field or business-rule validation failed.
MEDICAL_CARD_LOOKUP_FAILEDUnable to process request. DOH API request timed out.The location cannot perform the requested dispense.
MEDICAL_CARD_LOOKUP_FAILEDUnable to look up Medical Cannabis Card.The proposed Medical order exceeds the authoritative current balance.



POST/v1/doh/recordPatientMedicalCannabisCardReplacementRecord a card replacement↑ Back to top

Records that a patient's medical cannabis card was replaced, linking the retired card identifier to its replacement so that dispense history and 90-day unit usage continue to follow the patient onto the new card.

Parameters

NameInDescription
oldPatientMedicalCannabisCardId
required
body
string
Identifier of the card being replaced.
newPatientMedicalCannabisCardId
required
body
string
Identifier of the replacement card issued to the same patient.
Authorization
required
header
Bearer token
Administrative authorization token. The token must be issued for the DOH domain; tokens from other domains are rejected by the operation itself.
Content-Type
required
header
string
Must be application/json.

Request Body

{
  "oldPatientMedicalCannabisCardId": "4UX58G5R4G",
  "newPatientMedicalCannabisCardId": "47Y6UD25SE"
}

Try it out

Request URL

Request body

Server response

Successful Response

The replacement is forwarded to the authoritative service, and its payload is returned in the data object of the standard envelope.

{
  "status": "ok",
  "message": "",
  "data": {
    "patientMedicalCannabisCardReplacementId": 2,
    "oldPatientMedicalCannabisCardId": "KJH",
    "newPatientMedicalCannabisCardId": "KJHN",
    "createdDateTime": "2026-08-20 19:35:00"
  }
}

Response Fields

FieldTypeDescription
statusstringEnvelope status. ok when the request was processed without a transport or service error.
messagestringEmpty on success; carries the failure reason when the envelope status is error.
dataobjectResult reported by the authoritative service. Inspect its own status field to confirm the replacement was recorded.
data.statusstringerror when the replacement was rejected; any other value indicates the record was accepted.
data.messagestringExplanation accompanying data.status.
data.timestampdate-timeUTC time the result was produced.

Execute the request against your environment to confirm the exact fields the authoritative service currently returns inside data.

Card has already been replaced

{
  "status": "ok",
  "message": "",
  "data": {
    "status": "error",
    "errorCode": "PATIENT_MEDICAL_CARD_ALREADY_REPLACED",
    "message": "The old patient Medical Cannabis Card ID has already been replaced.",
    "data": null
  }
}

Non-DOH Token

When the bearer token verifies but was not issued for the DOH domain, the request is not forwarded. The envelope still reports HTTP 200 and status: "ok"; the rejection is carried inside data.

{
  "status": "ok",
  "message": "",
  "data": {
    "status": "error",
    "message": "Invalid DOH authorization token.",
    "timestamp": "2026-08-17T15:04:11.482Z",
    "data": null
  }
}

Unauthorized

Returned with HTTP 401 when the bearer token is missing, malformed, expired, or fails verification.

{
  "status": "error",
  "message": "Unauthorized.",
  "data": null
}

Endpoint-Specific Errors

Error codeTypical message or conditionMeaning
UNAUTHORIZEDUnauthorized.The authorization token was missing, expired, or failed verification.
INVALID_DOH_AUTHORIZATION_TOKENInvalid DOH authorization token.The token verified but was not issued for the DOH domain, so the replacement was not recorded.
CARD_REPLACEMENT_FAILEDUnable to process request. DOH API request timed out.The authoritative service did not answer within the 45-second request timeout.
CARD_REPLACEMENT_FAILEDUnable to record the medical cannabis card replacement.The authoritative service rejected the submitted card identifiers.