๐ Prescription Creation โ Field Reference
This endpoint allows the creation of single or multiple prescriptions for a patient in one API call.
Each prescription in the request array is processed individually, enabling efficient handling of bulk prescription submissions.
The system validates each prescription and returns a comprehensive response indicating the success or failure of each entry.
| Field | Type | Description | Required |
|---|---|---|---|
| x-api-key | String | API Key for authentication | Y |
| clinicId | String | Clinic ID in header overrides route parameter | Y |
| Field | Type | Description | Required |
|---|---|---|---|
| ext_tracking_id | String | Unique tracking ID in the external system; used for callbacks if provided. | N |
| patientId | String | Patient ID returned during patient creation. | Y |
| external_patient_id | String | External patient ID from the source system; used if provided. | N |
| npi | String | Prescriberโs NPI number. | Y |
| ndc | String | NDC of the drug; validated against drug catalog. | Y |
| isControlledDrug | boolean | Indicates if the drug is controlled. false for non-controlled drugs. | Y |
| dea | String | Required only if isControlledDrug is true. | Y/N |
| sig | String | Prescription directions. | Y |
| quantity | Number | Must be a positive integer. | Y |
| days_supply | Number | Must be a positive integer. | Y |
| refills | Number | Optional; positive integer; 0 = no refills. | N |
| notes | String | Optional additional notes. | N |
| isSubAllowed | boolean | Indicates if substitution is allowed; defaults to false if not provided. | Y |
| isAutoFlow | boolean | Controls auto-order creation. Defaults to true. | N |
| prescriberSig | String | Prescriberโs signature โ optional for electronic prescriptions. | N |
| rxAttachment | File/Base64 | Optional attachment (e.g., scanned Rx). | N |
| rxCreateDate | String | ISO-8601 date the prescription was created. | Y |
| rxTransmitDate | String | ISO-8601 transmit date; defaults to current date if not provided. | N |
| Notice | Details |
|---|---|
| Required Objects | Unless specified, all objects are required. |
| Validation | All field-level, boolean, date, and clinic/API checks are applied before processing. |
| Unsupported | isControlledDrug = true is not currently supported; fields included for future use. |
| Status Code | Error | Description | Solution |
|---|---|---|---|
| 401 | Authentication Failed | Invalid API key or clinicId combination | Correct combination of ClinicId and API key to be provided |
| 404 | Validation Failed | PATIENT_NOT_FOUND | Patient Id is not found in the system. |
| 409 | Validation Failed | PATIENT_CLINIC_MISMATCH | Patient does not belong to the clinic provided. |
| 409 | Validation failed | PRESCRIBER_CLINIC_MISMTACH | Prescriber does not belong to the specified clinic |
| 500 | Validation failed | Drug with NDC starting with 999991090 not found (first 9 digits, ignoring dashes) | NDC should be valid and it is validated against drug catalog |
Clinic identifier
API Key for authentication
Unique PatientID of the patient
"3a4b8a88-83e9-4ebd-ba62-dcbd218583ab"
External patient ID in source system
"PAT-2025-001"
Patient address information
{
"address1": "465 W President George Bush Hwy",
"address2": "Suite 240",
"city": "Richardson",
"state": "TX",
"zipCode": "75080",
"country": "USA"
}Array of prescription entries to be created for this patient
[
{
"external_tracking_id": "RX-2025-001",
"ndc": "12345-6789-01",
"npi": "1234567890",
"days_supply": 30,
"quantity": 30,
"sig": "Take one tablet by mouth once daily",
"refills": 2,
"isControlledDrug": false,
"notes": "Patient reports no side effects with previous prescription",
"isSubAllowed": true,
"isAutoFlow": true,
"rxCreateDate": "2025-10-06T10:00:00",
"rxTransmitDate": "2025-10-06T10:00:00",
"dea": "",
"rxAttachment": "",
"prescriberSig": ""
}
]Prescriptions added successfully.