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 our API you will need to use the API keys. These must be passed in the header of all the requests you intend to make.
We have two levels of APIs: customer and provider.
To use the first level of APIs it will be necessary to provide the customer api-key as header in each request, which can be generated through the zak-api | plugin (KAPI) from its Zak extranet.
To use the second level of APIs it will be necessary to provide both the customer api-key and the provider-api-key.
Each of the following examples will be provided with a fake customer api-key 123456 and, when necessary, a fake provider api-key 654321 .

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!"}