Bookings

fetch reservations

For now we only accept to take reservation data. We will use the codeVoucher which is the identifier of the the client reservation. If the customer has booked through an agency, the ID will be codeVoucher given by the agency

fetch_reservation(token, lcode, codeVoucher)

If you want to download the reservations for one date range, you need to use this function

fetch_reservations(token, lcode, day_in, day_out)

If you want to download the reservations of one date, you need to use this function

fetch_reservations_day(token, lcode, day)

The date must be expressed in this format “dd/mm/yyyy” or unix time

Checkin - Checkout

This function marks a reservation as checkin, rid is the id of the reservation, not the client nor the agency. It will be mandatory to fetch_reservation to know this data

checkin(token, lcode, rid)

Same with the checkout

checkout(token, lcode, rid)

Extras

We extract a list of all property’s extras with:

fetch_extra(token, lcode)

To add an extra, we use the following function

add_extra_to_reserve(token, lcode, rid, eid, n)

With it, we associate the extra code listed above with a reservation. rid being the booking id, eid the id of the extra and n is the number of extras added.

To delete an extra, it works the same way but adding the variable 0:

add_extra_to_reserve(token, lcode, rid, eid, n, 0)

Payments

To add a paymet to a reservation, we’ll use:

add_payment(token, lcode, rid, type_of_payment, amount)

amunt being a mandatory value, e indicates the amount and type_of_payment the type of payment The possible values for the type of payment are numerical and are one of the following:

type_of_payment Description
1 Payment to the channel
2 Payment by card
3 Payment in cash
4 Payment by bank transfer
5 Payment by check
6 Other

The following example shows you how to realize a 60 euros payment

s.add_payment(token, lcode, rid, 2, 60)

Optionally you can add and payment information:

s.add_payment(token, lcode, rid, 2, 60, 'Payment of one room')