Prescriptions can also be created inline when you create an order. See Creating an Order via API. Use this article when you want to manage prescriptions on their own.
Before You Start: Lookups
What you need | Endpoint | Example |
Treating provider and location |
|
|
Product IDs |
|
|
Patient's diagnosis codes |
|
|
The treating provider is a referring provider record in NikoHealth. If they don't exist yet, create them first. See Referring Providers via API.
Create a Prescription
POST /v1/patients/{patientId}/prescriptions
Fields
Field | Required | Notes |
| ✅ |
|
| ✅ | The referring provider's ID |
|
| The referring provider's location ID |
|
| Prescribe specific products (see below) |
|
| Prescribe by HCPCS code instead of product (see below) |
Use Products, Hcpcs, or both.
Prescribing by Product
Each entry in Products is either a Primitive (a single product) or a Bundle (a bundle product and its components).
| Required | Notes |
| ✅ | Exactly 20 characters, from |
| ✅ | Quantity |
| ✅ | In months |
|
| ICD-10 codes, with the dot, e.g. |
|
| Free text |
| Required | Notes |
| ✅ | The bundle product's ID (20 characters) |
| ✅ | Quantity |
| ✅ | One |
|
| Free text |
Prescribing by HCPCS Code
| Required | Notes |
| ✅ | Exactly 5 characters, e.g. |
| ✅ | Quantity |
| ✅ | In months |
|
| ICD-10 codes |
|
| Free text |
Example: prescribe a product
POST /v1/patients/10000105/prescriptions
{
"EffectiveDate": "2026-11-10",
"TreatingProviderId": "RP01d8eb00863baa596d54c7ab32b5a2d8",
"TreatingProviderLocationId": "RL01d8eb00863b3ff9aef47dd9f5309dfa",
"Products": [
{
"Primitive": {
"ProductId": "P31SM48ZK95CX72GA60R",
"Count": 1,
"LengthOfNeed": 12,
"DiagnosisCodes": ["G47.33"]
}
}
]
}
Example: prescribe by HCPCS code
{
"EffectiveDate": "2026-11-10",
"TreatingProviderId": "RP01d8eb00863baa596d54c7ab32b5a2d8",
"TreatingProviderLocationId": "RL01d8eb00863b3ff9aef47dd9f5309dfa",
"Hcpcs": [
{
"Code": "E0601",
"Count": 1,
"LengthOfNeed": 99,
"DiagnosisCodes": ["G47.33"]
}
]
}
Response: 201 Created
{ "Id": "PP94adce00ef4bd958ee946025a6fe86a7" }
Use this prescription ID when creating an order (Prescription.Id).
Get a Patient's Prescriptions
GET /v1/patients/{patientId}/prescriptions
Filters
Filter | Notes |
|
|
| One or more HCPCS codes |
| Effective date range |
| Expiry date range |
| Include archived prescriptions |
| Paging |
GET /v1/patients/10000056/prescriptions?status=Active
{
"Count": 1,
"Items": [
{
"Id": "PP0fb7ac00c60b0b2869f4813259744956",
"Hcpcs": ["E1390"],
"Status": "Active",
"Archived": false,
"EffectiveDate": "2026-08-28T00:00:00",
"TreatingProvider": {
"Id": "RP8241cb00160b4e88ee1480cf43ace12c",
"Npi": "1356316996",
"Practice": "Example Sleep Center",
"PhysicianName": { "First": "Jack", "Last": "Johnson", "FullName": "Jack Johnson" },
"Location": {
"Id": "RLd831cb00160b24fa59146a6aadda96c0",
"Address": "123 Main St, Denver, CO 80203"
}
}
}
]
}
💡 Expired prescriptions have Status: "Expired" and an ExpiryDate. Filter by status=Active to find prescriptions you can use for a new order.
Get One Prescription
GET /v1/patients/{patientId}/prescriptions/{id}Returns the full prescription, including Products (with product details, LengthOfNeed, and DiagnosisCodes), HcpcsCodes, BundleProducts, TreatingProvider, and signature information (SignInfo) when signed.
Update a Prescription
PUT /v1/patients/{patientId}/prescriptions/{id}
Send the full prescription, using the same fields as creating one.
PUT /v1/patients/10000105/prescriptions/PP94adce00ef4bd958ee946025a6fe86a7
Response: 200 OK
Delete a Prescription
DELETE /v1/patients/{patientId}/prescriptions/{id}
Response: 200 OK
Common Errors
Code | Meaning |
| Invalid request, e.g. missing |
| Token missing, expired, or invalid |
| You don't have permission to access this resource |
| Patient, prescription, provider, or product not found |
| Too many requests |
