Zak API to manage reservation notes

This is an OLD API, Do not use!
These APIs allow you to create, read, update or delete a reservation note (remark).

Get notes

This method provides the notes of a zak reservation.
Url: https://kapi.wubook.net/kapi/notes/get_notes

The following input fields are mandatory:

Field name

Description

rcode

Reservation code

Response-data: list of notes.

Example

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

curl:

$ curl https://kapi.wubook.net/kapi/notes/get_notes -u 123456: -X POST \
  -d rcode=CG-0001
{
    "data":
    [
     {"id": 1007, "remarks": "this is the third note of CG-0001"},
     {"id": 1006, "remarks": "this is the second note of CG-0001"},
     {"id": 1005, "remarks": "this is the first note of CG-0001"}
    ]
}

python code:

import requests
uspw=(123456, None)
data= {'rcode': 'CG-0001'}
response= requests.post('https://kapi.wubook.net/kapi/notes/get_notes', data, auth= uspw)
print(response.text)

Create a note

This method allows the user to create a note in the specified reservation.
Url: https://kapi.wubook.net/kapi/notes/create_note

The following input fields are mandatory:

Field name

Description

rcode

Reservation code

new_note

New note to be inserted in the reservation

Response-data: confirmation of note creation.

Example


curl:

$ curl https://kapi.wubook.net/kapi/notes/create_note -u 123456: -X POST \
  -d rcode=CG-0001 -d new_note="this is the note to be inserted"
{
    "data": "OK"
}

python code:

import requests
uspw=(123456, None)
data= {'rcode': 'CG-0001', 'new_note': 'this is the note to be inserted'}
response= requests.post('https://kapi.wubook.net/kapi/notes/create_note', data, auth= uspw)
print(response.text)

Update a note

This method allows the user to update a specific note.
Url: https://kapi.wubook.net/kapi/notes/update_note

The following input fields are mandatory:

Field name

Description

id_note

ID of the note

updated_note

Text that will replace the text of the specified note

Response-data: confirmation of note update.

Example


curl:

$ curl https://kapi.wubook.net/kapi/notes/update_note -u 123456: -X POST \
  -d id_note=1005 -d updated_note="this is the updated note"
{
    "data": "OK"
}

python code:

import requests
uspw=(123456, None)
data= {'id_note': 1005, 'updated_note': 'this is the updated note'}
response= requests.post('https://kapi.wubook.net/kapi/notes/update_note', data, auth= uspw)
print(response.text)

Delete a note

This method allows the user to delete a specific note.
Url: https://kapi.wubook.net/kapi/notes/delete_note

The following input fields are mandatory:

Field name

Description

id_note

ID of the note

Response-data: confirmation of note deletion.

Example

curl:

$ curl https://kapi.wubook.net/kapi/notes/delete_note -u 123456: -X POST \
  -d id_note=1005
{
    "data": "OK"
}

python code:

import requests
uspw=(123456, None)
data= {'id_note': 1005}
response= requests.post('https://kapi.wubook.net/kapi/notes/delete_note', data, auth= uspw)
print(response.text)