About the Products API

The Products API allows you to create and manage a store's products.

With the Products API you can:

Before you begin

It's important to note the following points before starting to code:

  • The site owner must install the Wix Stores app from the Wix App Market.

Variants

Every product has at least one variant. Products without options have a single "default variant" with an empty choices array. Products with options have one variant for each combination of option choices.

Variant-level data includes pricing (actualPrice, compareAtPrice), SKU, barcode, weight, and inventory status. For digital products, each variant can have its own digital file.

Inventory

The Create Product endpoint does not automatically create inventory items. To create a product with inventory in a single call, use Create Product With Inventory. Otherwise, create inventory items separately using the Inventory Items API.

The product's read-only inventory field reflects the aggregated inventory status from the default location only.

Options and modifiers

When you create a product with inline options or modifiers (without referencing existing customization IDs), new standalone Customization entities are automatically created. These can then be reused across other products.

Handle vs Slug

Products have both a handle and a slug field:

  • Slug: Auto-generated from the product name, used in the product's URL path.
  • Handle: A user-defined unique identifier for cross-platform consistency, useful when re-importing products from other systems.

Media

The product's media.main field is read-only and automatically set to the first item in the media list.

Subscriptions

Subscription discounts are defined at the product level, but they apply to each variant's actualPrice. This means the final subscription price varies per variant based on the variant's base price.

Searching and querying

Use Query Products for simple filtering operations. Use Search Products for complex queries that include free-text search. When using free-text search, you must specify which fields to search.

Learn more about the differences between Query and Search methods.

Categories

Products can be assigned to categories using the Categories API. The directCategoriesInfo.categories[].index field determines the display order of products within a category—lower values appear first.

Use cases

Did this help?