Commerce

Delete variants

Deletes the variants in variantIds (comma-separated, up to 100) and returns the updated product. A product keeps at least one variant, so deleting every variant is refused by the platform. Needs products.variants.

delete/v1/commerce/products/{productId}/variants

Path parameters

productIdstring required

Platform-native id.

Query parameters

accountIdstring required

Connected store SocialAccount id.

variantIdsstring required

Comma-separated ids.

Response

Product after the change

Example response

{
  "product": {
    "variants": [
      {
        "price": {
          "amount": "19.90",
          "currency": "USD"
        },
        "compareAtPrice": {
          "amount": "19.90",
          "currency": "USD"
        }
      }
    ]
  }
}

Changes

Changed in 2 of the 60 revisions of this API.2