---
title: "POST /api/style-variants/"
method: POST
path: "/api/style-variants/"
tags: ["Products/Variants"]
---

# POST /api/style-variants/

`POST /api/style-variants/`

## Request body

- object
  - `forCompanyId` string
  - `styleId` string, required
  - `name` string, required
  - `description` string
  - `codes` object[], required
    - `codeId` string, required — Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID.
    - `codeValue` string, required — The unique code value for this identifier, e.g. "ERP-001234".
  - `color` string, required
  - `gender` string
  - `imagesFileIds` string[]
  - `brands` string[]
  - `departments` string[]
  - `seasons` string[]
  - `collections` string[]
  - `customProperties` string
  - `suppliers` string[]
  - `mainSupplier` string
  - `vendors` string[]
  - `claimIntentions` string[]
  - `weight` object
    - `unit` 'GRAM' | 'GRAM_PER_SQUARE_METER' | 'GRAM_PER_SQUARE_FOOT' | 'GRAM_PER_SQUARE_YARD' | 'OUNCE_PER_SQUARE_YARD' | 'MILLIGRAM' | 'KILOGRAM' | 'METRIC_TON' | 'POUNDS' | 'SHORT_TON' | 'LONG_TON' | 'HUNDREDWEIGHT' | 'SHORT_HUNDREDWEIGHT' | 'LONG_HUNDREDWEIGHT' | 'OUNCE' | 'DRAM' | 'GRAIN' | 'PENNYWEIGHT' | 'SCRUPLE' | 'STONE', required
    - `value` number, required
  - `isStoryActive` boolean
  - `externalId` string — Your own identifier for this product. Unique per company across all product levels. Can be used in place of the Retraced ID on any product ID field in this API. On update it is only written when the field is present in the body — omitting it keeps the stored value, sending null clears it.

## Response `201`

Default Response

- object
  - `metadata` object, required
    - `success` boolean, required — True when the request succeeded.
  - `data` VariantSchema, required
    - `id` string, required
    - `externalId` string
    - `styleId` string, required
    - `forCompanyId` string, required
    - `name` string, required
    - `description` string
    - `codes` object[], required
      - `codeId` string, required — Identifier type for the code. Single-use (each may appear at most once): ERP_ID, PLM_ID, MAIN_SUPPLIERS_ID, PIM_ID, UPC_GTIN_12, EAN_GTIN_13, ZALANDO_ID, FASHIONCLOUD_ID. Multi-use (append a numeric suffix for additional entries, e.g. OTHER_ID1, OTHER_ID2): OTHER_ID, ALTERNATIVE_SUPPLIERS_ID.
      - `codeValue` string, required — The unique code value for this identifier, e.g. "ERP-001234".
    - `gender` string
    - `styleLevelId` string, required
    - `styleTypeId` string, required
    - `color` string, required
    - `imagesFileIds` string[]
    - `images` object[]
      - `id` string, required
      - `url` string, required
      - `previewUrl` string, required
      - `fileType` string, required
      - `bucketName` string, required
      - `name` string, required
      - `fileSize` number, required
      - `contentType` string, required
      - `fileHash` string, required
      - `createdAt` string, date-time, required
      - `updatedAt` string, date-time, required
      - `createdBy` string
      - `createdByCompanyId` string
      - `createdByImpersonateId` string
      - `createdByImpersonateName` string
      - `createdByUserId` string
      - `createdByApiKeyId` string
      - `createdByApiKeyLabel` string
      - `updatedByUserId` string
      - `updatedByUserName` string
      - `updatedByCompanyId` string
      - `updatedByCompanyName` string
      - `updatedByImpersonateId` string
      - `updatedByImpersonateName` string
      - `updatedByApiKeyId` string
      - `updatedByApiKeyLabel` string
    - `featuredImage` object
      - `id` string, required
      - `url` string, required
      - `previewUrl` string, required
      - `fileType` string, required
      - `bucketName` string, required
      - `name` string, required
      - `fileSize` number, required
      - `contentType` string, required
      - `fileHash` string, required
      - `createdAt` string, date-time, required
      - `updatedAt` string, date-time, required
      - `createdBy` string, required
      - `createdByCompanyId` string, required
      - `createdByImpersonateId` string, required
      - `createdByImpersonateName` string, required
      - `createdByUserId` string, required
      - `createdByApiKeyId` string, required
      - `createdByApiKeyLabel` string, required
      - `updatedByUserId` string, required
      - `updatedByUserName` string, required
      - `updatedByCompanyId` string, required
      - `updatedByCompanyName` string, required
      - `updatedByImpersonateId` string, required
      - `updatedByImpersonateName` string, required
      - `updatedByApiKeyId` string, required
      - `updatedByApiKeyLabel` string, required
    - `brands` string[]
    - `departments` string[]
    - `seasons` string[]
    - `collections` string[]
    - `customProperties` string
    - `suppliers` string[]
    - `mainSupplier` string
    - `vendors` string[]
    - `claimIntentions` string[]
    - `weight` object
      - `unit` string, required
      - `value` number, required
    - `overriddenFlag` string[]
    - `isComponent` union
      - boolean
      - number
    - `isStoryActive` union
      - boolean
      - number
    - `isArchived` boolean, required
    - `skuCount` number
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
    - `createdByImpersonateId` string
    - `createdByUserId` string
    - `createdByCompanyId` string
    - `createdByApiKeyId` string
    - `createdByApiKeyLabel` string
    - `updatedByImpersonateId` string
    - `updatedByUserId` string
    - `updatedByCompanyId` string
    - `updatedByApiKeyId` string
    - `updatedByApiKeyLabel` string
    - `qrCodeUrl` string — URL of the product's pre-generated QR code image (an SVG hosted on the Retraced CDN). Null until generation completes, which happens asynchronously after the product is created. The QR image encodes a Retraced-managed forwarding URL that resolves to the product's traceability page once the story is active. The URL is stable once generated — it is not regenerated when product data changes.
    - `tracingStory` object
      - `id` string, required
      - `tracingType` string, required
      - `tracingId` string, required
      - `isActive` boolean, required
      - `createdAt` string, date-time, required
      - `updatedAt` string, date-time, required
      - `tracingName` string
    - `isWeightAvailable` boolean

---

[API](https://skmtc.net/retraced/apis/api-reference.md) · [All operations](https://skmtc.net/retraced/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/retraced/api-reference/revisions/60d6c901bc4e/schema)
