Retrieves product variants, based on either choices (option-choice key-value pairs) or variant IDs. See Stores Pagination for more information.
Requested product ID.
The specific choices available or chosen from within a selection (e.g., choosing the red Selection triggers the red Choice). You may specify all the relevant choices for a specific variant, or only some of the options, which will return all corresponding variants (not relevant when passing variant IDs).
List of variant IDs (not relevant when passing choices).
Whether merchant specific data should be included in the response. Requires permissions to manage products.
List of variants based on the specified filters and sorting.
curl -X POST \
'https://www.wixapis.com/stores/v1/products/0614129c-8777-9f3b-4dfe-b80a54df10d5/variants/query' \
--data-binary '{
"choices": {
"Weight": "250g"
},
"includeMerchantSpecificData": true
}' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH>'
{
"variants": [
{
"id": "00000000-0000-0020-0005-a316e6ba5b37",
"choices": {
"Weight": "250g",
"Ground for": "Stovetop"
},
"variant": {
"priceData": {
"currency": "USD",
"price": 35,
"discountedPrice": 30,
"formatted": {
"price": "$35.00",
"discountedPrice": "$30.00",
"pricePerUnit": "$0.12"
},
"pricePerUnit": 0.12
},
"convertedPriceData": {
"currency": "USD",
"price": 35,
"discountedPrice": 30,
"formatted": {
"price": "$35.00",
"discountedPrice": "$30.00",
"pricePerUnit": "$0.12"
},
"pricePerUnit": 0.12
},
"costAndProfitData": {
"itemCost": 20,
"formattedItemCost": "$20.00",
"profit": 10,
"formattedProfit": "$10.00",
"profitMargin": 0.3333
},
"weight": 0.25,
"sku": "10001",
"visible": true
}
},
{
"id": "00000000-0000-0021-0005-a316e6ba5b37",
"choices": {
"Weight": "250g",
"Ground for": "Filter"
},
"variant": {
"priceData": {
"currency": "USD",
"price": 35,
"discountedPrice": 30,
"formatted": {
"price": "$35.00",
"discountedPrice": "$30.00",
"pricePerUnit": "$0.12"
},
"pricePerUnit": 0.12
},
"convertedPriceData": {
"currency": "USD",
"price": 35,
"discountedPrice": 30,
"formatted": {
"price": "$35.00",
"discountedPrice": "$30.00",
"pricePerUnit": "$0.12"
},
"pricePerUnit": 0.12
},
"costAndProfitData": {
"itemCost": 20,
"formattedItemCost": "$20.00",
"profit": 10,
"formattedProfit": "$10.00",
"profitMargin": 0.3333
},
"weight": 0.25,
"sku": "10003",
"visible": true
}
}
],
"metadata": {
"items": 2,
"offset": 0
},
"totalResults": 2
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.