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"
}
| Field | Type | Description |
|---|---|---|
id | UUID | Unique ticket tier identifier |
name | string | Tier name (e.g. "Early Bird", "VIP") |
price | decimal | Price in EUR |
quantity | integer | Total tickets available for this tier |
start_time | ISO 8601 | When ticket sales open (optional) |
end_time | ISO 8601 | When ticket sales close (optional) |
valid_since | ISO 8601 | Earliest time a purchased ticket can be used (optional) |
valid_until | ISO 8601 | Latest time a purchased ticket can be used (optional) |
festival_id | string | Owning 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"
}