Aggiorna una prenotazione
curl --request PATCH \
--url https://app.gestionesala.com/api/v1/reservations/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"serviceDate": "2023-12-25",
"time": "<string>",
"partySize": 2,
"notes": "<string>",
"tableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tableCombinationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"guestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"externalRef": "<string>",
"version": "2023-11-07T05:31:56Z"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
serviceDate: '2023-12-25',
time: '<string>',
partySize: 2,
notes: '<string>',
tableId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
tableCombinationId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
guestId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
externalRef: '<string>',
version: '2023-11-07T05:31:56Z'
})
};
fetch('https://app.gestionesala.com/api/v1/reservations/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.gestionesala.com/api/v1/reservations/{id}"
payload = {
"serviceDate": "2023-12-25",
"time": "<string>",
"partySize": 2,
"notes": "<string>",
"tableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tableCombinationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"guestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"externalRef": "<string>",
"version": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"reservation": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"venueId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"serviceDate": "2023-12-25",
"time": "<string>",
"startsAt": "2023-11-07T05:31:56Z",
"endsAt": "2023-11-07T05:31:56Z",
"partySize": 123,
"status": "created",
"tableAssigned": true,
"needsAttention": true,
"notes": "<string>",
"source": "phone",
"sourceDetail": "<string>",
"externalRef": "<string>",
"guestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updatedAt": "2023-11-07T05:31:56Z",
"guest": {
"name": "<string>",
"allergies": "<string>",
"allergens": [
"gluten"
]
},
"guestDetails": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"phone": "<string>",
"email": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"name": "<string>",
"allergies": "<string>",
"allergens": [
"gluten"
],
"notes": "<string>",
"visitCount": 123,
"noShowCount": 123,
"externalRef": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
},
"table": {
"tableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tableCombinationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tables": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"minSeats": 123,
"maxSeats": 123
}
]
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {
"fields": [
"<string>"
],
"requiredScope": "<string>",
"reason": "<string>",
"alternatives": [
{
"time": "<string>",
"startsAt": "2023-11-07T05:31:56Z",
"endsAt": "2023-11-07T05:31:56Z",
"turnTimeMinutes": 123,
"seats": 123,
"overflowsShift": true
}
]
},
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {
"fields": [
"<string>"
],
"requiredScope": "<string>",
"reason": "<string>",
"alternatives": [
{
"time": "<string>",
"startsAt": "2023-11-07T05:31:56Z",
"endsAt": "2023-11-07T05:31:56Z",
"turnTimeMinutes": 123,
"seats": 123,
"overflowsShift": true
}
]
},
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {
"fields": [
"<string>"
],
"requiredScope": "<string>",
"reason": "<string>",
"alternatives": [
{
"time": "<string>",
"startsAt": "2023-11-07T05:31:56Z",
"endsAt": "2023-11-07T05:31:56Z",
"turnTimeMinutes": 123,
"seats": 123,
"overflowsShift": true
}
]
},
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {
"fields": [
"<string>"
],
"requiredScope": "<string>",
"reason": "<string>",
"alternatives": [
{
"time": "<string>",
"startsAt": "2023-11-07T05:31:56Z",
"endsAt": "2023-11-07T05:31:56Z",
"turnTimeMinutes": 123,
"seats": 123,
"overflowsShift": true
}
]
},
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {
"fields": [
"<string>"
],
"requiredScope": "<string>",
"reason": "<string>",
"alternatives": [
{
"time": "<string>",
"startsAt": "2023-11-07T05:31:56Z",
"endsAt": "2023-11-07T05:31:56Z",
"turnTimeMinutes": 123,
"seats": 123,
"overflowsShift": true
}
]
},
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {
"fields": [
"<string>"
],
"requiredScope": "<string>",
"reason": "<string>",
"alternatives": [
{
"time": "<string>",
"startsAt": "2023-11-07T05:31:56Z",
"endsAt": "2023-11-07T05:31:56Z",
"turnTimeMinutes": 123,
"seats": 123,
"overflowsShift": true
}
]
},
"requestId": "<string>"
}
}Prenotazioni
Aggiorna una prenotazione
Scope: reservations:write. Conferma, sposta o cambia stato, tavolo o ospite. Gli stati della sala (arrived, seated, released, completed, no_show) e tableId/tableCombinationId chiedono anche floor:write. Per annullare si usa DELETE.
PATCH
/
reservations
/
{id}
Aggiorna una prenotazione
curl --request PATCH \
--url https://app.gestionesala.com/api/v1/reservations/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"serviceDate": "2023-12-25",
"time": "<string>",
"partySize": 2,
"notes": "<string>",
"tableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tableCombinationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"guestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"externalRef": "<string>",
"version": "2023-11-07T05:31:56Z"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
serviceDate: '2023-12-25',
time: '<string>',
partySize: 2,
notes: '<string>',
tableId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
tableCombinationId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
guestId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
externalRef: '<string>',
version: '2023-11-07T05:31:56Z'
})
};
fetch('https://app.gestionesala.com/api/v1/reservations/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.gestionesala.com/api/v1/reservations/{id}"
payload = {
"serviceDate": "2023-12-25",
"time": "<string>",
"partySize": 2,
"notes": "<string>",
"tableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tableCombinationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"guestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"externalRef": "<string>",
"version": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"reservation": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"venueId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"serviceDate": "2023-12-25",
"time": "<string>",
"startsAt": "2023-11-07T05:31:56Z",
"endsAt": "2023-11-07T05:31:56Z",
"partySize": 123,
"status": "created",
"tableAssigned": true,
"needsAttention": true,
"notes": "<string>",
"source": "phone",
"sourceDetail": "<string>",
"externalRef": "<string>",
"guestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updatedAt": "2023-11-07T05:31:56Z",
"guest": {
"name": "<string>",
"allergies": "<string>",
"allergens": [
"gluten"
]
},
"guestDetails": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"phone": "<string>",
"email": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"name": "<string>",
"allergies": "<string>",
"allergens": [
"gluten"
],
"notes": "<string>",
"visitCount": 123,
"noShowCount": 123,
"externalRef": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
},
"table": {
"tableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tableCombinationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tables": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"minSeats": 123,
"maxSeats": 123
}
]
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {
"fields": [
"<string>"
],
"requiredScope": "<string>",
"reason": "<string>",
"alternatives": [
{
"time": "<string>",
"startsAt": "2023-11-07T05:31:56Z",
"endsAt": "2023-11-07T05:31:56Z",
"turnTimeMinutes": 123,
"seats": 123,
"overflowsShift": true
}
]
},
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {
"fields": [
"<string>"
],
"requiredScope": "<string>",
"reason": "<string>",
"alternatives": [
{
"time": "<string>",
"startsAt": "2023-11-07T05:31:56Z",
"endsAt": "2023-11-07T05:31:56Z",
"turnTimeMinutes": 123,
"seats": 123,
"overflowsShift": true
}
]
},
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {
"fields": [
"<string>"
],
"requiredScope": "<string>",
"reason": "<string>",
"alternatives": [
{
"time": "<string>",
"startsAt": "2023-11-07T05:31:56Z",
"endsAt": "2023-11-07T05:31:56Z",
"turnTimeMinutes": 123,
"seats": 123,
"overflowsShift": true
}
]
},
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {
"fields": [
"<string>"
],
"requiredScope": "<string>",
"reason": "<string>",
"alternatives": [
{
"time": "<string>",
"startsAt": "2023-11-07T05:31:56Z",
"endsAt": "2023-11-07T05:31:56Z",
"turnTimeMinutes": 123,
"seats": 123,
"overflowsShift": true
}
]
},
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {
"fields": [
"<string>"
],
"requiredScope": "<string>",
"reason": "<string>",
"alternatives": [
{
"time": "<string>",
"startsAt": "2023-11-07T05:31:56Z",
"endsAt": "2023-11-07T05:31:56Z",
"turnTimeMinutes": 123,
"seats": 123,
"overflowsShift": true
}
]
},
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {
"fields": [
"<string>"
],
"requiredScope": "<string>",
"reason": "<string>",
"alternatives": [
{
"time": "<string>",
"startsAt": "2023-11-07T05:31:56Z",
"endsAt": "2023-11-07T05:31:56Z",
"turnTimeMinutes": 123,
"seats": 123,
"overflowsShift": true
}
]
},
"requestId": "<string>"
}
}Autorizzazioni
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Intestazioni
L'updatedAt letto: la modifica passa solo se nessuno ha scritto dopo
Parametri del percorso
Corpo
application/json
Giorno di servizio, YYYY-MM-DD
Ora locale del locale, HH:mm
Pattern:
^([01]\d|2[0-3]):[0-5]\d$Intervallo richiesto:
x >= 1Solo le transizioni ammesse; lo stesso stato non cambia niente
Opzioni disponibili:
confirmed, arrived, seated, released, completed, no_show Il tavolo; null lo toglie
L'unione di tavoli, in alternativa a tableId
L'ospite da collegare; null lo stacca
Il tuo identificativo; null lo toglie
Required string length:
1 - 200In alternativa a If-Match: l'updatedAt letto
Risposta
OK
Show child attributes
Show child attributes

