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

ResourceExpandables
Articlevariants
Batch-
Customers-
Document-
Inbound-
Location typesadministration_code
Modification-
Order-
Shipmentshipment_lines, shipment_labels, shipping_address, shipping_method, serial_numbers, variant, administration_code
Shipping methodadministration_code
Stockvariant
Variant-
Customer to Customer Transfercustomer_to_customer_transfer_lines, variant

Single requests

ResourceExpandables
Articlevariants
Batchvariant, inbound, inbound_lines
Document-
Inboundinbound_lines, variant, inbound_quality_controls, inbound_documents, documents, inbound_line_meta_data
Modificationmodification_lines, variant
Ordershipping_address, order_lines, documents, serial_numbers, variants, meta_data, order_line_meta_data
Shipmentshipment_lines, shipment_labels, shipping_address, shipping_method
Shipping method-
Stockvariant
Variantarticle
Customer to Customer Transfercustomer_to_customer_transfer_lines, variant

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"
        }
    ]
}