---
updatedAt: 2025-10-01T13:24:58.000Z
agentTools:
  projectIndex: https://docs.quable.com/v5-EN/llms.txt
---

# /variants

Create a new variant

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "version": "2d049f10adc518320a4a4ebeb07b64db5b919923",
    "title": "Quable PIM/DAM API v4"
  },
  "paths": {
    "/variants": {
      "post": {
        "description": "Create a new variant",
        "tags": [
          "Variants"
        ],
        "responses": {
          "201": {
            "description": "Variant has been created",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "success",
                    "code",
                    "document_code",
                    "location",
                    "warnings"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "code": {
                      "type": "string"
                    },
                    "document_code": {
                      "type": "string"
                    },
                    "location": {
                      "type": "string"
                    },
                    "warnings": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "- Document Type does not accept variants\n- Variant was not created\n"
          },
          "404": {
            "description": "- Document not found\n"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/target_culture"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/VariantPostPut"
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://instance_name.quable.com/api_1.php"
    }
  ],
  "components": {
    "parameters": {
      "target_culture": {
        "name": "target_culture",
        "in": "query",
        "description": "**Code of the data locale** into which attribute's values must be retrieved or pushed\nIf empty, default locale from the account will be used.\n",
        "required": false,
        "schema": {
          "type": "string"
        }
      }
    },
    "requestBodies": {
      "VariantPostPut": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/VariantPostPut"
            }
          }
        },
        "required": true
      }
    },
    "schemas": {
      "VariantPostPut": {
        "type": "object",
        "required": [
          "code",
          "document_code"
        ],
        "properties": {
          "active": {
            "type": "boolean"
          },
          "code": {
            "type": "string"
          },
          "document_code": {
            "type": "string"
          }
        },
        "example": {
          "active": 1,
          "code": "variant_blue_XL",
          "document_code": "document_blue",
          "ERP_code": "XKLJSLD7686",
          "size": "XL"
        }
      }
    }
  }
}
```