---
updatedAt: 2026-06-19T21:07:49.000Z
agentTools:
  projectIndex: https://dev-center.instaleap.io/llms.txt
---

# Creation of Variants

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "servers": [
    {
      "url": "https://redbook.instaleap.io",
      "description": "Production environment"
    },
    {
      "url": "https://redbook.xandar.instaleap.io",
      "description": "QA environment"
    },
    {
      "url": "https://redbook.unified-jennet.instaleap.io",
      "description": "Unified Jennet Production environment"
    },
    {
      "url": "https://redbook.special-sailfish.instaleap.io",
      "description": "Special sailfish Production environment"
    }
  ],
  "info": {
    "version": "1.0",
    "title": "Redbook Api official",
    "description": "Welcome to the Catalog V2 API documentation. This API provides you the ability to create, update and consult products or catalogs, and consult the stores and categories (to understand how the data are stored in our data warehouse, check *DATA STRUCTURE CATALOG V2- DOCUMENTATION*).Here find the endpoints that are exposed with their respective documentation and mocks.\n"
  },
  "paths": {
    "/variant/variants/": {
      "post": {
        "summary": "Creation of Variants",
        "operationId": "CreateVariant",
        "parameters": [
          {
            "$ref": "#/components/parameters/apikeyHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createVariant"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/listVariant"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/400BadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          }
        },
        "tags": [
          "Variants"
        ]
      }
    }
  },
  "components": {
    "parameters": {
      "apikeyHeader": {
        "name": "x-api-key",
        "description": "token provided by Instaleap to make API calls",
        "in": "header",
        "required": true,
        "style": "simple",
        "schema": {
          "type": "string",
          "example": "{{apikey}}"
        }
      }
    },
    "schemas": {
      "400BadRequest": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "",
            "example": "Anything error"
          }
        }
      },
      "variantAttribute": {
        "type": "object",
        "description": "Name and value for each of the attributes defined in additionalAttributes.",
        "properties": {
          "attribute": {
            "type": "string",
            "description": "Name of the attribute. Should match one of the values sent in additionalAttributes.",
            "example": "RAM"
          },
          "value": {
            "type": "string",
            "description": "Value represented by this SKU for this variant sub-tree.",
            "example": "16gb"
          }
        }
      },
      "variantMember": {
        "type": "object",
        "description": "Defines each of the members of this sub-tree. At least one element representing the dominant variant should be sent.",
        "properties": {
          "sku": {
            "type": "string",
            "description": "SKU of the product to add to this sub-tree (may be a dominant or non-dominant variant).",
            "example": 12370051
          },
          "values": {
            "type": "array",
            "description": "Values for each of the attributes defined in the additionalAttributes.",
            "items": {
              "$ref": "#/components/schemas/variantAttribute"
            }
          }
        }
      },
      "variantElement": {
        "type": "object",
        "description": "Information of each of the variants sub-trees (dominants and their non-dominants variants).",
        "properties": {
          "dominantSku": {
            "type": "string",
            "description": "SKU of the product used as the dominant variant for this sub-tree.",
            "example": 12370051
          },
          "value": {
            "type": "string",
            "description": "Value corresponding to the dominantAttribute for this sub-tree. Optional if the dominantAttribute isn't sent.",
            "example": "Purple"
          },
          "dominantName": {
            "type": "string",
            "description": "Name to display for the dominant variant of this sub-tree.",
            "example": "erPhone 25XZ Purple"
          },
          "thumbnailValue": {
            "type": "string",
            "description": "Value to be displayed on the thumbnail of the dominant variant of this sub-tree.",
            "example": "#FFFFFF"
          },
          "members": {
            "type": "array",
            "description": "Defines the list of members that belongs to this variant sub-tree",
            "items": {
              "$ref": "#/components/schemas/variantMember"
            }
          }
        }
      },
      "variantWithoutReference": {
        "type": "object",
        "properties": {
          "dominantAttribute": {
            "type": "string",
            "description": "Main attribute for this set of variants, and it will make the variants.dominantName required if sent.",
            "example": "Color"
          },
          "additionalAttributes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of 'secondary' attributes which will be displayed only inside the product details page.",
            "example": [
              "RAM"
            ]
          },
          "thumbnailType": {
            "type": "string",
            "enum": [
              "color",
              "image",
              "label"
            ],
            "description": "Defines the type of thumbnails that will be used to display the sibling variants in the product detail page.",
            "example": "color"
          },
          "variants": {
            "type": "array",
            "description": "List of variant elements with the details of the dominant variant and the related non dominant variants.",
            "items": {
              "$ref": "#/components/schemas/variantElement"
            }
          }
        }
      },
      "createVariant": {
        "allOf": [
          {
            "type": "object",
            "required": [
              "variantReference",
              "variants",
              "dominantAttribute",
              "additionalAttributes"
            ],
            "properties": {
              "variantReference": {
                "type": "string",
                "description": "Unique identifier for this variant. This value will be used to update or delete the variants.",
                "example": "variant-001"
              }
            }
          },
          {
            "$ref": "#/components/schemas/variantWithoutReference"
          }
        ]
      },
      "listVariant": {
        "allOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "UUID of the variant in the database",
                "example": "2e7d33e6-7daa-40e4-b03f-f8f2bea74f6b"
              }
            }
          },
          {
            "$ref": "#/components/schemas/variantWithoutReference"
          }
        ]
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true,
    "samples-enabled": true
  }
}
```