---
agentTools:
  projectIndex: https://aasaan.readme.io/llms.txt
---

# Update a product.

Update a product.

# OpenAPI definition

```json
{
  "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."
  },
  "components": {
    "schemas": {
      "Product": {
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the resource that was used to create this product",
            "example": "623d3455ec3c4b3548eb4a343"
          },
          "name": {
            "type": "string",
            "description": "Name",
            "example": "Head & Shoulders Anti Hairfall Anti Dandruff Shampoo"
          },
          "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
          },
          "displayOrder": {
            "type": "integer",
            "description": "Display Order within the category",
            "example": 1
          },
          "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
          },
          "isVariantEnabled": {
            "type": "boolean",
            "description": "Enable to enter product variants"
          },
          "variantAttributeValues": {
            "type": "array",
            "description": "All Possible Variant Attribute Values that this parent product can have",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "Name of the variant attribute",
                  "example": "color"
                },
                "value": {
                  "type": "array",
                  "description": "List of all possible values that this attribute can have as variants",
                  "items": {
                    "type": "string",
                    "example": "blue, yellow, green"
                  }
                }
              }
            }
          },
          "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"
                  }
                }
              }
            }
          },
          "categories": {
            "type": "array",
            "description": "Associated Categories",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "id",
                  "example": "1231231"
                },
                "name": {
                  "type": "string",
                  "description": "name",
                  "example": "Shampoos and Soaps"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "brand": {
            "type": "object",
            "description": "Brand",
            "properties": {
              "id": {
                "type": "string",
                "description": "id",
                "example": "636f2e876e9de14bfe1b02fa"
              },
              "name": {
                "type": "string",
                "description": "name",
                "example": "P&G"
              }
            }
          },
          "metaData": {
            "type": "object",
            "description": "Any additional meta data that needs to be stored as a part of this entity"
          },
          "variants": {
            "type": "array",
            "description": "Images",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Unique identifier for a variant",
                  "example": "567152378158871683"
                },
                "name": {
                  "type": "string",
                  "description": "Variant name",
                  "example": "Head & Shoulders Anti Hairfall Anti Dandruff Shampoo 600ml"
                },
                "salesPrice": {
                  "type": "string",
                  "description": "Sales price",
                  "example": 800
                },
                "regularPrice": {
                  "type": "string",
                  "description": "Actual price",
                  "example": 800
                },
                "quantity": {
                  "type": "integer",
                  "description": "Variant quantity",
                  "example": 10
                },
                "description": {
                  "type": "string",
                  "description": "Variant description",
                  "example": ""
                },
                "shortDescription": {
                  "type": "string",
                  "description": "Variant short description",
                  "example": ""
                },
                "hide": {
                  "type": "boolean",
                  "description": "Hide this variant",
                  "example": false
                },
                "active": {
                  "type": "boolean",
                  "description": "Active indicator",
                  "example": true
                },
                "outOfStock": {
                  "type": "boolean",
                  "description": "Out of stock",
                  "example": false
                },
                "width": {
                  "type": "integer",
                  "description": "Width(cm)",
                  "example": 10
                },
                "height": {
                  "type": "integer",
                  "description": "Height(cm)",
                  "example": 10
                },
                "depth": {
                  "type": "integer",
                  "description": "Depth(cm)",
                  "example": 10
                },
                "weight": {
                  "type": "integer",
                  "description": "Weight(kg)",
                  "example": 10
                },
                "isShippingEnabled": {
                  "type": "boolean",
                  "description": "Enable to enter shipping details",
                  "example": true
                },
                "images": {
                  "type": "array",
                  "description": "Variant 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"
                }
              }
            }
          },
          "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"
          }
        }
      },
      "ProductUpdateBody": {
        "properties": {
          "name": {
            "type": "string",
            "description": "Name",
            "example": "Head & Shoulders Anti Hairfall Anti Dandruff Shampoo"
          },
          "salesPrice": {
            "type": "string",
            "description": "Sales price",
            "example": 543
          },
          "regularPrice": {
            "type": "string",
            "description": "Actual price",
            "example": 543
          },
          "quantity": {
            "type": "integer",
            "description": "Product quantity",
            "example": 100
          },
          "weight": {
            "type": "integer",
            "description": "Weight(kg)",
            "example": 2
          },
          "categories": {
            "type": "array",
            "description": "Associated Categories",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "id",
                  "example": "636f2e876e9de14bfe1b02f1"
                }
              }
            }
          },
          "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
          },
          "displayOrder": {
            "type": "integer",
            "description": "Display Order within the category",
            "example": 1
          },
          "width": {
            "type": "integer",
            "description": "Width(cm)",
            "example": 100
          },
          "height": {
            "type": "integer",
            "description": "Height(cm)",
            "example": 200
          },
          "depth": {
            "type": "integer",
            "description": "Depth(cm)",
            "example": 20
          },
          "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"
                }
              }
            }
          },
          "brand": {
            "type": "object",
            "description": "Brand",
            "properties": {
              "id": {
                "type": "string",
                "description": "id",
                "example": "636f2e876e9de14bfe1b02f2"
              }
            }
          },
          "metaData": {
            "type": "object",
            "description": "Any additional meta data that needs to be stored as a part of this entity"
          },
          "variantAttributeValues": {
            "type": "array",
            "description": "All Possible Variant Attribute Values that this parent product can have",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "Name of the variant attribute",
                  "example": "color"
                },
                "value": {
                  "type": "array",
                  "description": "List of all possible values that this attribute can have as variants",
                  "items": {
                    "type": "string",
                    "example": "blue, yellow, green"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://apiservice.lightbooks-dev.io/api/v1/partner-integrations/stores",
      "description": "Development server"
    }
  ],
  "paths": {
    "/{storeId}/products/{productId}": {
      "patch": {
        "summary": "Update a product.",
        "tags": [
          "Product"
        ],
        "description": "Update a product.",
        "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"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "$ref": "#/components/schemas/ProductUpdateBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Product updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          },
          "403": {
            "description": "Invalid Api Key"
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "x-amazon-apigateway-integration": {
          "type": "aws_proxy",
          "httpMethod": "PATCH",
          "uri": "arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:128512798967:function:aasaan-api-dev-serverless/invocations",
          "passthroughBehavior": "when_no_match",
          "responses": {
            "default": {
              "statusCode": 200
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 100,
      "1": 139,
      "2": 202,
      "3": 12,
      "4": 35,
      "5": 189,
      "6": 78,
      "7": 3,
      "8": 76,
      "9": 95,
      "10": 61,
      "11": 157
    }
  }
}
```