Bookings
This will return a Booking by the provided booking id
.
If any erros occur you can access the errors guide.
Parameters
idpath integerRequired
Returns a specific Booking by the provided booking
id
.includequery string
Include associations (delimited with comma). Available associations: reservation, table
{
const res = await fetch(`${BASE_URL}/api/v1/bookings/${id}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}});
const data = await res.json();
}
{
"data": {
"id": "8f9399eb-e629-4756-a929-83a4fab16d3a",
"type": "bookings",
"links": {
"self": "/bookings/8f9399eb-e629-4756-a929-83a4fab16d3a"
},
"attributes": {
"seats-taken": 2
},
"relationships": {
"reservation": {
"links": {
"self": "/bookings/8f9399eb-e629-4756-a929-83a4fab16d3a/relationships/reservation",
"related": "/bookings/8f9399eb-e629-4756-a929-83a4fab16d3a/reservation"
}
},
"table": {
"links": {
"self": "/bookings/8f9399eb-e629-4756-a929-83a4fab16d3a/relationships/table",
"related": "/bookings/8f9399eb-e629-4756-a929-83a4fab16d3a/table"
}
}
}
}
}