Introduction
API documentation for Flexseats
This documentation aims to provide all the information you need to work with our API.
Base URL
https://api.flexseats.io
Authenticating requests
This API is authenticated by sending an Authorization
header with the value "Bearer {YOUR_AUTH_KEY}"
.
All authenticated endpoints are marked with a requires authentication
badge in the documentation below.
You will receive an API token from Tckl.
Events / Availability
Check availability for the given event
requires authentication
Provide the composition of the households, in the following format:
{
"households": [
{"adults": 3, "adolescents": 2, "minors": 4},
...
]
}
The API route will return a list of seatboxes with enough capacity to accommodate all the requested guests
Example request:
curl -X GET \
-G "https://api.flexseats.io/v1/events/quas/availability" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.flexseats.io/v1/events/quas/availability"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Events / Bookings
Create a new booking
requires authentication
Send a JSON body with the composition of the households to make a booking, by default the booking is "open" which means that the seats are reserved until the booking gets the status "paid". When you don't update the booking with that status within 10 minutes, the seats are dropped and the booking automatically gets the status "expired".
Example booking:
{
"households": [
{"adults": 3, "adolescents": 2, "minors": 4},
...
]
}
Example request:
curl -X POST \
"https://api.flexseats.io/v1/events/nobis/bookings" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"seatbox_id":16,"number_adults":10,"number_childs":16}'
const url = new URL(
"https://api.flexseats.io/v1/events/nobis/bookings"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"seatbox_id": 16,
"number_adults": 10,
"number_childs": 16
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"created_at": "2020-11-27T09:32:44.000000Z",
"updated_at": "2020-11-27T09:32:44.000000Z",
"seatbox": {
id: 123,
title: "",
...
},
"tickets": [
[
{ "id": 34, "category": "adults", "row": 12, "seat": 33 },
{ "id": 35, "category": "adults", "row": 12, "seat": 34 }
],
[
{ "id": 36, "category": "adolescents", "row": 12, "seat": 36 },
{ "id": 37, "category": "adults", "row": 12, "seat": 37 }
]
]
}
Received response:
Request failed with error:
Update a booking for an event
requires authentication
Change for example the status of an booking from "open" to "paid"
{ "status": "paid" }
Example request:
curl -X PUT \
"https://api.flexseats.io/v1/events/cumque/bookings" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.flexseats.io/v1/events/cumque/bookings"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Retrieve bookings of events
requires authentication
List all the bookings made by users
Example request:
curl -X GET \
-G "https://api.flexseats.io/v1/events/et/bookings" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.flexseats.io/v1/events/et/bookings"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Events
Retrieve seatplan of the specified event
requires authentication
Example request:
curl -X GET \
-G "https://api.flexseats.io/v1/events/repudiandae/seatplan/eius" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.flexseats.io/v1/events/repudiandae/seatplan/eius"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
List your events
requires authentication
List all the events you manage, ordered by start date. Only future events will be listed.
Example request:
curl -X POST \
"https://api.flexseats.io/v1/events" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.flexseats.io/v1/events"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Venues / Seatboxes / Placement
Update a seat
requires authentication
You can specify for example whether a seat is disabled or not
Example request:
curl -X PUT \
"https://api.flexseats.io/v1/venues/quia/seatboxes/veritatis/seats/magnam" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"title":"adipisci","row":3,"seat":2,"is_starting_seat":false,"is_disabled":false}'
const url = new URL(
"https://api.flexseats.io/v1/venues/quia/seatboxes/veritatis/seats/magnam"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "adipisci",
"row": 3,
"seat": 2,
"is_starting_seat": false,
"is_disabled": false
}
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Venues / Seatboxes
Remove a seat column in a seatbox of a venue
requires authentication
Example request:
curl -X DELETE \
"https://api.flexseats.io/v1/venues/in/seatboxes/iste/delete-column/aut" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.flexseats.io/v1/venues/in/seatboxes/iste/delete-column/aut"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Remove a seat column in a seatbox of a venue
requires authentication
Example request:
curl -X DELETE \
"https://api.flexseats.io/v1/venues/provident/seatboxes/aut/delete-row/iure" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.flexseats.io/v1/venues/provident/seatboxes/aut/delete-row/iure"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Add a seat column in a seatbox of a venue
requires authentication
Example request:
curl -X PUT \
"https://api.flexseats.io/v1/venues/totam/seatboxes/possimus/add-column" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.flexseats.io/v1/venues/totam/seatboxes/possimus/add-column"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Add a seat row in a seatbox of a venue
requires authentication
Example request:
curl -X PUT \
"https://api.flexseats.io/v1/venues/error/seatboxes/cumque/add-row" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.flexseats.io/v1/venues/error/seatboxes/cumque/add-row"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
Received response:
Request failed with error:
Retrieve a list of seats in a seatbox
requires authentication
Example request:
curl -X GET \
-G "https://api.flexseats.io/v1/venues/distinctio/seatboxes/sunt/seats" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.flexseats.io/v1/venues/distinctio/seatboxes/sunt/seats"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Update a seatbox in a venue
requires authentication
Example request:
curl -X PUT \
"https://api.flexseats.io/v1/venues/consequatur/seatboxes/est" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"title":"vel","is_first_come_first_serve":false,"seats_rows":4,"seats_per_row":1,"seats_distance_horizontal":5,"seats_distance_vertical":14,"seats_distance_diagonal":7}'
const url = new URL(
"https://api.flexseats.io/v1/venues/consequatur/seatboxes/est"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "vel",
"is_first_come_first_serve": false,
"seats_rows": 4,
"seats_per_row": 1,
"seats_distance_horizontal": 5,
"seats_distance_vertical": 14,
"seats_distance_diagonal": 7
}
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Create a new seatbox in a venue
requires authentication
Example request:
curl -X POST \
"https://api.flexseats.io/v1/venues/sit/seatboxes" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"title":"assumenda","is_first_come_first_serve":false,"seats_rows":16,"seats_per_row":17,"seats_distance_horizontal":17,"seats_distance_vertical":12,"seats_distance_diagonal":20}'
const url = new URL(
"https://api.flexseats.io/v1/venues/sit/seatboxes"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "assumenda",
"is_first_come_first_serve": false,
"seats_rows": 16,
"seats_per_row": 17,
"seats_distance_horizontal": 17,
"seats_distance_vertical": 12,
"seats_distance_diagonal": 20
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
List all the seatboxes within the given venue
requires authentication
Example request:
curl -X GET \
-G "https://api.flexseats.io/v1/venues/qui/seatboxes" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.flexseats.io/v1/venues/qui/seatboxes"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Venues
Update a venue
requires authentication
Example request:
curl -X PUT \
"https://api.flexseats.io/v1/venues/voluptate" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"title":"est"}'
const url = new URL(
"https://api.flexseats.io/v1/venues/voluptate"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "est"
}
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Create a new venue
requires authentication
Example request:
curl -X POST \
"https://api.flexseats.io/v1/venues" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"title":"et"}'
const url = new URL(
"https://api.flexseats.io/v1/venues"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "et"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
List your venues
requires authentication
List all the venues you manage, ordered by title
Example request:
curl -X GET \
-G "https://api.flexseats.io/v1/venues" \
-H "Authorization: Bearer {YOUR_AUTH_KEY}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.flexseats.io/v1/venues"
);
let headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error: