Developer documentation
Variants
Use the Variants API to create, retrieve, and update variants for your articles.
A variant is a variation of an article. Every variant has its own unique variant code, sku, ean and stock. An example of an article with 3 variants can be sized t-shirts (small, medium, large).
All articles must have at least 1 variant.
Response models
These response models describe the objects returned by this resource.
The variant model
| Field | Description |
|---|---|
idstringOptional | Read-only. Unique identifier for the variant. |
article_codestringOptional | Article codes are unique on customer level. |
namestringOptional | - |
descriptionstringOptional | - |
eanstringOptional | - |
List all variants
/wms/variants/Retrieves a collection of variants
New to the Expand header? See how it works, available groups, and request examples: Expanding responses.
Try it
Send a live request against the development middleware using your current API test session.
Request attributes
| Field | Description |
|---|---|
limitintegerOptional | Limit the number of results. Default is 50. |
pageintegerOptional | The page number to retrieve. |
directionstringOptional | Sort direction. Options: `asc` or `desc`. Default is `asc`. |
sortstringOptional | Sort field. Options: `id`, `createdAt`, `modifiedAt`, `name`, or `articleCode`. Default is `name`. |
curl https://eu-dev.middleware.ewarehousing-solutions.com/wms/variants/ \
-H 'Expand: article'[
{
"id": "f2894c16-399e-4ca1-9151-489775a6519c",
"article_code": "VBP_A",
"name": "Voorbeeld product - A",
"description": "Voorbeeld product - A",
"ean": "978020137962",
"sku": "VBP_A",
"hs_tariff_code": null,
"height": 2,
"depth": 3,
"width": 1,
"weight": 0,
"expirable": false,
"country_of_origin": null,
"using_serial_numbers": false,
"value": 15.95,
"article": {
"id": "f195e1e6-1558-4518-a34a-30783156b8c4",
"name": "T-Shirt",
"customer": "be62c27e-2aac-4ac1-902e-f770d64f8dce"
}
},
{
"id": "a3042f0b-fcb5-4b28-b02f-eced8316195d",
"article_code": "VBP_B",
"name": "Voorbeeld product - B",
"description": "Voorbeeld product - B",
"ean": "978020137963",
"sku": "VBP_B",
"hs_tariff_code": null,
"height": 2,
"depth": 3,
"width": 1,
"weight": 0,
"expirable": false,
"country_of_origin": null,
"using_serial_numbers": false,
"value": null,
"article": {
"id": "af7c1fe6-d669-414e-b066-e9733f0de7a8",
"name": "Broek",
"customer": "be62c27e-2aac-4ac1-902e-f770d64f8dce"
}
}
]Retrieve a variant
/wms/variants/:id/Retrieve a single variant.
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/variants/e710389a-5505-49d4-9b99-8314f3543427
-H 'Expand: article'{
"id": "f2894c16-399e-4ca1-9151-489775a6519c",
"article_code": "VBP_A",
"name": "Voorbeeld product - A",
"description": "Voorbeeld product - A",
"ean": "978020137962",
"sku": "VBP_A",
"hs_tariff_code": null,
"height": 2,
"depth": 3,
"width": 1,
"weight": 0,
"expirable": false,
"country_of_origin": null,
"using_serial_numbers": false,
"value": 15.95,
"article": {
"id": "9b67aea7-bb5c-4626-80fa-c6473f420ab3",
"name": "Voorbeeld product 1",
"customer": "53b5a543-129a-403c-9a6e-3d9c525ffa5b"
}
}Create a variant
/wms/variants/This endpoint allows you to add a new variant
Try it
Send a live request against the development middleware using your current API test session.
Request attributes
| Field | Description | Example value |
|---|---|---|
articleuuidRequired | Article identifier the variant belongs to. | |
article_codestringRequired | Unique article code. | |
namestringOptional | Variant name. | |
descriptionstringOptional | Variant description. | |
eanstringOptional | EAN code. | |
skustringOptional | SKU value. | |
hs_tariff_codestringOptional | HS tariff code. | |
widthstringOptional | Width. | |
heightstringOptional | Height. | |
depthstringOptional | Depth. | |
weightstringOptional | Weight. | |
expirablebooleanOptional | Whether the variant expires. | |
country_of_originstringOptional | Country of origin. | |
valuefloatOptional | Monetary value. | Not editable here |
using_serial_numbersbooleanOptional | Whether serial numbers are used. |
curl -X POST 'https://eu-dev.middleware.ewarehousing-solutions.com/wms/variants/' \
-H 'Content-Type: application/json' \
--data-raw '{
"article": "f195e1e6-1558-4518-a34a-30783156b8c4",
"article_code": "TB001",
"name": "T-Shirt blue",
"ean": 871040031114,
"sku": "PDVL_001",
"hs_tariff_code": null,
"width": 100,
"height": null,
"depth": 0,
"weight": null,
"expirable": false,
"country_of_origin": "NL",
"value": 0.0,
"using_serial_numbers": false,
}'{
"id": "98fcffc2-8d47-4bf3-9bd0-f07ee0596562",
"article_code": "TB001",
"name": "T-Shirt blue",
"description": null,
"ean": "871040031114",
"sku": "PDVL_001",
"hs_tariff_code": null,
"height": null,
"depth": 0,
"width": 100,
"weight": null,
"expirable": false,
"country_of_origin": "NL",
"using_serial_numbers": false,
"value": 0,
"article": {
"id": "f195e1e6-1558-4518-a34a-30783156b8c4",
"name": "T-Shirt",
"customer": "be62c27e-2aac-4ac1-902e-f770d64f8dce"
}
}Update a variant
/wms/variants/:id/This endpoint allows you to perform an update on an variant.
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/variants/774bf6ee-90cf-11e9-b36d-0242ac120005/ \
--data-raw '{
"description": "T-shirt is blue",
}'{
"id": "8700a223-785c-4234-8279-6a807808b543",
"article_code": "TB001",
"name": "T-Shirt blue",
"description": "T-shirt is blue",
"ean": 871040031114,
"sku": "PDVL_001",
"hs_tariff_code": null,
"width": 100,
"height": null,
"depth": 0,
"weight": null,
"expirable": false,
"country_of_origin": "NL",
"value": 0,
"using_serial_numbers": false,
"article": {
"id": "f195e1e6-1558-4518-a34a-30783156b8c4",
"name": "1337",
"customer": "be62c27e-2aac-4ac1-902e-f770d64f8dce"
}
}