API ReferenceProduct VariantsGet all variants for a product

Get all variants for a product

GET
/products/{productId}/variants

Authorization

x-api-key<token>

API Key authentication via header

In: header

Path Parameters

productIdRequiredstring
curl -X GET "https://niravai.com/api/v1/products/string/variants" \
  -H "x-api-key: <token>"

List of product variants

{
  "data": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "productId": "dcd53ddb-8104-4e48-8cc0-5df1088c6113",
      "sku": "SKU-77777768080-RED-XL",
      "name": "Classic Red Variant",
      "description": "string",
      "options": {
        "Color": "Red",
        "Size": "XL"
      },
      "imageUrl": "http://example.com",
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z"
    }
  ],
  "pageCount": 0,
  "total": 0
}