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

# Update a variant.

> Update a variant.



## OpenAPI

````yaml patch /{storeId}/products/{productId}/variants/{variantId}
openapi: 3.0.0
info:
  title: AASAAN PARTNER REST API
  version: 1.0.0
  description: >-
    REST API endpoints are organized by resource type. You’ll need to use
    different endpoints depending on your app’s requirements.
servers:
  - url: https://partner-api.aasaan.shop/api/v1/partner-integrations/stores
    description: Development server
security: []
tags: []
paths:
  /{storeId}/products/{productId}/variants/{variantId}:
    patch:
      tags:
        - Product
      summary: Update a variant.
      description: Update a variant.
      parameters:
        - name: storeId
          in: path
          required: true
          schema:
            type: string
            description: Store ID for this resource request
        - name: productId
          in: path
          required: true
          schema:
            type: string
            description: Product Id
        - name: variantId
          in: path
          required: true
          schema:
            type: string
            description: Variant Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VariantBody'
              type: object
      responses:
        '200':
          description: Variant updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Variant'
        '403':
          description: Invalid Api Key
        '500':
          description: Internal Server Error
components:
  schemas:
    VariantBody:
      required:
        - salesPrice
        - regularPrice
        - quantity
        - weight
        - variantAttributeValues
      properties:
        salesPrice:
          type: string
          description: Sales price
          example: 543
        regularPrice:
          type: string
          description: Actual price
          example: 543
        quantity:
          type: integer
          description: Product quantity
          example: 1
        variantAttributeValues:
          type: array
          description: attributes and corresponding options
          items:
            type: object
            properties:
              name:
                type: string
                description: attribute name
                example: color
              value:
                type: string
                description: attribute option value
                example: brown
        description:
          type: string
          description: Product description
          example: >-
            Now, ensure the good health of your hair with Head & Shoulders Anti
            Hairfall Anti Dandruff Shampoo that strengthens hair from its roots
            and cures dandruff. Be it dry, frizzy, or damaged, this shampoo can
            bring back the younger days of your hair within just a few days. The
            shampoo is richly indulgent and improves the experience of washing
            your hair. It makes your hair dandruff-free up to 100%. Do not fret
            over chemicals as the product is gentle in use and can be used every
            day.
        shortDescription:
          type: string
          description: Product short description
          example: >-
            Anti Dandruff Shampoo that strengthens hair from its roots and cures
            dandruff
        active:
          type: boolean
          description: Active indicator
          example: true
        outOfStock:
          type: boolean
          description: Out of stock product
          example: false
        width:
          type: integer
          description: Width(cm)
          example: 100
        height:
          type: integer
          description: Height(cm)
          example: 200
        depth:
          type: integer
          description: Depth(cm)
          example: 20
        weight:
          type: integer
          description: Weight(kg)
          example: 500
        isShippingEnabled:
          type: boolean
          description: Enable to enter shipping details
          example: true
        seo:
          type: object
          description: SEO metadata for this product
          properties:
            title:
              type: string
              description: SEO Title
              example: Head and Shoulders
            description:
              type: string
              description: SEO Description
              example: >-
                Head & Shoulders Anti Hairfall Anti Dandruff Shampoo that
                strengthens hair
            image:
              type: object
              description: SEO Image
              properties:
                url:
                  type: string
                  description: Image URL
                  example: https://images.aasaan.app/123412421
                type:
                  type: string
                  description: Mime Type
                  example: image/png
        images:
          type: array
          description: Product images
          items:
            type: object
            properties:
              id:
                type: string
                description: Image identifier
                example: 0
              url:
                type: string
                description: Image URL
                example: https://images.aasaan.app/123412421
              type:
                type: string
                description: Mime Type
                example: https://images.aasaan.app/123412421
    Variant:
      properties:
        id:
          type: string
          description: Unique identifier for the resource
          example: 623d3455ec3c4b3548eb4a343
        names:
          type: array
          description: Name
          example: XL, Brown
        slug:
          type: string
          description: Slug
          example: head_shoulders_anti_hairfall_anti_dandruff_shampoo_650_ml_22
        salesPrice:
          type: string
          description: Sales price
          example: 543
        regularPrice:
          type: string
          description: Actual price
          example: 543
        quantity:
          type: integer
          description: Product quantity
          example: 1
        description:
          type: string
          description: Product description
          example: >-
            Now, ensure the good health of your hair with Head & Shoulders Anti
            Hairfall Anti Dandruff Shampoo that strengthens hair from its roots
            and cures dandruff. Be it dry, frizzy, or damaged, this shampoo can
            bring back the younger days of your hair within just a few days. The
            shampoo is richly indulgent and improves the experience of washing
            your hair. It makes your hair dandruff-free up to 100%. Do not fret
            over chemicals as the product is gentle in use and can be used every
            day.
        shortDescription:
          type: string
          description: Product short description
          example: >-
            Anti Dandruff Shampoo that strengthens hair from its roots and cures
            dandruff
        hide:
          type: boolean
          description: Hide this product
          example: false
        active:
          type: boolean
          description: Active indicator
          example: true
        outOfStock:
          type: boolean
          description: Out of stock product
          example: false
        width:
          type: integer
          description: Width(cm)
          example: 100
        height:
          type: integer
          description: Height(cm)
          example: 200
        depth:
          type: integer
          description: Depth(cm)
          example: 20
        weight:
          type: integer
          description: Weight(kg)
          example: 500
        isShippingEnabled:
          type: boolean
          description: Enable to enter shipping details
          example: true
        seo:
          type: object
          description: SEO metadata for this product
          properties:
            title:
              type: string
              description: SEO Title
              example: Head and Shoulders
            description:
              type: string
              description: SEO Description
              example: >-
                Head & Shoulders Anti Hairfall Anti Dandruff Shampoo that
                strengthens hair
            image:
              type: object
              description: SEO Image
              properties:
                url:
                  type: string
                  description: Image URL
                  example: https://images.aasaan.app/123412421
                type:
                  type: string
                  description: Mime Type
                  example: image/png
        images:
          type: array
          description: Product images
          items:
            type: object
            properties:
              id:
                type: string
                description: Image identifier
                example: 0
              url:
                type: string
                description: Image URL
                example: https://images.aasaan.app/123412421
              type:
                type: string
                description: Mime Type
                example: image/png
        date_created:
          type: string
          description: Created date
          example: '2022-03-25T03:17:44.092Z'
        date_modified:
          type: string
          description: Modified date
          example: '2022-06-10T07:51:12.510Z'

````