Order Updated

A general-purpose event that fires on a variety of order changes. targetEntity is the Order. The eventType is order_updated.

⚠️

eventData shape varies and is usually empty. order_updated is emitted from many code paths — most send eventData: {} and convey the change only through eventTitle/eventDescription (free text). A few paths (e.g. a product removal) include action and performedBy. Do not rely on any eventData field being present. One important case — a provider rejection — fires an order_updated with the reason in eventDescription; see Prescription was rejected.

Field guarantees

FieldGuarantee
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 fieldTypeAlways?Notes
actionstring⚠️Only on specific firings (e.g. "remove")
performedByobject⚠️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"
}
FieldDelivered in v2Notes
Envelope + patient identity
order_id, order_statusResolved from the target order
action, performedByNot delivered