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
| Field | Description |
|---|---|
| creation_date | Creation Date of booking. |
| checkin_date | Check-in Date of booking. |
| checkout_date | Check-out Date of booking. |
| production_date | Production Date of hospitality. |
| confirmation_date | Confirmation Date of booking. |
| cancellation_date | Cancellation Date of booking. |
| reason_cancellation: | Cancellation reason. |
| country | Country name of the guest. |
| state | Country state of the guest. |
| city | City of guest. |
| guest_name | Guest name. |
| guest_id | Guest id from person table, the person needs to be added. |
| total_value | Billing amount accommodation_value + fees_value |
| accommodation_value: | Accommodation amount, without the tax. |
| booking_type | Booking type: PARTICULAR, BILLED, GROUP, USE OF HOME. |
| user_name | The username that added the booking. |
| user_id | The user ID that added the booking. |
| qty_chd | Number of children, paying or no. |
| qty_adl | Number of adults, paying or no. |
| type_pension | Pension type. |
| type_uh | Abbreviation of UH type. |
| type_uh_id | UH type ID in PMS. |
| uh_id | Number of UH, When define in the booking. |
| status | Booking status: booking, checkin, checkout, cancelada. |
| company_id | Company owner ID in PMS, when booking to be invoiced. |
| book_id | Guesting ID in PMS. |
| book_number | Number of booking in PMS. |
| qty_books | Number of UHs to the booking. |
| reservation_code | Reservation code. |
| reservation_otacode: | Reservation code OTA. |
| channel_id | Channel ID. |
| channel_name | Channel name. |