Create coupon
ticketspice_create_couponWRITE: create a discount coupon in the live TicketSpice account (it can be redeemed by ticket buyers right away). One discount (fixed amount or percent) and one or more codes; optionally limited to one form, to a number of uses, and to an expiry date. Not idempotent: calling it twice creates two coupons. POST /coupons.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Internal coupon name. | |
| codes | Yes | One or more redeemable codes. | |
| expires | No | When the coupon expires; omit for no expiry. | |
| form_id | No | Restrict the coupon to this form; omit for all forms. | |
| currency | No | Currency code, default USD. | |
| available | No | How many times the coupon can be used; -1 = unlimited (default). | |
| per_ticket | No | Apply the discount to each ticket instead of once per order (default false). | |
| discount_type | Yes | fixed (a currency amount) or percent. | |
| discount_value | Yes | Discount amount: currency units for a fixed discount, percent (1-100) for a percent discount. |