Coupons

Create Coupon

Creates a new coupon.

post/v1/shops/{shopId}/coupons

Request body

codestring required
globalboolean required
discountnumber required

Must be at least -999999. Must not be greater than 999999.

type'percentage' | 'fixed' required
max_usesnumber

Must be at least 1. Must not be greater than 999999.

max_uses_per_customernumber

Must be at least 1. Must not be greater than 999999.

min_invoice_pricenumber

Must be at least 0. Must not be greater than 999999.

start_datestring

Must be a valid date. Must be a date before <code>2038-01-19</code>.

expiration_datestring

Must be a valid date. Must be a date after <code>today</code>. Must be a date before <code>2038-01-19</code>.

allowed_emailsstring[]

Must be a valid email address.

payment_method_idsstring[]
disable_if_volume_discountboolean
disable_if_quantity_dealboolean
disable_if_bundle_offerboolean
disable_if_gateway_discountboolean
disable_if_affiliate_discountboolean
uses_count_mode'pending' | 'paid'
applies_to_renewalsboolean
itemsstring[]

This field is required when <code>global</code> is <code>false</code>.

Example request

{
  "code": "culpa",
  "discount": 19,
  "type": "percentage",
  "max_uses": 25,
  "max_uses_per_customer": 22,
  "min_invoice_price": 18,
  "start_date": "2020-08-22",
  "expiration_date": "2020-08-22",
  "allowed_emails": [
    "reichel.zetta@example.net"
  ],
  "disable_if_gateway_discount": true,
  "disable_if_affiliate_discount": true,
  "uses_count_mode": "paid",
  "applies_to_renewals": true,
  "items": [
    "culpa"
  ]
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.