Bookings

We can work with two options, access to the database as a read user or API with search type in big lots, for example, 6 in 6 lots. Below is a data model that we need.

NOTE: Bookings are destructured by line. Ex: A booking in a period of 10/05/2022 until 13/05/2022. It's represented by 3 lines (number of nights that guest stays at the hotel).

[
{
"creation_date": "2022-04-25",
"checkin_date": "2022-05-10",
"checkout_date": "2022-05-13",
"production_date": "2022-05-10",
"confirmation_date": "2022-04-25",
"book_id": "123",
"cancellation_date": null,
"reason_cancellation": null,
"reservation_code": "419401ID4678343",
"reservation_otacode": "912048",
"status": "BOOKING/CANCELED/CHECKIN/CHECKOUT/NOSHOW",
"country": "BRAZIL - BRASIL",
"state": "RS",
"city": "PORTO ALEGRE",
"guest_name": "Guest Name - HOSPEDE NOME",
"guest_id": 1,
"accommodation_value": 400,
"total_value": 420,
"fees_value": 20,
"type_uh_id": 12,
"uh_id": "823",
"booking_type": "Single/Group - Individual/Grupo",
"qty_chd": 0,
"qty_adl": 2,
"qty_books": 1,
"type_pension": "With breakfast/middle and pension full - com café/meia pensão/pensão completa",
"type_uh": "Family Room/Double Standard/Couple Suite/... - Quarto Família/Standard Duplo/Suíte Casal/...",
"company_id": 1,
"company_name": "BOOKING,EXPEDIA, Petrobras, Central de Reservas VOA,123 MILHAS,HotelBeds,...",
"channel_id": 5,
"channel_name": "OTA,Phone or E-mail/Agency/Counter/Omnibees,... - Telefone ou E-mail/Agência/Balcão/Omnibees,...",
"book_number": "1",
"user_name": "Silbeck System, Fernanda (recepção)",
"user_id": 1
},
{
"creation_date": "2022-04-25",
"checkin_date": "2022-05-10",
"checkout_date": "2022-05-13",
"production_date": "2022-05-11",
"confirmation_date": "2022-04-25",
"book_id": "123",
"cancellation_date": null,
"reason_cancellation": null,
"reservation_code": "419401ID4678343",
"reservation_otacode": "912048",
"status": "BOOKING/CANCELED/CHECKIN/CHECKOUT/NOSHOW",
"country": "BRAZIL - BRASIL",
"state": "RS",
"city": "PORTO ALEGRE",
"guest_name": "Guest Name - HOSPEDE NOME",
"guest_id": 1,
"accommodation_value": 350,
"total_value": 367.5,
"fees_value": 17.5,
"type_uh_id": 12,
"uh_id": "823",
"booking_type": "Single/Group - Individual/Grupo",
"qty_chd": 0,
"qty_adl": 2,
"qty_books": 1,
"type_pension": "With breakfast/middle and pension full - com café/meia pensão/pensão completa",
"type_uh": "Family Room/Double Standard/Couple Suite/... - Quarto Família/Standard Duplo/Suíte Casal/...",
"company_id": 1,
"company_name": "BOOKING,EXPEDIA, Petrobras, Central de Reservas VOA,123 MILHAS,HotelBeds,...",
"channel_id": 5,
"channel_name": "OTA,Phone or E-mail/Agency/Counter/Omnibees,... - Telefone ou E-mail/Agência/Balcão/Omnibees,...",
"book_number": "1",
"user_name": "Silbeck System, Fernanda (recepção)",
"user_id": 1
},
{
"creation_date": "2022-04-25",
"checkin_date": "2022-05-10",
"checkout_date": "2022-05-13",
"production_date": "2022-05-12",
"confirmation_date": "2022-04-25",
"book_id": "123",
"cancellation_date": null,
"reason_cancellation": null,
"reservation_code": "419401ID4678343",
"reservation_otacode": "912048",
"status": "BOOKING/CANCELED/CHECKIN/CHECKOUT/NOSHOW",
"country": "BRAZIL - BRASIL",
"state": "RS",
"city": "PORTO ALEGRE",
"guest_name": "Guest Name - HOSPEDE NOME",
"guest_id": 1,
"accommodation_value": 500,
"total_value": 525,
"fees_value": 25,
"type_uh_id": 12,
"uh_id": "823",
"booking_type": "Single/Group - Individual/Grupo",
"qty_chd": 0,
"qty_adl": 2,
"qty_books": 1,
"type_pension": "With breakfast/middle and pension full - com café/meia pensão/pensão completa",
"type_uh": "Family Room/Double Standard/Couple Suite/... - Quarto Família/Standard Duplo/Suíte Casal/...",
"company_id": 1,
"company_name": "BOOKING,EXPEDIA, Petrobras, Central de Reservas VOA,123 MILHAS,HotelBeds,...",
"channel_id": 5,
"channel_name": "OTA,Phone or E-mail/Agency/Counter/Omnibees,... - Telefone ou E-mail/Agência/Balcão/Omnibees,...",
"book_number": "1",
"user_name": "Silbeck System, Fernanda (recepção)",
"user_id": 1
}
]

Description of fields

FieldDescription
creation_dateCreation Date of booking.
checkin_dateCheck-in Date of booking.
checkout_dateCheck-out Date of booking.
production_dateProduction Date of hospitality.
confirmation_dateConfirmation Date of booking.
cancellation_dateCancellation Date of booking.
reason_cancellation:Cancellation reason.
countryCountry name of the guest.
stateCountry state of the guest.
cityCity of guest.
guest_nameGuest name.
guest_idGuest id from person table, the person needs to be added.
total_valueBilling amount accommodation_value + fees_value
accommodation_value:Accommodation amount, without the tax.
booking_typeBooking type: PARTICULAR, BILLED, GROUP, USE OF HOME.
user_nameThe username that added the booking.
user_idThe user ID that added the booking.
qty_chdNumber of children, paying or no.
qty_adlNumber of adults, paying or no.
type_pensionPension type.
type_uhAbbreviation of UH type.
type_uh_idUH type ID in PMS.
uh_idNumber of UH, When define in the booking.
statusBooking status: booking, checkin, checkout, cancelada.
company_idCompany owner ID in PMS, when booking to be invoiced.
book_idGuesting ID in PMS.
book_numberNumber of booking in PMS.
qty_booksNumber of UHs to the booking.
reservation_codeReservation code.
reservation_otacode:Reservation code OTA.
channel_idChannel ID.
channel_nameChannel name.