Introduction
Expanding data using expand headers
To limit the number of calls to the API, and the size of the responses, The eWarehousing Solutions Middleware supports the expansion of certain elements. If your GET/POST/PUT/PATCH calls returns a set of results and you don't choose to expand anything, the response is short, displaying only a basic representation of the resource.
For example, the Orders resource will not return order_lines by default. If you want to retrieve extra data for a resource, the Expand header should be provided to request extra data. The value of the Expand header is a string of comma seperated values.
Available expandables
Collection requests
| Resource | Expandables |
|---|---|
| Article | variants |
| Batch | - |
| Customers | - |
| Document | - |
| Inbound | - |
| Modification | - |
| Order | - |
| Shipment | shipment_lines, shipment_labels, shipping_address, shipping_method, serial_numbers, variant |
| Shipping method | - |
| Stock | variant |
| Variant | - |
Single requests
| Resource | Expandables |
|---|---|
| Article | variants |
| Batch | variant, inbound, inbound_lines |
| Document | - |
| Inbound | inbound_lines, variant |
| Modification | modification_lines, variant |
| Order | shipping_address, order_lines, documents, serial_numbers, variants, 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
1GET [API URI]/wms/orders/590d67ab-f978-4a07-982d-3729c61c384e/2HTTP/1.1 3Accept: application/json1{2 "id": "590d67ab-f978-4a07-982d-3729c61c384e",3 "created_at": "2022-06-14T12:15:05+00:00",4 "requested_delivery_date": "2022-06-14T00:00:00+00:00",5 "customer": "be62c27e-2aac-4ac1-902e-f770d64f8dce",6 "external_reference": "VB_ORD_102A",7 "reference": "ORD00000003352",8 "status": "created",9 "business_to_business": false,10 "applied_business_rules": true,11 "partial_delivery": false,12 "language": "NL",13 "note": null,14 "customer_note": null,15 "order_amount": null,16 "assured_amount": null,17 "inco_terms": null,18 "shipping_method": null19}With Expand header
1GET [API URI]/wms/orders/590d67ab-f978-4a07-982d-3729c61c384e/2HTTP/1.1 3Accept: application/json 4Expand: order_lines,variant1{2 "id": "590d67ab-f978-4a07-982d-3729c61c384e",3 "created_at": "2022-06-14T12:15:05+00:00",4 "requested_delivery_date": "2022-06-14T00:00:00+00:00",5 "customer": "be62c27e-2aac-4ac1-902e-f770d64f8dce",6 "external_reference": "VB_ORD_102A",7 "reference": "ORD00000003352",8 "status": "awaiting_documents",9 "business_to_business": false,10 "applied_business_rules": true,11 "partial_delivery": false,12 "language": "DE",13 "note": null,14 "customer_note": null,15 "order_amount": null,16 "assured_amount": null,17 "inco_terms": null,18 "shipping_method": null,19 "order_lines": [20 {21 "variant": {22 "id": "20664efa-ec55-4eaf-a7ad-a05157b9d3da"23 },24 "quantity": 3,25 "description": "papier123"26 }27 ]28}