Developer documentation
Batches
Use the Batches API to list batches and retrieve batch details.
A batch is a lot of inventory for a specific variant, typically created when goods are received on an inbound. Batches hold per-lot attributes like expiration_date (THT, best-before date), and will include batch_codes in the future. Each batch has a direct relation to its variant and the inbound it came from.
Response models
These response models describe the objects returned by this resource.
The batch model
| Field | Description |
|---|---|
idstringOptional | Read-only. |
expiration_datedateOptional | Expiration date (THT, best-before) of the batch. |
quantityintegerOptional | - |
variantVariantOptional | - |
inboundInboundOptional | - |
List all batches
GET
/wms/batches/Retrieves a collection of batches
Try it
Send a live request against the development middleware using your current API test session.
Request attributes
| Field | Description |
|---|---|
article_codestringOptional | Search for a specific article code. |
eanstringOptional | Search for a specific ean. |
skustringOptional | Search for a specific sku. |
limitintegerOptional | Limit the number of results. Default is 50. |
pageintegerOptional | The page number to retrieve. |
directionstringOptional | Sort direction. Options: `asc` or `desc`. Default is `desc`. |
sortstringOptional | Sort field. Options: `createdAt` or `id`. Default is `id`. |
Request examplecURL
curl https://eu-dev.middleware.ewarehousing-solutions.com/wms/batches/Response exampleJSON
[
{
"id": "f7827cad-f857-4ebb-aba4-c5116bd6bbc9",
"expiration_date": null,
"quantity": 10,
"variant": {
"id": "b80e4926-a6ba-4686-91ca-0b5b1c6933a2",
"article_code": "VBP_A",
"name": "VBP_A",
"description": "VBP_A",
"ean": null,
"sku": null,
"hs_tariff_code": null,
"height": null,
"depth": null,
"width": null,
"weight": null,
"expirable": false,
"country_of_origin": null,
"using_serial_numbers": false,
"value": null
},
"inbound": {
"id": "6784554e-98ac-4528-8a62-72f933d34ba9",
"customer": "be62c27e-2aac-4ac1-902e-f770d64f8dce",
"created_at": "2022-04-14T13:03:56+00:00",
"reference": "INB00000000179",
"external_reference": "VB_INB_001AAA",
"status": "process_no_announcement",
"inbound_date": "2022-04-14T00:00:00+00:00",
"note": null,
"inbound_lines": [
{
"variant": {
"id": "b80e4926-a6ba-4686-91ca-0b5b1c6933a2",
"article_code": "VBP_A",
"name": "VBP_A",
"description": "VBP_A",
"ean": null,
"sku": null,
"hs_tariff_code": null,
"height": null,
"depth": null,
"width": null,
"weight": null,
"expirable": false,
"country_of_origin": null,
"using_serial_numbers": false,
"value": null
},
"quantity": 10,
"processed": 10,
"packing_slip": null
}
]
}
},
{
"id": "edeeb31e-01f2-4620-b6cb-2cd1c3e5a3f2",
"expiration_date": null,
"quantity": 3999,
"variant": {
"id": "20664efa-ec55-4eaf-a7ad-a05157b9d3da",
"article_code": "papier123",
"name": "papier123",
"description": null,
"ean": "papier123",
"sku": null,
"hs_tariff_code": null,
"height": null,
"depth": null,
"width": null,
"weight": null,
"expirable": false,
"country_of_origin": null,
"using_serial_numbers": false,
"value": 0
},
"inbound": {
"id": "0caa1ab0-f2f5-4a7f-a3b7-6ebfe3098b87",
"customer": "be62c27e-2aac-4ac1-902e-f770d64f8dce",
"created_at": "2022-04-22T10:15:03+00:00",
"reference": "INB00000000187",
"external_reference": "ADD_SANDBOX_STOCK_2022-04-22-10-15-03",
"status": "completed",
"inbound_date": "2022-04-22T10:15:03+00:00",
"note": null,
"inbound_lines": [
{
"variant": {
"id": "20664efa-ec55-4eaf-a7ad-a05157b9d3da",
"article_code": "papier123",
"name": "papier123",
"description": null,
"ean": "papier123",
"sku": null,
"hs_tariff_code": null,
"height": null,
"depth": null,
"width": null,
"weight": null,
"expirable": false,
"country_of_origin": null,
"using_serial_numbers": false,
"value": 0
},
"quantity": 4000,
"processed": 4000,
"packing_slip": 4000
}
]
}
}
]Retrieve a batch
GET
/wms/batches/:id/Retrieve a single batch.
Try it
Send a live request against the development middleware using your current API test session.
Path parameters
Request examplecURL
curl https://eu-dev.middleware.ewarehousing-solutions.com/wms/batches/e710389a-5505-49d4-9b99-8314f3543427Response exampleJSON
{
"id": "e710389a-5505-49d4-9b99-8314f3543427",
"expiration_date": null,
"quantity": 1650,
"variant": {
"id": "1e19da60-4d2b-4c15-8f4e-8978f6113c00",
"article_code": "default_variant_a_id",
"name": "default_variant_a_id",
"description": null,
"ean": "default_variant_a_id",
"sku": null,
"hs_tariff_code": null,
"height": null,
"depth": null,
"width": null,
"weight": null,
"expirable": false,
"country_of_origin": null,
"using_serial_numbers": false,
"value": 0
},
"inbound": {
"id": "f3f9950e-28a6-42f7-ac5c-80df7b1933c9",
"customer": "be62c27e-2aac-4ac1-902e-f770d64f8dce",
"created_at": "2021-11-24T10:09:09+00:00",
"reference": "INB00000000001",
"external_reference": "INITIAL_STOCK_2021-11-24-10-09-09",
"status": "completed",
"inbound_date": "2021-11-24T10:09:09+00:00",
"note": null
}
}