v1

latestOpenAPI 3.0.42026-07-2685196386.6 KB
Coupon

Create coupon

Creates a new coupon in the store. Requires the stores.coupons.create permission.

post/stores/{storeId}/coupons

Path parameters

storeIdstring uuid required

The ID of the store to create the coupon in

Request body

codestring required

The case-insensitive code the customer will enter to redeem the coupon.

maximumUsesinteger required

The maximum number of times the coupon may be used. Set to –1 for unlimited uses.

percentageDecreasenumber double nullable

The percentage to subtract from the order total when the coupon is applied.

amountDecreasenumber double nullable

A fixed amount to subtract from the order total when the coupon is applied.

isEnabledboolean required

Whether the coupon is active and may be used at checkout.

variantIdsstring[] nullable

The list of variant IDs this coupon applies to; null or empty for all variants.

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