Skip to main content

Tickets API

Tickets represent admission tiers for a festival. They are created and updated as part of the festival object — include a tickets array in POST /festivals or PUT /festivals/:id to sync ticket tiers. Each ticket has an optional sales window and a separate usage validity window.

Ticket Object

{
"id": "uuid",
"name": "General Admission",
"price": 49.99,
"quantity": 1000,
"start_time": "2025-05-01T00:00:00Z",
"end_time": "2025-06-30T23:59:59Z",
"valid_since": "2025-07-01T08:00:00Z",
"valid_until": "2025-07-03T23:59:59Z",
"festival_id": "summer-fest-2025"
}
FieldTypeDescription
idUUIDUnique ticket tier identifier
namestringTier name (e.g. "Early Bird", "VIP")
pricedecimalPrice in EUR
quantityintegerTotal tickets available for this tier
start_timeISO 8601When ticket sales open (optional)
end_timeISO 8601When ticket sales close (optional)
valid_sinceISO 8601Earliest time a purchased ticket can be used (optional)
valid_untilISO 8601Latest time a purchased ticket can be used (optional)
festival_idstringOwning festival ID

Create / Update Tickets

Tickets are managed as part of the festival. Pass a tickets array when creating or updating a festival:

Endpoint: PUT /festivals/:id

Headers:

  • X-F-Authorization: Client token (required)
  • X-F-Authentication: User token (required)

Request Body (excerpt):

{
"tickets": [
{
"name": "Early Bird",
"price": 39.99,
"quantity": 200,
"end_time": "2025-03-31T23:59:59Z"
},
{
"name": "General Admission",
"price": 59.99,
"quantity": 800
},
{
"name": "VIP",
"price": 149.99,
"quantity": 50
}
]
}

The festival PUT endpoint performs a full sync: tickets in the array replace the previous set. Omitting the tickets key leaves existing tickets unchanged.

Purchase a Ticket

To purchase a ticket, use the Payments API. Set payment_type to "ticket" and entity_id to the ticket ID. On successful payment a unique QR code is generated and returned.

Validate a Ticket (Scan QR)

Mark a purchased ticket as used at the gate.

Endpoint: PUT /payments/:paymentId/validate

Headers:

  • X-F-Authorization: Client token (required)
  • X-F-Authentication: User token (required)

Response:

{
"id": "payment-uuid",
"is_validated": true,
"validated_at": "2025-07-01T10:23:00Z",
"validated_by": "user-uuid"
}