Create Coupon

Overview

Creates a new coupon for the business. Available for Staff tokens.

Coupon Code

If the code field is left blank, a random alphanumeric code will be auto-generated. Coupon codes must be between 5 and 15 characters long and may only contain letters, numbers, and underscores.

Validation Rules

  • name is required and must be unique among active coupons.
  • coupon_type is required and must be either fixed or percent.
  • amount is required and must be a non-negative number.
  • starts_at is required. The date and time when the coupon becomes active.
  • expires_at is required. Must be a future date and must be at least 6 hours later than starts_at.
  • code must be unique among active coupons (if provided).
  • For percent type coupons, amount represents the percentage discount (e.g., 50 means 50% off).
  • For fixed type coupons, amount represents the fixed monetary discount in the business currency.
Language
Credentials
Bearer
JWT
Click Try It! to start a request and see the response here!