Expanding responses
Many objects allow you to request additional information as an expanded response by using the expand header. This parameter is available on all API requests, and applies to the response of that request only.
In many cases, an object contains the ID of a related object in its response properties. Those objects can be expanded inline with the expand request header.
Available expandables
Collection requests
Resource | Expandables |
---|---|
Article | variants |
Batch | - |
Customers | - |
Document | - |
Inbound | - |
Location types | administration_code |
Modification | - |
Order | - |
Shipment | shipment_lines, shipment_labels, shipping_address, shipping_method, serial_numbers, variant, administration_code |
Shipping method | administration_code |
Stock | variant |
Variant | - |
Single requests
Resource | Expandables |
---|---|
Article | variants |
Batch | variant, inbound, inbound_lines |
Document | - |
Inbound | inbound_lines, variant, inbound_quality_controls, inbound_documents, documents, inbound_line_meta_data |
Modification | modification_lines, variant |
Order | shipping_address, order_lines, documents, serial_numbers, variants, meta_data, order_line_meta_data |
Shipment | shipment_lines, shipment_labels, shipping_address, shipping_method |
Shipping method | - |
Stock | variant |
Variant | article |
Create requests
Resource | Expandables |
---|---|
Inbound | inbound_lines, variant |
Variant | article |
Example without expand header
Request without expand headers
curl https://eu-dev.middleware.ewarehousing-solutions.com/wms/orders/590d67ab-f978-4a07-982d-3729c61c384e/ \
Response using no expand headers
{
"id": "590d67ab-f978-4a07-982d-3729c61c384e",
"created_at": "2022-06-14T12:15:05+00:00",
"requested_delivery_date": "2022-06-14T00:00:00+00:00",
"customer": "be62c27e-2aac-4ac1-902e-f770d64f8dce",
"external_reference": "VB_ORD_102A",
"reference": "ORD00000003352",
"status": "created",
"business_to_business": false,
"applied_business_rules": true,
"partial_delivery": false,
"language": "NL",
"note": null,
"customer_note": null,
"order_amount": null,
"assured_amount": null,
"inco_terms": null,
"shipping_method": null
}
Example using expand header
Request with expand headers
curl https://eu-dev.middleware.ewarehousing-solutions.com/wms/orders/590d67ab-f978-4a07-982d-3729c61c384e/ \
-H "Expand: order_lines,variant"
Response using expand headers
{
"id": "590d67ab-f978-4a07-982d-3729c61c384e",
"created_at": "2022-06-14T12:15:05+00:00",
"requested_delivery_date": "2022-06-14T00:00:00+00:00",
"customer": "be62c27e-2aac-4ac1-902e-f770d64f8dce",
"external_reference": "VB_ORD_102A",
"reference": "ORD00000003352",
"status": "awaiting_documents",
"business_to_business": false,
"applied_business_rules": true,
"partial_delivery": false,
"language": "DE",
"note": null,
"customer_note": null,
"order_amount": null,
"assured_amount": null,
"inco_terms": null,
"shipping_method": null,
"order_lines": [
{
"variant": {
"id": "20664efa-ec55-4eaf-a7ad-a05157b9d3da"
},
"quantity": 3,
"description": "papier123"
}
]
}