Skip to main content
PATCH
/
{shopId}
/
products
/
63f76655c31eea543580fddc
Update product variants Copy
curl --request PATCH \
  --url http://staging.qshop.ng/apiv2/{shopId}/products/63f76655c31eea543580fddc \
  --header 'Content-Type: application/json' \
  --data '
{
  "attributes": [
    {
      "name": {
        "_id": "63e10d4ed4df923a8dda34d0",
        "name": "COLOR"
      },
      "options": [
        {
          "id": "63e10d4ed4df923a8dda34ce",
          "label": "COLOR",
          "name": "GOLD"
        }
      ]
    }
  ],
  "variants": [
    {
      "_id": "63f76655c31eea543580fdda",
      "alwaysInStock": true,
      "costPrice": null,
      "digital_download": {
        "maxDownloadsPerOrder": 5,
        "name": "sample.pdf",
        "type": "application/pdf",
        "url": "https://ucarecdn.com/92aaca76-e073-4a62-8244-5ea8c3c521b8/",
        "uuid": "92aaca76-e073-4a62-8244-5ea8c3c521b8"
      },
      "isActive": false,
      "options": [
        {
          "id": "63e10d4ed4df923a8dda34ce",
          "label": "COLOR",
          "name": "GOLD"
        }
      ],
      "price": 17800,
      "sale_price": 17300,
      "sku": "digital-with-variant-2-gold-0fdd9",
      "stock": 1
    }
  ]
}
'

Body

application/json
attributes
object[]
Example:
[
{
"name": {
"_id": "63e10d4ed4df923a8dda34d0",
"name": "COLOR"
},
"options": [
{
"id": "63e10d4ed4df923a8dda34ce",
"label": "COLOR",
"name": "GOLD"
}
]
}
]
variants
object[]
Example:
[
{
"_id": "63f76655c31eea543580fdda",
"alwaysInStock": true,
"costPrice": null,
"digital_download": {
"maxDownloadsPerOrder": 5,
"name": "sample.pdf",
"type": "application/pdf",
"url": "https://ucarecdn.com/92aaca76-e073-4a62-8244-5ea8c3c521b8/",
"uuid": "92aaca76-e073-4a62-8244-5ea8c3c521b8"
},
"isActive": false,
"options": [
{
"id": "63e10d4ed4df923a8dda34ce",
"label": "COLOR",
"name": "GOLD"
}
],
"price": 17800,
"sale_price": 17300,
"sku": "digital-with-variant-2-gold-0fdd9",
"stock": 1
}
]

Response

200 - undefined