Variants
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.
The variant model
Properties
- Name
id
- Type
- string
- Readonly
- readonly
- Description
Unique identifier for the variant.
- Name
article_code
- Type
- string
- Description
Article codes are unique on customer level.
- Name
name
- Type
- string
- Description
- Name
description
- Type
- string
- Description
- Name
ean
- Type
- string
- Description
- Name
sku
- Type
- string
- Description
- Name
hs_tariff_code
- Type
- string
- Description
- Name
height
- Type
- string
- Description
- Name
depth
- Type
- string
- Description
- Name
width
- Type
- string
- Description
- Name
weight
- Type
- string
- Description
- Name
expirable
- Type
- boolean
- Description
- Name
country_of_origin
- Type
- string
- Description
- Name
using_serial_numbers
- Type
- boolean
- Description
- Name
value
- Type
- float
- Description
Variant value in €
- Name
created_at
- Type
- datetime
- Readonly
- readonly
- Description
- Name
modified_at
- Type
- datetime
- Readonly
- readonly
- Description
GET/wms/variants/
List all variants
Retrieves a collection of variants
Optional attributes
- Name
limit
- Type
- integer
- Description
- Limits the amount of results.
- Name
page
- Type
- integer
- Description
- Only works in combination with the limit attribute.
- Name
from
- Type
- date
- Description
- Accepts date format %Y-%m-%d. IE: 2022-10-22
- Name
to
- Type
- date
- Description
- Accepts date format %Y-%m-%d. IE: 2022-10-22
- Name
direction
- Type
- string
- Description
- Sort direction. Options: asc | desc
- Default
- Default: asc
- Name
sort
- Type
- string
- Description
- You can sort on the following fields:
- id
- createdAt
- modifiedAt
- name
- articleCode
- Default
- Default: name
Request
GET
/wms/variants/curl https://eu-dev.middleware.ewarehousing-solutions.com/wms/variants/ \
-H 'Expand: article'
Response
[
{
"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"
}
}
]
GET/wms/variants/:id/
Retrieve a variant
Retrieve a single variant.
Request
GET
/wms/variants/:id/curl https://eu-dev.middleware.ewarehousing-solutions.com/wms/variants/e710389a-5505-49d4-9b99-8314f3543427
-H 'Expand: article'
Response
{
"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"
}
}
POST/wms/variants/
Create a variant
This endpoint allows you to add a new variant
Required attributes
- Name
article
- Type
- uuid
- Description
- Name
article_code
- Type
- string
- Description
Unique article code.
Optional attributes
- Name
name
- Type
- string
- Description
- Name
description
- Type
- string
- Description
- Name
ean
- Type
- string
- Description
- Name
sku
- Type
- string
- Description
- Name
hs_tariff_code
- Type
- string
- Description
- Name
width
- Type
- string
- Description
- Name
height
- Type
- string
- Description
- Name
weight
- Type
- string
- Description
- Name
expirable
- Type
- boolean
- Description
- Name
country_of_origin
- Type
- string
- Description
- Name
value
- Type
- float
- Description
- Name
using_serial_numbers
- Type
- boolean
- Description
Request
POST
/wms/variants/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,
}'
Response
{
"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.0,
"article": {
"id": "f195e1e6-1558-4518-a34a-30783156b8c4",
"name": "T-Shirt",
"customer": "be62c27e-2aac-4ac1-902e-f770d64f8dce"
}
}
PATCH/wms/variants/:id/
Update a variant
This endpoint allows you to perform an update on an variant.
Request
PATCH
/wms/variants/:id/curl -X PATCH
https://eu-dev.middleware.ewarehousing-solutions.com/wms/variants/774bf6ee-90cf-11e9-b36d-0242ac120005/ \
--data-raw '{
"description": "T-shirt is blue",
}'
Response
{
"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.0,
"using_serial_numbers": false,
"article": {
"id": "f195e1e6-1558-4518-a34a-30783156b8c4",
"name": "1337",
"customer": "be62c27e-2aac-4ac1-902e-f770d64f8dce"
}
}