Parameters

coupon
dictionary
reference_name
string
code
string
note
string
coupon_type
string
discount_type
string
discount_value
number
min_amount
number
max_amount
number
max_discount
number
max_uses
number
max_uses_user
number
new_user
boolean
start_at
string
end_at
string
active
boolean
POST/v1/coupons
curl https://api.tradly.app/v1/coupons \
  -H "Authorization: Bearer YOUR_PUBLISHABLE_OR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -X POST \
  -d '{
  "coupon": {
    "reference_name": "Holiday Campaign",
    "code": "HOLIDAY",
    "note": "Great! You have received $10 disount.",
    "coupon_type": "direct_discount",
    "discount_type": "flat",
    "discount_value": 10,
    "min_amount": 100,
    "max_amount": 0,
    "max_discount": 10,
    "max_uses": 1000,
    "max_uses_user": 1,
    "new_user": true,
    "start_at": "2022-12-12 00:00:00",
    "end_at": "2022-12-31 00:00:00",
    "active": true
  }
}'
RESPONSE
{
  "status": true,
  "data": {
    "coupon": {
      "id": 1,
      "code": "SAVE10"
    }
  }
}