Stay
The STAY part of the journey starts when Caroline has the first physical experience inside the hotel, and at that point, a couple of things have to happen:
- Caroline needs to know which room to go to
- She needs keys to the room
- You need her data for registration forms and similar
To get the reservations of the guests who have checked in, use webhooks to receive a notification when a reservation changes to checked-in
.
Now, that doesn’t need to be done in the exact moment of checking in. That’s way too stressful. They can happen shortly after, or even before.
During the stay, when hanging out in the room, Caroline wants to check the total current price of her stay. Including all those roller coaster rides and cotton candy, she booked as extras.
Check the current price - as a guest, I would love this one. See the current price of your reservation. Or do it like banking apps do and send a notification when the balance changes.
GET /booking/v1/reservations/{id}
Look for the balance field. You can also use webhooks to be informed about changes.
Add charges - Caroline might have done some shopping at the hotel shop or had a manicure at the hotel spa. For more information, check the Point of Sale integration guide. You can add the charges to her reservation by making a simple call to:
POST /finance/v1/folio-actions/{folioId}/charges
View charges - Caroline might want to see all the charges. You can present that information to her by just calling the following API:
GET /finance/v1/folios/{id}
Split charges - Caroline might want to split charges between the company and her personal account because the company policy might not cover her manicure at the hotel spa. It can be done by simply calling the following APIs:
POST /finance/v1/folio-actions/{folioId}/charges/{chargeId}/split
POST /finance/v1/folio-actions/{folioId}/payments/{paymentId}/split
POST /finance/v1/folios
Add credit card payments - when the guest entered their credit card info when making a booking, you can charge it using the API. Complicated things happen in the background, but for you, it is a simple call to:
POST /finance/v1/payment-tasks
When it’s time to check out, Caroline updates the invoice address, because that’s just nicer to do in bed, and not at the check-out counter. She also directly pays it, with the credit card she entered when making the booking.
Update the invoice address - the guest’s address is not necessarily the same as the billing address, and it is stored separately in apaleo. Change it with
PATCH /finance/v1/folios/{id}
Verify the details - once the address is updated and everything is paid, you can generate the invoice. This call needs the folioId
as input.
POST /finance/v1/invoices
Generate an invoice - once the address is updated and everything is paid, you can generate the invoice and email it to Caroline. This call needs the folioId
as input. Also, remember to close the folio after generating the invoice.
POST /finance/v1/invoices
GET /finance/v1/invoices/{id}/pdf
PUT /finance/v1/folio-actions/{folioId}/close
Check-out
PUT /booking/v1/reservation-actions/checkout
Now that all is taken care of, Caroline just leaves the hotel.