Create coupon

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Request body to create a coupon.

string
required

The name of the coupon.

string
required

The code of the coupon.

string
enum
required

The type of the coupon.

format
object
required

The format of the coupon.

date

The date the coupon starts (YYYY-MM-DD). Required if format.type is permanent or single-use.

date

The date the coupon ends (YYYY-MM-DD). Required if format.type is permanent or single-use.

float
Defaults to 0

The minimum cart amount required to use the coupon. Applicable for: pct-discount, fixed-discount, free-shipping, free-selection-with-selection, shipping-pct-discount, cs-discount, dynamic-discount, multi-fixed-discount.

The value of the coupon discount. Required for: pct-discount, fixed-discount, shipping-pct-discount, cs-discount, dynamic-discount.

integer
≥ 1

The maximum number of products in cart on which the coupon will be applied. Applicable for all types. Defaults to no maximum.

boolean
Defaults to false

When true, the coupon will be automatically added to the cart. Only one coupon can be automatically applied in the same period. Applicable for all types.

shipping_discount
object

The discount which will be applied to the shipping fees.

boolean
Defaults to false

When there is a commercial operation, the discount will be applied on the original selling price. Applicable for: pct-discount, fixed-discount, free-shipping, free-product-specific, free-selection-with-selection, shipping-pct-discount, dynamic-discount.

string

The terms and conditions which will be displayed on the website. Applicable for all types.

audience
object

The audience targeted by the coupon.

boolean
Defaults to true

Apply the discount on the cheapest products first. Only applicable for nth-item-pct-off.

boolean
Defaults to true

Hide the free products on the website. Only applicable for free-selection-with-selection.

integer
≥ 1

Quantity of products required in the cart. Required for: nth-item-pct-off, nth-item-fixed-price, free-selection-with-selection, buy-x-get-nth-fixed-price.

integer
≥ 1

Quantity of free products. Required for free-selection-with-selection.

string
enum

If shipping must be free for the free products, determines the carrier scope. Optional, for free-selection-with-selection only.

Allowed:
free_selection
object

Products from this selection will be free (up to qty_free items).

float

The price the products will be sold at. Required for: nth-item-fixed-price, buy-x-get-nth-fixed-price.

float

The discount percentage applied to the products. Required for nth-item-pct-off.

integer
≥ 1
Defaults to 1

Repeat the discount up to X times. Applicable for: nth-item-fixed-price, nth-item-pct-off, buy-x-get-nth-fixed-price.

boolean
Defaults to true

The tiers are cumulable. Only applicable for free-product-specific.

free_products
array of objects

A list of free product tiers. Required for free-product-specific.

free_products
tiers
array of objects
length ≤ 4

A list of tiers (up to 4). Required for: auto-tiered-discount, spend-x-get-amount-off, spend-x-get-pct-off, buy-x-get-x-free, buy-x-get-amount-off.

tiers
product
array of objects

A list of products with their external reference, new selling price and optional label ID. Required for multi-fixed-discount.

product
eligible_countries
array of strings
required

A list of alpha-2 country ISO codes. The coupon will only work on the addresses of those countries.

eligible_countries*
eligible_carriers
array of integers
required

A list of carrier IDs. The coupon will only work if the client chooses one of those carriers.

eligible_carriers*
product_selection
object

A selection of products. The coupon will only work on the products from this selection. Required when eligible_services is not present. Applicable for: pct-discount, fixed-discount, buy-x-get-pct-off, spend-x-get-amount-off, spend-x-get-pct-off, buy-x-get-x-free, nth-item-fixed-price, nth-item-pct-off, cs-discount, dynamic-discount, auto-tiered-discount.

cart_selection
object

A selection of products. The coupon will only work if the basket contains products from this selection. Required for: free-selection-with-selection, buy-x-get-nth-fixed-price.

discounted_selection
object

A selection of products. The discount will only be applied on the products from this selection. Required for buy-x-get-nth-fixed-price.

eligible_services
array of integers

A list of service IDs. Required when product_selection is not present. Applicable for: pct-discount, fixed-discount, free-shipping, free-product-specific, buy-x-get-pct-off, spend-x-get-amount-off, spend-x-get-pct-off, buy-x-get-x-free, nth-item-fixed-price, nth-item-pct-off, dynamic-discount, multi-fixed-discount, buy-x-get-nth-fixed-price, auto-tiered-discount.

eligible_services
integer
Defaults to 1

The site ID. Applicable for all types.

Responses

Language
Credentials
Bearer
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json