Commerce

Add options

Adds option axes (e.g. Size, Color) and their values. With createVariants true the platform creates a variant for every new combination; otherwise existing variants take the first value.

post/v1/commerce/products/{productId}/options

Path parameters

productIdstring required

Platform-native id.

Request body

accountIdstring required
createVariantsboolean

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