.. meta:: :description: Wired Zak API create, read, update or delete a reservation note (remark) :keywords: api, pms, zak, kapi, note, notes, remark, remarks Zak API to manage reservation notes *********************************** | 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. .. code-block:: html Url: https://kapi.wubook.net/kapi/notes/get_notes The following input fields are mandatory: .. table:: :widths: auto +--------------------------+-----------------------------------------------------------------------------------------+ | **Field name** | **Description** | +==========================+=========================================================================================+ | *rcode* | Reservation code | +--------------------------+-----------------------------------------------------------------------------------------+ | Response-data: *list of notes*. .. _123456: ../kapintro.html#authentication Example ------- | On each example `123456`_ is used as **api-key** which is sent as *user*. curl: ..... .. code-block:: shell $ 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: ............ .. code-block:: python 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. .. code-block:: html Url: https://kapi.wubook.net/kapi/notes/create_note The following input fields are mandatory: .. table:: :widths: auto +--------------------------+-----------------------------------------------------------------------------------------+ | **Field name** | **Description** | +==========================+=========================================================================================+ | *rcode* | Reservation code | +--------------------------+-----------------------------------------------------------------------------------------+ | *new_note* | New note to be inserted in the reservation | +--------------------------+-----------------------------------------------------------------------------------------+ | Response-data: *confirmation of note creation*. Example ------- | curl: ..... .. code-block:: shell $ 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: ............ .. code-block:: python 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. .. code-block:: html Url: https://kapi.wubook.net/kapi/notes/update_note The following input fields are mandatory: .. table:: :widths: auto +--------------------------+-----------------------------------------------------------------------------------------+ | **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: ..... .. code-block:: shell $ 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: ............ .. code-block:: python 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. .. code-block:: html Url: https://kapi.wubook.net/kapi/notes/delete_note The following input fields are mandatory: .. table:: :widths: auto +--------------------------+-----------------------------------------------------------------------------------------+ | **Field name** | **Description** | +==========================+=========================================================================================+ | *id_note* | ID of the note | +--------------------------+-----------------------------------------------------------------------------------------+ | Response-data: *confirmation of note deletion*. Example ------- curl: ..... .. code-block:: shell $ curl https://kapi.wubook.net/kapi/notes/delete_note -u 123456: -X POST \ -d id_note=1005 { "data": "OK" } python code: ............ .. code-block:: python 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)