When integrating products from your Wix Stores catalog into an eCommerce cart, checkout, or order, you must use the catalogReference object structure.
This guide explains how to properly format and use the catalogReference object in various eCommerce API functions.
Pass the catalogReference object as part of the lineItems array in the following eCommerce API functions:
The catalogReference object includes the following fields:
Important:
options or customTextFields based on the modifierRenderType:
TEXT_CHOICES, use the modifier and choice key in options.FREE_TEXT, use the freeTextSettings.key in customTextFields.customTextFields and options in catalogReference if the related modifier isn't mandatory.subscriptionOptionId if the product doesn't have subscriptionDetails defined or when subscriptionDetails.allowOneTimePurchases is true.variantId.Consider a product with the following structure:
Note: Many product fields in the above example have been omitted for conciseness.
A buyer wants to purchase "Coffee" with the following options:
catalogReference objectcatalogReference objectSince both modifiers have "mandatory": false and subscriptionDetails.allowOneTimePurchases is true, the following minimal catalogReference is also valid: