Jetron TicketFluid
Checkout

Check a promo code

POST
/events/{slug}/promo-codes/validate

Checks a promo code before the attendee reserves, so you can show the discount early. Send the ticket IDs in the cart: a code limited to some tickets returns 400 without them, or when the cart has other tickets. Only codes that belong to this event work. Checking a code does not hold it: send it as promoCode when you create the reservation, which applies the discount. Returns 404 for an unknown or expired code and 400 when the code has no uses left.

Authorization

ApiKeyAuth
AuthorizationBearer <token>

Your public API key (e.g. jt_public_...) passed as a Bearer token.

In: header

Path Parameters

slug*string

The event's URL slug.

Header Parameters

X-Device-ID?string

The attendee's reservationToken, if they already have a reservation. If that reservation already holds uses of the code, they still count as available to this attendee.

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/events/string/promo-codes/validate" \  -H "Content-Type: application/json" \  -d '{    "code": "string"  }'
{  "status": true,  "data": {    "code": "string",    "type": "PERCENTAGE",    "value": 0,    "ticketIds": [      "fb54b4bc-22b8-4601-8bca-fd618f908a4c"    ],    "expiresAt": "2019-08-24T14:15:22Z"  }}