Delivery

A Delivery represents the process of delivering one or multiple items to a customer (or some recipient specified by the customer).

Deliveries are created based on the SalesOrderDraftDelivery objects configured during the draft phase.

A delivery is always performed from a specific location (shipping_location) to a specific address (delivery_addres) and may be scheduled to be delivered during a specific time frame (delivery_time_range).

There may be more information about the collector than just the address (recipient_information), but that is optional.

A delivery follows a simple state machine:

State diagram: Delivery

The meaning of the states is as follows:

StateMeaning
PENDINGThe delivery has not yet happend and the items are not yet prepared either. This is the initial state.
PREPAREDThe items have been prepared for shipment.
SHIPPEDThe items have been shipped / handed over to the shipping carrier.
RECEIVEDThe items have been received by the customer/recipient. This is a final state.
CANCELEDThe delivery has been canceled. Items may or may not have been prepared before the cancelation. This is a final state.

Note that a delivery's status can be modified via the API (via PUT ​/org​/{org-id}​/fulfillments​/deliveries/{delivery-id}​/status) but that it cannot be set to CANCELED that way. A delivery only get's canceled when the sales order that it belongs to gets canceled.