> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kibocommerce.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate Product Variations

> Generate product variations for a product type.



## OpenAPI

````yaml /openapi/openapi_catalog_admin.json post /commerce/catalog/admin/attributedefinition/producttypes/{productTypeId}/variations
openapi: 3.0.1
info:
  description: |-
    <div id="overview_CATALOG_ADMIN">
                <h2>CATALOG ADMINISTRATION</h2>
                <p>The Catalog Administration APIs are a collection of resources for configuring the catalogs and products offered to your shoppers, including
                    discounts and coupon sets, faceting, price lists, and different types or variations of products. See the
                    <a href="/concept-guides/catalog">Catalog user guides</a>
                    for information about the related features in the Unified Commerce Admin.</p>
                <p>Use the <strong>Attributes</strong> resource to manage localization and attribute configurations for your catalogs. This current version of the Attributes API includes localizedContent to
                    support <a href="/pages/catalog-structure#multi-locale-catalogs">multi-locale catalogs</a>, which was not present in the legacy API model. If
                    you were a client prior to May 2024 and have upgraded your implementation to support this feature,
                    you can still access attribute data that has not yet been rewritten to the new model by providing
                    an x-api-version header set to "1". </p>
                <p>Use the <strong>Categories</strong> resource to organize products and control where they appear on the storefront. Create
                    and maintain a hierarchy of categories and subcategories where the site will store properties. This current version of the Categories API includes localizedContent to
                    support <a href="/pages/catalog-structure#multi-locale-catalogs">multi-locale catalogs</a>, which was not present in the legacy API model. If
                    you were a client prior to May 2024 and have upgraded your implementation to support this feature,
                    you can still access category data that has not yet been rewritten to the new model by providing
                    an x-api-version header set to "1". </p>
                <p>Use the <strong>Coupon Sets</strong> resource to view and create coupon sets. You can use coupon sets to group multiple
                    coupon codes together and associate them with one or more discounts.</p>
                <p>Use the <strong>Currency</strong> resource to manage the currency localization rules and exchange rates for any of the
                    currencies that are supported for placing orders in.</p>
                <p>Use the <strong>Discounts</strong> and <strong>Discount Settings</strong> resources to define and manage discounts to apply to products, product categories, or
                    orders. This current version of the Discounts API includes localizedContent to
                    support <a href="/pages/catalog-structure#multi-locale-catalogs">multi-locale catalogs</a>, which was not present in the legacy Products API model. If
                    you were a client prior to May 2024 and have upgraded your implementation to support this feature,
                    you can still access discount data that has not yet been rewritten to the new model by providing
                    an x-api-version header set to "1". </p>
                <p>Use the <strong>Facets</strong> resource to manage the facets shoppers use to filter product display results on a
                    storefront. Facets can include categories, product attributes, or prices, and use either a range of
                    values or discrete values.</p>
                <p>Use the <strong>Master Catalog</strong> resource to view details of the master catalogs associated with a tenant and to
                    manage the product publishing mode for each master catalog.</p>
                <p>Use the <strong>Price Lists</strong> resources to view and create price lists. You can use price lists to override the
                    catalog pricing of products for specific customer segments and/or sites.</p>
                <p>Use the <strong>Products</strong>, <strong>Product Types/Extras/Options/Properties</strong>, and <strong>Product Sort Definitions</strong> resources to create new product definitions in the master catalog and determine which
                    catalogs will feature products. This current version of the Products API includes localizedContent to
                    support <a href="/pages/catalog-structure#multi-locale-catalogs">multi-locale catalogs</a>, which was not present in the legacy Products API model. If
                    you were a client prior to May 2024 and have upgraded your implementation to support this feature,
                    you can still access product data that has not yet been rewritten to the new model by providing
                    an x-api-version header set to "1".</p>
                <p>Use the <strong>Publishing</strong> resource to publish pending product updates together as part of a set.</p>
                <p>Use the <strong>Search</strong> resource to manage all settings and options for providing product search on your site, as
                    well as search tuning rules.</p>
            </div>
  title: Catalog Admin
  version: 0.0.1
servers:
  - description: Kibo Base URL
    url: '{baseUrl}/api'
    variables:
      baseUrl:
        default: https://t1000000.sb.usc1.gcp.kibocommerce.com
        description: Base URL
security:
  - bearerAuth: []
paths:
  /commerce/catalog/admin/attributedefinition/producttypes/{productTypeId}/variations:
    post:
      tags:
        - ProductTypes
      summary: Generate Product Variations
      description: Generate product variations for a product type.
      parameters:
        - in: path
          name: productTypeId
          required: true
          schema:
            format: int32
            type: integer
        - in: query
          name: productCode
          schema:
            type: string
        - in: query
          name: startIndex
          schema:
            default: 0
            format: int32
            type: integer
        - in: query
          name: pageSize
          schema:
            default: 0
            format: int32
            type: integer
        - in: query
          name: sortBy
          schema:
            type: string
        - in: query
          name: filter
          schema:
            type: string
        - description: limits which fields are returned in the response body
          in: query
          name: responseFields
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              items:
                $ref: '#/components/schemas/CatalogAdminsProductOption'
              type: array
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductVariationPagedCollection'
            text/json:
              schema:
                $ref: '#/components/schemas/ProductVariationPagedCollection'
            text/plain:
              schema:
                $ref: '#/components/schemas/ProductVariationPagedCollection'
          description: OK
components:
  schemas:
    CatalogAdminsProductOption:
      description: "Product options for configurable or stand-alone products. A configurable option is one that the shopper chooses when ordering, for example, \r\nthe color of a T-shirt. A stand-alone option is independent of the product and can be added to the product order. For example, a monogram."
      properties:
        attributeFQN:
          description: Unique identifier of the Attribute.
          nullable: true
          type: string
        isProductImageGroupSelector:
          description: >-
            Defines whether or not this option can be used to segment product
            images
          nullable: true
          type: boolean
        values:
          description: List of all the values for this product option.
          items:
            $ref: '#/components/schemas/CatalogAdminsProductOptionValue'
          nullable: true
          type: array
      type: object
    ProductVariationPagedCollection:
      description: >-
        Collection of product variations where the variations are returned in a
        series of pages.
      properties:
        items:
          items:
            $ref: '#/components/schemas/ProductVariation'
          nullable: true
          type: array
        pageCount:
          format: int32
          type: integer
        pageSize:
          format: int32
          type: integer
        startIndex:
          format: int32
          type: integer
        totalCount:
          format: int32
          type: integer
      type: object
    CatalogAdminsProductOptionValue:
      description: >-
        A value of a product option for this product. For example, a computer
        product may have an option called "Memory" that can have the values
        "6GB,"8GB," and "12GB."
      properties:
        attributeVocabularyValueDetail:
          $ref: '#/components/schemas/CatalogAdminsAttributeVocabularyValue'
        value:
          nullable: true
      type: object
    ProductVariation:
      description: >-
        The ProductVariation resource helps merchants manage their products with
        configurable options. Using this resource, the system creates a matrix
        of all possible combinations of the product options and the merchant
        confirms which variations match products for sale. For example, a
        T-shirt with three color and three size options has nine possible
        product variations. The system keeps track of inventory for each
        variation.
      properties:
        deltaPrice:
          $ref: '#/components/schemas/ProductVariationDeltaPrice'
        deltaWeight:
          description: Weight of the product with this variation.
          format: double
          nullable: true
          type: number
        fixedPrice:
          $ref: '#/components/schemas/ProductVariationFixedPrice'
        fixedWeight:
          description: Fixed weight of the product with this variation.
          format: double
          nullable: true
          type: number
        fulfillmentTypesSupported:
          description: Indicates the fulfillment types the product supports.
          items:
            type: string
          nullable: true
          type: array
        isActive:
          description: >-
            If true, the merchant accepts the variation generated from the
            configurable options as a product offering. If IsActive is false
            then the product variation is not for sale--either because it was
            never a product offering or it was permanently dropped. IsActive is
            not intended for temporary unavailability. Default is false.
          nullable: true
          type: boolean
        isOrphan:
          description: >-
            If true, the variation is no longer possible. The system sets
            IsOrphan to true when the merchant has changed something to make
            this variation impossible. For example, if the merchant stopped
            selling all "small" shirts, all product variations with the "small"
            option are set to IsOrphan. System-supplied and read-only.
          nullable: true
          type: boolean
        localizedDeltaPrice:
          description: "How much more the variation costs above the cost of the base product. If the price of the base product changes, this price is adjusted accordingly.\r\nThis collection allows for multiple currencies."
          items:
            $ref: '#/components/schemas/ProductVariationDeltaPrice'
          nullable: true
          type: array
        localizedFixedPrice:
          description: "Price of the variation using fixed per currency\r\nThis collection allows for multiple currencies."
          items:
            $ref: '#/components/schemas/ProductVariationFixedPrice'
          nullable: true
          type: array
        options:
          description: >-
            List of values for this product variation: such as "small, "red..
            these are read only here as the variationKey defines the values "
          items:
            $ref: '#/components/schemas/ProductVariationOption'
          nullable: true
          type: array
        properties:
          description: List of properties specific to this variation
          items:
            $ref: '#/components/schemas/ProductVariationProperty'
          nullable: true
          type: array
        supplierInfo:
          $ref: '#/components/schemas/ProductSupplierInfo'
        upc:
          description: Price Lookup Unit code for the product
          nullable: true
          type: string
        variationExists:
          description: >-
            If true, the product variation exists. When the merchant sets
            IsActive to true, the system sets VariationExists to true and
            creates a Variation Key as a unique identifier for this variation.
            System-supplied and read-only.
          nullable: true
          type: boolean
        variationProductCode:
          description: >-
            Descriptive code to refer to a single variation. Typically this is a
            sequence appended to the base ProduceCode. A merchant can create
            this code to easily recognize a product variation. By default, the
            system creates this code by appending a number to the base product.
            After the merchant supplies this code, it becomes read-only.
          nullable: true
          type: string
        variationkey:
          description: >-
            Unique identifier for a single variation ("small" + "red" +
            "short-sleeved"). System-supplied and read-only.
          nullable: true
          type: string
      type: object
    CatalogAdminsAttributeVocabularyValue:
      description: Value of an attribute
      properties:
        content:
          $ref: '#/components/schemas/AttributeVocabularyValueLocalizedContent'
        displayOrder:
          description: >-
            The order in which the attribute value displays. If you omit a value
            for this property, Mozu infers the display order from the attribute
            value's position the list.
          format: int32
          nullable: true
          type: integer
        localizedContent:
          description: >-
            The Content of an attribute value. This content is in multiple
            locals supported by the master catalog and is only valid for String
            DataType.
          items:
            $ref: '#/components/schemas/AttributeVocabularyValueLocalizedContent'
          nullable: true
          type: array
        mappedGenericValues:
          description: "The actual values of the related generic attribute. This value must match the datatype of the attribute and already exist \r\nwithin the Vocabulary values of the related ValueMappingAttribute. Only supporting string at this time."
          items: {}
          maxItems: 200
          nullable: true
          type: array
        productName:
          description: The ProductName when the Attribute DataType is ProductCode.
          nullable: true
          type: string
        value:
          description: "The actual value of the attribute vocabulary. This value must be unique within the vocabulary for a single attribute and match the datatype of the attribute. \r\nString data type requires a canonical value here or one will be system generated if null. The actual string content displayed to users should be stored as Content. \r\nString values require content to be present.\r\nOnce this value is set it cannot be changed."
          maxLength: 50
          nullable: false
          pattern: ^[A-Za-z0-9-_\.()]*[A-Za-z0-9-_()]
        valueSequence:
          description: Read only System generated monotonically increasing unique sequence.
          format: int32
          nullable: true
          type: integer
      type: object
    ProductVariationDeltaPrice:
      description: >-
        How much more a product variation costs above the cost of the base
        product. If the price of the base product changes, this price is
        adjusted automatically.
      properties:
        creditValue:
          description: Credit amt of the product
          format: double
          nullable: true
          type: number
        currencyCode:
          description: Which currency is in use.
          nullable: true
          type: string
        msrp:
          description: Manufacturer Suggested Retail Price.
          format: double
          nullable: true
          type: number
        value:
          description: >-
            How much more the variation costs above the cost of the base
            product.
          format: double
          nullable: true
          type: number
      type: object
    ProductVariationFixedPrice:
      properties:
        creditValue:
          description: Credit amt of the product
          format: double
          nullable: true
          type: number
        currencyCode:
          description: Which currency is in use.
          nullable: true
          type: string
        listPrice:
          description: Variation price for fixed pricing
          format: double
          nullable: true
          type: number
        msrp:
          description: Manufacturer Suggested Retail Price.
          format: double
          nullable: true
          type: number
        salePrice:
          description: Variation sale price whne fixed pricing
          format: double
          nullable: true
          type: number
      type: object
    ProductVariationOption:
      description: >-
        An option for a product variation. For example, a T-shirt with size and
        color configurable options, might have a product variation option of
        "size" or "color."
      properties:
        attributeFQN:
          description: >-
            Unique identifier of the product variation option. System-supplied
            and read-only.
          nullable: true
          type: string
        content:
          $ref: '#/components/schemas/AttributeVocabularyValueLocalizedContent'
        value:
          description: >-
            Name of the product variation option used on the admin side
            independent of how it appears on the storefront. For example, the
            internal "SZ" attribute might appear as "size" on the storefront.
          nullable: true
      type: object
    ProductVariationProperty:
      description: ''
      properties:
        attributeFQN:
          description: Unique identifier of the Attribute.
          nullable: true
          type: string
        values:
          items:
            $ref: '#/components/schemas/CatalogAdminsProductPropertyValue'
          nullable: true
          type: array
      type: object
    ProductSupplierInfo:
      description: Supplier info for the product
      properties:
        cost:
          $ref: '#/components/schemas/CatalogAdminsProductCost'
        distPartNumber:
          nullable: true
          type: string
        mfgPartNumber:
          nullable: true
          type: string
      type: object
    AttributeVocabularyValueLocalizedContent:
      description: Attribute Value Localized Resource
      properties:
        localeCode:
          description: >-
            Language used for the string attribute value. Currently, only en_US
            is supported.
          nullable: true
          type: string
        stringValue:
          description: Localized Value in the language of the locale code
          minLength: 1
          nullable: false
          type: string
      type: object
    CatalogAdminsProductPropertyValue:
      description: >-
        A value of a product option for this product. For example, a computer
        product may have an option called "Memory" that can have the values
        "6GB,"8GB," and "12GB."
      properties:
        attributeVocabularyValueDetail:
          $ref: '#/components/schemas/CatalogAdminsAttributeVocabularyValue'
        content:
          $ref: '#/components/schemas/ProductPropertyValueLocalizedContent'
        localizedContent:
          items:
            $ref: '#/components/schemas/ProductPropertyValueLocalizedContent'
          nullable: true
          type: array
        value:
          nullable: true
      type: object
    CatalogAdminsProductCost:
      description: Price of the product and currency used.
      properties:
        cost:
          description: >-
            Cost of the product. This is the price the merchant pays for the
            product.
          format: double
          nullable: true
          type: number
        isoCurrencyCode:
          description: Currency code.
          nullable: true
          type: string
      type: object
    ProductPropertyValueLocalizedContent:
      description: Attribute Value Localized Resource
      properties:
        localeCode:
          description: Language used for the string attribute value.
          nullable: true
          type: string
        stringValue:
          description: Localized Value in the language of the locale code
          nullable: true
          type: string
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      description: JWT Authorization header using the Bearer scheme.
      scheme: bearer
      type: http

````