Reservations and guests
upsertReservation creates a reservation the first time you send an externalId and updates it every time after. You choose the externalId: it is your own booking id.
A reservation with its guests
Create a reservation with both guests
The lead guest is the booker: their form is made with the reservation, so it reports unchanged. Every other guest gets a form of their own (created). Best Guest pre-fills each form; nothing is e-mailed because of suppressGuestEmail. The response has one result per guest, with what each form still needs.
curl -X POST https://api.bestguest.app/v1/upsertReservation \
-H "Authorization: $BESTGUEST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"externalId": "doc-example-1",
"accommodationId": 1234,
"listingIds": [
1234
],
"fromDate": "2027-03-10",
"toDate": "2027-03-13",
"personsCount": 2,
"countryOfResidence": "Germany",
"recipientLanguage": "en",
"suppressGuestEmail": true,
"guests": [
{
"externalGuestId": "guest-1",
"isLead": true,
"firstName": "Anna",
"lastName": "Muster",
"email": "anna@example.com"
},
{
"externalGuestId": "guest-2",
"firstName": "Ben",
"lastName": "Muster",
"birthdate": "1990-04-02",
"nationality": "DEU",
"identType": "passport",
"identNumber": "C01X00T47",
"street": "Hauptstrasse",
"houseNumber": "5",
"city": "Berlin",
"postalCode": "10115",
"state": "Deutschland",
"purpose": "T",
"birthPlace": "Berlin",
"birthCountry": "DEU"
}
]
}' Answer: HTTP 200, and data.created = true, data.guests.0.result = "unchanged", data.guests.1.result = "created", data.guests.1.signatureRequired = true, data.guests.1.missingFields = ["signature"].
Required: externalId, accommodationId, listingIds (from getProperties), fromDate, toDate, personsCount, countryOfResidence, recipientLanguage. Overlapping dates on a listing are refused (OVERLAP_CONFLICT) unless you send allowOverlap. Without any guest contact a reservation is refused (GUEST_CONTACT_REQUIRED) unless you send allowSkeleton; the lead's e-mail in guests[] counts as the contact.
guests[]
Send every guest's details with your own externalGuestId for each. Best Guest pre-fills each guest's check-in form, so the guest only has to review and sign. Only externalGuestId is required; partial data is accepted and the gaps are reported.
- The lead guest (
"isLead": true, at most one) is the booker: their name and contact stand in for the reservation's top-level ones (if you send both they must agree). Every other guest gets an invitation and a form of their own and must have a first and last name when first sent. - At most
personsCountguests; the call never raises it. At most 30. - Fields (all optional but
externalGuestId):firstName,lastName,birthdate(YYYY-MM-DD),nationality(ISO 3166-1 alpha-3, e.g.DEU),identType(idorpassport),identNumber,street,houseNumber,city,postalCode,state(country of residence),district,birthPlace,birthCountry,checkIn,checkOut,purpose, the Slovak visa and residence-document fields,licensePlate,note,email,phoneNumberandsignature. Anything else is refused: a name or a document number never appears in an error message, and a field that Best Guest sets itself (userId,status, ...) cannot be sent. - The whole array is checked before anything is written: one bad guest refuses the call and nothing is stored.
The answer, per guest
result | Meaning |
|---|---|
created | A new form was made for this guest. |
updated | The form was changed. |
unchanged | Nothing to change (a replay, or the lead's form that was made with the reservation). |
skipped | Left alone, with a reason. |
Each result also has missingFields (what the form still needs; the signature is reported as signature), signatureRequired and the guest's own checkinUrl. Best Guest e-mails the lead's link (unless suppressGuestEmail); for every other guest it returns the link and leaves delivering it to you.
Send the same call again
Idempotent: the same externalId updates the same reservation, the same externalGuestId the same form. Nothing is duplicated.
curl -X POST https://api.bestguest.app/v1/upsertReservation \
-H "Authorization: $BESTGUEST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"externalId": "doc-example-1",
"accommodationId": 1234,
"listingIds": [
1234
],
"fromDate": "2027-03-10",
"toDate": "2027-03-13",
"personsCount": 2,
"countryOfResidence": "Germany",
"recipientLanguage": "en",
"suppressGuestEmail": true,
"guests": [
{
"externalGuestId": "guest-1",
"isLead": true,
"firstName": "Anna",
"lastName": "Muster",
"email": "anna@example.com"
},
{
"externalGuestId": "guest-2",
"firstName": "Ben",
"lastName": "Muster",
"birthdate": "1990-04-02",
"nationality": "DEU",
"identType": "passport",
"identNumber": "C01X00T47",
"street": "Hauptstrasse",
"houseNumber": "5",
"city": "Berlin",
"postalCode": "10115",
"state": "Deutschland",
"purpose": "T",
"birthPlace": "Berlin",
"birthCountry": "DEU"
}
]
}' Answer: HTTP 200, and data.created = false, data.guests.1.result = "unchanged".
What is never overwritten
Your data pre-fills a form until the guest takes over. A guest is skipped, and the form left exactly as it is, when:
reason | Because |
|---|---|
FORM_COMPLETED | the guest already completed the form. |
SIGNED | a signature exists. |
EDITED_SINCE | someone else (the guest, the host) changed the form since your last write. |
RESERVATION_CLOSED | the reservation was submitted: its guest list is final. |
FORM_REMOVED, NAME_REQUIRED, TOO_MANY_GUESTS, NO_LEAD_CONTACT, LEAD_ALREADY_MAPPED, GUEST_ACCOUNT_FAILED, INVALID_FILE_TYPE, ERROR | see the reference. |
A guest who opened their link and added themselves with the same name is adopted, not duplicated.
Removing a guest
Leaving a guest out of guests[] removes nobody. To remove one, send {"externalGuestId": "...", "remove": true} and nothing else in that entry. It works only for a guest you added through the API, never the lead, and only while nobody has completed, signed or edited the form and it has not been invoiced; otherwise the guest is skipped with FORM_COMPLETED, SIGNED, EDITED_SINCE, BILLED, NOT_PARTNER_CREATED or LEAD_CANNOT_BE_REMOVED. A removed guest has result: "removed" and the externalGuestId is free again; removing one that is not there is unchanged (NOT_FOUND), so the call is safe to repeat.
Fields Best Guest does not store
gender (M, F, X or N) and identIssueDate are accepted and checked, so you need not strip them, but they are not stored; the guest's result carries a FIELDS_NOT_STORED warning.
Signatures
A form is complete only when it is signed. You can supply the signature image yourself (signature: a PNG or JPEG, base64 or a data URI, at most 1 MB), together with every required detail, and the form is complete without the guest opening Best Guest. The key that supplied it and the time are recorded. The type is read from the image itself.
By sending a signature you confirm that you obtained it from the guest. A form completed this way is treated like any other: with the host's automatic closing on, it is approved and, for a Czech property, reported to the police on schedule, without anyone at Best Guest looking at it.
Supply a guest's signature
With every required detail and a signature image (PNG or JPEG, base64), the form is complete and nothing is left for the guest to do. A form the guest completed, signed or edited is never overwritten: it is reported as skipped.
curl -X POST https://api.bestguest.app/v1/upsertReservation \
-H "Authorization: $BESTGUEST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"externalId": "doc-example-1",
"accommodationId": 1234,
"listingIds": [
1234
],
"fromDate": "2027-03-10",
"toDate": "2027-03-13",
"personsCount": 2,
"countryOfResidence": "Germany",
"recipientLanguage": "en",
"suppressGuestEmail": true,
"guests": [
{
"externalGuestId": "guest-1",
"isLead": true,
"firstName": "Anna",
"lastName": "Muster",
"email": "anna@example.com"
},
{
"externalGuestId": "guest-2",
"firstName": "Ben",
"lastName": "Muster",
"birthdate": "1990-04-02",
"nationality": "DEU",
"identType": "passport",
"identNumber": "C01X00T47",
"street": "Hauptstrasse",
"houseNumber": "5",
"city": "Berlin",
"postalCode": "10115",
"state": "Deutschland",
"purpose": "T",
"birthPlace": "Berlin",
"birthCountry": "DEU",
"signature": "data:image/png;base64,..."
}
]
}' Answer: HTTP 200, and data.guests.1.result = "updated", data.guests.1.missingFields = [], data.guests.1.signatureRequired = false.
Reading a reservation
Read a reservation back
submissionStatus is the police-reporting status; compliance.readyToClose says whether every form is complete.
curl -X GET https://api.bestguest.app/v1/getReservation?externalId=doc-example-1 \
-H "Authorization: $BESTGUEST_API_KEY" Answer: HTTP 200, and data.externalId = "doc-example-1", data.personsCount = 2, data.submissionStatus = null.
| Field | Meaning |
|---|---|
forms[], filledForms, missingForms | The guests' check-in forms and how many are complete. |
compliance.readyToClose, closeBlockers | Every form is complete and nothing else blocks closing. |
submissionStatus | Police reporting: null (not closed), PENDING, SENT, FAILED. Outside Czechia a closed reservation reads SENT: it is closed, nothing is reported to any police portal. |
checkinUrl | The lead guest's link. Stable, expires 30 days after the stay, stops working when the reservation is cancelled or the guest's e-mail is changed. Send it to the guest only. |
localFeePaidAmount, localFeeQrAmount, ... | The local fee, while a payment is outstanding and once paid. |
Closing and the police
You do not submit to the police. The host decides, per property, whether Best Guest closes reservations automatically (getProperties shows it as autoClose; you cannot change it). When it is on, a reservation closes by itself once every guest's form is complete, from the arrival day to 14 days after it; a Czech one is then sent to the UbyPort portal on schedule, never earlier. When it is off, the host closes it. A reservation completed more than 14 days after arrival is no longer picked up automatically and waits for the host.
Changing a guest's contact
upsertReservation never changes a contact that exists: a routine full sync that resends old data must not be able to revoke a guest's link. Use updateGuestContact:
Give the lead guest another e-mail
The old check-in link stops working and a new one is returned. Once a guest completed or signed their form the e-mail can no longer be changed (CONTACT_LOCKED); the lead's form here is still open.
curl -X POST https://api.bestguest.app/v1/updateGuestContact \
-H "Authorization: $BESTGUEST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"externalId": "doc-example-1",
"email": "anna.muster@example.com",
"suppressGuestEmail": true
}' Answer: HTTP 200, and data.checkinUrlChanged = true, data.emailSent = false.
| Situation | Result |
|---|---|
| No invitation yet (a reservation without a contact) | The invitation and form are made. |
| A new e-mail, form not completed | The old link ends, a new link is returned, mailed unless suppressGuestEmail. |
| A phone number | Stored; the link does not change. |
| The same values | Success, nothing happens. |
| A new e-mail, form completed or signed | 409 CONTACT_LOCKED. |
| Reservation submitted / locked | 409 ALREADY_SENT / 403 FORBIDDEN. |
| More than 5 e-mail changes per reservation in 24 hours | 429 RATE_LIMIT_EXCEEDED. |
Clearing a contact is not supported. After a change, replaying your old create payload is refused (it no longer matches the stored contact). Another guest: send their externalGuestId.
Cancelling
Cancel a reservation
Soft-deletes it. Refused with ALREADY_SENT once it was submitted for police reporting.
curl -X POST https://api.bestguest.app/v1/cancelReservation \
-H "Authorization: $BESTGUEST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"externalId": "doc-example-1"
}' Answer: HTTP 200.