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

{
    "person": {
        "id": "6e3ab460-55cf-11e7-9300-04016aacf401",
        "first_name": "John",
        "last_name": "Smith",
        "initials": "JS",
        "gender": "male",
        "birth_date": "2003-08-20",
        "email": "john.smith@bookinglayer.com",
        "language_code": "en",
        "nationality_code": "gb",
        "phone_country_calling_code": "44",
        "phone_country_code": "gb",
        "phone": "2071234567",
        "country_code": "gb",
        "state": "England",
        "city": "London",
        "zip_code": "SW1A 1AA",
        "address_line_1": "10 Downing Street",
        "address_line_2": null,
        "address_line_3": null,
        "custom_fields": {
            "surf_level_6375066bbc27f": "550e8400-e29b-41d4-a716-446655440000",
            "yoga_level_61f2619ca4746": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
            "dietary_requirements_61f2619ca4746": "vegan"
        },
        "totals": {
            "last_booking": "2020-04-15T13:08:58+00:00",
            "booking_count": 2,
            "total_as_guest": 2,
            "total_as_booker": 1,
            "total_paid_as_booker": 2310,
            "booking_inquiry_count": 1
        },
        "id_type": "passport",
        "id_number": "7700225VH",
        "id_expiry_date": "2030-01-10",
        "company_name": "Bookinglayer",
        "tax_number": "AB123456D",
        "diet_id": 357,
        "diet": {
            "id": 357,
            "backoffice_title": "Omnivorous",
            "abbreviation": "OV"
        },
        "is_guest": true,
        "is_booker": true,
        "created_at": "2017-06-20T15:45:05+00:00",
        "updated_at": "2020-04-15T13:08:58+00:00"
    },
    "booking_related_data": {
        "booking_id": "83d8ac7b-10c5-3839-abfc-9c2d9643cac5",
        "web_checked_in_at": "2023-05-01",
        "check_in_at": "2023-05-05",
        "checked_in_at": "2023-05-05T08:33:54+00:00",
        "check_out_at": "2023-05-25",
        "checked_out_at": null,
        "arrival_date": "2023-05-05",
        "odd_arrival_date": null,
        "arrival_time": "08:35:00",
        "arrival_location_id": 52632,
        "arrival_location": {
            "id": 52632,
            "title": "Hotel A",
            "abbreviation": "HTLA"
        },
        "arrival_flight": "W221HFS",
        "arrival_airline": "Wintheiser PLC",
        "departure_date": "2023-05-26",
        "odd_departure_date": "2023-05-26",
        "departure_time": "18:30:00",
        "departure_location": {
            "id": 52633,
            "title": "Hotel B",
            "abbreviation": "HTLB"
        },
        "departure_flight": "ZGK3RR1",
        "departure_airline": "Ziegler Group",
        "transfer_comment": null,
        "final_price_incl_tax": 500,
        "cancelled_at": null,
        "created_at": "2023-12-01T15:29:13+00:00",
        "updated_at": "2023-12-01T15:29:13+00:00"
    }
}

Since the Person resource is already explained in its own page, this document will focus on booking_related_data.

ID of the booking the Guest is assigned to.

The date and time the guest completed their online check-in.

The date the guest is supposed to check in on.

The date and time the guest actually checks in.

The date the guest is supposed to check out on.

The date and time the guest actually checks out.

The date the guest is supposed to arrive on.

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.

The time the guest is due to arrive at.

ID of the location the guest will arrive to.

Expanded ID of the location the guest will arrive to.

Expanded title of the location the guest will arrive to.

Expanded abbreviation of the title of the location the guest will arrive to.

Number of the flight the guest will arrive on.

Name of the airline operating the guests arrival flight.

The date the guest is supposed to leave.

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.

The time the guest is due to depart at.

ID of the location the guest will depart from.

Expanded ID of the location the guest will depart from.

Expanded title of the location the guest will depart from.

Expanded abbreviation of the title of the location the guest will depart from.

Number of the flight the guest will depart on.

Name of the airline operating the guests departure flight.

Arbitrary comments about the Guest's transfer.

The total cost of the booking for the relevant guest.

The date and time when this guest was cancelled. Contains null if the guest is not cancelled.

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.

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

NameTypeDescription

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.

{
    "data": [
        {
            "id": "32187d7b-efdc-3132-a748-f28a76ea1d9f",
            "person": {
                "id": "de6e4f20-df8b-3b7b-a7b7-e02cf90366b0",
                "first_name": "Evelyn",
                "last_name": "Langosh",
                "initials": "EL",
                "gender": "female",
                "birth_date": "1993-03-02",
                "email": "evelyn@bookinglayer.com",
                "language_code": "en",
                "nationality_code": null,
                "phone_country_calling_code": "en",
                "phone_country_code": "en",
                "phone": "543208383",
                "country_code": "us",
                "state": "South Dakota",
                "city": "Rapid City",
                "zip_code": "57701",
                "address_line_1": "77335 Addison Shoals",
                "address_line_2": "63487 Gibson Stravenue\nLake Fausto, NC 96328-8403",
                "address_line_3": null,
                "custom_fields": [],
                "totals": {
                    "last_booking": null,
                    "booking_count": null,
                    "total_as_guest": null,
                    "total_as_booker": null,
                    "total_paid_as_booker": null,
                    "booking_inquiry_count": null
                },
                "id_type": "id_card",
                "id_number": "555333",
                "id_expiry_date": "2027-08-19",
                "company_name": null,
                "tax_number": null,
                "diet_id": 357,
                "diet": {
                    "id": 357,
                    "backoffice_title": "Omnivorous",
                    "abbreviation": "OV"
                },
                "is_booker": false,
                "is_guest": true,
                "created_at": "2023-12-18T17:32:02+00:00",
                "updated_at": "2023-12-18T17:32:02+00:00",
            },
            "booking_related_data": {
                "booking_id": "73ecf641-b762-4889-adfa-8c994bb0acee",
                "web_checked_in_at": "2023-12-02T14:33:34+00:00",
                "check_in_at": "2023-12-16",
                "checked_in_at": "2023-12-16T09:28:29+00:00",
                "check_out_at": "2023-12-29",
                "checked_out_at": null,
                "arrival_date": "2023-12-16",
                "odd_arrival_date": null,
                "arrival_time": "09:00:00",
                "arrival_location_id": 713,
                "arrival_location": {
                    "id": 713,
                    "backoffice_title": "Hotel 1",
                    "abbreviation": "HTL1"
                },
                "arrival_flight": "W122H7",
                "arrival_airline": "WizzAir",
                "departure_date": "2023-12-29",
                "odd_departure_date": "2023-12-30",
                "departure_time": "13:45:00",
                "departure_location_id": 713,
                "departure_location": {
                    "id": 713,
                    "backoffice_title": "Hotel 1",
                    "abbreviation": "HTL1"
                },
                "departure_flight": null,
                "departure_airline": null,
                "transfer_comment": "Arrival is handled by us. Guest is leaving on their own and staying in town for an extray day.",
                "final_price_incl_tax": 800,
                "cancelled_at": null,
                "created_at": "2023-12-10T17:32:02+00:00",
                "updated_at": "2023-12-02T14:33:34+00:00"
            }
        },
    ],
    "links": {
        "first": "https://api.bookinglayer.io/private/bookings/guests?page=3",
        "last": "https://api.bookinglayer.io/private/bookings/guests?page=5",
        "prev": "https://api.bookinglayer.io/private/bookings/guests?page=2",,
        "next": "https://api.bookinglayer.io/private/bookings/guests?page=4",
    },
    "meta": {
        "from": 21,
        "to": 30,
        "per_page": 10,
        "current_page": 3,
        "last_page": 5,
        "total": 47
    }
}

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

NameTypeDescription

booking_id*

UUID

ID of the booking for which guests should be fetched

{
    "data": [
        {
            "id": "32187d7b-efdc-3132-a748-f28a76ea1d9f",
            "person": {
                "id": "de6e4f20-df8b-3b7b-a7b7-e02cf90366b0",
                "first_name": "Evelyn",
                "last_name": "Langosh",
                "initials": "EL",
                "gender": "female",
                "birth_date": "1993-03-02",
                "email": "evelyn@bookinglayer.com",
                "language_code": "en",
                "nationality_code": null,
                "phone_country_calling_code": "en",
                "phone_country_code": "en",
                "phone": "543208383",
                "country_code": "us",
                "state": "South Dakota",
                "city": "Rapid City",
                "zip_code": "57701",
                "address_line_1": "77335 Addison Shoals",
                "address_line_2": "63487 Gibson Stravenue\nLake Fausto, NC 96328-8403",
                "address_line_3": null,
                "custom_fields": [],
                "totals": {
                    "last_booking": null,
                    "booking_count": null,
                    "total_as_guest": null,
                    "total_as_booker": null,
                    "total_paid_as_booker": null,
                    "booking_inquiry_count": null
                },
                "id_type": "id_card",
                "id_number": "555333",
                "id_expiry_date": "2027-08-19",
                "company_name": null,
                "tax_number": null,
                "diet_id": 357,
                "diet": {
                    "id": 357,
                    "backoffice_title": "Omnivorous",
                    "abbreviation": "OV"
                },
                "is_booker": false,
                "is_guest": true,
                "created_at": "2023-12-18T17:32:02+00:00",
                "updated_at": "2023-12-18T17:32:02+00:00",
            },
            "booking_related_data": {
                "booking_id": "73ecf641-b762-4889-adfa-8c994bb0acee",
                "web_checked_in_at": "2023-12-02T14:33:34+00:00",
                "check_in_at": "2023-12-16",
                "checked_in_at": "2023-12-16T09:28:29+00:00",
                "check_out_at": "2023-12-29",
                "checked_out_at": null,
                "arrival_date": "2023-12-16",
                "odd_arrival_date": null,
                "arrival_time": "09:00:00",
                "arrival_location_id": 713,
                "arrival_location": {
                    "id": 713,
                    "backoffice_title": "Hotel 1",
                    "abbreviation": "HTL1"
                },
                "arrival_flight": "W122H7",
                "arrival_airline": "WizzAir",
                "departure_date": "2023-12-29",
                "odd_departure_date": "2023-12-30",
                "departure_time": "13:45:00",
                "departure_location_id": 713,
                "departure_location": {
                    "id": 713,
                    "backoffice_title": "Hotel 1",
                    "abbreviation": "HTL1"
                },
                "departure_flight": null,
                "departure_airline": null,
                "transfer_comment": "Arrival is handled by us. Guest is leaving on their own and staying in town for an extray day.",
                "final_price_incl_tax": 800,
                "cancelled_at": null,
                "created_at": "2023-12-10T17:32:02+00:00",
                "updated_at": "2023-12-02T14:33:34+00:00"
            }
        },
    ],
}

Fetch a single Guest

GET https://api.bookinglayer.io/private/bookings/{booking_id}/guests/{person_id}

Fetches a single guest.

Path Parameters

NameTypeDescription

booking_id*

UUID

ID of the Booking the Guest belongs to.

guest_id*

UUID

ID of the Person the Guest belongs to.

{
    "data": {
        "id": "32187d7b-efdc-3132-a748-f28a76ea1d9f",
        "person": {
            "id": "de6e4f20-df8b-3b7b-a7b7-e02cf90366b0",
            "first_name": "Evelyn",
            "last_name": "Langosh",
            "initials": "EL",
            "gender": "female",
            "birth_date": "1993-03-02",
            "email": "evelyn@bookinglayer.com",
            "language_code": "en",
            "nationality_code": null,
            "phone_country_calling_code": "en",
            "phone_country_code": "en",
            "phone": "543208383",
            "country_code": "us",
            "state": "South Dakota",
            "city": "Rapid City",
            "zip_code": "57701",
            "address_line_1": "77335 Addison Shoals",
            "address_line_2": "63487 Gibson Stravenue\nLake Fausto, NC 96328-8403",
            "address_line_3": null,
            "custom_fields": [],
            "totals": {
                "last_booking": null,
                "booking_count": null,
                "total_as_guest": null,
                "total_as_booker": null,
                "total_paid_as_booker": null,
                "booking_inquiry_count": null
            },
            "id_type": "id_card",
            "id_number": "555333",
            "id_expiry_date": "2027-08-19",
            "company_name": null,
            "tax_number": null,
            "diet_id": 357,
            "diet": {
                "id": 357,
                "backoffice_title": "Omnivorous",
                "abbreviation": "OV"
            },
            "is_booker": false,
            "is_guest": true,
            "created_at": "2023-12-18T17:32:02+00:00",
            "updated_at": "2023-12-18T17:32:02+00:00",
        },
        "booking_related_data": {
            "booking_id": "73ecf641-b762-4889-adfa-8c994bb0acee",
            "web_checked_in_at": "2023-12-02T14:33:34+00:00",
            "check_in_at": "2023-12-16",
            "checked_in_at": "2023-12-16T09:28:29+00:00",
            "check_out_at": "2023-12-29",
            "checked_out_at": null,
            "arrival_date": "2023-12-16",
            "odd_arrival_date": null,
            "arrival_time": "09:00:00",
            "arrival_location_id": 713,
            "arrival_location": {
                "id": 713,
                "backoffice_title": "Hotel 1",
                "abbreviation": "HTL1"
            },
            "arrival_flight": "W122H7",
            "arrival_airline": "WizzAir",
            "departure_date": "2023-12-29",
            "odd_departure_date": "2023-12-30",
            "departure_time": "13:45:00",
            "departure_location_id": 713,
            "departure_location": {
                "id": 713,
                "backoffice_title": "Hotel 1",
                "abbreviation": "HTL1"
            },
            "departure_flight": null,
            "departure_airline": null,
            "transfer_comment": "Arrival is handled by us. Guest is leaving on their own and staying in town for an extray day.",
            "final_price_incl_tax": 800,
            "cancelled_at": null,
            "created_at": "2023-12-10T17:32:02+00:00",
            "updated_at": "2023-12-02T14:33:34+00:00"
        }
    }
}

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

NameTypeDescription

booking_id*

UUID

ID of the Booking the Guest belongs to.

guest_id*

UUID

ID of the Person the Guest belongs to.

Request Body

NameTypeDescription

email

email

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.

{
    "data": {
        "id": "32187d7b-efdc-3132-a748-f28a76ea1d9f",
        "person": {
            "id": "de6e4f20-df8b-3b7b-a7b7-e02cf90366b0",
            "first_name": "Evelyn",
            "last_name": "Langosh",
            "initials": "EL",
            "gender": "female",
            "birth_date": "1993-03-02",
            "email": "evelyn@bookinglayer.com",
            "language_code": "en",
            "nationality_code": null,
            "phone_country_calling_code": "en",
            "phone_country_code": "en",
            "phone": "543208383",
            "country_code": "us",
            "state": "South Dakota",
            "city": "Rapid City",
            "zip_code": "57701",
            "address_line_1": "77335 Addison Shoals",
            "address_line_2": "63487 Gibson Stravenue\nLake Fausto, NC 96328-8403",
            "address_line_3": null,
            "custom_fields": [],
            "totals": {
                "last_booking": null,
                "booking_count": null,
                "total_as_guest": null,
                "total_as_booker": null,
                "total_paid_as_booker": null,
                "booking_inquiry_count": null
            },
            "id_type": "id_card",
            "id_number": "555333",
            "id_expiry_date": "2027-08-19",
            "company_name": null,
            "tax_number": null,
            "diet_id": 357,
            "diet": {
                "id": 357,
                "backoffice_title": "Omnivorous",
                "abbreviation": "OV"
            },
            "is_booker": false,
            "is_guest": true,
            "created_at": "2023-12-18T17:32:02+00:00",
            "updated_at": "2023-12-18T17:32:02+00:00",
        },
        "booking_related_data": {
            "booking_id": "73ecf641-b762-4889-adfa-8c994bb0acee",
            "web_checked_in_at": "2023-12-02T14:33:34+00:00",
            "check_in_at": "2023-12-16",
            "checked_in_at": "2023-12-16T09:28:29+00:00",
            "check_out_at": "2023-12-29",
            "checked_out_at": null,
            "arrival_date": "2023-12-16",
            "odd_arrival_date": null,
            "arrival_time": "09:00:00",
            "arrival_location_id": 713,
            "arrival_location": {
                "id": 713,
                "backoffice_title": "Hotel 1",
                "abbreviation": "HTL1"
            },
            "arrival_flight": "W122H7",
            "arrival_airline": "WizzAir",
            "departure_date": "2023-12-29",
            "odd_departure_date": "2023-12-30",
            "departure_time": "13:45:00",
            "departure_location_id": 713,
            "departure_location": {
                "id": 713,
                "backoffice_title": "Hotel 1",
                "abbreviation": "HTL1"
            },
            "departure_flight": null,
            "departure_airline": null,
            "transfer_comment": "Arrival is handled by us. Guest is leaving on their own and staying in town for an extray day.",
            "final_price_incl_tax": 800,
            "cancelled_at": null,
            "created_at": "2023-12-10T17:32:02+00:00",
            "updated_at": "2023-12-02T14:33:34+00:00"
        }
    }
}

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

NameTypeDescription

booking_id*

UUID

ID of the Booking the Guest belongs to.

guest_id*

UUID

ID of the Person the Guest belongs to.

{
    "data": {
        "id": "32187d7b-efdc-3132-a748-f28a76ea1d9f",
        "person": {
            "id": "de6e4f20-df8b-3b7b-a7b7-e02cf90366b0",
            "first_name": "Evelyn",
            "last_name": "Langosh",
            "initials": "EL",
            "gender": "female",
            "birth_date": "1993-03-02",
            "email": "evelyn@bookinglayer.com",
            "language_code": "en",
            "nationality_code": null,
            "phone_country_calling_code": "en",
            "phone_country_code": "en",
            "phone": "543208383",
            "country_code": "us",
            "state": "South Dakota",
            "city": "Rapid City",
            "zip_code": "57701",
            "address_line_1": "77335 Addison Shoals",
            "address_line_2": "63487 Gibson Stravenue\nLake Fausto, NC 96328-8403",
            "address_line_3": null,
            "custom_fields": [],
            "totals": {
                "last_booking": null,
                "booking_count": null,
                "total_as_guest": null,
                "total_as_booker": null,
                "total_paid_as_booker": null,
                "booking_inquiry_count": null
            },
            "id_type": "id_card",
            "id_number": "555333",
            "id_expiry_date": "2027-08-19",
            "company_name": null,
            "tax_number": null,
            "is_booker": false,
            "is_guest": true,
            "created_at": "2023-12-18T17:32:02+00:00",
            "updated_at": "2023-12-18T17:32:02+00:00",
            "country": {
                "id": 17144
            },
            "phone_country": {
                "id": 17143
            }
        },
        "booking_related_data": {
            "booking_id": "73ecf641-b762-4889-adfa-8c994bb0acee",
            "web_checked_in_at": "2023-12-02T14:33:34+00:00",
            "check_in_at": "2023-12-16",
            "checked_in_at": "2023-12-16T09:28:29+00:00",
            "check_out_at": "2023-12-29",
            "checked_out_at": null,
            "arrival_date": "2023-12-16",
            "odd_arrival_date": null,
            "arrival_time": "09:00:00",
            "arrival_location_id": 713,
            "arrival_location": {
                "id": 713,
                "backoffice_title": "Hotel 1",
                "abbreviation": "HTL1"
            },
            "arrival_flight": "W122H7",
            "arrival_airline": "WizzAir",
            "departure_date": "2023-12-29",
            "odd_departure_date": "2023-12-30",
            "departure_time": "13:45:00",
            "departure_location_id": 713,
            "departure_location": {
                "id": 713,
                "backoffice_title": "Hotel 1",
                "abbreviation": "HTL1"
            },
            "departure_flight": null,
            "departure_airline": null,
            "transfer_comment": "Arrival is handled by us. Guest is leaving on their own and staying in town for an extray day.",
            "guest_group_id": 357,
            "guest_group": {
                "id": 357
            },
            "diet_id": 357,
            "diet": {
                "id": 357,
                "backoffice_title": "Omnivorous",
                "abbreviation": "OV"
            },
            "level_id": 357,
            "level": {
                "id": 357,
                "backoffice_title": "Advanced",
                "abbreviation": "ADV"
            },
            "final_price_incl_tax": 800,
            "cancelled_at": null,
            "created_at": "2023-12-10T17:32:02+00:00",
            "updated_at": "2023-12-02T14:33:34+00:00"
        }
    }
}

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

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.

{
    "event": "GuestCreated",
    "data": {
        "person_id": "0bfacfba-9a71-414a-8736-4c16bba211b5",
        "booking_id": "a4a853cc-9769-4e88-9640-469507b2ccaa"
    }
}

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.

{
    "event": "GuestUpdated",
    "data": {
        "person_id": "1d08ccbe-f978-42ed-be95-1c5a09ba1ca2",
        "booking_id": "eac4506b-0dbd-4576-b7a1-c49612ec801b"
    }
}

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.

{
    "event": "GuestDeleted",
    "data": {
        "person_id": "9e9f1565-d87f-4222-bff3-abd9faa37e75",
        "booking_id": "3b3b4f72-3cb7-444d-bc7a-d60873a09efb"
    }
}

Last updated