Zak API to read/write reservations details
A Reservation
A reservation is a data structure composed of the following fields:
Field name |
Description |
---|---|
id |
Id of the reservation |
rcode |
Reservation code of the form XY-0001 |
rooms |
A list of rooms |
status |
Status of the reservation |
expiration_date |
In case status is option/offer, such field contains the optional expiring date |
price |
A data structure containing information regarding the price |
payment |
A data structure containing information regarding the payment |
board |
type of board of the reservation (ai,fb,hb,bb,nb) |
agency |
id of the agency through which the reservation has been made |
booker |
id of the booker |
corporate |
id of the corporate through which the reservation has been made |
created |
creation date of the reservation |
A room is structured as following:
Field name |
Description |
---|---|
dfrom |
Starting date |
dto |
Ending date |
id_zak_room |
id of the room |
id_zak_room_type |
id of the room type |
customers |
A data structure containing the ids of the customers related to the reservation |
occupancy |
A data structure containing information regarding occupancy |
Fetch one reservation
Url: https://kapi.wubook.net/kp/reservations/fetch_one_reservation
Usage example
At least one of the following parameters is required:
Field name |
Description |
---|---|
id |
reservation id |
hcode |
reservation code of the form (XY-0001) |
curl --location --request POST 'https://kapi.wubook.net/kp/reservations/fetch_one_reservation' \
--header 'x-api-key: wb_yyyyyyyyyyy' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'rcode=XY-0001'
>>> import requests
>>> headers = {'x-api-key':'wb_yyyyyyyyyyy'}
>>> data = {'rcode':'XY-0001'}
>>> response= requests.post('https://kapi.wubook.net/kp/reservations/fetch_one_reservation', headers = headers, data = data)
>>> print(response.text)
Response Example
{
"data":{
"id":486,
"id_human":"PD-0003",
"booker":3509,
"status":"Confirmed",
"expiration_date":"",
"origin":{
"channel":"--"
},
"last_status_date":"",
"board":"fb",
"created":"12/07/2024",
"cpolicy":"Default Policy",
"agency":null,
"corporate":null,
"price":{
"rooms":{
"amount":11.0,
"vat":1.4299999999999997,
"total":12.43,
"discount":0.0,
"currency":"EUR"
},
"extras":{
"amount":9.090909090909092,
"vat":0.9090909090909083,
"total":10.0,
"discount":0.0,
"currency":"EUR"
},
"meals":{
"amount":0.0,
"vat":0.0,
"total":0.0,
"discount":0.0,
"currency":"EUR"
},
"total":22.43
},
"payment":{
"amount":0.0,
"currency":"EUR"
},
"taxes":{
},
"rooms":[
{
"id_zak_room":null,
"id_zak_reservation_room":1712,
"door_code":null,
"id_zak_room_type":17,
"dfrom":"13/07/2024",
"dto":"14/07/2024",
"occupancy":{
"adults":2,
"teens":0,
"children":0,
"babies":0
},
"price":{
"amount":11.0,
"vat":1.4299999999999997,
"total":12.43,
"discount":0.0,
"currency":"EUR"
},
"product_id":20,
"rate_id":1,
"customers":[
{
"checkin":null,
"checkout":null,
"id":3509
}
]
}
]
}
}
Create a reservation
Url: https://kapi.wubook.net/kp/reservations/new
Usage example
The information is sent with an unique parameter, containing a json structure:
Field name |
Description |
---|---|
params |
Json Structure |
The Json Structure has the following mandatory fields:
Field name |
Description |
---|---|
arrival |
Arrival (european format 21/12/2121) |
depature |
Departure (european format 21/12/2121) |
customer |
As an object: {‘name’: Name, ‘surname’: surname} (and optionally email and phone) |
It is also mandatory to specify rooms and/or products. At least specify rooms or products (specifying both still possible):
Field name |
Description |
---|---|
rooms |
A list of rooms (each room being a dict-like object) |
products |
A list of products (each product being a dict-like object) |
assign_phisical_rooms |
If you do not specify a phisical room using room key inside rooms dict, to have Zak to select a phisical room for you, just use this optional field |
About rooms: you can specify the room type, the phisical room or both information.
curl --location --request POST 'https://kapi.wubook.net/kp/reservations/new' \
--header 'x-api-key: wb_yyyyyyyyyyy' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'params={"arrival": "20/01/2023", "departure": "31/02/2023", "customer": {"name": "Name", "surname": "Surname"}, "rooms": [{"room": 159, "room_type": 107, "price": 100, "currency": "EUR"}], "products": [{"product": 329, "price": 101, "currency": "EUR"}]}'
WITH AUTOMATIC ASSIGNMENT OF THE PHISICAL ROOM:
curl --location --request POST 'https://kapi.wubook.net/kp/reservations/new' \
--header 'x-api-key: wb_yyyyyyyyyyy' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'params={"arrival": "20/01/2023", "departure": "31/02/2023", "customer": {"name": "Name", "surname": "Surname"}, "rooms": [{"room_type": 107, "price": 100, "currency": "EUR"}], "products": [{"product": 329, "price": 101, "currency": "EUR"}], "assign_phisical_rooms": "true"}'
>>> import requests
>>> import json
>>> headers = {'x-api-key':'wb_yyyyyyyyyyy'}
>>> room= {'room': 159, 'room_type': 107, 'price': 100, 'currency': 'EUR'}
>>> rooms= [room]
>>> prod= {'product': 329, 'price': 101, 'currency': 'EUR'}
>>> prods= [prod]
>>> cust= {'name': 'Name', 'surname': 'Surname', 'email': 'bat@gotham.us', 'phone': '3333'}
>>> arv= '20/01/2024'
>>> dep= '31/01/2024'
>>> data= {'arrival': arv, 'departure': dep, 'customer': cust, 'rooms': rooms, 'products': prods}
>>> data= {'params': json.dumps(data)}
>>> response= requests.post('https://kapi.wubook.net/kp/reservations/new', headers = headers, data = data)
>>> print(response.text)
Response Example
$
{
"data": {
"id": XY-0001,
}
Fetch reservations
Url: https://kapi.wubook.net/kp/reservations/fetch_reservations
Usage example
Input fields are not necessary, nevertheless a data structure containing filtering options can be provided
Type of filters |
Description |
---|---|
created |
Reservations created in a range of dates |
arrival |
Reservation with arrival date in a range of dates |
departure |
Reservation with departure date in a range of dates |
pager |
Paging options - Limit can be a value in [8, 16, 32, 64], offset can be any integer |
{'filters':{
'created': {'from': '10/10/2023', 'to':'01/02/2024'},
'arrival': {'from': '17/12/2023', 'to': '11/01/2024'},
'departure': {'from': '10/02/2024', 'to': '12/03/2024'},
'pager': {'limit': 8, 'offset': 0}
}
}
filters must be passed as JSON.
curl --location --request POST 'https://kapi.wubook.net/kp/reservations/fetch_reservations' \
--header 'x-api-key: wb_yyyyyyyyyyy' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'filters= {"created": {"from": "08/12/2023", "to": "10/12/2023"},"arrival": {"from": "08/12/2023", "to": "10/12/2023"},"pager": {"limit": 32, "offset": 0}}'
>>> import requests
>>> import json
>>> headers = {'x-api-key':'wb_yyyyyyyyyyy'}
>>> created= {'from': '10/10/2023', 'to': '10/12/2023'}
>>> arrival= {'from': '08/12/2023', 'to': '10/12/2023'}
>>> pager= {'limit': 32, 'offset': 0}}
>>> data= {'created': created, 'arrival': arrival, 'pager': pager}
>>> data= {'filters': json.dumps(data)}
>>> response= requests.post('https://kapi.wubook.net/kp/reservations/fetch_reservations', headers = headers, data = data)
>>> print(response.text)
Response example
This API returns a list of reservations.
Fetch today reservations
Url: https://kapi.wubook.net/kp/reservations/fetch_today_reservations
Usage example
Input fields are not necessary.
curl --location --request POST 'https://kapi.wubook.net/kp/reservations/fetch_today_reservations' \
--header 'x-api-key: wb_yyyyyyyyyyy'
>>> import requests
>>> headers = {'x-api-key':'wb_yyyyyyyyyyy'}
>>> response= requests.post('https://kapi.wubook.net/kp/reservations/fetch_today_reservations', headers = headers)
>>> print(response.text)
Checkin/out
Url: https://kapi.wubook.net/kp/reservations/do_checkin
Url: https://kapi.wubook.net/kp/reservations/do_checkout
Usage example
Following parameters can / must be used in order to use this call
Field name |
Description |
Mandatory |
---|---|---|
reservation_id |
reservation id |
yes, if not human_code |
human_code |
reservation code of the form (XY-0001) |
yes, if not id |
room_customer_ids |
list of reservation room customers id’s |
No |
all |
str to check-in(out) all the customers in a reservation (any string is ok, ‘x’ e.g ) |
No |
curl --location --request POST 'https://kapi.wubook.net/kp/reservations/do_checkin' \
--header 'x-api-key: wb_yyyyyyyyyyy' \
--data-urlencode 'reservation_ireservation_id=277' \
--data-urlencode 'all='\''true'\
>>> import requests
>>> headers = {'x-api-key':'wb_yyyyyyyyyyy'}
>>> data = {'reservation_id':'277', 'all':'true'}
>>> response= requests.post('https://kapi.wubook.net/kp/reservations/do_checkin', headers = headers, data = data)
>>> print(response.text)
Response example
{"data": {
"success": "true"
}
{ "error": "the error" }
Undo Checkin/out
Url: https://kapi.wubook.net/kp/reservations/undo_checkin
Url: https://kapi.wubook.net/kp/reservations/undo_checkout
Usage example
Following parameters can / must be used in order to use this call
Field name |
Description |
Mandatory |
---|---|---|
reservation_id |
reservation id |
yes, if not human_code |
human_code |
reservation code of the form (XY-0001) |
yes, if not id |
curl --location --request POST 'https://kapi.wubook.net/kp/reservations/undo_checkin' \
--header 'x-api-key: wb_yyyyyyyyyyy' \
--data-urlencode 'reservation_id=277'
>>> import requests
>>> headers = {'x-api-key':'wb_yyyyyyyyyyy'}
>>> data = {'reservation_id':'277'}
>>> response= requests.post('https://kapi.wubook.net/kp/reservations/undo_checkin', headers = headers, data = data)
>>> print(response.text)
Response example
{"data": {
"success": "true"
}
{ "error": "the error" }
Add Customer
Url: https://kapi.wubook.net/kp/reservations/add_customer
Usage example
Following parameters can / must be used in order to use this call
Field name |
Description |
Mandatory |
---|---|---|
reservation_id |
reservation id |
yes, if not human_code |
human_code |
reservation code of the form (XY-0001) |
yes, if not reservation_id |
reservation_room_id |
reservation room id |
yes |
custdata |
json object containing customer to add |
yes |
docdata |
json object containing document to add |
yes |
Field name |
Description |
Mandatory |
---|---|---|
name |
str |
yes |
surname |
str |
yes |
country |
str (‘IT’, ‘GB’, ‘ES’..) |
no |
birth_contry |
str (‘IT’, ‘GB’, ‘ES’..) |
no |
residence_country |
str (‘IT’, ‘GB’, ‘ES’..) |
no |
birthday |
str ( ‘10/01/1993’ ) |
no |
phone |
str |
no |
zipcode |
str |
no |
address |
str |
no |
city |
str |
no |
birth_city |
str |
no |
str |
no |
|
gender |
str (‘m’, ‘f’, ‘x’) |
no |
Field name |
Description |
Mandatory |
---|---|---|
doc_type |
str (see doc types in syms) |
yes |
doc_country |
str (‘italy’, ‘spain’ …) |
yes |
doc_number |
str |
yes |
doc_issue |
str |
yes |
doc_expiry |
str |
yes |
doc_issuer |
str |
no |
doc_medium |
str |
no |
curl --location --request POST 'https://kapi.wubook.net/kp/reservations/add_customer' \
--header 'x-api-key: wb_yyyyyyyyyyy' \
--data-urlencode 'reservation_id=277' \
--data-urlencode 'reservation_room_id=962' \
--data-urlencode 'custdata={"name": "Mario", "surname": "Rossi"}'\
--data-urlencode 'docdata={"doc_type": "i", "doc_country": "italy", "doc_number": "CA00000AA", "doc_issue": "30/05/2022", "doc_expiry": "30/12/2031" }'\
--data-urlencode 'all='\''true'\'
>>> import requests
>>> import json
>>> headers = {'x-api-key':'wb_yyyyyyyyyyy'}
>>> custdata = {'name': 'Mario', 'surname': 'Rossi'}
>>> custdata = json.dumps(custdata)
>>> docdata = {"doc_type": 'i', 'doc_country': 'italy', 'doc_number': 'CA00000AA', 'doc_issue': '30/05/2022', 'doc_expiry': '30/12/2031'}
>>> docdata = json.dumps(docdata)
>>> data = {'reservation_id': 277, 'reservation_room_id': 962, 'custdata': custdata, 'docdata': docdata}
>>> response= requests.post('https://kapi.wubook.net/kp/reservations/add_customer', headers = headers, data = data)
>>> print(response.text)
Response example
{"data": {
"customer_id": "10",
"reservation_room_customer_id": "15",
}
{ "error": "the error" }
Bind Customer
Url: https://kapi.wubook.net/kp/reservations/bind_customer
Usage example
Following parameters can / must be used in order to use this call
Field name |
Description |
Mandatory |
---|---|---|
reservation_id |
reservation id |
yes, if not human_code |
human_code |
reservation code of the form (XY-0001) |
yes, if not reservation_id |
reservation_room_id |
reservation room id |
yes |
customer_id |
customer id |
yes |
curl --location --request POST 'https://kapi.wubook.net/kp/reservations/bind_customer' \
--header 'x-api-key: wb_yyyyyyyyyyy' \
--data-urlencode 'reservation_id=277' \
--data-urlencode 'reservation_room_id=962' \
--data-urlencode 'customer_id=20' -k
>>> import requests
>>> import json
>>> headers = {'x-api-key':'wb_yyyyyyyyyyy'}
>>> data = {'reservation_id': 277, 'reservation_room_id': 962, 'customer_id': 20}
>>> response= requests.post('https://kapi.wubook.net/kp/reservations/bind_customer', headers = headers, data = data)
>>> print(response.text)
Response example
{"data": null}
{ "error": "the error" }
Meal
Field name |
Description |
subf-ields |
---|---|---|
id |
id of the meal |
|
dates |
structure containing dates information |
day, created |
meal_info |
structure containing meal information |
mnumber, mtype, times |
price |
structure containing costs information |
amount, currency, discount, total, vat, vat_rate |
field |
Type |
Description |
day |
date (dd/mm/yyyy) |
day on which the meal was eaten |
created |
date (dd/mm/yyyy) |
creation date on Zak |
mnumber |
integer |
number of meals |
mtype |
string (“b”, “l” or “d” ) |
Breakfast, lunch or dinner |
times |
integer |
number of repetitions for this meal |
amount |
float |
amount |
currency |
string |
currency of the amount |
discount |
float |
discount |
total |
float |
total |
vat |
float |
vat |
vat_rate |
int |
vat percentage |
Meal example
{"data":
{
"id": 34,
"dates": {
"created": "27/01/2021",
"day": "25/01/2021"
},
"meal_info": {
"mnumber": 1,
"mtype": "l",
"times": 1
},
"price": {
"amount": 19.0,
"currency": "EUR",
"discount": 0.0,
"total": 19.0,
"vat": 0.0,
"vat_rate": 0
}
},
}
Get Meals
Url: https://kapi.wubook.net/kp/reservations/get_meals
Usage example
Only reservation id is required to use this API.
curl --location --request POST 'https://kapi.wubook.net/kp/reservations/get_meals' \
--header 'x-api-key: wb_yyyyyyyyyyy' \
--data-urlencode 'rsrvid=277'
>>> import requests
>>> headers = {'x-api-key':'wb_yyyyyyyyyyy'}
>>> data = {'rsrvid': 277}
>>> response= requests.post('https://kapi.wubook.net/kp/reservations/get_meals', headers = headers, data = data)
>>> print(response.text)
Response example
{"data": [
{"id": 34 . . },{"id": 35 . . }, {}, {}
]
Add Meal
Url: https://kapi.wubook.net/kp/reservations/add_meal
Usage example
To use this API one must provide several different parameters
Field |
Description |
Type |
Mandatory |
---|---|---|---|
rsrvid |
reservation id |
int |
yes |
meal |
json object containing meal to add |
JSON |
yes |
A meal data is
Field name |
Description |
Mandatory |
---|---|---|
price |
float |
yes |
mtype |
char(b,l,d) |
yes |
mnumber |
int |
yes |
day |
str |
yes |
times |
int |
yes |
curl --location --request POST 'https://kapi.wubook.net/kp/reservations/add_meal' \
--header 'x-api-key: wb_yyyyyyyyyyy' \
--data-urlencode 'rsrvid=277' \
--data-urlencode 'meal={"price": 200, "mtype": "l", "mnumber" : 1, "times" : 1, "day": "21/10/2022"}'
>>> import requests
>>> import json
>>> headers = {'x-api-key':'wb_yyyyyyyyyyy'}
>>> meal = {'price': 200, 'mtype': 'l', 'mnumber': 1, 'times': 1, 'day': '21/10/2022'}
>>> meal = json.dumps(meal)
>>> data = {'rsrvid': 277, 'meal': meal}
>>> response= requests.post('https://kapi.wubook.net/kp/reservations/add_meal', headers = headers, data = data)
>>> print(response.text)
Response example
{
"data": 1
}
Delete Meal
Url: https://kapi.wubook.net/kp/reservations/del_meal
Usage example
To use this API only two parameters are mandatory: reservation id and the meal id:
Field |
Description |
Type |
Mandatory |
---|---|---|---|
rsrvid |
reservation id |
int |
yes |
fmid |
meal id |
int |
yes |
curl --location --request POST 'https://kapi.wubook.net/kp/reservations/del_meal' \
--header 'x-api-key: wb_yyyyyyyyyyy' \
--data-urlencode 'rsrvid=277' \
--data-urlencode 'fmid=1'
>>> import requests
>>> headers = {'x-api-key':'wb_yyyyyyyyyyy'}
>>> data = {'rsrvid': 277, 'fmid':1}
>>> response= requests.post('https://kapi.wubook.net/kp/reservations/del_meal', headers = headers, data = data)
>>> print(response.text)
Response example
{"data": null}
Extra
Field name |
Description |
subf-ields |
---|---|---|
rexid |
id of the extra related to reservation |
|
dates |
structure containing dates information |
created, daily, day |
extra_info |
structure containing extra information |
number, name |
price |
structure containing costs information |
amount, currency, discount, total, vat, vat_rate |
field |
Type |
Description |
created |
date (dd/mm/yyyy) |
creation date on Zak |
daily |
bool (true,false) |
if the extra has been assigned for each day of the reservation |
day |
date (dd/mm/yyyy) |
assigned day (if daily, the field returns null) |
number |
integer |
number of extras (if daily per day) |
exid |
int |
id of the extra related to property |
name |
string |
Extra’s name |
amount |
float |
amount |
currency |
string |
currency of the amount |
discount |
float |
discount |
total |
float |
total |
vat |
float |
vat |
vat_rate |
int |
vat percentage |
Extra example
{
"data":[
{
"rexid":164,
"dates":{
"created":"16/08/2023",
"daily":true,
"day":null
},
"extra_info":{
"number":1,
"name":"Acqua"
},
"price":{
"amount":89.28571428571429,
"currency":"EUR",
"discount":0.0,
"total":100.0,
"vat":10.714285714285708,
"vat_rate":12.0
}
}
]
}
Get Extras
Url: https://kapi.wubook.net/kp/reservations/get_extras
Usage example
Only reservation id is required to use this API.
curl --location --request POST 'https://kapi.wubook.net/kp/reservations/get_extras' \
--header 'x-api-key: wb_yyyyyyyyyyy' \
--data-urlencode 'rsrvid=277'
>>> import requests
>>> headers = {'x-api-key':'wb_yyyyyyyyyyy'}
>>> data = {'id': 277}
>>> response= requests.post('https://kapi.wubook.net/kp/reservations/get_extras', headers = headers, data = data)
>>> print(response.text)
Response example
{"data": [
{"rexid": 164 . . },{"rexid": 165 . . }, {}, {}
]
Add Extra
Url: https://kapi.wubook.net/kp/reservations/add_extra
Usage example
Following parameters can / must be used in order to use this call
Field name |
Description |
Mandatory |
---|---|---|
rsrvid |
reservation id |
yes |
extra |
json object containing extra to add |
yes |
A extra data is
Field name |
Description |
Mandatory |
---|---|---|
price |
float |
yes |
exid |
str |
yes (if not name) |
name |
str |
yes (if not exid) |
number |
int |
yes |
daily |
str (“true” or “false”) |
no (default is “false”) |
day |
str |
yes (if daily is “false”) |
vat_rate |
float |
no (default from property settings) |
currency |
str |
no (default from property settings) |
curl --location --request POST 'https://kapi.wubook.net/kp/reservations/add_extra' \
--header 'x-api-key: wb_yyyyyyyyyyy' \
--data-urlencode 'rsrvid=528' \
--data-urlencode 'extra={"price": 200, "name": "Big", "number" : 1, "daily" : "false", "day": "10/09/2023", "vat_rate": 12, "currency": 'EUR'}'
>>> import requests
>>> import json
>>> headers = {'x-api-key':'wb_yyyyyyyyyyy'}
>>> extra = {'price': 200, 'name': 'Big', 'number': 1, 'daily': 'false', 'day': '10/09/2023', 'vat_rate': 12, 'currency': 'EUR'}
>>> extra = json.dumps(extra)
>>> data = {'rsrvid': 528,'extra': extra}
>>> response= requests.post('https://kapi.wubook.net/kp/reservatios/add_extra', headers = headers, data = data)
>>> print(response.text)
Del Extra
Url: https://kapi.wubook.net/kp/reservations/del_extra
Usage example
Only Reservation id and extra id are necessary
Field name |
Description |
Mandatory |
---|---|---|
rsrvid |
reservation id |
yes |
rexid |
extra id related to reservation |
yes |
curl --location --request POST 'https://kapi.wubook.net/kp/reservations/del_extra' \
--header 'x-api-key: wb_yyyyyyyyyyy' \
--data-urlencode 'rsrvid=528' \
--data-urlencode 'rexid=164'
>>> import requests
>>> import json
>>> headers = {'x-api-key':'wb_yyyyyyyyyyy'}
>>> data = {'rsrvid': 528,'rexid': 164}
>>> response= requests.post('https://kapi.wubook.net/kp/reservatios/del_extra', headers = headers, data = data)
>>> print(response.text)
Response example
{"data": null}
Get Doors Codes
Url: https://kapi.wubook.net/kp/reservations/get_doors_codes
Usage example
Only reservation id or reservation code are necessary
Field name |
Description |
Mandatory |
---|---|---|
rsrvid |
reservation id |
yes |
curl --location --request POST 'https://kapi.wubook.net/kp/reservations/get_doors_codes' \
--header 'x-api-key: wb_yyyyyyyyyyy' \
--data-urlencode 'rsrvid=549'
>>> import requests
>>> headers = {'x-api-key':'wb_yyyyyyyyyyy'}
>>> data = {'rsrvid': 549}
>>> response= requests.post('https://kapi.wubook.net/kp/reservations/get_doors_codes', headers = headers, data = data)
>>> print(response.text)
Response example
{
"data":[
{
"zak_reservation_room_id":1356,
"door_code":{
"code":"yellow"
}
},
{
"zak_reservation_room_id":1357,
"door_code":{
"code":"green"
}
},
{
"zak_reservation_room_id":1358,
"door_code":{
"code":"13131"
}
},
{
"zak_reservation_room_id":1359,
"door_code":{
"code":""
}
},
{
"zak_reservation_room_id":1360,
"door_code":{
"code":"123"
}
}
]
}
Set Doors Codes
Url: https://kapi.wubook.net/kp/reservations/set_doors_codes
Usage example
Following parameters can / must be used in order to use this call
Field name |
Description |
Mandatory |
---|---|---|
rsrvid |
reservation id |
yes |
codes |
json object containing codes to set |
yes |
A codes data is
Field name |
Description |
Mandatory |
---|---|---|
id |
zak reservation room id |
yes |
door_code |
str |
yes |
curl --location --request POST 'https://kapi.wubook.net/kp/reservations/set_doors_codes' \
--header 'x-api-key: wb_yyyyyyyyyyy' \
--data-urlencode 'rsrvid=549' \
--data-urlencode 'codes=[{"id": 1356, "door_code": "1111"},{"id": 1357, "door_code": "2222"}]'
>>> import requests
>>> import json
>>> headers = {'x-api-key':'wb_yyyyyyyyyyy'}
>>> codes = [{'id': 1356, 'door_code': '1111'},{'id': 1357, 'door_code': '2222'}]
>>> codes = json.dumps(codes)
>>> data = {'rsrvid': 549,'codes': codes}
>>> response= requests.post('https://kapi.wubook.net/kp/reservatios/set_doors_codes', headers = headers, data = data)
>>> print(response.text)
Response example
{"data": null}