Order Status

Order status is tracked by three values:

  • Export Status: Whether Zalando or the partner is currently responsible for the order (non-ZFS).
  • Order Status: The overall status of the order.
  • Order Line Status: The status of each order line in the order.

Export Status

An order (non-ZFS only) is exported from zDirect to a partner when the partner actively claims responsibility for its fulfillment.

When an order is created, we set the value of exported to false. When you get the order, you start the fulfillment process by exporting the order. This lets us know that you have received the order and have begun fulfillment.

Export status is found in the exported field of the Order tier:

{
    "data": {
        "type": "Order",
        "id": "56be4b6d-f2de-4f57-b97b-6e1a5409623e",
        ...
        "order_lines_count": 2,
        "order_lines_price_amount": 749.55,
        "order_lines_price_currency": "EUR",
        "delivery_end_date": "2019-11-22T09:12:32.169+00:00",
        "exported": true,

The exported flag takes a boolean value:

Export Status Description
false Zalando has responsibility of fulfillment (default).
true The partner has claimed responsibility for fulfillment.

For instructions on how to export an order, see Exporting Orders in the "Processing Orders" section.

Order Status

Order status is indicated by the status field at the top of the the JSON. There is only one Order status for each order.

{
    "data": {
        "type": "Order",
        "id": "56be4b6d-f2de-4f57-b97b-6e1a5409623e",
        "attributes": {
            ...
            "status": "approved",

Order status has three possible values:

Order Status Description
initial The customer has placed an order but it has not yet been paid for.
approved Payment has been confirmed and the order may now be processed and shipped.
fulfilled The order is completed. Each Order Line article was shipped, canceled, and/or returned.

Order status is read-only and is set by Zalando. All orders are set to initial when they are created. When payment is confirmed or an invoice is authorized for postpayment orders, we change the order status to approved.

When you have set all Order Lines to shipped or canceled, we will change the order status to fulfilled.

Caution

Do not begin fulfilling an order while it is in the initial state, except for optionally reserving stock. We may need to cancel an order if the payment is unsuccessful or for other reasons. You may begin order fulfilmment when the order is in the approved state.

Order Line Status

Unlike Order Status, you are responsible for updating Order Line Status as you process the order.

Each Order Line in an order has its own state, indicated in the status attribute:

{
    "type": "OrderLine",
    "id": "e5a39c6c-c887-49fa-a6e9-bf5056ca860d",
    "attributes": {
        "order_line_id": "e5a39c6c-c887-49fa-a6e9-bf5056ca860d",
        "order_item_id": "e0a3eb36-4443-44bf-82b4-f21955bcf534",
        "status": "canceled",
        ...

There are five possible values for Order Line status:

Order Line Status Description
initial The default status of all Order Items when the order is created.
reserved You have reserved product stock for an Order Line.
shipped You have packed and shipped the Order Line article to the customer.
canceled You have canceled the item because it is out of stock or is otherwise not available.
returned You have received an Order Item that was returned by the customer.

Status Changes during Order Processing

This section describes how order status changes at the various phases of order placement.

Prepayment Status Changes

The following diagram illustrates a scenario in which a customer prepays for an order. Order Status is shown in blue, and Order Line Status is shown in purple.

After the order is placed, moving from the left side to the right side, the following states are shown:

  • The partner is out of stock. Order Status is set to Fulfilled, and Order Line Status is set to Canceled.
  • The partner has stock. Order Status is set to Approved because the customer has already prepaid. The partner sets the Order Line Status to either Initial or Reserved. Reserved is used when you want to set aside stock to fulfill this order.
  • Once the product has shipped, the Order Status is Fulfilled and the Order Line Status is Shipped. If the product is not returned by the customer, then the process stops here.
  • If the customer returns the product, the Order Status remains Fulfilled but the partner sets the Order Line Status to Returned when they receive the returned product.

Postpayment Status Changes

The following diagram illustrates a scenario in which a customer post-pays for an order. Order Status is shown in blue, and Order Line Status is shown in purple.

Transitions

A transition is any time an order changes from one status to another. The transition history is logged by zDirect, and may be requested as a JSON. The endpoint that you may query to retrieve a report of transition history is specified in the order JSON in the following field:

"order_transitions": {
                "links": {
                    "related": "URL"
                }
            }

You may also use the following endpoints to get transition data.

To get all state transitions for a given order-id:

GET /merchants/{merchant-id}/orders/{order-id}/transitions

To get all transitions that happened at the Order Line level:

GET /merchants/{merchant-id}/orders/{order-id}/items/{order-item-id}/lines/{order-line-id}/transitions

For more information on how to work with transitions, see Getting Transitions in the Orders API Reference.

Contact Support