validateProduct

Arguments

productIdIntegerRequired
Product ID
variantIdIntegerRequired
Variant ID
quantityIntegerRequired
Quantity
productOptionslist of optional GenericScalarOptional
Product options list
storeHashStringOptional
Store hash
channelIdIntegerOptional
Channel ID
targetStringOptional

Validation target: ‘CART’ or ‘QUOTE’ (default). Controls whether OOS/Non-Purchasable products return errors or warnings.

Returns

an optional Object
responseTypeString

The type of response returned. Possible values are SUCCESS | WARNING | ERROR.

messageString
The message returned if the product is not valid.
errorCodeString

The error code returned if the product is not valid. Possible values are NON_PURCHASABLE | OOS | INVALID_FIELDS | OTHER.

productObject
Details of the product