Gets the availability of relevant product variants based on the product ID and selections provided. See Use Cases for an example.
Requested product ID.
Array containing the selected options. For example, ["color": "Blue", "size": "Large"]
.
Variant information, given that all the choices were provided.
Information about media items (images, videos, etc.) associated with this choice.
Options information (color, size, etc.) for this product, with the inventory and visibility fields updated based on the provided choices.
Whether all the selected choices result in a visible, in-stock variant.
curl -X POST \
'https://www.wixapis.com/stores/v1/products/1044e7e4-37d1-0705-c5b3-623baae212fd/productOptionsAvailability' \
--data-binary '{
"options": {
"Size": "S",
"Color": "Green"
}
}' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH>'
{
"productOptions": [
{
"optionType": "color",
"name": "Color",
"choices": [
{
"value": "#008000",
"description": "Green",
"inStock": true,
"visible": true
},
{
"value": "#800080",
"description": "Purple",
"inStock": true,
"visible": true
}
]
}
],
"availableForPurchase": false
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.