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

# Update product variants



## OpenAPI

````yaml patch /{shopId}/products/63ec9527e29310243b665e9e
openapi: 3.0.3
info:
  title: API V2
  version: 1.0.0
  contact: {}
servers:
  - url: http://staging.qshop.ng/apiv2
    description: Staging server
  - url: http://qshop.ng/api
    description: null
security: []
tags:
  - name: Analytics
  - name: Authentication
  - name: Storefront
  - name: Roles
  - name: Banks
  - name: Products
  - name: Shops
  - name: Roles1
  - name: Bank accounts
  - name: Users
  - name: Payment methods
  - name: Integrations
  - name: Subscriptions
  - name: Currency
  - name: Shipping zones
  - name: Shipping rates
  - name: Policies
  - name: Contact us
  - name: Locations
  - name: Reviews
  - name: Referral
  - name: Stripe
  - name: Campaigns
  - name: Credits
  - name: Product Tags
  - name: Product Attributes
  - name: Product Categories
  - name: Orders
  - name: Discount
  - name: Shipping
  - name: Redeem digital assets
  - name: Coupons
  - name: Currencies
  - name: Shop categories
  - name: Locations1
  - name: Features
  - name: Subscription plan
  - name: Recurring subscription plan
  - name: Shop payments
  - name: QDiscounts
  - name: Order status
  - name: Announcements
  - name: Wishlist
  - name: Transaction status
  - name: Templates
  - name: Config
  - name: Cart management
  - name: Users1
  - name: Profile
  - name: Domains
  - name: Transactions
  - name: Subscriptions1
  - name: Subscription statuses
  - name: Security
  - name: Payments
  - name: Payment methods1
  - name: Payment platforms
  - name: Public
  - name: social
  - name: Shipping1
  - name: Orders1
  - name: Integrations1
  - name: Webhook
  - name: ShopTags
  - name: Themes
paths:
  /{shopId}/products/63ec9527e29310243b665e9e:
    patch:
      tags:
        - Products
      summary: Update product variants
      description: Update product variants
      operationId: updateProductVariants
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                attributes:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: object
                        properties:
                          _id:
                            type: string
                            example: 620230bd0d148855678615c3
                          name:
                            type: string
                            example: Color
                      options:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              example: 633595a632a48354241eedee
                            label:
                              type: string
                              example: Color
                            name:
                              type: string
                              example: Space grey
                        example:
                          - id: 633595a632a48354241eedee
                            label: Color
                            name: Space grey
                          - id: 63359d60cfce8ece38311278
                            label: Color
                            name: Black
                  example:
                    - name:
                        _id: 620230bd0d148855678615c3
                        name: Color
                      options:
                        - id: 633595a632a48354241eedee
                          label: Color
                          name: Space grey
                        - id: 63359d60cfce8ece38311278
                          label: Color
                          name: Black
                price:
                  type: number
                  example: 21000000
                sale_price:
                  type: number
                  example: 19000000
                typeAttributes:
                  type: object
                  properties:
                    packaging:
                      type: object
                      properties:
                        height:
                          type: number
                          example: 115.24
                        length:
                          type: number
                          example: 145.72
                        weight:
                          type: number
                          example: 4500
                        width:
                          type: number
                          example: 135.56
                variants:
                  type: array
                  items:
                    type: object
                    properties:
                      _id:
                        type: string
                        example: 63ec9527e29310243b665e9c
                      alwaysInStock:
                        type: boolean
                        example: false
                      costPrice:
                        nullable: true
                        example: null
                      dimension:
                        type: object
                        properties:
                          height:
                            type: number
                            example: 7
                          length:
                            type: number
                            example: 30
                          unit:
                            type: string
                            example: m
                          width:
                            type: number
                            example: 50
                      isActive:
                        type: boolean
                        example: true
                      options:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              example: 63359d60cfce8ece38311278
                            label:
                              type: string
                              example: Color
                            name:
                              type: string
                              example: Black
                        example:
                          - id: 63359d60cfce8ece38311278
                            label: Color
                            name: Black
                      price:
                        type: number
                        example: 3000000
                      sale_price:
                        nullable: true
                        example: null
                      sku:
                        type: string
                        example: toyota-corolla-black-65e9b
                      stock:
                        type: number
                        example: 15
                      weight:
                        type: object
                        properties:
                          base:
                            type: object
                            properties:
                              unit:
                                nullable: true
                                example: null
                              value:
                                nullable: true
                                example: null
                          unit:
                            type: string
                            example: kg
                          value:
                            type: number
                            example: 20000
                  example:
                    - _id: 63ec9527e29310243b665e9c
                      alwaysInStock: false
                      costPrice: null
                      dimension:
                        height: 7
                        length: 30
                        unit: m
                        width: 50
                      isActive: true
                      options:
                        - id: 63359d60cfce8ece38311278
                          label: Color
                          name: Black
                      price: 3000000
                      sale_price: null
                      sku: toyota-corolla-black-65e9b
                      stock: 15
                      weight:
                        base:
                          unit: null
                          value: null
                        unit: kg
                        value: 20000
                variantsInheritPrice:
                  type: boolean
                  example: true
            example:
              attributes:
                - name:
                    _id: 620230bd0d148855678615c3
                    name: Color
                  options:
                    - id: 633595a632a48354241eedee
                      label: Color
                      name: Space grey
                    - id: 63359d60cfce8ece38311278
                      label: Color
                      name: Black
              price: 21000000
              sale_price: 19000000
              typeAttributes:
                packaging:
                  height: 115.24
                  length: 145.72
                  weight: 4500
                  width: 135.56
              variants:
                - _id: 63ec9527e29310243b665e9c
                  alwaysInStock: false
                  costPrice: null
                  dimension:
                    height: 7
                    length: 30
                    unit: m
                    width: 50
                  isActive: true
                  options:
                    - id: 63359d60cfce8ece38311278
                      label: Color
                      name: Black
                  price: 3000000
                  sale_price: null
                  sku: toyota-corolla-black-65e9b
                  stock: 15
                  weight:
                    base:
                      unit: null
                      value: null
                    unit: kg
                    value: 20000
              variantsInheritPrice: true
      responses:
        '200':
          description: ''

````