Commerce

Add variants

Adds variants to a product. Each variant names a value for every product option (create options first with POST .../options). A product's placeholder default variant is replaced when real ones arrive.

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

Path parameters

productIdstring required

Platform-native id.

Request body

accountIdstring required

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