Seating Reservations
The reservation API is used to map a booking intention. This intent can be controlled via the following endpoints.
A Reservation will expire after 15 Minutes if there is no update.
The reservation expiration time will be resetted to now() + 20 Minutes every time an object get added or removed from the reservation.
Base URL:
https://seatmap.vivenu.com/api or https://seatmap.vivenu.dev/api
Reserve an Object
Reserve an Object
To reserve an object, this endpoint must be used. It is usually used from the client.
If no token is passed, a new reservation is created, otherwise the object is added to the existing reservation.
You will receive the token that identifies the reservation in the response. This token should be unique per checkout and event.
Caution: You may not use this token for more than 1 customer, 1 checkout or more than 1 event. Doing so will result in reservation update or checkout completion failures.
Caution: You will need to provide this token to the following endpoints.
If the object is a seat: The status transitions from free to reserved.
If the object is a general admission: The booked amount increases by payload.amount
Payload
Optional attributes
- Name
childEventIds- Type
- array<string>
- Description
An array of Event-IDs the reservation affects too
- Name
amount- Type
- number
- Description
if generalAdmission = true. The amount seats inside of the General Admission to reserve
- Name
token- Type
- string
- Description
A token to identify the reservation. Initially empty, provided in the response
- Name
objectId- Type
- string
- Description
The Status-ID of the object to reserve
- Name
object- Type
- oneOf
- Description
- Name
config- Type
- object
- Description
Optional nested attributes (5)
- Name
availabilityMode- Type
- string
- Description
- Name
allowedContingents- Type
- array<string>
- Description
- Name
resolving- Type
- enum(fallback, exact)
- Description
- Name
contingentMode- Type
- string
- Description
- Name
signature- Type
- string
- Description
Request
const response = await fetch('https://seatmap.vivenu.com/api/public/event/507f191e810c19729de860ea/reserve', {
method: 'POST',
headers: {
Authorization: 'Bearer {token}',
'Content-Type': 'application/json',
},
body: JSON.stringify( {
"childEventIds": [
"string"
],
"amount": 10.5,
"token": "string",
"objectId": "507f191e810c19729de860ea",
"object": {
"gaName": "string"
},
"config": {}
}),
})
const data = await response.json()Response (200)
{
"status": "ok",
"statusId": "507f191e810c19729de860ea",
"token": "string",
"validUntil": "2030-01-23T23:00:00.123Z"
}Free an Object
Free an Object
To remove an object from a reservation, this endpoint must be used. It is usually used from the client.
If the object is a seat: The status transitions from reserved to free.
If the object is a general admission: The booked amount decreases by payload.amount
Payload
Required attributes
- Name
objectId- Type
- string
- Description
The Status-ID of the object to remove from reservation
- Name
token- Type
- string
- Description
The token for the reservation
Optional attributes
- Name
childEventIds- Type
- array<string>
- Description
An array of Event-IDs the reservation affects too
- Name
amount- Type
- number
- Description
if generalAdmission = true. The amount seats inside of the General Admission to free
Request
const response = await fetch('https://seatmap.vivenu.com/api/public/event/507f191e810c19729de860ea/free', {
method: 'POST',
headers: {
Authorization: 'Bearer {token}',
'Content-Type': 'application/json',
},
body: JSON.stringify( {
"objectId": "507f191e810c19729de860ea",
"token": "string",
"childEventIds": [
"string"
],
"amount": 10.5
}),
})
const data = await response.json()Response (200)
{
"status": "ok"
}Extend a Reservation
Extend a Reservation
To extend the expiration time of a reservation, this endpoint must be used. Should be used from the server only!
The new expiration is now() + 20 Minutes
Query parameters
Required query parameters
- Name
token- Type
- string
- Description
Request
const response = await fetch('https://seatmap.vivenu.com/api/reservation/extend?token=value', {
method: 'POST',
headers: {
Authorization: 'Bearer {token}',
},
})
const data = await response.json()Response (200)
{
"eventId": "507f191e810c19729de860ea",
"childEventIds": [
"string"
],
"token": "string",
"_owner": "string",
"objects": [
"string"
],
"validUntil": "2030-01-23T23:00:00.123Z",
"createdAt": "2030-01-23T23:00:00.123Z",
"updatedAt": "2030-01-23T23:00:00.123Z"
}Cancel a Reservation
Cancel a Reservation
To cancel a reservation, this endpoint must be used. Should be used from the server only!
All included Seats will transition to their initial state. And all included Seats inside of General Admissions will be discarded.
This action is irreversible. The reservation is then destroyed.
Query parameters
Required query parameters
- Name
token- Type
- string
- Description
Request
const response = await fetch('https://seatmap.vivenu.com/api/reservation/cancel?token=value', {
method: 'POST',
headers: {
Authorization: 'Bearer {token}',
},
})
const data = await response.json()Response (200)
{
"eventId": "507f191e810c19729de860ea",
"childEventIds": [
"string"
],
"token": "string",
"_owner": "string",
"objects": [
"string"
],
"validUntil": "2030-01-23T23:00:00.123Z",
"createdAt": "2030-01-23T23:00:00.123Z",
"updatedAt": "2030-01-23T23:00:00.123Z"
}