POST

Get Product Options Availability


Gets the availability of relevant product variants based on the product ID and selections provided. See Use Cases for an example.

Permissions
Manage Stores - all permissions
Read Stores - all read permissions
Manage Orders
Manage Products
Read Products
Manage Restaurants - all permissions
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/stores-reader/v1/products/{id}/productOptionsAvailability

Path Params
idstringRequired

Requested product ID.

Body Params
optionsMap <string, string>format map

Array containing the selected options. For example, ["color": "Blue", "size": "Large"].

Response Object
selectedVariantSelectedVariant

Variant information, given that all the choices were provided.


mediaMedia

Information about media items (images, videos, etc.) associated with this choice.


productOptionsArray <ProductOption>

Options information (color, size, etc.) for this product, with the inventory and visibility fields updated based on the provided choices.


availableForPurchaseboolean

Whether all the selected choices result in a visible, in-stock variant.

Get Product Options Availability Example 1
Request
cURL
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>'
Response
JSON
{ "productOptions": [ { "optionType": "color", "name": "Color", "choices": [ { "value": "#008000", "description": "Green", "inStock": true, "visible": true }, { "value": "#800080", "description": "Purple", "inStock": true, "visible": true } ] } ], "availableForPurchase": false }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?