.. meta:: :description: Wired Zak API do checkin :keywords: api, pms, zak, kapi, booking, bookings, reservation, checkin, chin, do_checkin, set_arrived, arrived, Zak API to do guest chek in *************************** | These APIs allow you to do a guest check in for an existing reservation. Do checkin ========== | Do the guest check in for a reservation-room. .. code-block:: html Url: https://kapi.wubook.net/kapi/chin/do_checkin | Checkin Forms are represented as JSON objects. | Input fields: The following fields are mandatory: .. table:: :widths: auto +--------------------------+-----------------------------------------------------------------------------------------+ | **Field name** | **Description** | +==========================+=========================================================================================+ | *rrid* | Id of the reservation-room [rrid]_ | +--------------------------+-----------------------------------------------------------------------------------------+ | *name* | Guest name | +--------------------------+-----------------------------------------------------------------------------------------+ | *surname* | Guest surname | +--------------------------+-----------------------------------------------------------------------------------------+ | *country* | Country `ISO code`_ (*RU*, *IT*, *ES*, ..) | +--------------------------+-----------------------------------------------------------------------------------------+ | *doc_type* | Code of document type (provided by api symbols: `get document types`_) | +--------------------------+-----------------------------------------------------------------------------------------+ | *doc_number* | Document number | +--------------------------+-----------------------------------------------------------------------------------------+ .. _get document types: symbols.html#get-document-types .. _123456: ../kapintro.html#authentication .. _ISO code: https://it.wikipedia.org/wiki/ISO_3166-1 The following fields are optional: .. table:: :widths: auto +--------------------------+-----------------------------------------------------------------------------------------+ | **Field name** | **Description** | +==========================+=========================================================================================+ | *cid* | Customer ID (if it's an existing customer) | +--------------------------+-----------------------------------------------------------------------------------------+ | *birthday* | Customer birthday, e.g. 23/08/1990 | +--------------------------+-----------------------------------------------------------------------------------------+ | *birth_country* | Birthday country | +--------------------------+-----------------------------------------------------------------------------------------+ | *gender* | Guest gender (*m*, *f*, *x*) | +--------------------------+-----------------------------------------------------------------------------------------+ | *email* | Guest email | +--------------------------+-----------------------------------------------------------------------------------------+ | *phone* | Guest phone number | +--------------------------+-----------------------------------------------------------------------------------------+ | *city* | City of guest | +--------------------------+-----------------------------------------------------------------------------------------+ | *address* | Guest address | +--------------------------+-----------------------------------------------------------------------------------------+ | *zip* | Guest address zip code | +--------------------------+-----------------------------------------------------------------------------------------+ | *doc_issue* | Date of document issue | +--------------------------+-----------------------------------------------------------------------------------------+ | *doc_expiry* | Date of document expiry | +--------------------------+-----------------------------------------------------------------------------------------+ | *doc_issuer* | Issuer country of the document | +--------------------------+-----------------------------------------------------------------------------------------+ | *doc_medium* | Phisical ID of the document | +--------------------------+-----------------------------------------------------------------------------------------+ | Response-data: customer id. .. [rrid] It is the identification number of a reservation-room and it can be obtained by `reservation api. `_ Examples -------- | On the examples the **api-key** is used as `123456`_ which is sent as *user*. curl: ..... .. code-block:: shell curl https://kapi.wubook.net/kapi/chin/do_checkin -u 123456: \ -d rrid=5218979 -d name='James' -d surname='Bond' -d country='ES' -d doc_type='d' -d doc_number='234' python code: ............ .. code-block:: python import json import requests data= { "rrid":104, "name":"Max", "surname":"Planck", "country":"DE", "doc_type":"p", "doc_number":"MP-1033dA181", "gender":"m", "email":"max-planck@ppp.com", "phone":"822-0746 4885" } jdata=json.dumps(data) uspw=('123456', None) response= requests.post('https://kapi.wubook.net/kapi/chin/do_checkin', jdata, auth= uspw) print(response.text) Set as arrived ============== | Set a reservation as **arrived** (the guests are arrived). .. code-block:: html Url: https://kapi.wubook.net/kapi/chin/set_arrived | Input fields: *rcode* (it's the reservation code) | Optional input field: *rrid* (reservation room) | Response-data: boolean of success or failure. Examples -------- curl: ..... .. code-block:: shell $ curl https://kapi.wubook.net/kapi/chin/set_arrived -u 123456: -X POST -d rcode=MP-0002 -d rrid=104 {"data": true} python code: ............ .. code-block:: python import requests data= {"rcode": "MP-0002", "rrid": 104} uspw=('123456', None) response= requests.post('https://kapi.wubook.net/kapi/chin/set_arrived', data, auth= uspw) print(response.text) Set as gone =========== | Set a reservation as **left** (the guests are gone). .. code-block:: html Api url: https://kapi.wubook.net/kapi/chin/set_left | Input fields: *rcode* (it's the reservation code) | Optional input field: *rrid* (reservation room) | Response-data: boolean of success or failure. Examples -------- curl: ..... .. code-block:: shell $ curl https://kapi.wubook.net/kapi/chin/set_left -u 123456: -X POST -d rcode=MP-0002 {"data": true} python code: ............ .. code-block:: python import requests data= {"rcode": "MP-0002"} uspw=('123456', None) response= requests.post('https://kapi.wubook.net/kapi/chin/set_left', data, auth= uspw) print(response.text)