Data Model & Glossary
How prescriptions, orders, and shipments relate — and what each identifier means.
The same concepts appear under slightly different names across webhooks and API responses. This page is the reference for how they fit together.
How the entities relate
- A patient can have many prescriptions.
- A single prescription can produce many orders (one initial fill plus refills) in the API-driven workflow.
- An order contains one or more medication dispenses (the actual dispensed items).
- A dispense gains a shipment once it leaves the Honeybee facility.
Glossary
| Term / field | What it is | Where you see it |
|---|---|---|
patient_id | Honeybee's opaque patient identifier. Stable across all events for a patient. Contains no PHI. | All webhooks; GET /patients/{patient_id} |
prescription_id | The prescription identifier. Pass this in items[] to POST /orders to request a fill. | RX_RECEIVED; create-order request |
id (on a medication request) | The same value as prescription_id — the prescription ID. The two names are interchangeable. | RX_RECEIVED, RX_UPDATED payloads |
medication_requests[] | The prescription(s) referenced by an event or order. | Webhooks; order responses |
medication_dispenses[] | The dispensed line items within an order. Present once an order exists. | RX_UPDATED, SHIPMENT_UPDATED, GET /orders |
order_number | The alphanumeric order identifier. Use it for GET /orders/{order_number} and order actions. | RX_UPDATED onward |
dispense_id | Identifier for an individual dispense within an order. | medication_dispenses[] |
order_status | The order's lifecycle state. See Order Statuses. | medication_dispenses[] |
shipment | Carrier tracking details. null until the order ships. | SHIPMENT_UPDATED; order responses |
tracking_no / tracking_url | Carrier tracking number and a customer-facing tracking link. | shipment object |
refills_left | Remaining refills on the prescription. Drives refill triggers in the API-driven workflow. | RX_RECEIVED, RX_UPDATED |
ndc | National Drug Code identifying the dispensed product. | Webhooks; order responses |
gcn / gcn_seqno | Generic Code Number — identifies a drug regardless of manufacturer. | Order items; product responses |
sku | Pre-agreed identifier for an over-the-counter or packaging item. | Order items; see OTC Items |
method_id | Integer ID of a shipping method from GET /shipping_methods. | create-order request |
event_id | Unique ID for a webhook delivery. Use it to deduplicate redelivered events. | Every webhook payload |
brand_id | Used only if your account is configured with multiple brands. | create-order request/response |
:::tip id vs. prescription_id
In medication_requests, id and prescription_id carry the same prescription identifier. RX_RECEIVED includes both explicitly; later events may only include id. Treat them as equivalent when matching.
:::