Updating Orders for Returns
If a customer returns an item, you must update the status value for the corresponding Order Line to returned. You may do so even if the order status is fulfilled.

To set the status of an Order Line to returned, create a JSON payload similar to this example:
{
"data":{
"id":"$ORDER_LINE_ID",
"type":"OrderLine",
"attributes":{
"status":"returned",
"reason": "$INTEGER_CODE"
}
}
}
The reason attribute is an integer code and is optional, but we recommend including it whenever possible. We accept following integer codes:
| Code | Description |
|---|---|
| 0 | UNKNOWN_CAUSE |
| 1 | DISLIKE |
| 2 | SIZE_BIG |
| 3 | SIZE_SMALL |
| 4 | VALUE_FOR_MONEY |
| 5 | DELIVERY_TOO_LATE |
| 6 | NOT_LIKE_IMAGINED |
| 9 | ARTICLE_WRONG |
| 10 | DEFECTIVE |
Use the following call to update the specified Order Line:
PATCH /merchants/{merchant_ID}/orders/{order_ID}/items/{order_item_ID}/lines/{order_line_ID}
This example httpie call takes the local file order-line-updated.json as input for the PATCH requests:
http PATCH \
https://api-sandbox.merchants.zalando.com\
/merchants/{merchant_ID}/orders/{order_ID}\
/items/{order_item_ID}/lines\
/{order_line_ID} \
Accept:application/vnd.api+json \
Content-Type:application/vnd.api+json \
"Authorization:Bearer $YOUR_ACCESS_TOKEN" \
< order-line-updated.json
Response Codes
| HTTP Code | Description |
|---|---|
| 204 | Order was successfully patched. |
| 400 | Error in JSON payload. |
| 403 | You do not have authority to patch this order. |
For a full list of response codes, see the Orders API OpenAPI Reference.
Contact Support