Docs β€Ί Orders

The order object & statuses

Fields, lifecycle and dispatchedTo values.

Responses from POST /v1/orders and GET /v1/orders/{externalId} return an order:

FieldTypeDescription
orderIdstringDragonfly's id for the order.
externalIdstringYour id: the one you sent.
statusenumSee the lifecycle below.
dispatchedTostring or nullCreate only. Where the order went; see below.
dropoffsintegerCreate only. Number of delivery stops.
trackingUrlstring or nullLive tracking page for the recipient, once available.
promisedDeliveryAttimestamp or nullThe delivery promise, when one is set.
deliveredAttimestamp or nullWhen the delivery was completed.
onTimeboolean or nullWhether it was delivered inside its window.
createdAttimestampWhen Dragonfly received the order.
idempotentReplaybooleanCreate only. true when this externalId already existed.

Status lifecycle

text
PENDING ──► ASSIGNED ──► PICKED_UP ──► DELIVERED
   β”‚            β”‚
   └────────────┴──► CANCELLED        (any) ──► FAILED
StatusMeaning
PENDINGReceived. Waiting for a driver, or for Dragonfly to build routes.
ASSIGNEDA driver (or a route with a driver) has it.
PICKED_UPThe driver collected it and is delivering.
DELIVEREDDelivered, with proof of delivery captured.
FAILEDThe delivery couldn't be completed (for example, a bad address or no access). Webhooks carry the reason.
CANCELLEDCancelled before pickup.

dispatchedTo values

ValueMeaning
cartwheelSingle drop, sent to a catering/on-demand driver network.
onfleetMulti-stop route, dispatched as one route.
internalDispatched by Dragonfly's own dispatch board and driver app.
dragonfly_routingHeld for Dragonfly to build the day's routes. See routing modes.
sandboxSandbox key: simulated.
nullAn idempotent replay (the order already existed), or an order recorded for dispatch later.

Something unclear or missing? Tell us.