eCommerce Integration with Wix Stores Catalog V3

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:

Catalog Reference Object Structure

について catalogReference object includes the following fields:

eコマースStores Catalog
catalogItemIdについて productId of the Wix Stores product
appIdThe Wix Stores app ID (always "215238eb-22a5-4c36-9e7b-e7c08025e04e")
optionsAn optional object containing product-specific key-value pairs
コピー
1

Important Notes

  1. Use modifiers in either options または customTextFields based on the modifierRenderType:
    • For TEXT_CHOICES, use the modifier and choice key in options.
    • For FREE_TEXT, use the freeTextSettings.key in customTextFields.
  2. You may omit customTextFields そして options in catalogReference if the related modifier is not mandatory.
  3. You can omit subscriptionOptionId if the product doesn't have subscriptionDetails defined or when subscriptionDetails.allowOneTimePurchases is 真の.
  4. Always include the variantId.

Consider a product with the following structure:

コピー
1

Note: many product fields in the above example have been omitted for conciseness.

Scenario

A buyer wants to purchase "Coffee" with the following options:

  • Size: S
  • Box color: Red
  • Remove price tag: Yes
  • Engraving: "For my best friend! :)"
  • Delivery: Monthly subscription

Resulting catalogReference object

コピー
1

To find the correct variantId, match the options.id そして options.choicesSettings.choices.choiceId of the buyer's selected options with variantsInfo.variants.optionChoiceIds.optionId そして variantsInfo.variants.optionChoiceIds.optionId in the variants.

Minimal valid catalogReference object

Since both modifiers have "mandatory": false そして subscriptionDetails.allowOneTimePurchases is 真の, the following minimal catalogReference is also valid:

コピー
1
役に立ちましたか?
はい
いいえ