get

/coupons

Returns a list of Coupons. Default sorting is by coupon/discount id, from lowest to highest. Optional filter parameters can be passed in.

Usage Notes

Available types for type and exclude_type filters:

Type
per_item_discount
percentage_discount
per_total_discount
shipping_discount
free_shipping
promotion

Coupons with type=promotion will not populate usable data for the following fields but instead be set to the following default values:

...
amount : 0.0000
min_purchase: 0.0000
applies_to
restricted_to: []
shipping_methods : null
...

Authorization

apiKey - X-Auth-Token
apiKey - X-Auth-Client

Request Parameters

9 Query Parameters
2 Headers

Responses

1 Example
Schema
array[object]
id
integer

The coupon’s ID. This is a read-only field; do not set or modify its value in a POST or PUT request.

1 validation + required
date_created
string

Date Created

1 validation
num_uses
integer

Number of times this coupon has been used. This is a read-only field; do not set or modify its value in a POST or PUT request.

1 validation
name
string

The name of the coupon.

1 validation + required
type
string
1 validation + required
amount
string

The discount to apply to an order, as either an amount or a percentage. This field’s usage is determined by the coupon type. For example, a type of + percentage_discount would determine a percentage here.

1 validation + required
min_purchase
string

Specifies a minimum value that an order must have before the coupon can be applied to it.

1 validation
expires
string

Specifies when a coupon expires. Coupons need not have an expiry date – you can also control expiry via + max_uses or max_uses_per_customer. If you do use this date field, the value must be in RFC 2822 format.

enabled
boolean

If the coupon is enabled, this field’s value is true; otherwise, false.

1 validation
code
string

The coupon code that customers will use to receive their discounts. Value must be unique.

1 validation + required
applies_to
object

If it is not included in the PUT request, its existing value on the coupon will be cleared. Also required to be set on the POST request

required
max_uses
integer

Maximum number of times this coupon can be used.

1 validation
max_uses_per_customer
integer

Maximum number of times each customer can use this coupon.

1 validation
restricted_to
object
shipping_methods
array[string]

This is a list of shipping-method names. A shipping method must be enabled on the store to use it with a coupon. To check which shipping methods are enabled, please use the List Shipping Methods endpoint.

Send a Test Request

Send requests directly from the browser (CORS must be enabled)
$$.env
2 variables not set
store_hash
X-Auth-Token
X-Auth-Client