Use the NikoHealth External API to create a new order for an existing patient. You can see every endpoint below in Swagger.
Before You Start: Lookups
What you need | Endpoint | Example ID |
Service Location ID |
|
|
Referring Provider ID and Location ID |
|
|
Product ID |
|
|
Existing prescription (optional) |
|
|
Patient diagnoses (optional) |
|
|
The Service Location is the location in your organization that the order belongs to. If you have only one location, use the same ID for every order.
The referring provider’s location ID is the PrimaryLocation.Id returned by GET /v1/referring-providers.
Create the Order
POST /v1/patients/{patientId}/ordersPut the patient’s ID in the path of the URL.
Required Fields
Field | Notes |
| From |
| YYYY-MM-DD |
|
|
|
|
Common Optional Fields
Field | Notes |
| From |
| The referring provider’s location ID |
| YYYY-MM-DD |
| The products on the order (see below) |
| For home deliveries |
| Attach existing patient documents (numeric IDs) |
| From |
| Free text |
|
|
General.Products is deprecated. Use General.Items instead.
Items
Field | Notes |
|
|
| Required when |
| Required when |
| Must be greater than 0. |
| Optional unit of measure, from |
| Optional: |
| Optional, up to 4,000 characters |
Prescriptions
⚠️ If you include a referring provider on the order, the Prescription section becomes required. You can either:
Reference an existing prescription by passing its
Id(fromGET /v1/patients/{patientId}/prescriptions), orCreate a new prescription by passing the prescription details. It is created along with the order in the same POST.
Prescription Fields
Field | Notes |
| The existing prescription’s ID, when you’re referencing one |
| The prescription’s effective date, YYYY-MM-DD |
| The same value as |
| The same value as |
| The products this prescription covers, with length of need and diagnosis codes |
| An alternative to |
Prescription Products
Each entry is either a Primitive (a single product) or a Bundle (a parent product with Components).
Field | Notes |
| 20 characters, from |
| Greater than 0 |
| From 1 to 99 |
| An array of diagnosis codes |
Example: Order With a Referring Provider and a New Prescription
POST /v1/patients/10000105/orders
{
"General": {
"ServiceLocationId": "OL3b309d00aceae09bd4544bef2658410e",
"StartDate": "2026-11-10",
"Priority": "Normal",
"ReferralDate": "2026-11-10",
"ReferringProviderId": "RP01d8eb00863baa596d54c7ab32b5a2d8",
"ReferringProviderLocationId": "RL01d8eb00863b3ff9aef47dd9f5309dfa",
"Delivery": {
"Type": "HomeDelivery",
"ShipTo": "Jane Doe",
"Address": {
"AddressLine": "123 Main St",
"City": "Birmingham",
"State": "AL",
"Zip": "35203"
}
},
"Items": [
{
"Type": "Product",
"ProductId": "A05MW34SX96ZF71QT28K",
"QuantityInBaseUnits": 1
}
]
},
"Prescription": {
"EffectiveDate": "2026-11-10",
"TreatingProviderId": "RP01d8eb00863baa596d54c7ab32b5a2d8",
"TreatingProviderLocationId": "RL01d8eb00863b3ff9aef47dd9f5309dfa",
"Products": [
{
"Primitive": {
"ProductId": "A05MW34SX96ZF71QT28K",
"Count": 1,
"LengthOfNeed": 12,
"DiagnosisCodes": ["Z39.1"]
}
}
]
}
}
Example: Order Referencing an Existing Prescription
{
"General": {
"ServiceLocationId": "OL3b309d00aceae09bd4544bef2658410e",
"StartDate": "2026-11-10",
"Priority": "Normal",
"ReferringProviderId": "RP01d8eb00863baa596d54c7ab32b5a2d8",
"ReferringProviderLocationId": "RL01d8eb00863b3ff9aef47dd9f5309dfa",
"Delivery": { "Type": "HomeDelivery" },
"Items": [
{ "Type": "Product", "ProductId": "A05MW34SX96ZF71QT28K", "QuantityInBaseUnits": 1 }
]
},
"Prescription": {
"Id": "PP94adce00ef4bd958ee946025a6fe86a7",
"TreatingProviderId": "RP01d8eb00863baa596d54c7ab32b5a2d8",
"TreatingProviderLocationId": "RL01d8eb00863b3ff9aef47dd9f5309dfa"
}
}
Response: 201 Created
{ "Id": "SO05adce00ef4b092b90f42f97b2ec3e36" }
Common Errors
Code | Meaning |
400 | Invalid request, such as a missing required field, a missing prescription when a referring provider is included, or a bad enum value |
401 | The token is missing, expired or invalid |
403 | You don’t have permission to access this resource |
404 | The patient, or a referenced ID, wasn’t found |
429 | Too many requests |
