Zak API to read availability

These methods allow to read the zak room types availability.

Get room type availability

This method return the list of day-availability of a zak room type
between a couple of dates (dfrom, dto).
Url: https://kapi.wubook.net/kapi/avail/get_by_roomtype
Input fields:

The following fields are mandatory:

Field name

Description

dfrom

Date start of the price reading period

dto

Date end of the price reading period

rtid

Zak room type id [roomtypeid]

Response-data: list of day-availability for every day between dfrom, dto.
[roomtypeid]

It is the identification number of a zak-room-type and it can be obtained by room api.

Example

On each examples 123456 is used as api-key which is sent as user.

curl:

$ curl https://kapi.wubook.net/kapi/avail/get_by_roomtype -u 123456: -X POST \
  -d dfrom=12/11/2018 -d dto=18/11/2018 -d rtid=4870
{"data": [2, 2, 1, 1, 2, 2, 2]}

python code:

import requests
uspw=(123456, None)
data= {'dfrom':'12/11/2018', 'dto':'18/11/2018', 'rtid':4870}
response= requests.post('https://kapi.wubook.net/kapi/avail/get_by_roomtype', data, auth= uspw)
print(response.text)