Zak API to read prices

These methods allow to read the prices of a zak room type.

Get pricing plans

This method return the list of pricing plans of a zak property.
Url: https://kapi.wubook.net/kapi/prices/get_plans
Input fields are not necessary.
Response-data: return the list of ‘pricing plans of a property’.
For each plan you receive the following fields:

Field name

Description

id

Identification number of the zak pricing plan

name

Name of the zak pricing plan

info

Information about the plan (if linked to another plan)

Examples

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

curl:

$ curl https://kapi.wubook.net/kapi/prices/get_plans -u 123456: -X POST
{"data": [
  {"id": 1, "name": "Standard", "info": ""},
  {"id": 2, "name": "not refundable", "info": "virtual (Standard +-10.0%)"},
  ...
  ]
}

python code:

import requests
uspw=(123456, None)
response= requests.post('https://kapi.wubook.net/kapi/prices/get_plans', {}, auth= uspw)
print(response.text)

Get prices per room per occupancy

This method returns the list of prices of a room type for each days
between two dates (dfrom, dto) read on a certain pricing plan.
You can specify the occupancy (adults, children) and the meal.
Url: https://kapi.wubook.net/kapi/prices/get_by_roomocc
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

plid

ZaK pricing plan id planid

The following fields are optional:

Field name

Description

adults

Numebr of adults

children

Numenr of children

meal

meal symbol (bb, hb, ..)

Response-data: list of prices.

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

planid It is the identification number of a zak-pricing-plan and it can be obtained by plans api.

Example

curl:

$ curl https://kapi.wubook.net/kapi/prices/get_by_roomocc -u 123456: -X POST \
  -d dfrom=12/11/2018 -d dto=18/11/2018 -d rtid=4870 -d plid=1025 -d adults=2 -d meal=bb
{"data": [[90.0, 90.0, 90.0, 90.0, 90.0, 100.0, 100.0]]}

python code:

import requests
uspw=(123456, None)
data= {'dfrom':'12/11/2018', 'dto':'18/11/2018', 'rtid':4870, 'plid':1025, 'adults':2, 'meal':'bb'}
response= requests.post('https://kapi.wubook.net/kapi/prices/get_by_roomocc', data, auth= uspw)
print(response.text)