.. meta:: :description: Wired Zak API read availability :keywords: api, pms, zak, kapi, availability, avail, room type 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). .. code-block:: html Url: https://kapi.wubook.net/kapi/avail/get_by_roomtype | Input fields: The following fields are mandatory: .. table:: :widths: auto +--------------------------+-----------------------------------------------------------------------------------------+ | **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. `_ .. _123456: ../kapintro.html#authentication Example ------- | On each examples `123456`_ is used as **api-key** which is sent as *user*. curl: ..... .. code-block:: shell $ 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: ............ .. code-block:: python 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)