Seating Objects
The Objects API is used to read and manage the state of Event Objects. An object represents a Seat or a General Admission and keeps track of the corresponding state.
Base URL:
https://seatmap.vivenu.com/api or https://seatmap.vivenu.dev/api
The Object Status
Required attributes
- Name
status- Type
- enum(free, booked, notforsale, reserved, forsale)
- Description
The status indicating whether bookings are currently accepted on this object
Optional attributes
- Name
booked- Type
- integer
- Description
The number of booked seats in a GA. Set if the object is a general admission
Example
{
"status": "free",
"booked": 1
}Get Object Status
Get Object Status
Get the status of an object for a given Event.
If your requested object is of type General Admission than you will get the booked seats amount for the section aswell.
Request
const response = await fetch('https://seatmap.vivenu.com/api/event/507f191e810c19729de860ea/status/507f191e810c19729de860ea', {
method: 'GET',
headers: {
Authorization: 'Bearer {token}',
},
})
const data = await response.json()Response (200)
{
"status": "free",
"booked": 1
}Update Object Status
Update Object Status
Update the status for several objects for a given Event. The provided objects have to be all from the same type.
Caution: The status depends on the type of object. Seats have different status as General Admissions.
For General Admissions you can change the booked amount by providing a bookedChange amount.
The General Admissions booked amount will be increased by the amount. You can provide a negative number in order to decrease the booked amount.
Request
const response = await fetch('https://seatmap.vivenu.com/api/event/507f191e810c19729de860ea/status', {
method: 'POST',
headers: {
Authorization: 'Bearer {token}',
'Content-Type': 'application/json',
},
body: JSON.stringify( {
"objects": [
"string"
],
"status": "free"
}),
})
const data = await response.json()Response (200)
{
"message": "ok"
}Get Object Status Logs
Get Object Status Logs
Get the status logs of an object for a given Event. Whenever a status change is performed for an object the system creates a log entry.
Request
const response = await fetch('https://seatmap.vivenu.com/api/event/507f191e810c19729de860ea/status/507f191e810c19729de860ea/logs', {
method: 'GET',
headers: {
Authorization: 'Bearer {token}',
},
})
const data = await response.json()Response (200)
[
{
"api": true,
"_owner": "string",
"type": "ObjectStatusChange",
"eventId": "507f191e810c19729de860ea",
"objectId": "507f191e810c19729de860ea",
"before": "free",
"after": "booked",
"userId": "507f191e810c19729de860ea",
"bookedChange": 10.5,
"createdAt": "2030-01-23T23:00:00.123Z",
"updatedAt": "2030-01-23T23:00:00.123Z"
}
]