A general-purpose event that fires on a variety of order changes. targetEntity is the Order. The eventType is order_updated.
eventDatashape varies and is usually empty.order_updatedis emitted from many code paths — most sendeventData: {}and convey the change only througheventTitle/eventDescription(free text). A few paths (e.g. a product removal) includeactionandperformedBy. Do not rely on anyeventDatafield being present. One important case — a provider rejection — fires anorder_updatedwith the reason ineventDescription; see Prescription was rejected.
Field guarantees
| Field | Guarantee |
|---|---|
eventData.action, eventData.performedBy (v1) | ⚠️ Conditional — present only on specific firings; most send {} |
v2 order reference (order_id, order_status) | ✅ Always present |
v1 payload (legacy)
Example of a firing that does carry eventData (a product removal). Many firings send eventData: {} instead.
{
"_id": "event::xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"ownerEntity": "pat::xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"ownerEntityModel": "Patient",
"targetEntity": "order::xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"targetEntityModel": "Order",
"eventTitle": "Tirzepatide 3 Month was removed from this order",
"eventType": "order_updated",
"eventData": {
"action": "remove",
"performedBy": { "id": "usr::xxxx", "role": "admin", "name": "<ADMIN_NAME>" }
},
"deleted": false,
"createdAt": { "$date": "2026-01-01T12:00:00.000Z" },
"updatedAt": { "$date": "2026-01-01T12:00:00.000Z" },
"__v": 0
}eventData field | Type | Always? | Notes |
|---|---|---|---|
action | string | ⚠️ | Only on specific firings (e.g. "remove") |
performedBy | object | ⚠️ | Only on specific firings |
v2 payload
Sanitized envelope. performedBy is stripped (PHI-adjacent); action isn't on the ORDER allowlist. The order reference is resolved from the target order.
{
"event_type": "order_updated",
"event_id": "event::xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"api_version": "2026-08-09",
"timestamp": "2026-05-30T14:00:00.000Z",
"affiliate_id": "aff::xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"patient_id": "pat::xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"patient_external_id": "ext-patient-123",
"patient_marketing_consent": false,
"is_returning_patient": true,
"order_id": "order::xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"order_status": "requires_provider_review"
}| Field | Delivered in v2 | Notes |
|---|---|---|
| Envelope + patient identity | ✅ | |
order_id, order_status | ✅ | Resolved from the target order |
action, performedBy | ⛔ | Not delivered |
