Developer documentation
Return labels
Use the WMS Return Labels API to create, retrieve, update, request (generate), and cancel return shipping labels for your customers. All endpoints require authentication and an X-Customer-Code header.
Use the WMS Return Labels API to create, retrieve, update, request (generate), and cancel return shipping labels. All operations are scoped by the X-Customer-Code header.
**Quick links**
Go directly to: Retrieve a return label • Request (generate) • Create
How do I get a shipping_method id?
If you create a Return Label using a shipping method, you need the shipping method ID (UUID) for the carrier/service you want to use.
You can retrieve shipping methods via the Shipping Methods API:
- List all shipping methods: GET /wms/shippingmethods/
- Retrieve a specific shipping method: GET /wms/shippingmethods/:id/
Tip: Use query parameters such as code, shipper, or shipping_software to find the correct method for returns. See the examples on the Shipping methods page.
Response models
These response models describe the objects returned by this resource.
The return label model
Top-level return label properties returned by the API.
| Field | Description |
|---|---|
iduuidOptional | Read-only. |
external_referencestringOptional | Derived from the shipment when created using shipment_id; otherwise, can be set via external_reference on create. |
urlstring|nullOptional | Signed URL to the label PDF. Null until requested/generated. |
created_atdatetime (ISO 8601)Optional | Read-only. |
tracking_informationarray of TrackingInformationOptional | - |
TrackingInformation
Nested tracking objects inside `tracking_information`.
| Field | Description |
|---|---|
label_codestring|nullOptional | - |
tracking_codestring|nullOptional | - |
tracking_urlstring|nullOptional | - |
SenderAddress (response)
Address object returned by the API in `sender_address`.
| Field | Description |
|---|---|
addressed_tostringOptional | - |
contact_personstring|nullOptional | - |
streetstringOptional | - |
street2string|nullOptional | - |
street_numberstringOptional | - |
SenderAddress (request: Create/Patch)
Address shape accepted when creating or updating a return label.
| Field | Description |
|---|---|
addressed_tostringOptional | - |
contact_personstring|nullOptional | - |
streetstringOptional | - |
street2string|nullOptional | - |
street_numberstringOptional | - |
List all return labels
/wms/return-labels/Retrieve a collection of return labels. By default you get base information; expand the response using the Expand header.
Try it
Send a live request against the development middleware using your current API test session.
Request attributes
| Field | Description |
|---|---|
fromdateOptional | Accepts a date in the format YYYY-MM-DD. |
todateOptional | Accepts a date in the 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`. |
sortstringOptional | Sorting field for the return label collection. |
curl https://eu-dev.middleware.ewarehousing-solutions.com/wms/return-labels/[
{
"id": "c7c0f8a9-3c2b-4b0b-9f02-2a3c47f0b7c1",
"external_reference": "mw_64f0df1a11a4",
"url": "https://files.example/signed/595253ae-3d35-4fac-a85a-6b01c46478d3/RL00000000001.pdf?...",
"created_at": "2025-08-26T10:34:00+00:00",
"tracking_information": [
{
"label_code": "RL00000000001",
"tracking_code": "3SABC...",
"tracking_url": "https://track.example/..."
}
],
"sender_address": {
"addressed_to": "Henny Krijnen",
"contact_person": null,
"street": "De Gagelrijzen",
"street2": null,
"street_number": "127",
"street_number_addition": null,
"zipcode": "4711PD",
"city": "St.Willebrord",
"country": "NL",
"state": null,
"phone_number": "+31653263698",
"mobile_number": null,
"fax_number": null,
"email_address": null
}
}
]Retrieve a return label
/wms/return-labels/:id/Retrieve details for a specific return label. Optionally include the linked shipment with the shipment expand group when the return label is linked to a shipment.
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/return-labels/c7c0f8a9-3c2b-4b0b-9f02-2a3c47f0b7c1 \
-H 'Expand: shipment'{
"id": "c7c0f8a9-3c2b-4b0b-9f02-2a3c47f0b7c1",
"external_reference": "mw_64f0df1a11a4",
"url": "https://files.example/signed/595253ae-3d35-4fac-a85a-6b01c46478d3/RL00000000001.pdf?...",
"created_at": "2025-08-26T10:34:00+00:00",
"tracking_information": [
{
"label_code": "RL00000000001",
"tracking_code": "3SABC...",
"tracking_url": "https://track.example/..."
}
],
"sender_address": {
"addressed_to": "Henny Krijnen",
"contact_person": null,
"street": "De Gagelrijzen",
"street2": null,
"street_number": "127",
"street_number_addition": null,
"zipcode": "4711PD",
"city": "St.Willebrord",
"country": "NL",
"state": null,
"phone_number": "+31653263698",
"mobile_number": null,
"fax_number": null,
"email_address": null
}
}Create a return label
/wms/return-labels/Create a new return label. You can create it in three ways:
- Using only
shipment_id
(derive shipping details from the shipment or your defaults)
- Using
Try it
Send a live request against the development middleware using your current API test session.
curl -X POST 'https://eu-dev.middleware.ewarehousing-solutions.com/wms/return-labels/' \
-H 'Content-Type: application/json' \
--data-raw '{
"shipment_id": "e710389a-5505-49d4-9b99-8314f3543427"
}'{
"id": "c7c0f8a9-3c2b-4b0b-9f02-2a3c47f0b7c1",
"external_reference": "mw_64f0df1a11a4",
"url": null,
"created_at": "2025-08-26T10:34:00+00:00",
"tracking_information": [],
"sender_address": {
"addressed_to": "Henny Krijnen",
"contact_person": null,
"street": "De Gagelrijzen",
"street2": null,
"street_number": "127",
"street_number_addition": null,
"zipcode": "4711PD",
"city": "St.Willebrord",
"country": "NL",
"state": null,
"phone_number": "+31653263698",
"mobile_number": null,
"fax_number": null,
"email_address": null
}
}Update a return label
/wms/return-labels/:id/Partially update a return label. Provide only the fields you want to change.
After performing the request action, a return label can no longer be updated. Attempts will result in HTTP 412 Precondition Failed.
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/return-labels/c7c0f8a9-3c2b-4b0b-9f02-2a3c47f0b7c1/ \
-H 'Content-Type: application/json' \
--data-raw '{
"sender_address": {
"city": "Breda",
"country": "NL"
}
}'{
"id": "c7c0f8a9-3c2b-4b0b-9f02-2a3c47f0b7c1",
"external_reference": "mw_64f0df1a11a4",
"url": null,
"created_at": "2025-08-26T10:34:00+00:00",
"tracking_information": [],
"sender_address": {
"addressed_to": "Henny Krijnen",
"contact_person": null,
"street": "De Gagelrijzen",
"street2": null,
"street_number": "127",
"street_number_addition": null,
"zipcode": "4711PD",
"city": "Breda",
"country": "NL",
"state": null,
"phone_number": "+31653263698",
"mobile_number": null,
"fax_number": null,
"email_address": null
}
}Request a return label
/wms/return-labels/:id/requestGenerate the return label file and tracking details for the given id. No request body.
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/return-labels/c7c0f8a9-3c2b-4b0b-9f02-2a3c47f0b7c1/request{
"id": "c7c0f8a9-3c2b-4b0b-9f02-2a3c47f0b7c1",
"external_reference": "mw_64f0df1a11a4.R",
"url": "https://files.example/signed/595253ae-3d35-4fac-a85a-6b01c46478d3/RL00000000001.pdf?...",
"created_at": "2025-08-26T10:34:00+00:00",
"tracking_information": [
{
"label_code": "RL00000000001",
"tracking_code": "3SABC...",
"tracking_url": "https://track.example/..."
}
],
"sender_address": {
"addressed_to": "Henny Krijnen",
"contact_person": null,
"street": "De Gagelrijzen",
"street2": null,
"street_number": "127",
"street_number_addition": null,
"zipcode": "4711PD",
"city": "St.Willebrord",
"country": "NL",
"state": null,
"phone_number": "+31653263698",
"mobile_number": null,
"fax_number": null,
"email_address": null
}
}Cancel a return label
/wms/return-labels/:id/cancelCancel a return label that has not yet been requested (generated). If the label has already been requested, the operation fails with HTTP 412 Precondition Failed. No request body. Returns the updated label state.
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/return-labels/c7c0f8a9-3c2b-4b0b-9f02-2a3c47f0b7c1/cancel{
"id": "c7c0f8a9-3c2b-4b0b-9f02-2a3c47f0b7c1",
"external_reference": "mw_64f0df1a11a4",
"url": null,
"created_at": "2025-08-26T10:34:00+00:00",
"tracking_information": [],
"sender_address": {
"addressed_to": "Henny Krijnen",
"contact_person": null,
"street": "De Gagelrijzen",
"street2": null,
"street_number": "127",
"street_number_addition": null,
"zipcode": "4711PD",
"city": "St.Willebrord",
"country": "NL",
"state": null,
"phone_number": "+31653263698",
"mobile_number": null,
"fax_number": null,
"email_address": null
}
}