Guests
Guests are an extension of the `Person` and represent their relationships with `Booking` instances.
Guests are basically Persons in relation with Bookings. Each Guest contains the same person data and additional booking related data. It is important to note that the data contained within a Guest does not necessarily have to match the data contained within the Person related to this guest. This is caused by the fact that each time a Guest is added to a Booking they enter all the required information again. For that reason, each Guest could have data different than the Person it belongs to, and the person will always hold the data from the latest Booking.
The Guest object
Since the Person
resource is already explained in its own page, this document will focus on booking_related_data
.
booking_related_data.booking_id
booking_related_data.booking_id
ID of the booking the Guest is assigned to.
booking_related_data.web_checked_in_at
[nullable]
booking_related_data.web_checked_in_at
[nullable]The date and time the guest completed their online check-in.
booking_related_data.check_in_at
[nullable]
booking_related_data.check_in_at
[nullable]The date the guest is supposed to check in on.
booking_related_data.checked_in_at
[nullable]
booking_related_data.checked_in_at
[nullable]The date and time the guest actually checks in.
booking_related_data.check_out_at
[nullable]
booking_related_data.check_out_at
[nullable]The date the guest is supposed to check out on.
booking_related_data.checked_out_at
[nullable]
booking_related_data.checked_out_at
[nullable]The date and time the guest actually checks out.
booking_related_data.arrival_date
[nullable]
booking_related_data.arrival_date
[nullable]The date the guest is supposed to arrive on.
booking_related_data.odd_arrival_date
[nullable]
booking_related_data.odd_arrival_date
[nullable]In case the actual date of guests arrival is different from the start_date
of the guests earliest booking line this field is used for specifying the actual arrival date.
booking_related_data.arrival_time
[nullable]
booking_related_data.arrival_time
[nullable]The time the guest is due to arrive at.
booking_related_data.arrival_location_id
[nullable]
booking_related_data.arrival_location_id
[nullable]ID of the location the guest will arrive to.
booking_related_data.arrival_location.id
booking_related_data.arrival_location.id
Expanded ID of the location the guest will arrive to.
booking_related_data.arrival_location.backoffice_title
booking_related_data.arrival_location.backoffice_title
Expanded title of the location the guest will arrive to.
booking_related_data.arrival_location.abbreviation
booking_related_data.arrival_location.abbreviation
Expanded abbreviation of the title of the location the guest will arrive to.
booking_related_data.arrival_flight
[nullable]
booking_related_data.arrival_flight
[nullable]Number of the flight the guest will arrive on.
booking_related_data.arrival_airline
[nullable]
booking_related_data.arrival_airline
[nullable]Name of the airline operating the guests arrival flight.
booking_related_data.departure_date
[nullable]
booking_related_data.departure_date
[nullable]The date the guest is supposed to leave.
booking_related_data.odd_departure_date
[nullable]
booking_related_data.odd_departure_date
[nullable]In case the actual date of guests departure is different from the end_date
of the guests latest booking line this field is used for specifying the actual departure date.
booking_related_data.departure_time
[nullable]
booking_related_data.departure_time
[nullable]The time the guest is due to depart at.
booking_related_data.departure_location_id
[nullable]
booking_related_data.departure_location_id
[nullable]ID of the location the guest will depart from.
booking_related_data.departure_location.id
booking_related_data.departure_location.id
Expanded ID of the location the guest will depart from.
booking_related_data.departure_location.backoffice_title
booking_related_data.departure_location.backoffice_title
Expanded title of the location the guest will depart from.
booking_related_data.departure_location.abbreviation
booking_related_data.departure_location.abbreviation
Expanded abbreviation of the title of the location the guest will depart from.
booking_related_data.departure_flight
[nullable]
booking_related_data.departure_flight
[nullable]Number of the flight the guest will depart on.
booking_related_data.departure_airline
[nullable]
booking_related_data.departure_airline
[nullable]Name of the airline operating the guests departure flight.
booking_related_data.transfer_comment
[nullable]
booking_related_data.transfer_comment
[nullable]Arbitrary comments about the Guest's transfer.
booking_related_data.final_price_incl_tax
booking_related_data.final_price_incl_tax
The total cost of the booking for the relevant guest.
booking_related_data.cancelled_at
[nullable]
booking_related_data.cancelled_at
[nullable]The date and time when this guest was cancelled. Contains null
if the guest is not cancelled.
booking_related_data.created_at
booking_related_data.created_at
The date and time when this guest was created. Note: this is the date and time of creating the relationship between the booking and the person, not the date and time when the person was created.
booking_related_data.updated_at
booking_related_data.updated_at
The date and time when the guest was last modified. Note: this represents the last time the guest was modified, not the person.
Endpoints
Fetch all booking Guests
GET
https://api.bookinglayer.io/private/bookings/guests
Fetches a list of all booking guests. By default this endpoint does not scope guests by any parameter, however filtering the list is possible.
Query Parameters
arrives_at
NullableDate
Scopes the list by guest arrival date.
departs_at
NullableDate
Scopes the list by guest departure date.
onsite_at
DateRange
Scopes the list by dates when guest are on premise.
cancelled_at
NullableDate
Scopes the list by booking cancellation date.
transfer_location_id
int
Scopes the list by booking line transfer locations.
arrival_location_id
int
Scopes the list by the location guests arrive to.
departure_location_id
int
Scopes the list by the location guests depart from.
location_id
int
Scopes the list by a location guests have to have at least one booked product in.
checked_in
bool
Scopes the list based on wheter guests checked in or not.
booking_status
string[]
Scopes the list based on the status of the guests booking lines. Accepts a comma-separated list of statuses. Guests have to have at least one booking line in any booking in any of the provided statuses in order to be included in the list.
product_id
UUID
Scopes the list based on booked products. Guests have to have the specified product booked at least once in any booking in order to appear in the list.
product_type
string[]
Scopes the list based on the type of booked products. Accepts a comma-separated list of types. Guests have to have at least one product of any of the specified types booked in any booking in order to appear in the list.
diet_id
int
Scopes the list by diet. Guests need to have the specified diet selected in any booking in order to appear in the list.
is_transfer
String
Scopes the list by transfer product booking lines. Guests must have at least on transfer product booked in any booking in order to appear in the list.
Fetch Guests of a single Booking
GET
https://api.bookinglayer.io/private/bookings/{booking_id}/guests
Fetches a list of all the guests of a single booking.
Path Parameters
booking_id*
UUID
ID of the booking for which guests should be fetched
Fetch a single Guest
GET
https://api.bookinglayer.io/private/bookings/{booking_id}/guests/{person_id}
Fetches a single guest.
Path Parameters
booking_id*
UUID
ID of the Booking the Guest belongs to.
guest_id*
UUID
ID of the Person the Guest belongs to.
Update a single Guest
PUT
https:/api.bookinglayer.io/private/bookings/{booking_id}/guests/{person_id}
Updates a Guest entity. Updating a Guest entity will also update it's parent Person entity, since Persons always contain the latest data from their Guest/Booker instances.
When updating the email of an existing Guest entity there are three possible flows based on the create_new
flag and whether the new email you are setting is already assigned to another Person.
The first flow, when the create_new
flag is missing or null
and a new email is provided, will update the email of the Guest, as well as the Person.
The second flow is initiated by sending the create_new
flag as true
and, again, sending an email that is not assigned to any other Person. In this case a new Person will be created and the Guest being updated attached to it and detached from its old Person.
The last flow is relevant when an email that is already assigned to another person is sent. In this flow the create_new
flag has no effect, and the Guest is merged with the existing Person.
Path Parameters
booking_id*
UUID
ID of the Booking the Guest belongs to.
guest_id*
UUID
ID of the Person the Guest belongs to.
Request Body
Update the Guests email or creates a new Person, depending on the create_new
flag.
booking_related_data.checked_in_at
Datetime
Updates the Guest checked in timestamp.
booking_related_data.checked_out_at
Datetime
Updates the Guest checked out timestamp.
booking_related_data.odd_arrival_date
date
Updates the Guest odd arrival date. Updating this will not affect the arrival_date
field, and changes in booking lines will not affect this field either.
booking_related_data.odd_departure_date
Date
Updates the Guest odd departure date. Updating this will not affect the departure_date
field, and changes in booking lines will not affect this field either.
booking_related_data.arrival_time
Time
Updates the Guest arrival time.
booking_related_data.departure_time
Time
Updates the Guest departure time.
booking_related_data.arrival_flight
string
Updates the Guest arrival flight number.
booking_related_data.arrival_airline
string
Updates the Guest arrival flight airline.
booking_related_data.departure_flight
string
Updates the Guest departure flight number.
booking_related_data.departure_airline
string
Updates the Guest departure airline.
salutation
string
Updates the Guests salutation.
first_name
string
Updates the Guest first name.
last_name
String
Updates the Guest last name.
language_code
Country alpha-2 code
Updates the Guest language.
phone_country_code
Country alpha-2 code
Updates the Guest phone country code and phone calling code accordingly.
phone
string
Updates the Guest phone.
address_line_1
string
Updates the Guest address line 1.
address_line_2
string
Updates the Guest address line 2.
address_line_3
string
Updates the Guest address line 3.
zip_code
string
Updates the Guest zip code.
city
string
Updates the Guest city.
state
string
Updates the Guest state.
tax_number
string
Updates the Guest tax number.
birth_date
date
Updates the Guest birth date.
gender
male or female
Updates the Guest gender.
country_code
Country alpha-2 code
Updates the Guest country.
nationality_code
Country alpha-2 code
Updates the Guest nationality.
booking_related_data.arrival_location_id
int
Updates the Guest arrival location.
booking_related_data.departure_location_id
int
Updates the Guest departure location.
diet_id
int
Updates the Guest diet.
id_type
id_card, passport, driver_license or other
Updates the Guest ID type.
id_number
string
Updates the Guest ID number.
id_expiry_date
date
Updates the Guest ID expiration date.
custom_fields
object
Updates the Guest custom fields.
booking_related_data.transfer_comments
string
Updates the Guest transfer comments.
booking_related_data.is_checkin_completed
bool
Updates whether the Guest has completed checkin.
create_new
bool
Determines whether to create a new Person or not. Only takes effect when email
is updated.
booking_related_data.web_checked_in_at
Datetime
Updates the timestamp when the Guest checked in online.
booking_related_data.arrival_date
date
Updates the date the Guest is due to arrive. This date is affected by Booking Lines and could automatically be updated based on them.
booking_related_data.departure_date
String
Updates the date the Guest is due to depart. This date is affected by Booking Lines and could automatically be updated.
Delete a single Guest
DELETE
https://api.bookinglayer.io/private/bookings/{booking_id}/guests/{person_id}
Deletes a single Guest from a booking. Deleting a Guest from a booking will affect totals and potentially properties of the Person the Guest belongs to.
Deleting a Guest from a Booking will also automatically delete all the booking lines that belonged to the Guest from the Booking. However, in case any of the Guest's Booking Lines have previously been invoiced the Guest cannot be deleted.
Path Parameters
booking_id*
UUID
ID of the Booking the Guest belongs to.
guest_id*
UUID
ID of the Person the Guest belongs to.
Webhooks
Webhooks are a mechanism for Bookinglayer to notify other apps when something happens in the system. They are described in detail in a dedicated Webhooks document.
GuestCreated
GuestCreated
Sends a new Guest ID via a webhook call when a Guest gets created. If this is the first time that Person is being created in Bookinglayer the PersonCreated
event would get dispatched at the same time as well, so you should be careful if you're subscribed to both events.
GuestUpdated
GuestUpdated
Sends a Guest ID via a webhook call when an existing Guest gets updated. Updating a Guest also results in updating the Person that Guest belongs to so the PersonUpdated
event would get dispatched at the same time.
GuestDeleted
GuestDeleted
Sends a Person ID and Booking ID via a webhook call when an existing Guest gets deleted. Deleting a Guest from a Booking does not automatically delete the Person the guest belonged to so there are no conflicts in this scenario.
Last updated