Backend API

Fields
idobjectId

Unique identifier for the coupon.

namestringrequired

A short descriptive name of the coupon.

activeboolean

Indicates the coupon is currently active. Note: this is not affected by `date_valid` and `date_expired`.

active_generationsCoupon generation

List of coupon generations that are active.

codesarray of Codes

Expandable list of codes used to identify the coupon.

currencystring

Three-letter ISO currency code in uppercase. Defaults to the store's base currency.

date_createddate

Date and time the coupon was created.

date_expireddate

Date the coupon is considered expired and no longer available for use. When defined, the coupon will not be valid after this date.

date_updateddate

Date and time the coupon was last updated.

date_validdate

Date the coupon is first available for use. When defined, the coupon will not be valid until after this date and before date_expired.

descriptionstring

A brief description of the coupon, as it may be displayed to customers.

discount_groupstring

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.

discountsarray of object

List of discount rules to apply.

generationsarray of Generations

List of coupon generations.

limit_code_usesint

Maximum number of times each coupon code can be applied. Mainly used with multiple codes.

limit_usesint

Maximum number of times the coupon can be applied across all customers.

limit_account_usesint

Maximum number of times the coupon can be used by each customer account.

limit_account_groupsarray of account_groups

List of customer account groups allowed to use the coupon.

limit_account_segmentsarray of string

List of account segments for which the coupon is avaialble.

limit_subscription_usesint

Maximum number of invoices the promotion may be applied to for a subscription.

multi_codesboolean

Indicates the coupon is identified by multiple coupon codes.

ordersOrder

Expandable list of orders that have applied the coupon.

subscriptionsSubscription

Expandable list of subscriptions that have applied the coupon.

use_countint

Number of times the coupon has been used.

usesarray of Uses

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
}