Use Cases
In this example we will query a product variant:
- The product is a shirt
- The shirt has 2 options - size and color
- The size option has 3 choices - S/M/L
- The color option has 3 choices - Red/Green/Blue
- The product variant S+Red is out of stock
The product's options field
Copy
1
Copy
1
**Now let's query the availability of S **
Notice in the response that:
- Red is out of stock, because S+Red is out of stock
availableForPurchase
is false, because both size and color must be given for this product
Copy
1
Copy
1
**Now let's query the availability of S+Green **
Notice in the response that:
- We get the selected variant, with proper values for price, weight, SKU and inventory
availableForPurchase
is true
Copy
1
Copy
1
Was this helpful?
Yes
No