> ## 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.

# Update Product

> Update Product

<Info>
  The `PATCH` request is used to partially update an existing entity by the
  given id. This means:

  * Only the fields provided in the request body will be updated.
  * Fields not provided in the request body will remain unchanged.
  * The request is idempotent, meaning multiple identical PATCH requests will
    always result in the same final state.
</Info>


## OpenAPI

````yaml patch /v2/products/{id}
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/{id}:
    patch:
      tags:
        - Product
      summary: Update Product
      description: Update Product
      parameters:
        - description: Product ID
          name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/dtosv2.ProductUpdateRequest'
        description: Product Update Request
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/dtos.SuccessResponse'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/dtosv2.ProductDetailsResponse'
        '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.ProductUpdateRequest:
      type: object
      properties:
        group_code:
          description: >-
            If the code already exists, this variant joins that group. If the
            code is new, every variant in this group gets the new code. Omit to
            leave the group as-is.
          type: string
          x-order: '2'
          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.5'
          example:
            - color
            - size
        reference_id:
          description: >-
            Reference ID for the variant, if no reference id is available, the
            sku_id should be used
          type: string
          x-order: '3'
          example: PRD1
        name:
          type: string
          maxLength: 255
          x-order: '4'
          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: '5'
        collections:
          description: One or more collection IDs for this variant
          type: array
          items:
            type: string
          x-order: '6'
        medias:
          description: Media assets associated with this variant
          type: array
          items:
            $ref: '#/components/schemas/dtosv2.ProductMediaRequest'
          x-order: '7'
        attributes:
          description: Key-value pair attributes like size, shape, material, etc.
          type: array
          items:
            $ref: '#/components/schemas/dtos.AttributeRequest'
          x-order: '8'
        product_prices:
          description: Prices mapped to price lists
          type: array
          items:
            $ref: '#/components/schemas/dtosv2.ProductPriceRequest'
          x-order: '9'
        status:
          type: string
          enum:
            - inactive
            - active
          x-order: '10'
          example: inactive
        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.SeoInfoUpdateRequest'
          x-order: '12'
        channel_visibility:
          description: Channel-specific visibility; omit to leave unchanged
          allOf:
            - $ref: '#/components/schemas/dtosv2.ChannelVisibilityRequest'
          x-order: '13'
        priority:
          description: Omit = no change; null = clear; value = set.
          type: integer
          x-nullable: 'true'
          x-order: '13.5'
        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: Send as empty list [] to remove all tags
          type: array
          items:
            type: string
          x-order: 6a
        brand:
          description: Brand name; one group one brand. Omit to leave unchanged.
          type: string
          x-order: 6b
          example: Acme
    dtos.SuccessResponse:
      type: object
      properties:
        data:
          x-order: '1'
    dtosv2.ProductDetailsResponse:
      type: object
      properties:
        id:
          description: UUID
          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'
        categories:
          type: array
          items:
            type: string
          x-order: '9'
          example:
            - Electronics
            - Smartphones
        created_at:
          type: string
          x-order: '10'
        updated_at:
          type: string
          x-order: '11'
        price_lists:
          type: array
          items:
            $ref: '#/components/schemas/dtosv2.ProductPriceResponse'
          x-order: '12'
        url_slug:
          type: string
          x-order: '13'
          example: blue-t-shirt-xl
        seo_info:
          allOf:
            - $ref: '#/components/schemas/dtosv2.SeoInfoResponse'
          x-order: '14'
        channel_visibility:
          allOf:
            - $ref: '#/components/schemas/dtosv2.ChannelVisibilityResponse'
          x-order: '15'
        volume:
          description: Physical volume in both CFT and CBM
          allOf:
            - $ref: '#/components/schemas/dtosv2.VolumeResponse'
          x-order: '16'
        tags:
          type: array
          items:
            type: string
          x-order: 9a
          example:
            - tag1
            - tag2
        brand:
          description: null when brand management disabled or no mapping
          type: string
          x-order: 9b
          example: BrandName
    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.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.SeoInfoUpdateRequest:
      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.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.ProductPriceResponse:
      type: object
      properties:
        created_at:
          type: string
        default_order_quantity:
          type: integer
        id:
          type: string
        max_order_quantity:
          type: integer
        min_order_quantity:
          type: integer
        price:
          type: number
        sale_price:
          type: number
        step_increment:
          type: integer
        updated_at:
          type: string
        volume_tiers:
          type: array
          items:
            $ref: '#/components/schemas/dtosv2.VolumeTierResponse'
    dtosv2.SeoInfoResponse:
      type: object
      properties:
        description:
          description: SEO meta description used by search engines and social previews.
          type: string
        keywords:
          description: SEO keywords for this product page.
          type: array
          items:
            type: string
        primary_title:
          description: Primary browser/page title shown in the page title bar.
          type: string
        title:
          description: SEO meta title used by search engines and social previews.
          type: string
    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.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
    dtosv2.VolumeTierResponse:
      type: object
      properties:
        price:
          type: number
          example: 20
        start_quantity:
          type: integer
          example: 1
        step_increment:
          type: integer
          example: 1
  securitySchemes:
    ApiKeyAuth:
      description: API Key for authentication
      type: apiKey
      name: X-API-Key
      in: header

````