Integration specification · API version 1
Table reservations
A restaurant’s 360° tour can show each table where it stands, with its live status, and let a visitor reserve it. The availability and the booking come from the restaurant’s own booking system. This page is what that system implements: three HTTPS endpoints returning JSON.
How it works
1
Visitor’s browser
Opens the tour, taps a table, picks date, time and party size, enters name and e-mail.
2
Vimmersa server
Looks up the connection behind the hotspot, adds your API key, calls your system, checks and trims the answer.
3
Your booking system
Lists tables, answers availability, takes the reservation. It stays the only source of truth.
Visitors never talk to your system directly and never see its address or key: every call is made by our server. That is why your endpoints need no CORS headers, and why the API key can be a real secret.
Table labels in the tour show the status for the date, time and party size the visitor is looking at — the next half hour at least an hour ahead until they choose. Each label refreshes about once a minute while the tour is open.
Connect your own API — no changes on your side
Most venues already have a booking system with its own API. Choose Your own API when connecting, paste the address of its table list, and say where the key goes (Authorization: Bearer, a header such as X-Api-Key, or a query parameter). We read one answer, suggest which field is the table’s ID, name, seats, area and status, and show the tables as visitors will see them before you save.
| Field | Type | Meaning |
|---|---|---|
| Table list | required | Any JSON: a bare array or a list inside an object (“data”, “result.tables”). Names can be a field or a template like “№ {table_number}”. A status field is optional; you say which of its values mean free, booked and occupied (guests seated now) — booked and occupied are both taken, and visitors read them as “Reserved” and “Occupied now”. |
| Availability | optional | Either a list of tables with their status for a date and time, or — as most large systems answer — the venue’s free start times for a date and party (times as “19:30” or ISO date-times, with an optional available flag). |
| Booking | optional | POST or PUT to your address with a JSON body you write, e.g. {"table_number":"{table.table_number}","guest_name":"{name}","guest_phone":"{phone}","guests_count":{guests},"booking_time":"{datetimeUtc}","comment":"{notes}"}. {table.<field>} is any field of the chosen table. Any 2xx answer is a booking; say which field holds its ID and confirmation code. Tick “needs the guest’s phone” to make the phone required, and “staff confirm bookings” when bookings wait for confirmation in your system: the table then reads “Awaiting confirmation” to every visitor until your staff decide. An optional hold call runs first; its ID is {holdId}. |
| Decision | optional | When staff confirm later, Vimmersa learns the outcome from your webhook (below), or by reading the booking back: an address with {bookingId} (https://…/bookings/{bookingId}) or your bookings list, searched by the booking ID field. Say which field holds the booking’s status and which of its words mean confirmed, declined and still waiting; the usual ones (confirmed, accepted, declined, cancelled, new, pending, and their Russian forms) work without listing them. A status word on the table list can also mean “awaiting confirmation”. |
Addresses and bodies can use {date} {time} {datetime} {guests} {tableId} {name} {firstName} {lastName} {email} {phone} {notes} {idempotencyKey} {holdId} {datetimeUtc} {datetimeOffset} and {table.<field>}. Dates and times are the restaurant’s local time; set its time zone (e.g. Europe/Minsk) and {datetimeUtc} becomes 2026-11-07T18:00:00Z for 21:00. Values are URL-encoded in addresses and JSON-escaped in bodies.
What your API lacks falls back cleanly. Without availability, tables show their status as of now (“Free now”). Without a booking call, visitors send a request the owner confirms or declines by e-mail. Without either, tables still appear and take requests. The same address rules, timeout and size limit apply as below.
Setting it up in a tour
A Table reservation hotspot works in one of three ways, chosen under “How guests reserve”. Only the second uses this API.
| Field | Type | Meaning |
|---|---|---|
| Requests to me | default | No booking system. The guest sends date, time, party size, name and e-mail within the opening hours the author set; the owner gets an e-mail with Confirm / Decline (also in Leads and the lead webhook) and the guest is e-mailed the answer, with a calendar file when confirmed. Labels say “Reserve”. Needs a plan with lead capture. |
| Booking system | your API or ours | Live status on every table label and instant booking through your system — mapped from your own API, or built to the specification below. |
| Booking page | a link | A Reserve button opening the page the venue already uses (TheFork, OpenTable, its own site), https only. No status. |
If a connected booking system cannot be reached (down, a refused key, a timeout), its tables quietly switch to “Requests to me” until it answers again, so a visitor can always ask for a table.
To connect a booking system:
- In the tour editor, open Hotspots → Create hotspot and click the place in the panorama where the table stands.
- Under “What are you placing?” choose Table reservation.
- Under How guests reserve choose Booking system, then Connect a booking system, enter your API address (the base URL every path below is appended to) and API key. We call
GET /tablesright away; a connection that does not answer is not saved. - Pick the table from your system’s list, the same way a navigation hotspot picks its destination. The label takes the table’s name.
- Optionally set the party size the visitor’s card starts with, and whether the hotspot draws as a label (default) or a marker.
A connection belongs to the account that added it and can serve any number of hotspots in any of that account’s tours. Removing it stops every hotspot that uses it from showing availability.
Transport and authentication
- HTTPS on port 443, on a host that resolves to public addresses only. Plain HTTP, other ports, private and loopback addresses are refused.
- No redirects. A 3xx answer is an error; give us the final address.
- 8 seconds for the whole answer, and at most 1 MB of body.
- JSON in UTF-8, both ways. Unknown fields are ignored, so you may send more than is listed.
- Dates are
YYYY-MM-DDand timesHH:mm(24 h), both in the venue’s local time.
Every request carries:
Authorization: Bearer <the API key entered in the editor> (when one was entered)
Accept: application/json
User-Agent: Vimmersa-Reservations/1.0
X-Vimmersa-Reservations-Version: 1Answer 401 when the key is missing or wrong. The editor then tells the author to check the key; visitors see a neutral message.
GET /tables
GET{base}/tables
The venue and every table a hotspot can be placed on. We cache the answer for 5 minutes per connection.
{
"venue": { "id": "silva-resort-terrace", "name": "Silva Resort — Restaurant 360°", "timezone": "Europe/Lisbon" },
"tables": [
{ "id": "t12", "name": "Table 12", "type": "round", "minGuests": 2, "maxGuests": 6,
"area": "Terrace, sea view", "description": "Round table under the olive tree." }
]
}| Field | Type | Meaning |
|---|---|---|
| venue.id | string | Your identifier for the venue. |
| venue.name | string | Shown in the editor; the default name of the connection. |
| venue.timezone | string? | IANA zone of the dates and times, e.g. Europe/Warsaw. |
| tables[].id | string | Stable identifier. Hotspots store it: never reuse an id for another table. |
| tables[].name | string | Shown to visitors, e.g. “Table 12”. |
| tables[].minGuests | integer | Smallest party (1 when absent). |
| tables[].maxGuests | integer | Largest party: shown as the table’s seats on its label and card, and limits the guest picker. |
| tables[].type | string? | "round", "square", "long", "booth", "bar" or "lounge": the icon on the table’s label and card, and its name (“Round table”). Anything else is ignored. |
| tables[].area | string? | Section of the restaurant, shown on the card. |
| tables[].description | string? | Shown on the card when the hotspot has no description of its own. |
At most 500 tables are read; names are cut at 120 characters.
GET /availability
GET{base}/availability?date=2026-11-07&time=19:30&guests=4
The status of every table for one start time and party size. Answer for all tables in one response; we ask once for the whole tour.
{
"date": "2026-11-07",
"time": "19:30",
"guests": 4,
"tables": [
{ "tableId": "t12", "status": "available" },
{ "tableId": "t13", "status": "reserved", "alternativeTimes": ["17:30", "21:30"] },
{ "tableId": "t7", "status": "unavailable", "reason": "Seats up to 2." }
]
}| Field | Type | Meaning |
|---|---|---|
| tables[].tableId | string | An id from /tables. |
| tables[].status | "available" | "pending" | "reserved" | "unavailable" | available: bookable now. pending: a booking for it awaits your staff’s confirmation (shown as “Awaiting confirmation”, not bookable). reserved: someone else has it. unavailable: cannot be booked for this party or time (too small, closed, held back). |
| tables[].alternativeTimes | string[]? | Up to 8 bookable HH:mm start times that day, offered as one-tap choices when it is not available. |
| tables[].reason | string? | Short sentence shown to the visitor when it is not available. |
A table missing from the answer is shown as unavailable; we never assume a table is free. Sitting length, buffers and opening hours are yours to apply — we only pass the start time.
GET /slots (optional)
GET{base}/slots?date=2026-11-07&guests=4&tableId=t12
One table's start times for a day, for the small day chart and the time picker on the visitor's card. Optional: answer 404 with any code other than TABLE_NOT_FOUND and we ask /availability once per half hour from 12:00 to 22:30 instead. We cache the answer for a minute per table, date and party size, and drop it after a booking.
{
"date": "2026-11-07",
"tableId": "t12",
"slots": [
{ "time": "12:00", "status": "available" },
{ "time": "12:30", "status": "available" },
{ "time": "19:30", "status": "reserved" }
]
}| Field | Type | Meaning |
|---|---|---|
| slots[].time | string | HH:mm start time, in the venue’s local time. Up to 96 a day. |
| slots[].status | "available" | "pending" | "reserved" | "unavailable" | Same meanings as /availability. |
POST /reservations
POST{base}/reservations
Books a table. Check availability again inside the same transaction: two visitors may tap the same table at the same moment.
{
"tableId": "t12",
"date": "2026-11-07",
"time": "19:30",
"guests": 4,
"customer": { "name": "Anna Nowak", "email": "anna@example.com", "phone": "+48 600 000 000" },
"notes": "Window side if possible",
"idempotencyKey": "rc_4f…:9b2d0c…",
"source": { "kind": "vimmersa", "projectId": 353, "hotspotId": "hotspot_1762…" }
}| Field | Type | Meaning |
|---|---|---|
| customer.phone | string? | Only when the visitor gave one. |
| notes | string? | Up to 500 characters from the visitor. |
| idempotencyKey | string | Up to 100 characters. The same key twice must return the first reservation, not make a second one (our retries, a double tap). |
| source | object | Where the booking came from, for your records. projectId is the tour. |
Answer 201 (or 200 for a repeated idempotency key):
{
"reservation": {
"id": "res_8c1e…",
"status": "confirmed",
"tableId": "t12",
"date": "2026-11-07",
"time": "19:30",
"guests": 4,
"confirmationCode": "4F2A9C",
"manageUrl": "https://bookings.example.com/r/8c1e…",
"message": "See you on Friday!"
}
}| Field | Type | Meaning |
|---|---|---|
| status | "confirmed" | "pending" | pending: your staff confirm later. The table reads “Awaiting confirmation” and the guest follows the booking live. Answer pending only if you also answer GET /reservations/{id} or call our webhook when it is decided. |
| confirmationCode | string? | Shown to the visitor. |
| manageUrl | string? | Your page to change or cancel. https only; anything else is dropped. |
| message | string? | One or two sentences shown on the confirmation. |
Send the visitor’s confirmation e-mail yourself. For a pending booking we also tell the guest when you decide, if they left an e-mail.
GET /reservations/{id} (for pending bookings)
GET{base}/reservations/res_8c1e…
Where one booking stands. We read a pending booking back about every two minutes until it is decided (or its date has passed), unless your webhook tells us first. Answer with the same reservation object as above:
{ "reservation": { "id": "res_8c1e…", "status": "confirmed", "tableId": "t12", "date": "2026-11-07", "time": "19:30", "guests": 6,
"message": "See you on Friday!" } }| Field | Type | Meaning |
|---|---|---|
| status | "pending" | "confirmed" | "declined" | "cancelled" | Anything but pending settles it: the table is re-read in every open tour and the guest is told. |
| message | string? | Shown to the guest with the decision (“Fully booked, but we have 21:00”). |
Webhook: tell us about changes
When a booking is confirmed, declined or cancelled in your system — or a table’s status changes for any reason — POST to the connection’s webhook address. Every tour showing that restaurant re-reads its tables within a second, instead of at its next check (about every 15 seconds). The owner finds the address and secret in the editor under the table list, after the connection is saved.
POST https://vimmersa.com/api/reservations/webhook/rc_…
Content-Type: application/json
X-Vimmersa-Signature: t=1762534800,v1=<hex HMAC-SHA256(secret, "1762534800." + raw body)>
{ "booking_id": "res_8c1e…", "status": "confirmed", "message": "See you on Friday!" }| Field | Type | Meaning |
|---|---|---|
| Signature | header | Stripe-style, the same as our own lead webhook: t is unix seconds (within 5 minutes of our clock), v1 the hex HMAC-SHA256 of t, a dot and the exact raw body. A system that cannot sign may send “Authorization: Bearer <secret>” instead. |
| booking_id | string? | Your booking’s id, as your booking answer gave it. Also read from bookingId, reservation_id, reservation.id or booking.id — never a bare “id”, which could be a table’s. |
| status | string? | Your own word for the outcome (confirmed, declined, cancelled — or the words set in the editor). Also read from state, reservation.status, booking.status. |
| message | string? | Shown to the guest with the decision. |
Any other body — or none — still counts: a correctly signed call means “something changed, read my tables again”. Answer codes: 200 when received (its body says whether a booking was settled), 401 for a wrong signature or secret, 413 above 64 KB. Retries are safe: a booking is settled once.
# Sign and send from a shell
SECRET=whsec_…; BODY='{"booking_id":"res_8c1e","status":"confirmed"}'; T=$(date +%s)
SIG=$(printf '%s.%s' "$T" "$BODY" | openssl dgst -sha256 -hmac "$SECRET" -hex | sed 's/^.* //')
curl -X POST -H "Content-Type: application/json" -H "X-Vimmersa-Signature: t=$T,v1=$SIG" -d "$BODY" https://vimmersa.com/api/reservations/webhook/rc_…Errors
Any non-2xx answer with this body. The message of a 4xx is shown to the visitor, so write it for them.
{ "error": { "code": "TABLE_UNAVAILABLE", "message": "That table was just booked for 19:30." } }| Field | Type | Meaning |
|---|---|---|
| 401 UNAUTHORIZED | any | Key missing or wrong. |
| 400 INVALID_REQUEST | any | A field is missing or malformed. |
| 404 TABLE_NOT_FOUND | availability, reservations | The table id is unknown (it was removed). |
| 409 TABLE_UNAVAILABLE | reservations | Taken in the meantime. The card goes back to the picker with fresh availability. |
| 409 OUTSIDE_OPENING_HOURS | reservations | The time is outside service. |
| 429 RATE_LIMITED | any | Slow down. |
| 5xx INTERNAL | any | Your side failed; the visitor is asked to try again. |
Personal data
The visitor’s name, e-mail, phone and notes are sent to your system only to make the reservation they asked for. A booking you confirm at once is not stored by Vimmersa: our server passes it through and logs only the reservation id, table, date and time. A booking you answer “pending” is kept with the table, time, your booking id and the guest’s name and e-mail (when given) so the table reads “Awaiting confirmation” and the guest hears your decision; the name and e-mail are cleared 30 days after the date, and the phone and notes are never kept. Your system is the controller of the reservation data; say so in your own privacy notice.
Public booking requests are limited per visitor address and carry the same bot protection as the other public forms on Vimmersa (a hidden field and a signed, time-checked token).
Demo provider
A pretend restaurant implementing this exact API, to try the hotspot and to compare your answers against. In the editor, “Use the demo restaurant” connects it in one click. Tables 1–16; tables 10 and 13 are always taken in the evening; parties of 6 or more are answered “pending” and confirmed by the demo “staff” about a minute later (read back through GET /reservations/{id}); bookings are kept in memory until our next deploy.
| Field | Type | Meaning |
|---|---|---|
| Base URL | string | https://vimmersa.com/api/reservations/demo/v1 |
| API key | string | vimmersa-demo-key |
curl -H "Authorization: Bearer vimmersa-demo-key" \
https://vimmersa.com/api/reservations/demo/v1/tables
curl -H "Authorization: Bearer vimmersa-demo-key" \
"https://vimmersa.com/api/reservations/demo/v1/availability?date=2026-11-07&time=19:30&guests=4"
curl -X POST -H "Authorization: Bearer vimmersa-demo-key" -H "Content-Type: application/json" \
-d '{"tableId":"t12","date":"2026-11-07","time":"19:30","guests":4,
"customer":{"name":"Test","email":"test@example.com"},
"idempotencyKey":"try-1","source":{"kind":"vimmersa"}}' \
https://vimmersa.com/api/reservations/demo/v1/reservationsChecklist
- Public HTTPS on 443, no redirects, answers within 8 s.
- Table ids stable forever; names readable by guests.
- /availability answers for every table in one response.
- /reservations re-checks availability atomically and honours idempotencyKey.
- 4xx messages written for a guest; 401 for a bad key.
- Your system e-mails the confirmation.
- If you answer “pending”: GET /reservations/{id}, or a signed webhook call when staff decide.
Questions about an integration: contact us.