Get Reservation
GET /v1/nextrestaurant/reservations/{reservationId}
One reservation
Needs reservations:read. The response carries an ETag.
Request
GET https://your-site.example/api/index.php/v1/nextrestaurant/reservations/{reservationId}
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
reservationId |
integer |
path |
Yes | (min 1) |
Responses
200 — The reservation.
{
"data": {
"id": 1,
"reservation_number": "RES-000109",
"location_id": 1,
"customer_id": 1,
"area_id": 1,
"table_ids": [
1
],
"guest_name": "string",
"guest_phone": "string",
"guest_email": "string",
"party_size": 1,
"reserved_at": "string",
"reserved_at_local": "string",
"duration_minutes": 1,
"status": "pending",
"deposit_amount": 1.5,
"special_requests": "string",
"source": "web",
"created_at": "string",
"updated_at": "string"
}
}
| Field | Type | Meaning |
|---|---|---|
data.id |
integer |
(int64) |
data.reservation_number |
string|null |
|
data.location_id |
integer |
|
data.customer_id |
integer|null |
|
data.area_id |
integer|null |
|
data.table_ids[] |
integer[] |
|
data.guest_name |
string |
|
data.guest_phone |
string|null |
|
data.guest_email |
string|null |
|
data.party_size |
integer |
|
data.reserved_at |
string |
UTC. |
data.reserved_at_local |
string|null |
The venue's wall clock — what the guest was told. |
data.duration_minutes |
integer |
|
data.status |
string |
One of pending, confirmed, seated, completed, no_show, cancelled, waitlist. |
data.deposit_amount |
number |
|
data.special_requests |
string|null |
|
data.source |
string|null |
|
data.created_at |
string|null |
|
data.updated_at |
string|null |
Errors
| Status | Code | When |
|---|---|---|
401 |
INVALID_TOKEN |
The token is missing, wrong, or none has been generated. |
403 |
INSUFFICIENT_SCOPE |
This API key does not have the permission this request needs. |
403 |
MODULE_DISABLED |
This module is disabled. |
403 |
API_DISABLED |
API is disabled |
404 |
NOT_FOUND |
No such record. |
429 |
RATE_LIMITED |
Too many requests. RATE_LIMITED with a Retry-After header: this key used its budget for the minute, or this address sent 20 bad tokens in 5 minutes. Nothing ran, so the request is safe to retry after the wait. |
Examples
curl
curl -s "https://your-site.example/api/index.php/v1/nextrestaurant/reservations/1" \
-H "Authorization: Bearer $API_TOKEN"
PHP
<?php
$ch = curl_init('https://your-site.example/api/index.php/v1/nextrestaurant/reservations/1');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('API_TOKEN'),
],
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
JavaScript
const API_TOKEN = process.env.API_TOKEN;
const response = await fetch("https://your-site.example/api/index.php/v1/nextrestaurant/reservations/1", {
headers: {
"Authorization": `Bearer ${API_TOKEN}`,
},
});
const data = await response.json();