.. meta:: :description: Wired Zak API read guests :keywords: api, pms, zak, kapi, booking, bookings, reservation, reservations, guest, guests, extra, extras, products, product Zak API to read/write properties ******************************** .. _wb_yyyyyyyyyyy: ../kapi/introduction.html#authentication | These APIs allow you to read/write data related to a zak property. | On each examples `wb_yyyyyyyyyyy`_ is used as **api-key** which is sent as *user*. Fetch Rates =========== | This method will return a list of rates related to a given property .. code-block:: html Url: https://kapi.wubook.net/kp/property/fetch_rates ..... Usage Example ------------- Input fields are not necessary. .. tabs:: .. code-tab:: bash curl $ curl --location --request POST 'https://kapi.wubook.net/kp/property/fetch_rates' \ --header 'x-api-key: wb_yyyyyyyyyyy' .. code-tab:: py >>> import requests >>> headers = {'x-api-key':'wb_yyyyyyyyyyy'} >>> response= requests.post('https://kapi.wubook.net/kp/property/fetch_rates', headers = headers) >>> print(response.text) | Response Example ---------------- | **Response** data: For each rate you receive the following fields .. table:: :widths: 200 600 +--------------------------+-------------------------------------------------------------------------------------------+ | **Field name** | **Description** | +==========================+===========================================================================================+ | *id* | Identification number of the zak rate | +--------------------------+-------------------------------------------------------------------------------------------+ | *board* | Board type | +--------------------------+-------------------------------------------------------------------------------------------+ | *currency* | Short code for currency | +--------------------------+-------------------------------------------------------------------------------------------+ | *name* | Name of the zak rate | +--------------------------+-------------------------------------------------------------------------------------------+ | *standard* | Standard flag | +--------------------------+-------------------------------------------------------------------------------------------+ .. code-block:: shell {"data": [{"id": 99, "board": "", "currency": "EUR", "name": "max", "standard": 1}]} | Fetch Meals Board =========== | This method will return a list of meals rules with price related to a given board rate | The boards are classified as follows: .. table:: :widths: 200 600 +-----------------+------------------+ | **Board name** | **Description** | +=================+==================+ | *fb* | Full Board | +-----------------+------------------+ | *hb* | Half Board | +-----------------+------------------+ | *bb* | Breakfast | +-----------------+------------------+ | *ai* | All Inclusive | +-----------------+------------------+ .. code-block:: html Url: https://kapi.wubook.net/kp/property/fetch_meals_board ..... Usage Example ------------- Input fields are not necessary. .. tabs:: .. code-tab:: bash curl $ curl --location --request POST 'https://kapi.wubook.net/kp/property/fetch_meals_board' \ --header 'x-api-key: wb_yyyyyyyyyyy' .. code-tab:: py >>> import requests >>> headers = {'x-api-key':'123456'} >>> response= requests.post('https://kapi.wubook.net/kp/property/fetch_meals_board', headers = headers) >>> print(response.text) | Response Example ---------------- | **Response** For each board you receive the following fields: .. table:: :widths: 200 600 +--------------------------+-------------------------------------------------------------------------------------------+ | **Field name** | **Description** | +==========================+===========================================================================================+ | *id* | Identification number of the zak meal board | +--------------------------+-------------------------------------------------------------------------------------------+ | *board* | Board type | +--------------------------+-------------------------------------------------------------------------------------------+ | *dfrom* | Start of the rule (if None always available) | +--------------------------+-------------------------------------------------------------------------------------------+ | *dto* | End of the rule (if None always available) | +--------------------------+-------------------------------------------------------------------------------------------+ | *adults* | Meal price for adults | +--------------------------+-------------------------------------------------------------------------------------------+ | *children* | Meal price for children | +--------------------------+-------------------------------------------------------------------------------------------+ | *teens* | Meal price for teens | +--------------------------+-------------------------------------------------------------------------------------------+ | *babies* | Meal price for babies | +--------------------------+-------------------------------------------------------------------------------------------+ .. code-block:: shell {"data": {"bb": [{"id": 7, "id_zak_property": 1, "board": "bb", "dfrom": null, "dto": null, "adults": 11.0, "children": 11.0, "teens": 11.0, "babies": 11.0}, {"id": 5, "id_zak_property": 1, "board": "bb", "dfrom": "28/01/2023", "dto": "31/01/2023", "adults": 2.0, "children": 4.0, "teens": 3.0, "babies": 0.0}], "fb": [{"id": 3, "id_zak_property": 1, "board": "fb", "dfrom": "23/12/2022", "dto": "29/12/2022", "adults": 3.0, "children": 5.0, "teens": 4.0, "babies": 0.0}]}} | Fetch Rooms =========== | This method will return a list of rooms related to a given property .. code-block:: html Url: https://kapi.wubook.net/kp/property/fetch_rooms ..... Usage example ------------- Input fields are not necessary. .. tabs:: .. code-tab:: bash curl $ curl --location --request POST 'https://kapi.wubook.net/kp/property/fetch_rooms' \ --header 'x-api-key: wb_yyyyyyyyyyy' .. code-tab:: py >>> import requests >>> headers = {'x-api-key':'wb_yyyyyyyyyyy'} >>> response= requests.post('https://kapi.wubook.net/kp/property/fetch_rooms', headers = headers) >>> print(response.text) ..... Response Example ---------------- | **Response** data: For each room you receive the following fields .. table:: :widths: 200 600 +--------------------------+-------------------------------------------------------------------------------------------+ | **Field name** | **Description** | +==========================+===========================================================================================+ | *id* | Identification number of the zak room | +--------------------------+-------------------------------------------------------------------------------------------+ | *id_room_type* | Identification number of the room type | +--------------------------+-------------------------------------------------------------------------------------------+ | *name* | Name of the zak room | +--------------------------+-------------------------------------------------------------------------------------------+ | *tags* | Array of room tags | +--------------------------+-------------------------------------------------------------------------------------------+ .. code-block:: shell {"data": [{"id": 7774, "id_room_type": 101, "name": "101", "tags": ["MM", "KK"]}, {..}, {..}]} | Fetch Room Types ================ .. code-block:: html Url: https://kapi.wubook.net/kp/property/fetch_room_types ..... Usage example ------------- Input fields are not necessary. .. tabs:: .. code-tab:: bash curl $ curl --location --request POST 'https://kapi.wubook.net/kp/property/fetch_room_types' \ --header 'x-api-key: wb_yyyyyyyyyyy' .. code-tab:: py >>> import requests >>> headers = {'x-api-key':'wb_yyyyyyyyyyy'} >>> response= requests.post('https://kapi.wubook.net/kp/property/fetch_room_types', headers = headers) >>> print(response.text) ..... Response Example ---------------- | **Response-data**: return the array of ‘room types of a property’. For each room type you receive the following fields: .. table:: :widths: 200 600 +--------------------------+-------------------------------------------------------------------------------------------+ | **Field name** | **Description** | +==========================+===========================================================================================+ | *id* | Identification number of the zak room typ e | +--------------------------+-------------------------------------------------------------------------------------------+ | *name* | Name of the zak room type | +--------------------------+-------------------------------------------------------------------------------------------+ | *shortname* | Short name of the zak room type | +--------------------------+-------------------------------------------------------------------------------------------+ | *maxprice* | Default price assigned to the room type | +--------------------------+-------------------------------------------------------------------------------------------+ | *occupancy* | Default occupancy of the room type | +--------------------------+-------------------------------------------------------------------------------------------+ **Occupancy** is a dictionary containing following fields: .. table:: :widths: 200 600 +--------------------------+-------------------------------------------------------------------------------------------+ | **Field name** | **Description** | +==========================+===========================================================================================+ | *adults* | Identification number of the zak room | +--------------------------+-------------------------------------------------------------------------------------------+ | *teens* | Identification number of the room type | +--------------------------+-------------------------------------------------------------------------------------------+ | *children* | Name of the zak room | +--------------------------+-------------------------------------------------------------------------------------------+ | *babies* | Default occupancy of the room type | +--------------------------+-------------------------------------------------------------------------------------------+ .. code-block:: shell {"data": [{"id": 55, "name": "example_name", "shortname": "ex_name", "maxprice": 100.0, "occupancy": {"adults": 2, "children": 1, "teens": 1, "babies": 0}}, {}, {}]} | Fetch Products ============== | This method will return a list of products .. code-block:: html Url: https://kapi.wubook.net/kp/property/fetch_products ..... Usage example ------------- .. tabs:: .. code-tab:: bash curl $ curl --location --request POST 'https://kapi.wubook.net/kp/property/fetch_products' \ --header 'x-api-key: wb_yyyyyyyyyyy' .. code-tab:: py >>> import requests >>> headers = {'x-api-key':'wb_yyyyyyyyyyy'} >>> response= requests.post('https://kapi.wubook.net/kp/property/fetch_products', headers = headers) >>> print(response.text) | Response Example ---------------- | **Response-data**: return the array of ‘products’. For each product you receive the following fields: .. table:: :widths: 200 600 +--------------------------+-------------------------------------------------------------------------------------------+ | **Field name** | **Description** | +==========================+===========================================================================================+ | *id* | Identification number of the zak product | +--------------------------+-------------------------------------------------------------------------------------------+ | *id_zak_property* | Identification of the zak property | +--------------------------+-------------------------------------------------------------------------------------------+ | *id_zak_room_type* | Identification of the zak room type | +--------------------------+-------------------------------------------------------------------------------------------+ | *board* | board type | +--------------------------+-------------------------------------------------------------------------------------------+ | *master* | The main product of the room type, not deletable | +--------------------------+-------------------------------------------------------------------------------------------+ | *max_price* | Default price assigned to the product | +--------------------------+-------------------------------------------------------------------------------------------+ | *name* | Name of the product | +--------------------------+-------------------------------------------------------------------------------------------+ | *rname* | Room Name | +--------------------------+-------------------------------------------------------------------------------------------+ | *rsetups* | Room Setup | +--------------------------+-------------------------------------------------------------------------------------------+ | *srname* | Short room name | +--------------------------+-------------------------------------------------------------------------------------------+ | *occupancy* | Default occupancy for that product | +--------------------------+-------------------------------------------------------------------------------------------+ **Occupancy** is a dictionary containing following fields: .. table:: :widths: 200 600 +--------------------------+-------------------------------------------------------------------------------------------+ | **Field name** | **Description** | +==========================+===========================================================================================+ | *adults* | Identification number of the zak room | +--------------------------+-------------------------------------------------------------------------------------------+ | *teens* | Identification number of the room type | +--------------------------+-------------------------------------------------------------------------------------------+ | *children* | Name of the zak room | +--------------------------+-------------------------------------------------------------------------------------------+ | *babies* | Default occupancy of the room type | +--------------------------+-------------------------------------------------------------------------------------------+ .. code-block:: shell {"data": [{"id": 10, "board": null, "id_zak_property": 10, "id_zak_room_type": 10, "master": 10, "max_price": 1000.0, "name": "CT10", "rname": "CAMERATOP", "rsetups": null, "srname": "CT10", "occupancy": {"adults": 2, "children": 0, "teens": 0, "babies": 0}}, {..}, {..}]} | Fetch Extras ============ | This method will return a list of extras related to a given property .. code-block:: html Url: https://kapi.wubook.net/kp/property/fetch_extras ..... Usage example ------------- .. tabs:: .. code-tab:: bash curl $ curl --location --request POST 'https://kapi.wubook.net/kp/property/fetch_extras' \ --header 'x-api-key: wb_yyyyyyyyyyy' .. code-tab:: py >>> import requests >>> headers = {'x-api-key':'wb_yyyyyyyyyyy'} >>> response= requests.post('https://kapi.wubook.net/kp/property/fetch_extras', headers = headers) >>> print(response.text) | Response Example ---------------- | **Response-data**: return the array of ‘extras’ . For each extra you receive the following fields: .. table:: :widths: auto +--------------------------+-----------------------------------------------------------------------------------------+ | **Field name** | **Description** | +==========================+=========================================================================================+ | *exid* | id of the extra | +--------------------------+-----------------------------------------------------------------------------------------+ | *name* | name of the extra | +--------------------------+-----------------------------------------------------------------------------------------+ | *price* | public price of the extra | +--------------------------+-----------------------------------------------------------------------------------------+ | *vat* | VAT (percentage) of the extra | +--------------------------+-----------------------------------------------------------------------------------------+ | *cost* | cost of the extra | +--------------------------+-----------------------------------------------------------------------------------------+ | *tags* | list of tags associated to the extra | +--------------------------+-----------------------------------------------------------------------------------------+ .. code-block:: shell {"data": [{"exid": 8, "cost": 2, "name": "Terrestre", "price": 1.0, "tags": [""], "vat": 10.0}, {"exid": 9, "cost": 2, "name": "Large", "price": 1000.0, "tags": [""], "vat": 10.0}, {"exid": 10, "cost": 2, "name": "Gusto", "price": 500.0, "tags": [""], "vat": 10.0}]}