Would this coupon work right now — and for how much? For a storefront to check a code before checkout. A code that doesn't work still answers 200 with valid: false and the reason, so the storefront can show it to the customer. To actually spend the coupon, pass coupon_code to create_work_order or complete_order — those fail loudly on a bad code, because at that point it changes what the customer pays.
Request Parameters
Field
Type
Required
Description
code
string
Required
The coupon code — matched case-insensitively
total
decimal
Optional
The order's money total — send it to get the exact discount back
customer_email
string
Optional
The customer — enforces a once-per-customer limit
Response Fields
Field
Type
Description
code
string
The code, normalized to uppercase
valid
boolean
Whether it currently works for this customer
reason
string
Only when valid is false — why not, in customer-facing words
label
string
How the discount reads, e.g. "10% off"
mode / value
string / decimal
percent or fixed, and the number behind it
discount
decimal|null
The exact discount for the total you sent — null when no total was sent