Backend API
Fields
Unique identifier for the coupon.
A short descriptive name of the coupon.
Indicates the coupon is currently active. Note: this is not affected by `date_valid` and `date_expired`.
List of coupon generations that are active.
Expandable list of codes used to identify the coupon.
Three-letter ISO currency code in uppercase. Defaults to the store's base currency.
Date and time the coupon was created.
Date the coupon is considered expired and no longer available for use. When defined, the coupon will not be valid after this date.
Date and time the coupon was last updated.
Date the coupon is first available for use. When defined, the coupon will not be valid until after this date and before date_expired.
A brief description of the coupon, as it may be displayed to customers.
ID of the discount group the coupon belongs to, if applicable, as defined in discount settings. Used to ensure only one set of discount rules can apply across a number of coupons and promotions.
List of discount rules to apply.
Type of discount to apply. Can be total, product, category, or shipment.
Possible enum values:
Type of value to calculate discount amount. Can be fixed or percent.
Possible enum values:
Purchase option the discount applies to.
Possible enum values:
ID of the subscription plan the discount applies to, when purchase_option is subscription_plan.
ID of the category to discount, if applicable.
Expandable link to the discounted category, if applicable.
List of category IDs to exclude from discount, applicable to category discounts when several categories overlap.
Expandable list of excluded categories, if applicable.
Minimum product price required for the rule to apply, applicable for category and product discounts.
ID of the product to discount, if applicable.
Expandable link to the discounted product, if applicable.
Quantity of the product to add to cart, if applicable.
Maximum product quantity required for the rule to apply, applicable for category and product discounts.
Minimum product quantity required for the rule to apply, applicable for category and product discounts.
ID of the shipping service to discount, if applicable.
Minimum order total required for the rule to apply.
Fixed discount applied when value_type=fixed.
Percentage discount applied when value_type=percent.
ID of the variant to discount, if applicable.
Expandable link to the discounted variant, if applicable.
Items required to be purchased in order to receive the coupon.
Unique identifier for the product.
Expandable link to the product.
Unique identifier for the category.
Expandable link to the category.
Eligible discounted items available once a coupon's buy_items requirements are met.
Unique identifier for the product.
Expandable link to the product.
Unique identifier for the category.
Expandable link to the category.
Indicates whether the get_items promotion requirements have been met.
Maximum redeemable discount amount for the coupon.
List of coupon generations.
Maximum number of times each coupon code can be applied. Mainly used with multiple codes.
Maximum number of times the coupon can be applied across all customers.
Maximum number of times the coupon can be used by each customer account.
List of customer account groups allowed to use the coupon.
List of account segments for which the coupon is avaialble.
Maximum number of invoices the promotion may be applied to for a subscription.
Indicates the coupon is identified by multiple coupon codes.
Expandable list of orders that have applied the coupon.
Expandable list of subscriptions that have applied the coupon.
Number of times the coupon has been used.
Expandable list of coupon code usage records.
The coupon model
{
"id": "60f199509111e70000000015",
"name": "10% Off Winter Jacket Sale",
"active": true,
"codes": [
{
"code": "WINTER10"
}
],
"currency": "USD",
"date_created": "2021-07-16T14:36:00.100Z",
"date_expired": "2018-03-01T00:00:00.000Z",
"date_updated": "2021-07-16T14:36:00.100Z",
"date_valid": "2018-11-01T00:00:00.000Z",
"description": "Save 10% on all Winter Jackets for a limited time only.",
"discount_group": null,
"discounts": [
{
"type": "category",
"category_id": "5a97242bc65396a875c2d381",
"value_type": "percent",
"value_fixed": 10
}
],
"limit_account_uses": 3,
"limit_code_uses": 10,
"limit_uses": 300,
"multi_codes": false,
"use_count": 184
}