Skip to Content
API ReferenceLegacy v1

Coupons

Request fields, responses, and examples for v1 coupons.

These v1 operations are active. Use an API key for SDK integrations. See authentication for credentials and store selection, or follow the first request guide.

List all coupons

GET
/v1/coupons

Authorization

bearerAuthstoreAuth
headerAuthorizationBearer <API Key>

Provide your SellApp API key as a bearer token.

headerX-STORE<token>

Store slug. Required for OAuth access tokens. API keys may omit it to use their current store, or the first accessible store when no current store is selected.

Query Parameters

limit?integer

Number of items to return per page.

Range1 <= value <= 100
Default15
page?integer

Page number to return.

Range1 <= value
Default1
with_trashed?boolean

Include soft-deleted resources in the result.

Defaultfalse
only_trashed?boolean

Return only soft-deleted resources. Ignored when with_trashed is true.

Defaultfalse

Response Body

Successful response.

application/json
  1. response
data*array<>
links*
meta*
Example Request
curl -X GET 'https://sell.app/api/v1/coupons'
{  "data": [    {      "id": 1,      "code": "BONANZA",      "type": "PERCENTAGE",      "discount": "80",      "limit": null,      "store_wide": true,      "minimum_amount": null,      "expires_at": null,      "created_at": "2022-12-12T12:12:12.000000Z",      "updated_at": "2022-12-12T12:12:12.000000Z",      "store_id": 1,      "deleted_at": null,      "products": [],      "product_variants": [],      "maximum_discount_amount": null,      "applies_to": "one_time",      "subscription_payments": null    }  ],  "links": {    "first": "https://sell.app/api/v1/coupons?page=1",    "last": "https://sell.app/api/v1/coupons?page=1",    "prev": null,    "next": null  },  "meta": {    "current_page": 1,    "from": 1,    "last_page": 1,    "path": "https://sell.app/api/v1/coupons",    "per_page": 15,    "to": 1,    "total": 1,    "links": [      {        "url": null,        "label": "&laquo; Previous",        "active": false      },      {        "url": "https://sell.app/api/v1/coupons?page=1",        "label": "1",        "active": true      },      {        "url": null,        "label": "Next &raquo;",        "active": false      }    ]  }}

Create a coupon

POST
/v1/coupons

Authorization

bearerAuthstoreAuth
headerAuthorizationBearer <API Key>

Provide your SellApp API key as a bearer token.

headerX-STORE<token>

Store slug. Required for OAuth access tokens. API keys may omit it to use their current store, or the first accessible store when no current store is selected.

Request Body

application/json
  1. body
code*string
Lengthlength <= 255
type*string
Value in"PERCENTAGE""AMOUNT"
discount*|

A decimal discount value of at least 1. Percentage discounts cannot exceed 100; amount discounts use the store currency's major unit. A subscriptions coupon cannot take 100% off: that returns 422 on discount, so offer a free trial instead.

Range1 <= value
Lengthlength <= 255
store_wide*boolean
products?array<integer>

Product IDs the coupon applies to when store_wide is false. Each product you add must sell a variant of the coupon's kind: a subscription plan for a subscriptions coupon, or a one-time variant for a one_time one. Another product returns 422 on products.

Items1 <= items
product_variants?array<integer>

Optional variant restrictions. Every variant must belong to a selected product. Products without listed variants remain eligible on all variants. Each variant you add must be of the coupon's kind, a subscription plan or a one-time variant; another returns 422 on product_variants.

limit?|
Range1 <= value
expires_at?|

A future date and time, or null for no expiry.

Formatdate-time
minimum_amount?||

A decimal minimum amount in the store currency's major unit that the order lines of the coupon's kind must reach, or null for no minimum.

Range1 <= value
Lengthlength <= 255
applies_to?string

What the coupon discounts: one_time for one-time purchases, or subscriptions for the first payments of a subscription plan. A new coupon defaults to one_time, and an update that leaves this out keeps the current kind. The coupon only discounts order lines of its kind.

Value in"one_time""subscriptions"
subscription_payments?|

How many payments a subscriptions coupon discounts, counting the signup payment as the first, so 3 discounts the signup and the next two renewals. A subscriptions coupon needs one, and an update that leaves it out keeps the stored number. Missing on a subscriptions coupon, or outside 1 to 36, it returns 422 on subscription_payments with The number of discounted payments must be between 1 and 36. A one_time coupon always stores null here.

Range1 <= value <= 36

Response Body

Coupon created successfully.

application/json
  1. response
data*
curl -X POST 'https://sell.app/api/v1/coupons' \  -H 'Content-Type: application/json' \  -d '{  "code": "PLAN10",  "type": "PERCENTAGE",  "discount": 10,  "store_wide": false,  "products": [    123,    456  ],  "product_variants": [    1001,    1002  ]}'
{  "data": {    "id": 1,    "code": "PLAN10",    "type": "PERCENTAGE",    "discount": "10",    "limit": null,    "store_wide": false,    "minimum_amount": null,    "expires_at": null,    "created_at": "2026-08-30T12:00:01.000000Z",    "updated_at": "2026-08-30T12:00:01.000000Z",    "store_id": 1,    "deleted_at": null,    "products": [      123,      456    ],    "product_variants": [      1001,      1002    ],    "maximum_discount_amount": null,    "applies_to": "one_time",    "subscription_payments": null  }}

Retrieve a coupon

GET
/v1/coupons/{coupon}

Authorization

bearerAuthstoreAuth
headerAuthorizationBearer <API Key>

Provide your SellApp API key as a bearer token.

headerX-STORE<token>

Store slug. Required for OAuth access tokens. API keys may omit it to use their current store, or the first accessible store when no current store is selected.

Path Parameters

coupon*integer

The coupon path parameter.

Query Parameters

with_trashed?boolean

Include soft-deleted resources in the result.

Defaultfalse
only_trashed?boolean

Return only soft-deleted resources. Ignored when with_trashed is true.

Defaultfalse

Response Body

Successful response.

application/json
  1. response
data*
Example Request
curl -X GET 'https://sell.app/api/v1/coupons/1'
{  "data": {    "id": 1,    "code": "BONANZA",    "type": "PERCENTAGE",    "discount": "80",    "limit": null,    "store_wide": true,    "minimum_amount": null,    "expires_at": null,    "created_at": "2022-12-12T12:12:12.000000Z",    "updated_at": "2022-12-12T12:12:12.000000Z",    "store_id": 1,    "deleted_at": null,    "products": [],    "product_variants": [],    "maximum_discount_amount": null,    "applies_to": "one_time",    "subscription_payments": null  }}

Update a coupon

PATCH
/v1/coupons/{coupon}

Authorization

bearerAuthstoreAuth
headerAuthorizationBearer <API Key>

Provide your SellApp API key as a bearer token.

headerX-STORE<token>

Store slug. Required for OAuth access tokens. API keys may omit it to use their current store, or the first accessible store when no current store is selected.

Path Parameters

coupon*integer

The coupon path parameter.

Query Parameters

with_trashed?boolean

Include soft-deleted resources in the result.

Defaultfalse
only_trashed?boolean

Return only soft-deleted resources. Ignored when with_trashed is true.

Defaultfalse

Request Body

application/json
  1. body
code?string
Lengthlength <= 255
type?string
Value in"PERCENTAGE""AMOUNT"
discount?|

A decimal discount value of at least 1. Percentage discounts cannot exceed 100; amount discounts use the store currency's major unit. A subscriptions coupon cannot take 100% off: that returns 422 on discount, so offer a free trial instead.

Range1 <= value
Lengthlength <= 255
store_wide?boolean
products?array<integer>

Product IDs the coupon applies to when store_wide is false. Each product you add must sell a variant of the coupon's kind: a subscription plan for a subscriptions coupon, or a one-time variant for a one_time one. Another product returns 422 on products.

Items1 <= items
product_variants?array<integer>

Optional variant restrictions. Omit to preserve existing restrictions or send an empty array to allow every variant of the selected products. Each variant you add must be of the coupon's kind, a subscription plan or a one-time variant; another returns 422 on product_variants.

limit?|
Range1 <= value
expires_at?|

A future date and time, or null for no expiry.

Formatdate-time
minimum_amount?||

A decimal minimum amount in the store currency's major unit that the order lines of the coupon's kind must reach, or null for no minimum.

Range1 <= value
Lengthlength <= 255
applies_to?string

What the coupon discounts: one_time for one-time purchases, or subscriptions for the first payments of a subscription plan. A new coupon defaults to one_time, and an update that leaves this out keeps the current kind. The coupon only discounts order lines of its kind.

Value in"one_time""subscriptions"
subscription_payments?|

How many payments a subscriptions coupon discounts, counting the signup payment as the first, so 3 discounts the signup and the next two renewals. A subscriptions coupon needs one, and an update that leaves it out keeps the stored number. Missing on a subscriptions coupon, or outside 1 to 36, it returns 422 on subscription_payments with The number of discounted payments must be between 1 and 36. A one_time coupon always stores null here.

Range1 <= value <= 36

Response Body

Successful response.

application/json
  1. response
data*
Example Request
curl -X PATCH 'https://sell.app/api/v1/coupons/1' \  -H 'Content-Type: application/json' \  -d '{  "store_wide": false,  "products": [    123  ],  "product_variants": [    1001,    1002  ]}'
{  "data": {    "id": 1,    "code": "BAZINGA",    "type": "PERCENTAGE",    "discount": "80",    "limit": null,    "store_wide": false,    "minimum_amount": null,    "expires_at": null,    "created_at": "2022-12-12T12:12:12.000000Z",    "updated_at": "2026-08-30T12:00:01.000000Z",    "store_id": 1,    "deleted_at": null,    "products": [      123    ],    "product_variants": [      1001,      1002    ],    "maximum_discount_amount": null,    "applies_to": "one_time",    "subscription_payments": null  }}

Delete a coupon

DELETE
/v1/coupons/{coupon}

Authorization

bearerAuthstoreAuth
headerAuthorizationBearer <API Key>

Provide your SellApp API key as a bearer token.

headerX-STORE<token>

Store slug. Required for OAuth access tokens. API keys may omit it to use their current store, or the first accessible store when no current store is selected.

Path Parameters

coupon*integer

The coupon path parameter.

Query Parameters

with_trashed?boolean

Include soft-deleted resources in the result.

Defaultfalse
only_trashed?boolean

Return only soft-deleted resources. Ignored when with_trashed is true.

Defaultfalse

Response Body

Successful response.

application/json
  1. response
data*
Example Request
curl -X DELETE 'https://sell.app/api/v1/coupons/1'
{  "data": {    "id": 1,    "code": "BONANZA",    "type": "PERCENTAGE",    "discount": "80",    "limit": null,    "store_wide": true,    "minimum_amount": null,    "expires_at": null,    "created_at": "2022-12-12T12:12:12.000000Z",    "updated_at": "2026-08-30T12:00:01.000000Z",    "store_id": 1,    "deleted_at": "2026-08-30T12:00:01.000000Z",    "products": [],    "product_variants": [],    "maximum_discount_amount": null,    "applies_to": "one_time",    "subscription_payments": null  }}

Update a coupon

PUT
/v1/coupons/{coupon}

Authorization

bearerAuthstoreAuth
headerAuthorizationBearer <API Key>

Provide your SellApp API key as a bearer token.

headerX-STORE<token>

Store slug. Required for OAuth access tokens. API keys may omit it to use their current store, or the first accessible store when no current store is selected.

Path Parameters

coupon*integer

The coupon path parameter.

Query Parameters

with_trashed?boolean

Include soft-deleted resources in the result.

Defaultfalse
only_trashed?boolean

Return only soft-deleted resources. Ignored when with_trashed is true.

Defaultfalse

Request Body

application/json
  1. body
code?string
Lengthlength <= 255
type?string
Value in"PERCENTAGE""AMOUNT"
discount?|

A decimal discount value of at least 1. Percentage discounts cannot exceed 100; amount discounts use the store currency's major unit. A subscriptions coupon cannot take 100% off: that returns 422 on discount, so offer a free trial instead.

Range1 <= value
Lengthlength <= 255
store_wide?boolean
products?array<integer>

Product IDs the coupon applies to when store_wide is false. Each product you add must sell a variant of the coupon's kind: a subscription plan for a subscriptions coupon, or a one-time variant for a one_time one. Another product returns 422 on products.

Items1 <= items
product_variants?array<integer>

Optional variant restrictions. Omit to preserve existing restrictions or send an empty array to allow every variant of the selected products. Each variant you add must be of the coupon's kind, a subscription plan or a one-time variant; another returns 422 on product_variants.

limit?|
Range1 <= value
expires_at?|

A future date and time, or null for no expiry.

Formatdate-time
minimum_amount?||

A decimal minimum amount in the store currency's major unit that the order lines of the coupon's kind must reach, or null for no minimum.

Range1 <= value
Lengthlength <= 255
applies_to?string

What the coupon discounts: one_time for one-time purchases, or subscriptions for the first payments of a subscription plan. A new coupon defaults to one_time, and an update that leaves this out keeps the current kind. The coupon only discounts order lines of its kind.

Value in"one_time""subscriptions"
subscription_payments?|

How many payments a subscriptions coupon discounts, counting the signup payment as the first, so 3 discounts the signup and the next two renewals. A subscriptions coupon needs one, and an update that leaves it out keeps the stored number. Missing on a subscriptions coupon, or outside 1 to 36, it returns 422 on subscription_payments with The number of discounted payments must be between 1 and 36. A one_time coupon always stores null here.

Range1 <= value <= 36

Response Body

Successful response.

application/json
  1. response
data*
Example Request
curl -X PUT 'https://sell.app/api/v1/coupons/1' \  -H 'Content-Type: application/json' \  -d '{  "store_wide": false,  "products": [    123  ],  "product_variants": [    1001,    1002  ]}'
{  "data": {    "id": 1,    "code": "BAZINGA",    "type": "PERCENTAGE",    "discount": "80",    "limit": null,    "store_wide": false,    "minimum_amount": null,    "expires_at": null,    "created_at": "2022-12-12T12:12:12.000000Z",    "updated_at": "2026-08-30T12:00:01.000000Z",    "store_id": 1,    "deleted_at": null,    "products": [      123    ],    "product_variants": [      1001,      1002    ],    "maximum_discount_amount": null,    "applies_to": "one_time",    "subscription_payments": null  }}

Search coupons

POST
/v1/coupons/search

Authorization

bearerAuthstoreAuth
headerAuthorizationBearer <API Key>

Provide your SellApp API key as a bearer token.

headerX-STORE<token>

Store slug. Required for OAuth access tokens. API keys may omit it to use their current store, or the first accessible store when no current store is selected.

Query Parameters

with_trashed?boolean

Include soft-deleted resources in the result.

Defaultfalse
only_trashed?boolean

Return only soft-deleted resources. Ignored when with_trashed is true.

Defaultfalse

Request Body

application/json
  1. body
filters?array<|>
sort?array<>
search?
includes?array<>

Response Body

Successful response.

application/json
  1. response
data*array<>
links*
meta*
Example Request
curl -X POST 'https://sell.app/api/v1/coupons/search' \  -H 'Content-Type: application/json' \  -d '{  "filters": [    {      "field": "id",      "operator": "=",      "value": 1    }  ],  "sort": [    {      "field": "created_at",      "direction": "desc"    }  ]}'
{  "data": [    {      "id": 1,      "code": "BONANZA",      "type": "PERCENTAGE",      "discount": "80",      "limit": null,      "store_wide": true,      "minimum_amount": null,      "expires_at": null,      "created_at": "2022-12-12T12:12:12.000000Z",      "updated_at": "2022-12-12T12:12:12.000000Z",      "store_id": 1,      "deleted_at": null,      "products": [],      "product_variants": [],      "maximum_discount_amount": null,      "applies_to": "one_time",      "subscription_payments": null    }  ],  "links": {    "first": "https://sell.app/api/v1/coupons/search?page=1",    "last": "https://sell.app/api/v1/coupons/search?page=1",    "prev": null,    "next": null  },  "meta": {    "current_page": 1,    "from": 1,    "last_page": 1,    "path": "https://sell.app/api/v1/coupons/search",    "per_page": 20,    "to": 1,    "total": 1,    "links": [      {        "url": null,        "label": "&laquo; Previous",        "active": false      },      {        "url": "https://sell.app/api/v1/coupons/search?page=1",        "label": "1",        "active": true      },      {        "url": null,        "label": "Next &raquo;",        "active": false      }    ]  }}

Batch create coupons

POST
/v1/coupons/batch

Authorization

bearerAuthstoreAuth
headerAuthorizationBearer <API Key>

Provide your SellApp API key as a bearer token.

headerX-STORE<token>

Store slug. Required for OAuth access tokens. API keys may omit it to use their current store, or the first accessible store when no current store is selected.

Request Body

application/json
  1. body
resources*array<>

Response Body

Successful response.

application/json
  1. response
data*array<>
Example Request
curl -X POST 'https://sell.app/api/v1/coupons/batch' \  -H 'Content-Type: application/json' \  -d '{  "resources": [    {      "code": "STARTER10",      "type": "PERCENTAGE",      "discount": 10,      "store_wide": false,      "products": [        123      ],      "product_variants": [        1001      ]    }  ]}'
{  "data": [    {      "id": 1,      "code": "STARTER10",      "type": "PERCENTAGE",      "discount": "10",      "limit": null,      "store_wide": false,      "minimum_amount": null,      "expires_at": null,      "created_at": "2026-08-30T12:00:01.000000Z",      "updated_at": "2026-08-30T12:00:01.000000Z",      "store_id": 1,      "deleted_at": null,      "products": [        123      ],      "product_variants": [        1001      ],      "maximum_discount_amount": null,      "applies_to": "one_time",      "subscription_payments": null    }  ]}

Batch update coupons

PATCH
/v1/coupons/batch

Authorization

bearerAuthstoreAuth
headerAuthorizationBearer <API Key>

Provide your SellApp API key as a bearer token.

headerX-STORE<token>

Store slug. Required for OAuth access tokens. API keys may omit it to use their current store, or the first accessible store when no current store is selected.

Query Parameters

with_trashed?boolean

Include soft-deleted resources in the result.

Defaultfalse
only_trashed?boolean

Return only soft-deleted resources. Ignored when with_trashed is true.

Defaultfalse

Request Body

application/json
  1. body
resources*

Response Body

Successful response.

application/json
  1. response
data*array<>
Example Request
curl -X PATCH 'https://sell.app/api/v1/coupons/batch' \  -H 'Content-Type: application/json' \  -d '{  "resources": {    "1": {      "store_wide": false,      "products": [        123      ],      "product_variants": [        1001,        1002      ]    }  }}'
{  "data": [    {      "id": 1,      "code": "BONANZA",      "type": "PERCENTAGE",      "discount": "80",      "limit": null,      "store_wide": false,      "minimum_amount": null,      "expires_at": null,      "created_at": "2022-12-12T12:12:12.000000Z",      "updated_at": "2026-08-30T12:00:01.000000Z",      "store_id": 1,      "deleted_at": null,      "products": [        123      ],      "product_variants": [        1001,        1002      ],      "maximum_discount_amount": null,      "applies_to": "one_time",      "subscription_payments": null    }  ]}

Batch delete coupons

DELETE
/v1/coupons/batch

Authorization

bearerAuthstoreAuth
headerAuthorizationBearer <API Key>

Provide your SellApp API key as a bearer token.

headerX-STORE<token>

Store slug. Required for OAuth access tokens. API keys may omit it to use their current store, or the first accessible store when no current store is selected.

Query Parameters

with_trashed?boolean

Include soft-deleted resources in the result.

Defaultfalse
only_trashed?boolean

Return only soft-deleted resources. Ignored when with_trashed is true.

Defaultfalse

Request Body

application/json
  1. body
resources*array<integer>

Response Body

Successful response.

application/json
  1. response
data*array<>
Example Request
curl -X DELETE 'https://sell.app/api/v1/coupons/batch' \  -H 'Content-Type: application/json' \  -d '{  "resources": [    1,    2  ]}'
{  "data": [    {      "id": 1,      "code": "BONANZA",      "type": "PERCENTAGE",      "discount": "80",      "limit": null,      "store_wide": true,      "minimum_amount": null,      "expires_at": null,      "created_at": "2022-12-12T12:12:12.000000Z",      "updated_at": "2026-08-30T12:00:01.000000Z",      "store_id": 1,      "deleted_at": "2026-08-30T12:00:01.000000Z",      "products": [],      "product_variants": [],      "maximum_discount_amount": null,      "applies_to": "one_time",      "subscription_payments": null    },    {      "id": 2,      "code": "BONANZA2",      "type": "PERCENTAGE",      "discount": "80",      "limit": null,      "store_wide": true,      "minimum_amount": null,      "expires_at": null,      "created_at": "2022-12-12T12:12:12.000000Z",      "updated_at": "2026-08-30T12:00:01.000000Z",      "store_id": 1,      "deleted_at": "2026-08-30T12:00:01.000000Z",      "products": [],      "product_variants": [],      "maximum_discount_amount": null,      "applies_to": "one_time",      "subscription_payments": null    }  ]}