Skip to main content

order.courier_assigned

Dedicated courier-assignment event including courier identity and a one-time ETA snapshot computed when the courier is assigned (not refreshed on live GPS updates).

OpenAPI​

See Partner API OpenAPI — CourierAssignedObject.

Payload fields (data.object)​

FieldTypeDescription
idstringPartner order id (ULID)
order_refstringPartner order number when set, else id
partner_idintegerPartner id
statusstringOrder status after assignment (usually confirmed)
courier_refstringOpaque courier reference
courierobject{ courier_ref, name, phone, vehicle }
assigned_atstring (ISO-8601)Assignment timestamp
courier_eta_minutesinteger | nullETA to first pickup in whole minutes (ceil). null when GPS or OSRM unavailable.
courier_eta_computed_atstring (ISO-8601) | nullWhen the ETA snapshot was computed. null when courier_eta_minutes is null.
stopsarrayOrdered stops with cumulative ETAs: { sequence, stop_type, eta_minutes }. Classic orders include synthetic pickup (seq 1) and dropoff (seq 2).

When courier_eta_minutes is null​

  • Courier GPS missing or stale in Redis
  • OSRM unreachable or unroutable for the courier → stops chain
  • Feature disabled via COURIER_ETA_ENABLED=false on order-worker

ETA is recomputed on reassignment (order.assigned again) and cleared when the order returns to pending without a courier (e.g. courier reject).

Payload envelope​

All webhook deliveries use a Stripe-style envelope:

{
"id": "01EVTEXAMPLE0000000000000001",
"object": "event",
"created": 1715000000,
"livemode": false,
"type": "order.courier_assigned",
"data": {
"object": {
"id": "01ORDEREXAMPLE000000000001",
"order_ref": "PO-12345",
"partner_id": 1,
"status": "confirmed",
"courier_ref": "c_ab12cd34",
"courier": {
"courier_ref": "c_ab12cd34",
"name": "Ahmed Ali",
"phone": "+966500000001",
"vehicle": null
},
"assigned_at": "2026-05-06T16:43:41+00:00",
"courier_eta_minutes": 8,
"courier_eta_computed_at": "2026-05-06T16:43:41+00:00",
"stops": [
{ "sequence": 1, "stop_type": "pickup", "eta_minutes": 8 },
{ "sequence": 2, "stop_type": "dropoff", "eta_minutes": 22 }
]
}
}
}

Verify the raw request body with X-Lynq-Signature: t=<unix>,v1=<hex> (HMAC-SHA256 over {t}.{raw_body}). See Webhooks guide and Tools.