Variations

The Variations APIs are a suite of endpoints designed for managing and retrieving item variation data within a catalog. These endpoints are part of a RESTful API, allowing for the creation, update, deletion, and retrieval of variation information.

API endpoints

Update variations

JSON parameters

JSON parameters are the same as for create or replace variations. The only difference is that name and data.url in the variation schema are not required when updating already existing items.

Modification of metadata

Metadata modifications cannot be done for on_missing=CREATE when working with the Update variations endpoint.

Metadata values can be partially updated with requests by providing them in a special format:

"key:action": ["value1", "value2"] where action could be either add or remove.

For example, this request will add "red" and remove "blue" from the metadata with the key "store1":

{
  "id": "t-shirt",
  "name": "T-Shirt",
  "data": {
    "store1:add": ["Red"],
    "store1:remove": ["Blue"]
  }
}

Rate limiting

To provide a better user experience with catalog update operations, a queuing mechanism is in place. Every catalog request creates a task to process.

The default queue limit is 1,000. After exceeding the limit of 1,000 tasks, rate limiting will be applied.

To understand the remaining quota, please refer to the X-RateLimit-Tasks-Remaining header, which will show how many tasks can be submitted at the moment.