Skip to main content

Orders

POST /orders accepts delivery jobs asynchronously. Lynq returns 202 Accepted with an order ULID when intake succeeds.

Single pickup order

Minimum fields:

  • pickup / dropoff with lat, lng, short_address
  • Dropoff requires contact_name and contact_phone (E.164 Saudi mobile recommended)
  • Optional quote_id from Quotes
  • Optional partner_order_number for your OMS reference
{
"pickup": {
"lat": 24.7136,
"lng": 46.6753,
"short_address": "RRRD2929",
"contact_name": "Ahmed",
"contact_phone": "0594939405"
},
"dropoff": {
"lat": 24.768,
"lng": 46.709,
"short_address": "RRRR1234",
"contact_name": "Saleem",
"contact_phone": "+966595848384"
}
}

Idempotency

Reuse the same partner_order_number for a given partner account and Lynq returns the existing order instead of creating a duplicate. Always persist Lynq's order ULID as the canonical identifier.

Order status

Poll GET /orders/{order_id} or rely on webhooks. Status strings align with Lynq core:

StatusMeaning
pendingSubmitted / awaiting assignment
confirmedCourier assigned
picked_upCollected from pickup
in_transitEn route
deliveredCompleted
cancelledCancelled
returnedReturned to partner
rejectedFailed / rejected

Webhook type values (e.g. order.picked_up) describe events — read data.object.status for the lifecycle state at emission time.

Cancellation

Use the cancel endpoint documented in the API reference when your integration needs to void a pending order. Not all statuses are cancellable — expect 409 Conflict when cancellation is no longer allowed.

Courier snapshot

Some deployments expose courier assignment details on the order resource and via order.courier_assigned webhooks. See Tracking.