v1

latestOpenAPI 3.0.42026-07-2685196386.6 KB
Variant

Create variant

Adds a new variant to the specified product. Requires the stores.products.update permission.

post/stores/{storeId}/products/{productId}/variants

Path parameters

storeIdstring uuid required

The store’s unique identifier.

productIdstring uuid required

The product’s unique identifier.

Request body

namestring required

The display name of the variant.

costnumber double required

The cost of the variant (non-negative).

dynamicUrlstring uri nullable

URL for dynamic fulfillment (when using the "dynamic" delivery type).

deliveryMessagestring nullable

Optional message shown on delivery.

minimumQuantityinteger required

Minimum quantity allowed per order (at least 1).

maximumQuantityinteger required

Maximum quantity allowed per order. Set to -1 for unlimited.

orderinteger required

Sort order for display (at least 1).

type0 | 1 required

The type of product that is being sold

billingInterval0 | 1 | 2 | 3 | 4

The billing interval for a subscription product

customIntervalDaysinteger nullable

Custom interval in days when BillingInterval is set to Custom.

stockinteger required

Stock quantity available (non-negative).

deliveryTypesstring[] required

Enabled delivery types. Valid values: license_keys, dynamic, keyauth, instructions, files.

stockMode0 | 1 | 2 required

The stock calculation modes that are used

disableVolumeDiscountOnCouponboolean required

When true, volume discounts are disabled if a coupon is applied to the order.

Response

The object was successfully created.

successboolean required

Indicates whether the operation or response was successful.

messagestring nullable

A descriptive message providing additional context or information about the response.

codestring nullable

The error code (if there was an error) to use when referencing the error