It is possible to retrieve all information about bookings that have been made by our system. This ranges from the status of the booking, the travel dates, prices, guest and payment information and many more.
There is two main use cases for this service:
The general URL of this service is https://connect.travanto.de/service/bookings. GET is the only available method in this case.
The basic response scheme for the bookings service provide you with a sound idea of its output.
There are two ways to authorize in order to fetch information about bookings.
Whenever you fetch data about bookings using this service, you are being presented the data as it is present in our system. The response to your request will always be of the same structure, only the containing data might have changed. In case you want to get data after a modification of a booking, you will get the same response with altered data so that you will have to identify the changed elements yourself.
After a booking has been made (or at any other point in time), you are able to retrieve all neccessary information using GET method. You can either fetch information about one specific booking, for all bookings for an entire property or all bookings for properties authorized through your API key.
| Method | URL | Description | Authorization |
|---|---|---|---|
| GET | /service/bookings/ | Get booking information for all bookings related to your API key | API key only |
| GET | /service/bookings/?object_id=$object_id | Get booking information for one entire property | API key & Token |
| GET | /service/bookings/$booking_id | Get booking information for one specific booking | API Key & Token |
The following example will give you an idea about the possible responses you can expect using this service. Since responses do only differ in “state”, the different responses are not being dealt with separately. The structure of the responses is always the same.
{
"OK": 1,
"Request": {
"Method": "GET",
"Path": "/service/bookings/221486"
},
"BookingsServiceResult": [
{
"booking_id": 221486,
"object_id": 1014407,
"stamp": "2017-05-22T20:24:32+02:00",
"state": "open",
"source": "travanto.de",
"stay": {
"arrival": "2017-08-05",
"departure": "2017-08-11",
"nights": 6,
"persons": 4,
"children": 0,
"services": [
{
"type": "final cleaning",
"amount": 1
},
{
"type": "laundry package",
"amount": 4,
"frequency": "per person"
}
]
},
"guest": {
"language": "DE",
"salutation": "male",
"first_name": "Tim",
"last_name": "Hochmuth",
"street": "Holzbrücke 7",
"zip": "20459",
"city": "Hamburg",
"country": "Deutschland",
"phone": "0157 1234567",
"email": "t.hochmuth@travanto.de"
},
"prices": {
"normal": {
"per_night": 107,
"rental": 642,
"services": {
"final cleaning": 64,
"laundry package": 64
},
"total": 770
},
"surcharged": {
"per_night": 125,
"rental": 750,
"services": {
"final cleaning": 75,
"laundry package": 76
},
"total": 901
},
"surcharge": 131,
"final_payment": 630.7,
"final_payment_due": "2017-07-22",
"pre_payment": 270.3,
"pre_payment_due": "2017-06-01"
}
}
]
}