Delivery order status lifecycles
You may require to understand where the order is in terms of its delivery lifecycle. This is denoted by the order status property i.e. the order state. Furthermore orders cannot be modified or canceled when in certain states (for example, if a rider has already been dispatched). As an order can have multiple delivery line items, the "status" i.e. state is also provided per delivery line item.
We recommend utilising the individual delivery line item status to track the progress of any given order.
Order status
Order statuses are bound to the 'status' (string) property of the respective order instance. Order statuses follow the following progressive lifecycle:
CREATED
: Order is still in its creation state it can be modified freelyPROCESSING_PAYMENT
: Order is being settled by our PSP or internal accountsPAID
: Order has been fully PAIDPAYMENT_FAILED
: Order has not been accepted and has FAILEDACCEPTED
: The order has been accepted by our team and has been scheduled for deliveryREADY_FOR_PICKUP
: At least one or more delivery line items have been assigned to a courier team and can no longer be CANCELLEDRIDER_DISPATCHED
: At least one or more delivery line items have a courier on their way to the pickup location (store)IN_TRANSIT
: At least one or more delivery line items a courier on their way to the delivery location (customer)DELIVERED
: ALL delivery line items a have been succesfully delivered at the (customer)COMPLETED
: The order is fully complete (no futher actions)PROCESSING_REFUND
: A refund is being processed for the orderREFUNDED
: The order has been refundedCANCELED
: The order has been cancelledRETURNED
: At least one or more delivery line items a have been returned. The order has been returned to the pickup location (store), i.e. not able to deliver after multiple attempts
- You can only modify an order and its respective child delivery line items when in the following state(s): 'CREATED'
- You can only cancel an order and its respective child delivery line items when in the following state(s): 'CREATED', 'PAID', 'ACCEPTED'
Delivery line item status
Delivery line item statuses are bound to the 'status' (string) property of the respective delivery line item. Note the deliveryStatus is used for more advanced lifeCycle management and is not applicable. Delivery line item statuses follow the following progressive lifecycle:
ADDED
: Delivery line item has been added and can be modified freely.PROCESSING_PAYMENT
: Delivery line item is being settled by our PSP or internal accountsPAID
: Delivery line item paidPAYMENT_FAILED
: Delivery line item has not been accepted and has FAILEDACCEPTED
: Delivery line item has been accepted by our team and has been scheduled for deliveryREADY_FOR_PICKUP
: Delivery line item has been assigned to a courier team and can no longer be CANCELEDRIDER_DISPATCHED
: Delivery line item courier on their way to the pickup location (store)IN_TRANSIT
: Delivery line item courier on their way to the delivery location (customer)DELIVERED
: Delivery line item has succesfully been delivered to the (customer)COMPLETED
: Delivery line is fully complete (no futher actions)REFUNDED
: Delivery line item refundedCANCELED
: Delivery line item CANCELEDRETURNED
: Delivery line item has been returned to the pickup location (store) as it could not be delivered on multiple attempts.
In addition to the above we assign specific properties when the lifecycle is updated, for example:
riderAssignedAt
: date-time stamp when the courier has been assigneddispatchedAt
( ISO-8601 ): date-time stamp when the courier has been dispatchedpickedupAt
: date-time stamp when the courier has picked up the delivery (store)onRouteAt
: date-time stamp when the courier is en route to the customerdeliveredAt
: date-time stamp when the courier has delivered to the customercanceledAt
: date-time stamp when the courier has delivered to the customerreturnedToStoreAt
: date-time stamp when the courier has returned an item to the store
Live delivery tracking
Individual deliveries can be tracked during the order lifecycle. Tracking Urls are provided dynamically and are available during certain order states. The links provide a map with a location of the courier.
Each delivery line item has the following properties, once the lifecycle has been transitioned to the ACCEPTED status state:
deliveryTrackingUrl
: (URL) with secure link for delivery tracking - this is only available for security reasons whilst the delivery is in progresspickupTrackingUrl
: (URL) with secure link for pickup tracking - this is only available for security reasons whilst the pickup is in progress