Importa ospiti
curl --request POST \
--url https://app.gestionesala.com/api/v1/imports/guests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"rows": [
{
"phone": "<string>",
"name": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"allergies": "<string>",
"notes": "<string>",
"externalRef": "<string>",
"visitCount": 50000,
"noShowCount": 50000,
"lastVisitAt": "2023-11-07T05:31:56Z"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
rows: [
{
phone: '<string>',
name: '<string>',
firstName: '<string>',
lastName: '<string>',
email: '<string>',
allergies: '<string>',
notes: '<string>',
externalRef: '<string>',
visitCount: 50000,
noShowCount: 50000,
lastVisitAt: '2023-11-07T05:31:56Z'
}
]
})
};
fetch('https://app.gestionesala.com/api/v1/imports/guests', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.gestionesala.com/api/v1/imports/guests"
payload = { "rows": [
{
"phone": "<string>",
"name": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"allergies": "<string>",
"notes": "<string>",
"externalRef": "<string>",
"visitCount": 50000,
"noShowCount": 50000,
"lastVisitAt": "2023-11-07T05:31:56Z"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"import": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "guests",
"status": "processing",
"totalRows": 123,
"createdRows": 123,
"updatedRows": 123,
"rejectedRows": 123,
"rejections": [
{
"row": 123,
"code": "<string>",
"message": "<string>",
"fields": [
"<string>"
]
}
],
"createdAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z"
}
}{
"import": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "guests",
"status": "processing",
"totalRows": 123,
"createdRows": 123,
"updatedRows": 123,
"rejectedRows": 123,
"rejections": [
{
"row": 123,
"code": "<string>",
"message": "<string>",
"fields": [
"<string>"
]
}
],
"createdAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z"
}
}{
"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>"
}
}Import
Importa ospiti
Scope: imports:write. Fino a 1000 righe per richiesta. Crea o aggiorna ogni ospite per telefono. Una riga storta non ferma le altre: finisce in rejections col motivo. Chi importa anche le prenotazioni passate non manda visitCount/noShowCount (si conterebbero due volte).
POST
/
imports
/
guests
Importa ospiti
curl --request POST \
--url https://app.gestionesala.com/api/v1/imports/guests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"rows": [
{
"phone": "<string>",
"name": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"allergies": "<string>",
"notes": "<string>",
"externalRef": "<string>",
"visitCount": 50000,
"noShowCount": 50000,
"lastVisitAt": "2023-11-07T05:31:56Z"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
rows: [
{
phone: '<string>',
name: '<string>',
firstName: '<string>',
lastName: '<string>',
email: '<string>',
allergies: '<string>',
notes: '<string>',
externalRef: '<string>',
visitCount: 50000,
noShowCount: 50000,
lastVisitAt: '2023-11-07T05:31:56Z'
}
]
})
};
fetch('https://app.gestionesala.com/api/v1/imports/guests', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.gestionesala.com/api/v1/imports/guests"
payload = { "rows": [
{
"phone": "<string>",
"name": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"allergies": "<string>",
"notes": "<string>",
"externalRef": "<string>",
"visitCount": 50000,
"noShowCount": 50000,
"lastVisitAt": "2023-11-07T05:31:56Z"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"import": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "guests",
"status": "processing",
"totalRows": 123,
"createdRows": 123,
"updatedRows": 123,
"rejectedRows": 123,
"rejections": [
{
"row": 123,
"code": "<string>",
"message": "<string>",
"fields": [
"<string>"
]
}
],
"createdAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z"
}
}{
"import": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "guests",
"status": "processing",
"totalRows": 123,
"createdRows": 123,
"updatedRows": 123,
"rejectedRows": 123,
"rejections": [
{
"row": 123,
"code": "<string>",
"message": "<string>",
"fields": [
"<string>"
]
}
],
"createdAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z"
}
}{
"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
La stessa chiave ripetuta ritrova la risorsa invece di crearne un'altra
Corpo
application/json
Required array length:
1 - 1000 elementsShow child attributes
Show child attributes
Risposta
Ritrovato con la stessa Idempotency-Key
Show child attributes
Show child attributes

