SubblySubbly
Log inGet started
  • Get started
  • Developer resources
Private API reference
Docs
Information
    Base URLAuthenticationPaginationErrors
Customer
    Get list of customersCreate a customerGet customer by IDUpdate a customerDelete a customerChange a customer's store credit balanceCreate a customer noteUpdate a customer noteDelete a customer note
Address
    Create an addressUpdate an addressDelete an address
Pickup Info
    Get list of pickup infoCreate pickup infoUpdate pickup infoDelete pickup info
Subscription
    Get list of subscriptionsCreate a subscriptionGet subscription by IDUpdate a subscriptionCancel a subscriptionUndo cancellationPause a subscriptionResume a subscriptionSkip renewals until a dateReactivate a cancelled or expired subscriptionSwitch the subscription to another plan by starting overChange the plans of the subscription's itemsUpdate a subscription's shipping address and methodUpdate a subscription's payment methodUpdate a subscription's survey preferencesCreate a subscription itemShow a subscription itemUpdate a subscription itemRemove a subscription itemUpdate a subscription item's preferencesUpdate a subscription item's bundleChange the plan of a subscription itemChange the variant of a one-time itemApply a discount to a subscription itemRemove a subscription item discountApply a discount to a subscriptionRemove a subscription discount
Invoice
    Get list of invoicesGet invoice by IDSchedule the next payment for invoiceVoid an invoiceForgive an invoiceMark an invoice as paid
Order
    Get list of ordersGet order by IDUpdate an orderShip an orderCancel an orderMark an order as pendingArchive an orderMark an order as a future shipmentSync order shipping items
Payment Method
    Create a payment methodGet payment method by IDDelete a payment method
Transaction
    Get list of transactionsGet transaction by ID
Cancellation
    Get shop cancellation reasons
Product
    Get list of productsGet product by IDGet variant by IDUpdate variantGet plan by IDUpdate planCreate subscription productUpdate subscription productPublish subscription productUnpublish subscription productArchive subscription productSync subscription product metadataCreate one-time productUpdate one-time productPublish one-time productUnpublish one-time productArchive one-time productSync one-time product metadataCreate variantArchive variantBatch create/update/archive variantsCreate planArchive plan
Survey
    Get survey by IDGet list of surveys
Bundle
    Get list of bundlesCreate a new bundleGet bundle by IDUpdate a bundleGet list of bundle itemsCreate a bundle itemBatch create bundle itemsGet bundle item by IDUpdate a bundle itemDelete a bundle itemGet list of bundle groupsPublish a bundleUnpublish a bundleArchive a bundleSync bundle metadataCreate a bundle planGet bundle plan by IDUpdate a bundle planArchive a bundle plan
Tag
    Get list of tags
Metafield
    Get shop's metafieldsCreate a new metadataUpdate the metadata
Funnel
    Get list of funnelsGet funnel by ID
Option
    Get list of options
Country
    Get list of countries
Inventory
    Get list of inventory itemsCreate a new inventory itemGet inventory item by IDUpdate an inventory itemArchive an inventory itemGet list of inventory groupsCreate a new inventory groupGet inventory group by IDUpdate an inventory group
Coupon
    Get list of couponsCreate a couponGet coupon by IDUpdate a couponArchive a coupon
Product Collection
    Get list of product collectionsCreate a product collectionGet product collection by IDUpdate a product collectionPublish a product collectionUnpublish a product collectionArchive a product collectionGet list of collection groups with itemsSync collection items

Coupon

Private Coupon API endpoints

Endpoints
  • GET/coupons
  • POST/coupons
  • GET/coupons/{coupon_id}
  • PATCH/coupons/{coupon_id}
  • POST/coupons/{coupon_id}/archive

Get list of coupons

GET /coupons

An API endpoint to get a paginated list of coupons.

Query parameters

idsoptionalinteger[]

Filter by coupon IDs

queryoptionalstring

Search by coupon code or name

activeoptionalinteger

Filter by active status (0 or 1)

Possible values: 0, 1.

trashedoptionalinteger

Include soft-deleted coupons (0 or 1)

Possible values: 0, 1.

sort[field]optionalstring

Sort field

Possible values: id, name.

sort[direction]optionalstring

Sort direction; defaults to asc.

Possible values: asc, desc.

Defaults to "asc".

pageoptionalinteger

Page number

per_pageoptionalinteger

Items per page

expand[]optionalstring[]

List of relations to expand in the response. Each expandable field on the response schema names its key, e.g. expand[]=customer. Nested keys use dot notation, e.g. items.product or subscriptions.items. Fields marked as always present are returned without being requested. An expanded list is null, not [], when there are no records. Unknown keys are ignored unless the endpoint says otherwise.

Returnsobject

Coupons list response

Error responses

422object

A query parameter fails validation: ids is not an array of distinct integers, query is not a string or is longer than 255 characters, active or trashed is not 0 or 1, sort[field] is missing or is not id or name while sort is sent, sort[direction] is not asc or desc, page is not an integer of at least 1, per_page is not an integer between 1 and 100, or expand[] is not an array.

curl https://api.subbly.co/private/v1/coupons \ -H 'X-API-KEY: <api-key>'
Response
{ "pagination": { "current_page": 1, "last_page": 2, "from": 1, "to": 1, "total": 20 }, "data": [ { "id": 1234, "coupon_id": "SAVE20", "name": "20% off", "duration": "once", "duration_in_months": 3, "remove_gifts_after_end_of_duration": false, "max_redemptions": 100, "times_redeemed": 5, "active": true, "limit_one_per_customer": false, "redeem_by": "2026-12-31 23:59:59", "valid": true, "condition": { "id": 10, "type": "product", "operator": "only", "products": [ {} ], "collections": [ {} ], "cart_value": { "min": 1, "max": 1 }, "cart_quantity": { "min": 1, "max": 1 } }, "discount": { "id": 20, "amount_off": 500, "percent_off": 20, "skip_payment_method": false, "first_shipment_only": false, "applies_to": {} }, "gift": { "id": 30, "amount_off": 1, "percent_off": 100, "addon_duration": "once", "remove_products_after_coupon_detached": false, "products": [ {} ] }, "rules": { "emails": {}, "customers": {}, "subscriptions": {} }, "created_at": "created_at", "updated_at": "updated_at", "deleted_at": "deleted_at" } ] }

Create a coupon

POST /coupons

Create a new coupon. Must include either a discount or a gift (or both).

Query parameters

expand[]optionalstring[]

List of relations to expand in the response. Each expandable field on the response schema names its key, e.g. expand[]=customer. Nested keys use dot notation, e.g. items.product or subscriptions.items. Fields marked as always present are returned without being requested. An expanded list is null, not [], when there are no records. Unknown keys are ignored unless the endpoint says otherwise.

Request body

nameRequiredstring
coupon_codeRequiredstring

Unique coupon code within the shop

durationRequiredstring

Possible values: once, forever, multiple.

duration_in_monthsoptionalinteger

Required when duration is "multiple". Prohibited when duration is "once" or "forever".

remove_gifts_after_end_of_durationoptionalinteger

Possible values: 0, 1.

max_redemptionsoptionalinteger | null
limit_one_per_customeroptionalinteger

Possible values: 0, 1.

redeem_byoptionalstring | null

Expiry date in Y-m-dTH:i:s format, interpreted as UTC. Must be after tomorrow.

conditionoptionalobject | null

Whether the coupon can be used on the cart. product, collection: the cart has a listed product, or a product from a listed collection. cart_value, cart_quantity: the value in cents, or the quantity, of the counted products is within min..max. any counts all products, only the listed ones, except all but the listed ones. At least one counted product is required. Products are variant IDs. Gift lines are not counted.. Set to null for no condition.

discountoptionalobject | null

Discount action. Required if gift is not provided.

giftoptionalobject | null

Products added to the cart, with the discount on those lines only.. Required if discount is not provided.

rulesoptionalobject | null

Who can use the coupon. When emails and customers are both set, matching either is enough..

ReturnsCoupon

Coupon created

Error responses

422object

The body fails validation. name, coupon_code and duration are required, and coupon_code must not be in use in the shop ("The coupon code :input is already in use."). duration_in_months is required when duration is multiple and not allowed otherwise. redeem_by must use Y-m-d H:i:s or Y-m-dTH:i:s and fall after the start of tomorrow (UTC). You must send discount or gift, and each needs exactly one of amount_off or percent_off ("A discount must specify either an amount off or a percent off."). discount.amount_off cannot be combined with discount.first_shipment_only. condition.operator must suit condition.type (product and collection accept only only). condition.products is required for only and except and not allowed for any or collection, condition.collections is required for and limited to collection, and condition.cart_value and condition.cart_quantity fit only their own type and need min when max is set. Condition products must be variants of the shop, and discount products, collections, customers and subscription products must belong to the shop. A gift product must be a one-time variant of the shop that is not a gift card and not in a configurable bundle.

curl -X POST https://api.subbly.co/private/v1/coupons \ -H 'X-API-KEY: <api-key>' \ -H 'Content-Type: application/json' \ -d '{ "name": "name", "coupon_code": "coupon_code", "duration": "once", "duration_in_months": 1, "remove_gifts_after_end_of_duration": 0, "max_redemptions": 1, "limit_one_per_customer": 0, "redeem_by": "2026-12-31T23:59:59", "condition": { "type": "product", "operator": "any", "products": { "create": [ { "product_id": 1 } ] }, "collections": { "create": [ { "collection_id": 1 } ] }, "cart_value": { "min": 1, "max": 1 }, "cart_quantity": { "min": 1, "max": 1 } }, "discount": { "amount_off": 1, "percent_off": 1.5, "applies_to": { "products": { "operator": "only", "ids": [ 440317, 440318 ] }, "collections": { "operator": "only", "ids": [ 440317, 440318 ] }, "item_types": [ "shipping" ] }, "skip_payment_method": 0, "first_shipment_only": 0 }, "gift": { "amount_off": 1, "percent_off": 1.5, "addon_duration": "once", "remove_products_after_coupon_detached": 0, "products": { "create": [ { "product_id": 1 } ] } }, "rules": { "emails": { "create": [ "customer@example.com" ] }, "customers": { "create": [ 1 ] }, "subscriptions": { "create": [ 1 ] } } }'
Response
{ "id": 1234, "coupon_id": "SAVE20", "name": "20% off", "duration": "once", "duration_in_months": 3, "remove_gifts_after_end_of_duration": false, "max_redemptions": 100, "times_redeemed": 5, "active": true, "limit_one_per_customer": false, "redeem_by": "2026-12-31 23:59:59", "valid": true, "condition": { "id": 10, "type": "product", "operator": "only", "products": [ {} ], "collections": [ {} ], "cart_value": { "min": 1, "max": 1 }, "cart_quantity": { "min": 1, "max": 1 } }, "discount": { "id": 20, "amount_off": 500, "percent_off": 20, "skip_payment_method": false, "first_shipment_only": false, "applies_to": {} }, "gift": { "id": 30, "amount_off": 1, "percent_off": 100, "addon_duration": "once", "remove_products_after_coupon_detached": false, "products": [ {} ] }, "rules": { "emails": {}, "customers": {}, "subscriptions": {} }, "created_at": "created_at", "updated_at": "updated_at", "deleted_at": "deleted_at" }

Get coupon by ID

GET /coupons/{coupon_id}

Get a single coupon by its ID.

Path parameters

coupon_idRequiredinteger

Coupon ID

Query parameters

expand[]optionalstring[]

List of relations to expand in the response. Each expandable field on the response schema names its key, e.g. expand[]=customer. Nested keys use dot notation, e.g. items.product or subscriptions.items. Fields marked as always present are returned without being requested. An expanded list is null, not [], when there are no records. Unknown keys are ignored unless the endpoint says otherwise.

ReturnsCoupon

Coupon object response

Error responses

404object

No coupon exists with this ID in the shop, or the coupon is deleted.

422object

The expand[] parameter is not an array.

curl https://api.subbly.co/private/v1/coupons/{coupon_id} \ -H 'X-API-KEY: <api-key>'
Response
{ "id": 1234, "coupon_id": "SAVE20", "name": "20% off", "duration": "once", "duration_in_months": 3, "remove_gifts_after_end_of_duration": false, "max_redemptions": 100, "times_redeemed": 5, "active": true, "limit_one_per_customer": false, "redeem_by": "2026-12-31 23:59:59", "valid": true, "condition": { "id": 10, "type": "product", "operator": "only", "products": [ {} ], "collections": [ {} ], "cart_value": { "min": 1, "max": 1 }, "cart_quantity": { "min": 1, "max": 1 } }, "discount": { "id": 20, "amount_off": 500, "percent_off": 20, "skip_payment_method": false, "first_shipment_only": false, "applies_to": {} }, "gift": { "id": 30, "amount_off": 1, "percent_off": 100, "addon_duration": "once", "remove_products_after_coupon_detached": false, "products": [ {} ] }, "rules": { "emails": {}, "customers": {}, "subscriptions": {} }, "created_at": "created_at", "updated_at": "updated_at", "deleted_at": "deleted_at" }

Update a coupon

PATCH /coupons/{coupon_id}

Partially update a coupon. All fields are optional.

Path parameters

coupon_idRequiredinteger

Coupon ID

Query parameters

expand[]optionalstring[]

List of relations to expand in the response. Each expandable field on the response schema names its key, e.g. expand[]=customer. Nested keys use dot notation, e.g. items.product or subscriptions.items. Fields marked as always present are returned without being requested. An expanded list is null, not [], when there are no records. Unknown keys are ignored unless the endpoint says otherwise.

Request body

nameoptionalstring
durationoptionalstring

Possible values: once, forever, multiple.

duration_in_monthsoptionalinteger

Required when duration is "multiple". Prohibited when duration is "once" or "forever".

remove_gifts_after_end_of_durationoptionalinteger

Possible values: 0, 1.

max_redemptionsoptionalinteger | null
limit_one_per_customeroptionalinteger

Possible values: 0, 1.

redeem_byoptionalstring | null

Expiry date in Y-m-dTH:i:s format, interpreted as UTC. Must be after tomorrow.

conditionoptionalobject | null

Whether the coupon can be used on the cart. product, collection: the cart has a listed product, or a product from a listed collection. cart_value, cart_quantity: the value in cents, or the quantity, of the counted products is within min..max. any counts all products, only the listed ones, except all but the listed ones. At least one counted product is required. Products are variant IDs. Gift lines are not counted.. Set to null to remove the condition.

discountoptionalobject | null

Update discount settings.

giftoptionalobject | null

Products added to the cart, with the discount on those lines only..

rulesoptionalobject | null

Who can use the coupon. When emails and customers are both set, matching either is enough.. Omit a type to leave it unchanged.

ReturnsCoupon

Coupon updated

Error responses

404object

No coupon exists with this ID in the shop, or the coupon is deleted.

422object

A field you send fails validation. Every field is optional and follows the create rules. condition.type and condition.operator are required with condition, and gift.addon_duration and gift.remove_products_after_coupon_detached are required with gift. Once the coupon has a discount, discount.amount_off and discount.percent_off are not allowed ("The discount amount off cannot be changed once the coupon has a discount action."), and the same holds for the gift amounts. discount.first_shipment_only fails when the existing discount is a fixed amount off ("First shipment only is not available when the existing discount is a fixed amount off."). Each *.delete.*.id and each rules.customers.delete.* or rules.subscriptions.delete.* must be an integer, and each rules.emails.delete.* must be an email.

curl -X PATCH https://api.subbly.co/private/v1/coupons/{coupon_id} \ -H 'X-API-KEY: <api-key>' \ -H 'Content-Type: application/json' \ -d '{ "name": "name", "duration": "once", "duration_in_months": 1, "remove_gifts_after_end_of_duration": 0, "max_redemptions": 1, "limit_one_per_customer": 0, "redeem_by": "2026-12-31T23:59:59", "condition": { "type": "product", "operator": "any", "products": { "create": [ { "product_id": 1 } ], "delete": [ { "id": 1 } ] }, "collections": { "create": [ { "collection_id": 1 } ], "delete": [ { "id": 1 } ] }, "cart_value": { "min": 1, "max": 1 }, "cart_quantity": { "min": 1, "max": 1 } }, "discount": { "amount_off": 1, "percent_off": 1.5, "applies_to": { "products": { "operator": "only", "ids": [ 440317, 440318 ] }, "collections": { "operator": "only", "ids": [ 440317, 440318 ] }, "item_types": [ "shipping" ] }, "skip_payment_method": 0, "first_shipment_only": 0 }, "gift": { "amount_off": 1, "percent_off": 1.5, "addon_duration": "once", "remove_products_after_coupon_detached": 0, "products": { "create": [ { "product_id": 1 } ], "delete": [ { "id": 1 } ] } }, "rules": { "emails": { "create": [ "customer@example.com" ], "delete": [ "customer@example.com" ] }, "customers": { "create": [ 1 ], "delete": [ 1 ] }, "subscriptions": { "create": [ 1 ], "delete": [ 1 ] } } }'
Response
{ "id": 1234, "coupon_id": "SAVE20", "name": "20% off", "duration": "once", "duration_in_months": 3, "remove_gifts_after_end_of_duration": false, "max_redemptions": 100, "times_redeemed": 5, "active": true, "limit_one_per_customer": false, "redeem_by": "2026-12-31 23:59:59", "valid": true, "condition": { "id": 10, "type": "product", "operator": "only", "products": [ {} ], "collections": [ {} ], "cart_value": { "min": 1, "max": 1 }, "cart_quantity": { "min": 1, "max": 1 } }, "discount": { "id": 20, "amount_off": 500, "percent_off": 20, "skip_payment_method": false, "first_shipment_only": false, "applies_to": {} }, "gift": { "id": 30, "amount_off": 1, "percent_off": 100, "addon_duration": "once", "remove_products_after_coupon_detached": false, "products": [ {} ] }, "rules": { "emails": {}, "customers": {}, "subscriptions": {} }, "created_at": "created_at", "updated_at": "updated_at", "deleted_at": "deleted_at" }

Archive a coupon

POST /coupons/{coupon_id}/archive

Archive (deactivate) a coupon.

Path parameters

coupon_idRequiredinteger

Coupon ID

ReturnsCoupon

Coupon archived

Error responses

404object

No coupon exists with this ID in the shop, or the coupon is deleted.

curl -X POST https://api.subbly.co/private/v1/coupons/{coupon_id}/archive \ -H 'X-API-KEY: <api-key>'
Response
{ "id": 1234, "coupon_id": "SAVE20", "name": "20% off", "duration": "once", "duration_in_months": 3, "remove_gifts_after_end_of_duration": false, "max_redemptions": 100, "times_redeemed": 5, "active": true, "limit_one_per_customer": false, "redeem_by": "2026-12-31 23:59:59", "valid": true, "condition": { "id": 10, "type": "product", "operator": "only", "products": [ {} ], "collections": [ {} ], "cart_value": { "min": 1, "max": 1 }, "cart_quantity": { "min": 1, "max": 1 } }, "discount": { "id": 20, "amount_off": 500, "percent_off": 20, "skip_payment_method": false, "first_shipment_only": false, "applies_to": {} }, "gift": { "id": 30, "amount_off": 1, "percent_off": 100, "addon_duration": "once", "remove_products_after_coupon_detached": false, "products": [ {} ] }, "rules": { "emails": {}, "customers": {}, "subscriptions": {} }, "created_at": "created_at", "updated_at": "updated_at", "deleted_at": "deleted_at" }
paginationobject
dataCoupon[]
typeRequiredstring

Possible values: product, cart_quantity, cart_value, collection.

operatorRequiredstring

Valid operators depend on type: product and collection accept only 'only'; cart_quantity and cart_value accept any, only and except.

Possible values: any, only, except.

productsoptionalobject | null

Required when operator is "only" or "except" and type is not "collection". Prohibited when operator is "any" or type is "collection".

collectionsoptionalobject | null

Required when type is "collection". Prohibited otherwise.

cart_valueoptionalobject | null

Prohibited when type is "product" or "cart_quantity". Amounts in cents, in the shop base currency.

cart_quantityoptionalobject | null

Prohibited when type is "product" or "cart_value".

amount_offoptionalinteger | null

Amount off in cents. Mutually exclusive with percent_off.

percent_offoptionalnumber | null

Percentage off (0-100). Mutually exclusive with amount_off.

applies_tooptionalCouponAppliesTo | null

Which cart lines get the discount. A line is discounted when it matches any rule. No rules means every line. An except rule cannot be combined with another rule..

skip_payment_methodoptionalinteger

Possible values: 0, 1.

first_shipment_onlyoptionalinteger

Prohibited when amount_off is used

Possible values: 0, 1.

amount_offoptionalinteger | null

Amount off in cents. Mutually exclusive with percent_off.

percent_offoptionalnumber | null

Percentage off (0-100). Mutually exclusive with amount_off.

addon_durationRequiredstring

With a subscription in the cart, the gift becomes an add-on. once ships it once, forever with every shipment. Ignored without a subscription.

Possible values: once, forever.

remove_products_after_coupon_detachedRequiredinteger

When 1, gift products are removed with the coupon.

Possible values: 0, 1.

productsRequiredobject
emailsoptionalobject
customersoptionalobject
subscriptionsoptionalobject

Customers with an active subscription to a listed subscription product, including multi-item subscriptions.

idinteger
coupon_idstring

Unique coupon code

namestring | null
durationstring

Possible values: once, forever, multiple.

duration_in_monthsinteger | null

Present when duration is "multiple"

remove_gifts_after_end_of_durationboolean
max_redemptionsinteger | null
times_redeemedinteger
activeboolean
limit_one_per_customerboolean
redeem_bystring | null
validboolean

Whether the coupon is currently valid for redemption

conditionCouponCondition | null

Whether the coupon can be used on the cart. product, collection: the cart has a listed product, or a product from a listed collection. cart_value, cart_quantity: the value in cents, or the quantity, of the counted products is within min..max. any counts all products, only the listed ones, except all but the listed ones. At least one counted product is required. Products are variant IDs. Gift lines are not counted..

discountCouponDiscount | null
giftCouponGift | null

Products added to the cart, with the discount on those lines only..

rulesCouponRules | null

Who can use the coupon. When emails and customers are both set, matching either is enough..

created_atstring | null
updated_atstring | null
deleted_atstring | null
idinteger
coupon_idstring

Unique coupon code

namestring | null
durationstring

Possible values: once, forever, multiple.

duration_in_monthsinteger | null

Present when duration is "multiple"

remove_gifts_after_end_of_durationboolean
max_redemptionsinteger | null
times_redeemedinteger
activeboolean
limit_one_per_customerboolean
redeem_bystring | null
validboolean

Whether the coupon is currently valid for redemption

conditionCouponCondition | null

Whether the coupon can be used on the cart. product, collection: the cart has a listed product, or a product from a listed collection. cart_value, cart_quantity: the value in cents, or the quantity, of the counted products is within min..max. any counts all products, only the listed ones, except all but the listed ones. At least one counted product is required. Products are variant IDs. Gift lines are not counted..

discountCouponDiscount | null
giftCouponGift | null

Products added to the cart, with the discount on those lines only..

rulesCouponRules | null

Who can use the coupon. When emails and customers are both set, matching either is enough..

created_atstring | null
updated_atstring | null
deleted_atstring | null
typeRequiredstring

Possible values: product, cart_quantity, cart_value, collection.

operatorRequiredstring

Valid operators depend on type: product and collection accept only 'only'; cart_quantity and cart_value accept any, only and except.

Possible values: any, only, except.

productsoptionalobject | null

Required when operator is "only" or "except" and type is not "collection". Prohibited when operator is "any" or type is "collection".

collectionsoptionalobject | null

Required when type is "collection". Prohibited otherwise.

cart_valueoptionalobject | null

Amounts in cents, in the shop base currency.

cart_quantityoptionalobject | null
amount_offoptionalinteger | null

Prohibited if discount already exists. Can only be set on initial creation.

percent_offoptionalnumber | null

Prohibited if discount already exists. Can only be set on initial creation.

applies_tooptionalCouponAppliesTo | null

Which cart lines get the discount. A line is discounted when it matches any rule. No rules means every line. An except rule cannot be combined with another rule.. Sending it replaces all rules; null removes them.

skip_payment_methodoptionalinteger

Possible values: 0, 1.

first_shipment_onlyoptionalinteger

Possible values: 0, 1.

amount_offoptionalinteger | null

Prohibited if gift already exists. Can only be set on initial creation.

percent_offoptionalnumber | null

Prohibited if gift already exists. Can only be set on initial creation.

addon_durationoptionalstring

With a subscription in the cart, the gift becomes an add-on. once ships it once, forever with every shipment. Ignored without a subscription.

Possible values: once, forever.

remove_products_after_coupon_detachedoptionalinteger

When 1, gift products are removed with the coupon.

Possible values: 0, 1.

productsoptionalobject | null
emailsoptionalobject
customersoptionalobject
subscriptionsoptionalobject

Customers with an active subscription to a listed subscription product, including multi-item subscriptions.

idinteger
coupon_idstring

Unique coupon code

namestring | null
durationstring

Possible values: once, forever, multiple.

duration_in_monthsinteger | null

Present when duration is "multiple"

remove_gifts_after_end_of_durationboolean
max_redemptionsinteger | null
times_redeemedinteger
activeboolean
limit_one_per_customerboolean
redeem_bystring | null
validboolean

Whether the coupon is currently valid for redemption

conditionCouponCondition | null

Whether the coupon can be used on the cart. product, collection: the cart has a listed product, or a product from a listed collection. cart_value, cart_quantity: the value in cents, or the quantity, of the counted products is within min..max. any counts all products, only the listed ones, except all but the listed ones. At least one counted product is required. Products are variant IDs. Gift lines are not counted..

discountCouponDiscount | null
giftCouponGift | null

Products added to the cart, with the discount on those lines only..

rulesCouponRules | null

Who can use the coupon. When emails and customers are both set, matching either is enough..

created_atstring | null
updated_atstring | null
deleted_atstring | null
idinteger
coupon_idstring

Unique coupon code

namestring | null
durationstring

Possible values: once, forever, multiple.

duration_in_monthsinteger | null

Present when duration is "multiple"

remove_gifts_after_end_of_durationboolean
max_redemptionsinteger | null
times_redeemedinteger
activeboolean
limit_one_per_customerboolean
redeem_bystring | null
validboolean

Whether the coupon is currently valid for redemption

conditionCouponCondition | null

Whether the coupon can be used on the cart. product, collection: the cart has a listed product, or a product from a listed collection. cart_value, cart_quantity: the value in cents, or the quantity, of the counted products is within min..max. any counts all products, only the listed ones, except all but the listed ones. At least one counted product is required. Products are variant IDs. Gift lines are not counted..

discountCouponDiscount | null
giftCouponGift | null

Products added to the cart, with the discount on those lines only..

rulesCouponRules | null

Who can use the coupon. When emails and customers are both set, matching either is enough..

created_atstring | null
updated_atstring | null
deleted_atstring | null