v1

latestOpenAPI 3.0.32026-07-173196215.4 KB
variants

List variants

Get multiple variants by specifying variant IDs.

Fetching variants by variant ID

To fetch a list of known variants, simply specify them by variant ID using the ids parameter, for example, /v1/variants?ids=1,2,3.


Selecting included variant data

By default, only basic variant data is included in the response. Use the with parameters (see below) to include more variant data.

To see all available variant data, for example, for debugging, you might use unrestricted with parameters: ?with=attributes,advancedAttributes,lowestPriorPrice.

Beware of using unrestricted with parameters in production applications. It will result in slow performance, as download sizes for full variant data lists can be quite big. Including only exactly what is needed will be best for performance when downloading and parsing the result.

A typical request for a variant list optimized for maximum performance is, for example, ?with=attributes:key(ean|shopSize),advancedAttributes:key(modelHeight),lowestPriorPrice.

get/v1/variants

Query parameters

shopIdstring required

In case you are operating multiple shops (for example, for different domain names or different languages), each shop is identified by its specific shopId

idsinteger[] required

Only include results with variantId matching one of the specified ids, for example ids=123,456,789.

campaignKeystring

Adjust prices based on the specified campaignKey. If results are not having a matching campaign, the default price is returned.

Please note, that campaign prices are stored in advance and available earlier than the campaign starts.

pricePromotionKeystring

Adjust variant price based on the specified pricePromotionKey. If the variant does not have a matching price promotion, the default price is returned.

withstring[]

Include related variant resources, for example, the attributes of a variant can be included using with=attributes or with=attributes:key(plusSize). Multiple includes are separated by commas with=attributes,advancedAttributes,lowestPriorPrice.

withincludes
attributesall attributes
attributes:key(<key>,<key>,...)only attributes with specified keys
attributes:type(<type>,<type>,...)only attributes with specified types
advancedAttributesall advancedAttributes
advancedAttributes:key(<key>,<key>,...)only advancedAttributes with specified keys
advancedAttributes:type(<type>,<type>,...)only advancedAttributes with specified types
lowestPriorPriceinclude variant lowestPriorPrice
merchantinclude merchant information

Response

successful operation

Example response

{
  "entities": [
    {
      "price": {
        "appliedReductions": [
          {
            "category": "campaign",
            "type": "relative"
          }
        ]
      },
      "productId": 123456,
      "referenceKey": "563843898",
      "firstLiveAt": "2023-01-26T09:30:15+00:00",
      "stock": {
        "expectedAvailabilityAt": "2023-01-26"
      },
      "createdAt": "2023-01-26T09:30:15+00:00",
      "updatedAt": "2023-01-26T09:30:15+00:00"
    }
  ]
}