GitHub

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

ResourceExpandables
Articlevariants
Batch-
Customers-
Document-
Inbound-
Modification-
Order-
Shipmentshipment_lines, shipment_labels, shipping_address, shipping_method, serial_numbers, variant
Shipping method-
Stockvariant
Variant-

Single requests

ResourceExpandables
Articlevariants
Batchvariant, inbound, inbound_lines
Document-
Inboundinbound_lines, variant
Modificationmodification_lines, variant
Ordershipping_address, order_lines, documents, serial_numbers, variants, meta_data
Shipmentshipment_lines, shipment_labels, shipping_address, shipping_method
Shipping method-
Stockvariant
Variantarticle

Create requests

ResourceExpandables
Inboundinbound_lines, variant
Variantarticle

Example

Without Expand header

1GET [API URI]/wms/orders/590d67ab-f978-4a07-982d-3729c61c384e/
2HTTP/1.1
3Accept: application/json
1{
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": null
19}

With Expand header

1GET [API URI]/wms/orders/590d67ab-f978-4a07-982d-3729c61c384e/
2HTTP/1.1
3Accept: application/json
4Expand: order_lines,variant
1{
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}
Previous
Authentication