Retrieves the availability of a product based on the specified option choices.
The information returned in the selectedVariant
and availableForPurchase
properties reflects the option choices passed in the choices
parameter.
If the specified choices result in the selection of a single product variant,
that variant is returned in the selectedVariant
property and the availableForPurchase
property indicates whether that product variant is available for purchase.
If the choices specified in the choices
parameter don't result in the selection of a single product variant,
no variant is returned in the selectedVariant
property and the availableForPurchase
property will be false
.
The ID of the product whose availability is being checked.
Option choices to use when checking the product's availability in the form of
an object containing a key:value
pair for each product option. For example, if a product has a size option, the key will be something like "Size" and its value will be something like "Large".