Introduction

To use the api is enough to make a simple POST call to the addresses of our resources.
Starting url: https://kapi.wubook.net/kapi/

Field types

Each date field has the European format dd/mm/yyyy.
The data that fills the country field must be 2 characters ISO country code.
The currency fields should contain ISO currency code.

Authentication

To use zak api, is necessary an api-key that must be sent as user to the POST call.
The api-key must be provided by the customer user of the ZaK pms, he can generate it
by the zak-api plugin (KAPI) from his ZaK extranet.
In each example of this documentation the api-key is represented by the fake code 123456.

The customer of the ZaK pms could match the api-key with a list of IP,
in this case only calls from one of those IPs are authorized.

Response

The response is always an object with one field: data or error.
The error field contains a text that describes the error.
The data field contains the results.

To interpret the symbols that an api returns or to know the symbol
to be sent as input you can get the zak symbols from the api-symbols.

Examples

The endpoint test could be used to check your api-key,
it does not require other input parameters.
On the examples 123456 is used as api-key
which is sent as user.

python code:

import requests
uspw=(123456, None)
response= requests.post('https://kapi.wubook.net/kapi/test', {}, auth= uspw)
print(response.text)
{"data": "Authentication done!"}

In case of error the response key is error and provides an error-description.

import requests

uspw=(654321, None)
response= requests.post('https://kapi.wubook.net/kapi/test', data={}, auth= uspw)
print(response.text)
{"error": "Authentication error"}

uspw=(123456, None)
response= requests.post('https://kapi.wubook.net/kapi/tset', data={}, auth= uspw)
print(response.text)
{"error": "Wrong api name: tset"}

curl:

$ curl https://kapi.wubook.net/kapi/test -u 123456: -X POST
{"data": "Authentication done!"}