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

# Create Product

> Create Product



## OpenAPI

````yaml post /v2/products
openapi: 3.0.0
info:
  description: Open API's for WizCommerce API's
  title: WizCommerce Open API's
  termsOfService: https://wizcommerce.com/terms/
  contact:
    name: Tech Support
    url: https://help.wizcommerce.com/
    email: tech@wizcommerce.com
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  version: '1.0'
servers:
  - url: https://api.wizcommerce.com
    description: Production BaseURL
  - url: https://api-staging.sourcerer.tech
    description: Staging BaseURL
security: []
paths:
  /v2/products:
    post:
      tags:
        - Product
      summary: Create Product
      description: Create Product
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/dtosv2.ProductCreateRequest'
        description: Product Create Request
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/dtos.SuccessResponse'
                  - type: object
                    properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/dtosv2.ProductListResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.HttpError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.HttpError'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.HttpError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.HttpError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    dtosv2.ProductCreateRequest:
      type: object
      required:
        - group_code
        - variants
      properties:
        group_code:
          description: If no grouping is available, the group code will be the sku_id
          type: string
          x-order: '1'
          example: PRD1
        grouping_attributes:
          description: >-
            Ordered list of attribute names used to distinguish and group
            variants under the same product (e.g., size, then shape). Example:
            ["color", "size"]
          type: array
          items:
            type: string
          x-order: '2'
          example:
            - color
            - size
        variants:
          type: array
          items:
            $ref: '#/components/schemas/dtosv2.VariantCreateRequest'
          x-order: '3'
        brand:
          description: Brand name (required when brand management is enabled).
          type: string
          x-order: 3a
          example: Acme
    dtos.SuccessResponse:
      type: object
      properties:
        data:
          x-order: '1'
    dtosv2.ProductListResponse:
      type: object
      properties:
        id:
          description: UUID
          type: string
          x-order: '1'
          example: 01f5d171-d3e3-4b2b-bd57-0727194b5bed
        parent_id:
          type: string
          x-order: '1'
          example: 01f5d171-d3e3-4b2b-bd57-0727194b5bed
        reference_id:
          type: string
          x-order: '1'
          example: SKU123
        sku:
          type: string
          x-order: '2'
          example: SKU123
        name:
          type: string
          x-order: '3'
          example: Product Name
        group_code:
          type: string
          x-order: '4'
          example: PRD1
        medias:
          type: array
          items:
            $ref: '#/components/schemas/dtosv2.ProductMediaResponse'
          x-order: '5'
        is_primary:
          type: boolean
          x-order: '6'
          example: true
        priority:
          type: integer
          x-order: '6.5'
          example: 1
        status:
          type: string
          enum:
            - active
            - inactive
          x-order: '7'
          example: active
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/dtos.AttributeResponse'
          x-order: '8'
        created_at:
          type: string
          x-order: '9'
        updated_at:
          type: string
          x-order: '10'
        channel_visibility:
          allOf:
            - $ref: '#/components/schemas/dtosv2.ChannelVisibilityResponse'
          x-order: '11'
        volume:
          description: Physical volume in both CFT and CBM
          allOf:
            - $ref: '#/components/schemas/dtosv2.VolumeResponse'
          x-order: '12'
    errors.HttpError:
      type: object
      properties:
        code:
          type: string
          x-order: '1'
        message:
          type: string
          x-order: '2'
        details:
          type: array
          items:
            $ref: '#/components/schemas/errors.HttpErrorDetails'
          x-order: '3'
    dtosv2.VariantCreateRequest:
      type: object
      required:
        - name
        - product_prices
        - reference_id
        - sku_id
      properties:
        sku_id:
          type: string
          x-order: '1'
          example: 66112458-fda7-4a96-8121-9c1d57a8651d
        reference_id:
          description: >-
            Reference ID for the variant, if no reference id is available, the
            sku_id should be used
          type: string
          x-order: '2'
          example: PRD1
        name:
          type: string
          maxLength: 255
          x-order: '3'
          example: 8'X10'
        categories:
          description: >-
            One or more category names for this variant, in case sub categories
            are available, the sub categories should be separated by :: eg:
            "category1::sub_category1::sub_sub_category1" then the category
            "sub_sub_category1" will be mapped to the product
          type: array
          items:
            type: string
          x-order: '4'
        collections:
          description: One or more collection IDs for this variant
          type: array
          items:
            type: string
          x-order: '5'
        medias:
          description: Media assets associated with this variant
          type: array
          items:
            $ref: '#/components/schemas/dtosv2.ProductMediaRequest'
          x-order: '6'
        attributes:
          description: Key-value pair attributes like size, shape, material, etc.
          type: array
          items:
            $ref: '#/components/schemas/dtos.AttributeRequest'
          x-order: '7'
        product_prices:
          description: Prices mapped to price lists
          type: array
          items:
            $ref: '#/components/schemas/dtosv2.ProductPriceRequest'
          x-order: '8'
        is_primary:
          description: Indicates if this is the primary variant
          type: boolean
          default: false
          x-order: '9'
          example: true
        priority:
          description: Sets the Priority for the product listing sort order.
          type: integer
          x-order: '10'
        url_slug:
          description: URL-friendly identifier for the variant
          type: string
          x-order: '11'
          example: blue-t-shirt-xl
        seo_info:
          allOf:
            - $ref: '#/components/schemas/dtosv2.SeoInfoCreateRequest'
          x-order: '12'
        channel_visibility:
          description: Channel-specific visibility; omit to use default (DontShow)
          allOf:
            - $ref: '#/components/schemas/dtosv2.ChannelVisibilityRequest'
          x-order: '13'
        volume:
          description: >-
            Physical volume. Provide only one of cbm or cft. If both are
            provided, cft takes precedence and cbm is ignored.
          allOf:
            - $ref: '#/components/schemas/dtosv2.VolumeRequest'
          x-order: '14'
        tags:
          description: Tag labels; each must match an existing tag
          type: array
          items:
            type: string
          x-order: 5a
    dtosv2.ProductMediaResponse:
      type: object
      properties:
        is_default:
          type: boolean
          example: true
        order:
          type: integer
          example: 1
        type:
          type: string
          example: image
        url:
          type: string
          example: https://example.com/image1.jpg
    dtos.AttributeResponse:
      type: object
      properties:
        id:
          type: string
          x-order: '1'
          example: '1234567890'
        name:
          type: string
          x-order: '2'
          example: color
        value:
          type: string
          x-order: '3'
          example: red
    dtosv2.ChannelVisibilityResponse:
      type: object
      properties:
        website:
          description: >-
            One of: DontShow | ShowForLoggedInUsersOnly |
            ShowForLoggedInAndNonLoggedInUsers
          type: string
          example: DontShow
    dtosv2.VolumeResponse:
      type: object
      properties:
        cbm:
          type: number
          example: 0.042475
        cft:
          type: number
          example: 1.5
    errors.HttpErrorDetails:
      type: object
      properties:
        field:
          type: string
          x-order: '1'
        reason:
          type: string
          x-order: '2'
    dtosv2.ProductMediaRequest:
      type: object
      required:
        - order
        - type
        - url
      properties:
        url:
          description: Media URL, should be a valid URL with public access
          type: string
          x-order: '1'
          example: https://example.com/image1.jpg
        order:
          description: Display order
          type: integer
          x-order: '2'
          example: 1
        is_default:
          description: Whether this is the default media
          type: boolean
          default: false
          x-order: '3'
          example: true
        type:
          description: Media type (currently supports "image" or "video")
          type: string
          enum:
            - image
          x-order: '4'
          example: image
    dtos.AttributeRequest:
      type: object
      required:
        - name
        - value
      properties:
        name:
          type: string
          maxLength: 255
          x-order: '1'
          example: '1234567890'
        value:
          type: string
          x-order: '2'
          example: red
    dtosv2.ProductPriceRequest:
      type: object
      required:
        - price_list_id
      properties:
        price_list_id:
          type: string
          x-order: '1'
          example: PRC123
        price:
          description: Price for this variant under the given price list
          type: number
          minimum: 0
          x-order: '2'
          example: 100
        min_order_quantity:
          description: Minimum quantity allowed per order
          type: integer
          default: 1
          minimum: 1
          x-order: '3'
          example: 1
        max_order_quantity:
          description: Maximum quantity allowed per order
          type: integer
          default: 9999
          minimum: 1
          x-order: '4'
          example: 100
        step_increment:
          description: Step increment for ordering (e.g., in multiples of 1, 5, etc.)
          type: integer
          default: 1
          minimum: 1
          x-order: '5'
          example: 1
        sale_price:
          description: The price at which the product is sold to the customer
          type: number
          x-order: '6'
          example: 90
        default_order_quantity:
          description: >-
            The initial order quantity (IOQ) that will be added to the cart by
            default
          type: integer
          x-order: '7'
          example: 2
        volume_tiers:
          description: >-
            Defines volume-based pricing for a product. Each tier specifies the
            minimum quantity (start_quantity), the unit price (price), and
            optional incremental order quantity (step_increment). The applicable
            price is determined by the highest tier matching the ordered
            quantity.
          type: array
          items:
            $ref: '#/components/schemas/dtosv2.VolumeTierRequest'
          x-order: '8'
    dtosv2.SeoInfoCreateRequest:
      type: object
      properties:
        primary_title:
          description: Primary browser/page title shown in the page title bar.
          type: string
          x-order: '1'
        title:
          description: SEO meta title used by search engines and social previews.
          type: string
          x-order: '2'
        description:
          description: SEO meta description used by search engines and social previews.
          type: string
          x-order: '3'
        keywords:
          description: SEO keywords for this product page.
          type: array
          items:
            type: string
          x-order: '4'
    dtosv2.ChannelVisibilityRequest:
      type: object
      properties:
        website:
          description: >-
            Allowed values: DontShow | ShowForLoggedInUsersOnly |
            ShowForLoggedInAndNonLoggedInUsers
          type: string
          enum:
            - DontShow
            - ShowForLoggedInUsersOnly
            - ShowForLoggedInAndNonLoggedInUsers
          x-order: '1'
          example: DontShow
    dtosv2.VolumeRequest:
      type: object
      properties:
        cbm:
          description: Cubic metres
          type: number
          minimum: 0
          x-order: '1'
          example: 12.5
        cft:
          description: Cubic feet
          type: number
          minimum: 0
          x-order: '2'
          example: 441.43
    dtosv2.VolumeTierRequest:
      type: object
      required:
        - price
        - start_quantity
      properties:
        price:
          type: number
          minimum: 0
        start_quantity:
          type: integer
          maximum: 99999
          minimum: 1
        step_increment:
          type: integer
          default: 1
          minimum: 1
  securitySchemes:
    ApiKeyAuth:
      description: API Key for authentication
      type: apiKey
      name: X-API-Key
      in: header

````