Zak API to read/write inventory

These APIs allow you to read/write the inventory data of a zak property.
On each examples wb_yyyyyyyyyyy is used as api-key which is sent as user.

Fetch symbols

This method will return a list of inventory parameters, useful in order to use these APIs along with a short description. You can check types and meanings of those parameters by clicking on rmap
Url: https://kapi.wubook.net/kp/inventory/fetch_symbols

Usage example

Input fields are not necessary.

$ curl --location --request POST 'https://kapi.wubook.net/kp/inventory/fetch_symbols' \
   --header 'x-api-key: wb_yyyyyyyyyyy'

Response Example

{"data": {"m": "MinStay", "M": "MAxStay", .. }}

Fetch rooms availability

This method will return a list of room types IDs that contain availability for the selected date range and the available physical rooms related to the room type. For more informations, check rooms and rooms types
Url: https://kapi.wubook.net/kp/inventory/fetch_rooms_availability

Usage example

INPUT mandatory fields:

Field name

Description

Type

Mandatory

arrival

starting date

str

yes

departure

departure date

str

yes

$ curl --location --request POST 'https://kapi.wubook.net/kp/inventory/fetch_rooms_availability' \
   --header 'x-api-key: wb_yyyyyyyyyyy' \
   --data-urlencode 'arrival=10/10/2023' \
   --data-urlencode 'departure=12/10/2023'

Response Example

A dictionary will be returned where keys(1,2,3,7 in the example) are the room type ids, availability is the real availability and rooms are the available phisical rooms. In the example, the id “2” has 1 room available and 2 phisical rooms (5, 6). In this case, for the selected period, a reservation was made specifying the room type, but no physical room has been assigned.

 ${"data":{
      "1":{
          "availability":8,
          "rooms":[
              1,
              2,
              3,
              14,
              15,
              16,
              17,
              18
          ]
      },
      "2":{
          "availability":1,
          "rooms":[
              5,
              6
          ]
      },
      "3":{
          "availability":3,
          "rooms":[
              7,
              8,
              9
          ]
      },
      "7":{
          "availability":0,
          "rooms":[
          ]
      }
  }
}

Fetch rate values

This method will allow you to fetch values of a given rate.
Url: https://kapi.wubook.net/kp/inventory/fetch_rate_values

Usage example

INPUT mandatory fields:

Field name

Description

Type

Mandatory

from

starting date

str

yes

rate

rate_id

int

yes

n

number of days

int

yes


Let’s say you want to fetch values for rate = 5, from 10/10/2023 to the next 5 days.

$ curl --location --request POST 'https://kapi.wubook.net/kp/inventory/fetch_rate_values' \
   --header 'x-api-key: wb_yyyyyyyyyyy' \
   --data-urlencode 'from=01/01/2023' \
   --data-urlencode 'rate=5' \
   --data-urlencode 'n=5'

Response Example

A dictionary will be returned where keys(278 in the example) are the product ids and values are lists of dictionaries (one for each day, 5 in this case) If you want to have a closer look at parameters that can be return click rmap

{"data": {"278": [{"p": 1000.0, "m": 1, "M": 1, "mx": ...}, {..}, {..}]}}

Write


Url: https://kapi.wubook.net/kp/inventory/write

Usage Example

Field name

Description

from

starting date

rate_id

rate id

rmap

rmap JSON

$ curl --location --request POST 'https://kapi.wubook.net/kp/inventory/write' \
    --header 'x-api-key: wb_yyyyyyyyyyy' \
    --data-urlencode 'from=10/10/2023' \
    --data-urlencode 'rate_id=3' \
    --data-urlencode 'rmap={"12": [{"p": 50.0}]}'

RMAP

Rmap is an object of the form:

rmap = {'3':[{'m': 1, 'M': 7, 'ma': 2 ..}, {}, {}]
Where the first number represents the zak_product_id (see fetch_producsts) each { } represents a single day. So the first { } represents the day indicated by from parameter and so on so forth.

Field name

Extended Filed name

Description

Type

Default Restriction Values

m

MinStay

Minimum number of nights for which a stay is possible

integer

1

M

MaxStay

Maximum number of nights for which a stay is possible

integer

31

ma

MinStayArrival

As MinStay, but depending on the arrival date

integer

1

Ma

MaxStayArrival

As MaxStay, but depending on the arrival date

integer

31

ni

NoCheckin

Check-ins cannot be performed on this date

boolean (0,1)

0

no

NoCheckout

Check-outs cannot be performed on this date

boolean (0,1)

0

c

Closure

On this date the sale is closed

boolean (0,1)

0

nt

NoOta

It is not possible to make reservations from ota

boolean (0,1)

0

mx

MinAdvance

This value indicates the minimum advance to book (hours)

integer

0

Mx

MaxAdvance

This value indicates the max advance to book

integer

365x3

o

Allowed Overbookings

Permission to overbook (negative availability)

boolean (0,1)

0

l

Maximum OTA reservations

Maximum amount of OTA reservations

integer

0

p

Price

Price

float

X

a

Availability

Availability

integer

X