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

FieldDescription
id
stringOptional
Read-only. Unique identifier for the variant.
article_code
stringOptional
Article codes are unique on customer level.
name
stringOptional
-
description
stringOptional
-
ean
stringOptional
-

List all variants

GET/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.

GET

Request attributes

FieldDescription
limit
integerOptional
Limit the number of results. Default is 50.
page
integerOptional
The page number to retrieve.
direction
stringOptional
Sort direction. Options: `asc` or `desc`. Default is `asc`.
sort
stringOptional
Sort field. Options: `id`, `createdAt`, `modifiedAt`, `name`, or `articleCode`. Default is `name`.
Request examplecURL
curl https://eu-dev.middleware.ewarehousing-solutions.com/wms/variants/ \
            -H 'Expand: article'
Response exampleJSON
[
  {
    "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

GET/wms/variants/:id/

Retrieve a single variant.

Try it

Send a live request against the development middleware using your current API test session.

GET

Path parameters

Request examplecURL
curl https://eu-dev.middleware.ewarehousing-solutions.com/wms/variants/e710389a-5505-49d4-9b99-8314f3543427
            -H 'Expand: article'
Response exampleJSON
{
  "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

POST/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.

POST

Request attributes

FieldDescriptionExample value
article
uuidRequired
Article identifier the variant belongs to.
article_code
stringRequired
Unique article code.
name
stringOptional
Variant name.
description
stringOptional
Variant description.
ean
stringOptional
EAN code.
sku
stringOptional
SKU value.
hs_tariff_code
stringOptional
HS tariff code.
width
stringOptional
Width.
height
stringOptional
Height.
depth
stringOptional
Depth.
weight
stringOptional
Weight.
expirable
booleanOptional
Whether the variant expires.
country_of_origin
stringOptional
Country of origin.
value
floatOptional
Monetary value.Not editable here
using_serial_numbers
booleanOptional
Whether serial numbers are used.
Request examplecURL
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 exampleJSON
{
  "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

PATCH/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.

PATCH

Path parameters

Request examplecURL
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 exampleJSON
{
  "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"
  }
}