Skip to main content

Festivals API

The Festivals API allows you to manage and retrieve festival information.

List Festivals

Get a list of festivals.

Endpoint: GET /festivals

Headers:

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

Query Parameters:

  • limit (optional): Number of results to return (default: 20)
  • offset (optional): Number of results to skip (default: 0)
  • organizer (optional): Filter by organizer ID
  • start_time (optional): Filter festivals starting after this date (ISO 8601)
  • end_time (optional): Filter festivals ending before this date (ISO 8601)

Response:

[
{
"id": "festival-id",
"name": "Summer Music Festival",
"description": "A great music festival",
"venue": "Central Park",
"address": "123 Main St",
"country": "USA",
"start_time": "2024-07-01T00:00:00Z",
"end_time": "2024-07-03T23:59:59Z",
"photo": "https://example.com/photo.jpg",
"organizer": {
"id": "organizer-id",
"name": "Festival Organizer"
}
}
]

Get Festival

Get details of a specific festival.

Endpoint: GET /festivals/:id

Headers:

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

Response:

{
"id": "festival-id",
"name": "Summer Music Festival",
"description": "A great music festival",
"venue": "Central Park",
"address": "123 Main St",
"country": "USA",
"start_time": "2024-07-01T00:00:00Z",
"end_time": "2024-07-03T23:59:59Z",
"photo": "https://example.com/photo.jpg",
"organizer": {
"id": "organizer-id",
"name": "Festival Organizer"
},
"gigs": [
{
"id": "gig-id",
"artist": {
"id": "artist-id",
"name": "Artist Name"
},
"start_time": "2024-07-01T18:00:00Z",
"end_time": "2024-07-01T20:00:00Z"
}
],
"places": [
{
"id": "place-id",
"name": "Main Stage",
"type": "stage"
}
]
}

Create Festival

Create a new festival.

Endpoint: POST /festivals

Headers:

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

Request Body:

{
"name": "Summer Music Festival",
"description": "A great music festival",
"venue": "Central Park",
"address": "123 Main St",
"country": "USA",
"area": "New York",
"start_time": "2024-07-01T00:00:00Z",
"end_time": "2024-07-03T23:59:59Z",
"organizer_id": "organizer-id",
"photo": "base64-encoded-image-or-url",
"gigs": [
{
"artist_id": "artist-id",
"place_id": "place-id",
"start_time": "2024-07-01T18:00:00Z",
"end_time": "2024-07-01T20:00:00Z"
}
],
"places": [
{
"name": "Main Stage",
"type": "stage",
"coordinates": {
"lat": 40.7128,
"lng": -74.0060
}
}
],
"tickets": [
{
"name": "General Admission",
"price": 100,
"quantity": 1000
}
]
}

Response: Returns the created festival object.

Update Festival

Update an existing festival.

Endpoint: PUT /festivals/:id

Headers:

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

Request Body: Same as create, but all fields are optional.

Delete Festival

Delete a festival.

Endpoint: DELETE /festivals/:id

Headers:

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

Response:

{
"message": "Festival deleted successfully"
}