---
title: "Update catalog variations"
method: PATCH
path: "/v2/variations"
tags: ["Variations"]
---

# Update catalog variations

`PATCH /v2/variations`

## Request

- Base URL: `https://batching.catalog.cnstrc.com`
- URL: `https://batching.catalog.cnstrc.com/v2/variations`
- Auth: one of:
  - HTTP basic
  - HTTP bearer

**🔐 This endpoint requires [HTTP authentication](https://docs.constructor.com/reference/main-authentication) (either [Basic](https://docs.constructor.com/reference/main-authentication#basic-authentication) or [Bearer](https://docs.constructor.com/reference/main-authentication#bearer-authentication)).**
For authenticating with Bearer token, required scopes are: `catalog(w)`.

Update variations in the catalog. If a variation does not exist, it will be created.

## Query parameters

- `key` string, required: The key of the index to use.
- `section` string, required: The section of the index to use. Defaults to `Products`.
- `on_missing` 'CREATE': Strategy for handling records that do not exist in the system.

## Request body

- VariationsBatchRequest: Request body for batching variations.
  - `variations` Variation[], required: Array of variations to batch (1-100 variations).
    - `id` string, required: The ID of the variation, must be unique.
    - `item_id` string, required: The ID of the item this variation is attached to.
    - `name` string, nullable: The name of the variation, as it will appear in the results. Must contain at least one alphanumeric character.
    - `suggested_score` integer, nullable: A number that will influence the variation's initial ranking relative to other variation scores (the higher the score, the higher in the list of suggestions the variation will appear).
    - `data` VariationMetadata: Additional metadata for a variation.
      - `keywords` string[], nullable: An array of keywords for this variation. Keywords are useful if you want a product name to appear when a user enters a search term that is not in the product name itself.
      - `url` string, nullable: A URL to directly send the user after selecting the variation. Might be required in some cases. Please consult with your integration team for more information.
      - `image_url` string, nullable: A URL that points to an image you would like displayed next to some variation (only applicable when URL is supplied).
      - `group_ids` string[], nullable: You can associate each variation with one or more groups (i.e. categories). To set up a group hierarchy please contact support@constructor.io group_ids can be used as filters in search, autosuggest, and browse requests.
      - `description` string, nullable: A description for this variation. The maximum length of this field is 4000 characters.
      - `active` boolean, nullable: Whether the variation is active and eligible to be returned in results.
      - `facets` object, nullable: A mapping of facet names to values. Each value is either a single string, integer, or floating point number, or a list of those. Facet keys are limited to 100 characters; string values are limited to 200 characters.
      - `is_default` boolean, nullable: Whether this variation should always be returned as the best matching variation.

## Response `202`

Accepted

- BatchAcceptedResponse: Response for accepted batching requests.
  - `message` string, required: Success message
  - `count` integer, required: Number of items/variations accepted.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `422`: Validation Error
- `429`: Too Many Requests

---

[API](https://skmtc.dev/constructor/apis/catalog-batching-service.md) - [All operations](https://skmtc.dev/constructor/apis/catalog-batching-service/llms.txt) - [OpenAPI document](https://skmtc.dev/constructor/apis/catalog-batching-service/revisions/e02ca184d2c2?raw)
