Developer documentation
Orders
Use the Orders API to create, retrieve, update, and cancel orders. This page covers models (lines, shipping, documents, metadata) and endpoints to manage the order lifecycle, including statuses and international compliance fields (IOSS, EORI).
Response models
These models describe the objects returned by the API in successful responses. Expanded fields are only included when requested through the `expand` header.
The order model
The primary response object returned for order endpoints. It contains the order state, commerce fields, compliance data, and optionally expanded related objects such as shipping address, order lines, documents, and metadata.
| Field | Description |
|---|---|
idstringOptional | Read-only. |
created_atdatetimeOptional | Read-only. |
requested_delivery_datedatetimeOptional | Requested delivery date returned by the API. |
customerstringOptional | Read-only. Customer identifier returned by the API. |
external_referencestringOptional | External order reference from your upstream system. |
The order line model
A single line within an order response. Each line resolves the requested article into a variant object and can optionally include serial numbers and line-level metadata when expanded.
| Field | Description |
|---|---|
variantvariantOptional | Resolved variant object returned for the requested article code. |
quantityintegerOptional | Ordered quantity. |
descriptionstringOptional | Order line description. |
serial_numbersarray of stringsOptional | Expanded serial numbers linked to the order line. Returned when `serial_numbers` is included in the `expand` header. |
meta_dataobjectOptional | Expanded key-value metadata attached to the order line. Returned when `order_line_meta_data` is included in the `expand` header. |
The shipping address model
The expanded shipping destination returned on an order. This object contains the normalized recipient and address details stored for fulfillment.
| Field | Description |
|---|---|
addressed_tostringOptional | Recipient or company name. |
contact_personstringOptional | Contact person returned in the response object. |
streetstringOptional | Street name. |
street2stringOptional | Additional street information. |
street_numberstringOptional | House number. |
The document model
A document attached to an order response, such as a packing slip, customs document, or shipping label. This model describes the metadata returned by the API for each linked document.
| Field | Description |
|---|---|
idstringOptional | Read-only document identifier. |
titlestringOptional | Document title. |
mime_typestringOptional | Read-only. |
quantityintegerOptional | Amount of times it will be printed |
is_shipping_labelbooleanOptional | Whether this document is marked as a shipping label. |
The meta data model
Metadata is available on both order and order line responses. Add `meta_data` to the `expand` header to receive it in the response. New to the Expand header? See how it works, available groups, and request examples: [Expanding responses](/expanding-responses). Keys must be lowercase and should use `_` or `-` as separators.
| Field | Description |
|---|---|
{key: value}objectOptional | An object of key-value pairs. |
List all orders
/wms/orders/Retrieves a collection of orders.
Try it
Send a live request against the development middleware using your current API test session.
Request attributes
| Field | Description |
|---|---|
referencestringOptional | Search for a specific reference. |
external_referencestringOptional | Search for a specific external reference. |
external_idstringOptional | Search for a specific external id. |
statusstringOptional | Search for a specific status. |
is_business_to_businessbooleanOptional | Filter by business-to-business orders. |
requested_delivery_date_gtestringOptional | Accepts date format YYYY-MM-DD. |
limitintegerOptional | Limit the number of results. Default is 50. |
pageintegerOptional | The page number to retrieve. |
directionstringOptional | Sort direction. Options: `asc` or `desc`. Default is `desc`. |
sortstringOptional | Sort field. Options: `createdAt`, `status`, `modifiedAt`, or `requestedDeliveryDate`. Default is `createdAt`. |
curl 'https://eu-dev.middleware.ewarehousing-solutions.com/wms/orders/?external_reference=WEB-10001&status=created&limit=10'[
{
"id": "f9c392ac-6335-4828-85e2-fae7f82ff636",
"created_at": "2021-11-12T14:05:43+00:00",
"requested_delivery_date": "2018-11-19T00:00:00+00:00",
"customer": "be62c27e-2aac-4ac1-902e-f770d64f8dce",
"external_reference": "WEB-10001",
"external_id": "order-10001",
"po_number": "841612",
"reference": "ORD00000000001",
"status": "created",
"shipping_method": "9eb93dd6-6929-4b91-8419-8a619a72905b",
"currency": "EUR"
}
]Retrieve an order
/wms/orders/:id/Retrieve a single order.
Try it
Send a live request against the development middleware using your current API test session.
Path parameters
curl 'https://eu-dev.middleware.ewarehousing-solutions.com/wms/orders/e710389a-5505-49d4-9b99-8314f3543427/' -H 'expand: shipping_address,order_lines,documents,meta_data,order_line_meta_data,serial_numbers'{
"id": "c9165f93-8301-4aaa-9f64-27f191c0c778",
"created_at": "2022-02-11T09:32:12+00:00",
"requested_delivery_date": "2022-02-14T00:00:00+00:00",
"customer": "be62c27e-2aac-4ac1-902e-f770d64f8dce",
"external_reference": "WEB-10001",
"external_id": "order-10001",
"po_number": "841612",
"reference": "ORD00000003029",
"status": "created",
"shipping_method": "9eb93dd6-6929-4b91-8419-8a619a72905b",
"language": "en",
"note": "Leave the parcel at the front desk.",
"customer_note": "Gift order",
"order_amount": 4599,
"assured_amount": 4599,
"inco_terms": "DAP",
"currency": "EUR",
"shipping_address": {
"addressed_to": "eWarehousing Solutions",
"contact_person": "Warehouse Team",
"street": "Nijverheidsweg",
"street_number": "27",
"zipcode": "3331MB",
"city": "Zwijndrecht",
"country": "NL",
"email_address": "outbound@example.com"
},
"order_lines": [
{
"variant": {
"id": "87557e7a-4f4d-44eb-bbf1-c9d83df90099",
"article_code": "default_variant_b_id",
"name": "default_variant_b_id"
},
"quantity": 7,
"description": "Blue T-shirt size M",
"serial_numbers": [
"SN-0001",
"SN-0002"
],
"meta_data": {
"gift_wrap": "true"
}
}
],
"documents": [
{
"id": "8067cdfb-cb22-4490-902d-a9863f38f76f",
"title": "packing-slip.pdf",
"mime_type": "application/pdf",
"quantity": 1,
"is_shipping_label": false,
"order_price": 0
}
],
"meta_data": {
"sales_channel": "webshop",
"priority": "normal"
}
}Create an order
/wms/orders/This endpoint allows you to add a new order.
Request vs response: you send article_code in order line requests, but the API returns resolved variant objects in the response.
Try it
Send a live request against the development middleware using your current API test session.
Request attributes
| Field | Description | Example value |
|---|---|---|
external_referencestringRequired | External order reference. | |
external_idstringOptional | Unique order identifier from your source system. | |
po_numberstringOptional | Purchase order number. | |
order_linesarray of order linesRequired | One or more order line payloads. | See nested fields below |
Expand order_lines→order_lines[].article_codestringRequiredUniversal identifier that matches against variant article_code, EAN, or SKU to identify the variant. order_lines[].quantityintegerRequiredOrdered quantity. order_lines[].descriptionstringRequiredHuman-readable order line description. order_lines[].pricenumberOptionalUnit price for the order line. order_lines[].meta_dataobjectOptionalAdditional key-value metadata for the order line. | ||
shipping_methoduuidOptional | Shipping method identifier. | |
shipping_addressShippingAddressRequired | Shipping address object. | See nested fields below |
Expand shipping_address→shipping_address.streetstringRequiredStreet name. shipping_address.street_numberstringOptionalHouse number. shipping_address.street_number_additionstringOptionalHouse number addition. shipping_address.street2stringOptionalAdditional street information. shipping_address.citystringRequiredCity name. shipping_address.statestringOptionalState or province. shipping_address.countrystringRequiredISO country code. shipping_address.zipcodestringRequiredPostal or ZIP code. Not mandatory for some countries such as `HK` or `AE`. shipping_address.phone_numberstringOptionalPhone number. shipping_address.mobile_numberstringOptionalMobile phone number. shipping_address.fax_numberstringOptionalFax number. shipping_address.invalidbooleanOptionalManually mark the address as invalid. shipping_address.addressed_tostringRequiredRecipient or company name. | ||
shipping_contactpersonstringRequired | Contact person for the shipment. | |
shipping_emailstringOptional | Shipping email address. | |
requested_delivery_datedateRequired | Requested delivery date. | |
documentsarray of documentsOptional | Attached documents. | Not editable here |
ioss_numberstringOptional | IOSS number of the sender. | |
eori_numberstringOptional | EORI number of the sender. | |
vat_numberstringOptional | VAT number of the sender. | |
inbound_vat_numberstringOptional | GB VAT number needed for shipments from Europe to GB. | |
inbound_eori_numberstringOptional | GB EORI number needed for shipments from Europe to GB. | |
meta_dataobjectOptional | Additional order-level key-value metadata. | |
languagestringOptional | Language code. | |
notestringOptional | Internal note. | |
customer_notestringOptional | Customer-facing note. | |
order_amountintegerOptional | Value of order in cents. | |
assured_amountintegerOptional | Assured amount in cents. | |
inco_termsstringOptional | Options: `DAP` or `DDP`. | |
currencystringOptional | Currency code. | |
curl -X POST 'https://eu-dev.middleware.ewarehousing-solutions.com/wms/orders/' -H 'Content-Type: application/json' --data-raw '{
"external_reference": "WEB-10001",
"external_id": "order-10001",
"po_number": "PO-841612",
"shipping_contactperson": "Warehouse Team",
"shipping_email": "outbound@example.com",
"requested_delivery_date": "2026-04-18",
"note": "Leave the parcel at the front desk.",
"customer_note": "Gift order",
"language": "en",
"currency": "EUR",
"order_amount": 4599,
"assured_amount": 4599,
"meta_data": {
"sales_channel": "webshop",
"priority": "normal"
},
"shipping_address": {
"addressed_to": "eWarehousing Solutions",
"street": "Nijverheidsweg",
"street_number": "27",
"zipcode": "3331MB",
"city": "Zwijndrecht",
"country": "NL"
},
"order_lines": [
{
"article_code": "default_variant_b_id",
"quantity": 2,
"description": "Blue T-shirt size M",
"price": 2299,
"meta_data": {
"gift_wrap": "true"
}
}
]
}'{
"id": "8faf6cd6-28e7-4e44-a258-4e927d8e680c",
"created_at": "2026-04-17T14:36:42+00:00",
"requested_delivery_date": "2026-04-18T00:00:00+00:00",
"customer": "be62c27e-2aac-4ac1-902e-f770d64f8dce",
"external_reference": "WEB-10001",
"external_id": "order-10001",
"po_number": "PO-841612",
"reference": "ORD00000005939",
"status": "created",
"shipping_method": "9eb93dd6-6929-4b91-8419-8a619a72905b",
"language": "en",
"note": "Leave the parcel at the front desk.",
"customer_note": "Gift order",
"order_amount": 4599,
"assured_amount": 4599,
"currency": "EUR"
}Update an order
/wms/orders/:id/This endpoint allows you to perform an update on an order.
Updating the order_lines will delete the previous order lines.
Try it
Send a live request against the development middleware using your current API test session.
Path parameters
Request attributes
| Field | Description | Example value |
|---|---|---|
po_numberstringOptional | Purchase order number. | |
order_linesarray of order linesOptional | When updating order lines, use the same format as creating orders. | See nested fields below |
Expand order_lines→order_lines[].article_codestringOptionalUniversal identifier that matches against variant article_code, EAN, or SKU to identify the variant. order_lines[].quantityintegerOptionalOrdered quantity. order_lines[].descriptionstringOptionalOrder line description. order_lines[].pricenumberOptionalUnit price for the order line. order_lines[].meta_dataobjectOptionalAdditional key-value metadata for the line. | ||
shipping_methoduuidOptional | Shipping method identifier. | |
shipping_addressShippingAddressOptional | Shipping address object. | See nested fields below |
Expand shipping_address→shipping_address.streetstringOptionalStreet name. shipping_address.street_numberstringOptionalHouse number. shipping_address.street_number_additionstringOptionalHouse number addition. shipping_address.street2stringOptionalAdditional street information. shipping_address.citystringOptionalCity name. shipping_address.statestringOptionalState or province. shipping_address.countrystringOptionalISO country code. shipping_address.zipcodestringOptionalPostal or ZIP code. shipping_address.phone_numberstringOptionalPhone number. shipping_address.mobile_numberstringOptionalMobile phone number. shipping_address.fax_numberstringOptionalFax number. shipping_address.invalidbooleanOptionalManually mark the address as invalid. shipping_address.addressed_tostringOptionalRecipient or company name. | ||
shipping_contactpersonstringOptional | Contact person for the shipment. | |
shipping_emailstringOptional | Shipping email address. | |
requested_delivery_datedateOptional | Requested delivery date. | |
documentsarray of documentsOptional | Attached documents. | Not editable here |
ioss_numberstringOptional | IOSS number of the sender. | |
eori_numberstringOptional | EORI number of the sender. | |
vat_numberstringOptional | VAT number of the sender. | |
inbound_vat_numberstringOptional | GB VAT number needed for shipments from Europe to GB. | |
inbound_eori_numberstringOptional | GB EORI number needed for shipments from Europe to GB. | |
meta_dataobjectOptional | Additional metadata key-value pairs. | |
languagestringOptional | Language code. | |
notestringOptional | Internal note. | |
customer_notestringOptional | Customer-facing note. | |
order_amountintegerOptional | Value of order in cents. | |
assured_amountintegerOptional | Assured amount in cents. | |
inco_termsstringOptional | Options: `DAP` or `DDP`. | |
currencystringOptional | Currency code. | |
curl -X PATCH https://eu-dev.middleware.ewarehousing-solutions.com/wms/orders/774bf6ee-90cf-11e9-b36d-0242ac120005/ -H 'Content-Type: application/json' --data-raw '{
"note": "Leave the parcel at the neighbors if needed.",
"shipping_email": "outbound@example.com",
"meta_data": {
"priority": "high"
},
"order_lines": [
{
"article_code": "default_variant_b_id",
"description": "Blue T-shirt size M",
"quantity": 3,
"price": 2299
}
]
}'{
"id": "4fdb3055-4b1d-4352-96d5-2a89f9f50680",
"external_reference": "WEB-10001",
"external_id": "order-10001",
"po_number": "PO-841612",
"status": "created",
"note": "Leave the parcel at the neighbors if needed.",
"shipping_method": "9eb93dd6-6929-4b91-8419-8a619a72905b"
}Cancel an order
/wms/orders/:id/cancel/This endpoint allows you to cancel an order.
The order can only be canceled while the order's status is one of:
- created
- planned
- invalid_address
Try it
Send a live request against the development middleware using your current API test session.
Path parameters
curl -X PATCH https://eu-dev.middleware.ewarehousing-solutions.com/wms/orders/774bf6ee-90cf-11e9-b36d-0242ac120005/cancel/List all order documents
/wms/orders/:id/documents/List all order documents.
Use the generic Documents resource to retrieve documents by ID.
Try it
Send a live request against the development middleware using your current API test session.
Path parameters
curl https://eu-dev.middleware.ewarehousing-solutions.com/wms/orders/184c47d4-d3ee-4412-b156-ce5a4518d641/documents/[
{
"id": "8067cdfb-cb22-4490-902d-a9863f38f76f",
"title": "customs_file_en.pdf",
"mime_type": "application/pdf",
"quantity": 1
}
]Retrieve an order document
/wms/orders/:id/documents/:documentId/**[deprecated] Use the [/wms/documents/:id](/resources/documents#retrieve-a-document) endpoint instead**
Retrieve an order document.
Try it
Send a live request against the development middleware using your current API test session.
Path parameters
curl https://eu-dev.middleware.ewarehousing-solutions.com/wms/orders/184c47d4-d3ee-4412-b156-ce5a4518d641/documents/af7c1fe6-d669-414e-b066-e9733f0de7a8/{
"id": "8067cdfb-cb22-4490-902d-a9863f38f76f",
"title": "customs_file.pdf",
"mime_type": "application/pdf",
"quantity": 1
}Add a document to an order
/wms/orders/:id/documents/This endpoint allows you to add a document to an existing order.
Try it
Send a live request against the development middleware using your current API test session.
Path parameters
curl -X POST 'https://eu-dev.middleware.ewarehousing-solutions.com/wms/orders/3f2a00b4-ce1d-473b-bacb-e6e12303244b/documents/' -H 'Content-Type: application/json' --data-raw '{
"file": "base64 encoded string",
"title": "my_label",
"quantity": 1,
"order_price": 115,
"shipping_label": false
}'{
"id": "8067cdfb-cb22-4490-902d-a9863f38f76f",
"title": "customs_file.pdf",
"mime_type": "application/pdf",
"quantity": 1
}