Quick Links:
Getting Started:
- Account: First you need to get an account. Contact our sales team at partners@chekin.io and they will create an account for you with an email and password.
- Token: Use your email & password to get a token using our API:
POST https://a.chekin.io/api/v3/token/ { "email": "your@user", "password": "yourpassword" } Response: { "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiN2JkMzU4NzEyYzJiNDY3ODllM2Y3ZjY1Y2UyM2FlYjgiLCJ1c2VybmFtZSI6Im1hcmlhbm9AY2hla2luLmlvIiwiZXhwIjoxNTcxMjU2OTA2LCJvcmlnX2lhdCI6MTU3MTI1MzMwNiwiaXNfb2NyX2VuYWJsZSI6ZmFsc2UsImZhY2VfZXh0IjpmYWxzZSwib2NyX3ZpeiI6ZmFsc2UsIm9jcl9iYXJjb2RlcyI6ZmFsc2V9.yEYTAeTs3omjqyX4nkWyIogmWcANn-XkUTz2k220Hlg" }
The token expires within 1 hour, but the same endpoint can be called to get a new one.
- Headers: Add these headers in all your following requests:
- Content-Type application/json
- Authorization JWT {{your token}}
Use Case #1: CheKin Online as guest data capture service. No police connection.
- Create a reservation doing a POST to CheKin API, and get a “Chekin online link” in response, on field “signup_form_link”.
POST https://a.chekin.io/api/v3/reservations/ { "check_in_date": "2019-10-16", "check_out_date": "2019-10-18", "housing": { "type": "HOU", "name": "My Rental House 1", "location": { // We ask different data to the guest based in the country "country": "IT" } }, "guest_group": {} } Response: { "id": "d52b50adcf6446ca9f4c9305cfbe5538", ... "guest_group": { "id": "4707a97810504e8084b8b16f6f22f298", "url": "https://a.chekin.io/api/v3/guest-groups/4707a978-1050-4e80-84b8-b16f6f22f298/", ... }, ... "signup_form_link": "https://a.chekin.io/L/0u1AClTXSeCcqZsBJC_zeQ", }
Save reservation id or guest group id to retrieve guests data later. - Share the signup_form_link with the guests through emails, whatsapp, or your preferred medium.
- The guests will add their data using the CheKin Online form, which includes a document scanner to make data entry easier as possible.
- You can retrieve the guests data in different ways :
- Get guest data by guest group id
GET https://a.chekin.io/api/v3/guest-groups/4707a97810504e8084b8b16f6f22f298/ Response: { "id":"4707a97810504e8084b8b16f6f22f298", "url":"https://a.chekin.io/api/v3/guest-groups/4707a978-1050-4e80-84b8-b16f6f22f298/", "number_of_guests":2, "members":[ // guests list { // one guest data "id":"ff23cc1796764f52bbf727afe81a82be", "phone":"", "full_name":"MARTIN PEREZ", "name":"MARTIN", "surname":"PEREZ", "second_surname":"", "gender":"M", "birth_date":"1984-08-11", … // some extra fields and structures may be present. They are used for Italy or other countries requiring extra data "language":"eng", "nationality":{ "code":"AR", "alpha_3":"ARG", "name":"Argentina" }, "names":{ "name":"MARTIN", "surname":"PEREZ" }, "document":{ "id":"629a8c349cd146199ff32d4d550f9e71", "type":"P", "number":"AAA875441", "issue_date":"2012-05-17", … // some extra fields may be present for Italy or other countries "type_str":"Passport" }, "status":"COMPLETE", // status is not used without police connection "status_display":"All the necessary data are filled in" }, { // another guest "id":"2f3d24418d084476ae28bbc484ca1224", "phone":"", "full_name":"CARLOS GONZALEZ FERNANDEZ", "name":"CARLOS", "surname":"GONZALEZ", "second_surname":"FERNANDEZ", "gender":"M", "birth_date":"1967-11-24", … } ], "leader_id":"ff23cc1796764f52bbf727afe81a82be", // In some countries like italy there is a guest leader, usually the first guest. "type":"G" }
- Get reservation by ID and looking at field “guest_group”
GET https://a.chekin.io/api/v3/reservations/c4f529e7ad5c4c96a6dd6c3d61072705/ Response: { "id": "c4f529e7ad5c4c96a6dd6c3d61072705", … // reservation data "guest_group": { "number_of_guests":2, "members":[ … // guests data as described in a. ] } }
- Get the full List of your reservations and get guest_group from each one
GET https://a.chekin.io/api/v3/reservations/ Response: { "count":5, // total reservations "next":null, // used with pagination "previous":null, "results":[ // List of reservations { "id":"7a2b3fe5c5d34463aa2583f09de5ab75", ... // Reservation and housing data "guest_group":{ "id":"06adcc1c9a194f858335ee22bbb1d3e3", "number_of_guests":2, "members":[ { "id":"74567767b20f47f5a14b4333b55a26b0", "full_name":"Alejandro Perez", ... // Full guest data }, { "id":"40e6099998964ec7947b84354f00c321", "full_name":"Sara Gomez", ... // Full guest data } ], "leader_id":"74567767b20f47f5a14b4333b55a26b0", "type":"G" }, ... }, { "id":"d52b50adcf6446ca9f4c9305cfbe5538", ... // Reservation and housing data "guest_group":{ "id":"4707a97810504e8084b8b16f6f22f298", "number_of_guests":2, "members":[ { "id":"ff23cc1796764f52bbf727afe81a82be", "full_name":"MARIANO MARTINEZ", ... // Full guest data }, { "id":"2f3d24418d084476ae28bbc484ca1224", "full_name":"CARLOS GONZALEZ FERNANDEZ", ... // Full guest data } ], "leader_id":"ff23cc1796764f52bbf727afe81a82be", "type":"G" }, ... } ] }
- Subscribe to webhooks to be notified every time a guest is added:
POST https://a.chekin.io/api/v3/webhooks/ { "target": "https://your.domain.con/target-endpoint/", "event": "Guest.created" } Response { "id": "5adecfc46a6c4b72a15c98fe0e96b048", "event": "Guest.created", "target": "https://your.domain.con/target-endpoint/" }
Every time a guest is added we will do a POST request to your endpoint sending the following data:
{ "hook": { "id": "fab8af5dd0074d04a42395d00890c310", "event": "Guest.created", "target": "http://example.org/target-url/" }, "data": { "reservation_id": "620186f602de439faffb6caa71b5014e", "guest_id": "3cdcede6af45448ebaf28315d09ceec2", "guest_origin": "CH_ONLINE" } }
You can use the guest id or reservation id to retrieve the guest data in that moment. Example using guest_id:
GET https://a.chekin.io/api/v3/guests/3cdcede6-af45-448e-baf2-8315d09ceec2/ Response: { "id":"3cdcede6af45448ebaf28315d09ceec2", "phone":"", "full_name":"MARTIN PEREZ", "name":"MARTIN", "surname":"PEREZ", "second_surname":"", "gender":"M", "birth_date":"1984-08-11", … // some extra fields and structures may be present. They are used for Italy or other countries requiring extra data "language":"eng", "nationality":{ "code":"AR", "alpha_3":"ARG", "name":"Argentina" }, "names":{ "name":"MARTIN", "surname":"PEREZ" }, "document":{ "id":"629a8c349cd146199ff32d4d550f9e71", "type":"P", "number":"AAA875441", "issue_date":"2012-05-17", … // some extra fields may be present for Italy or other countries "type_str":"Passport" }, // other status fields can be ignored in this use case. They are used when the house is connected with legal authorities (police, statistics..). }
Find more information about webhook events available in API Docs
- Get guest data by guest group id
Use Case #2: CheKin Online with legal compliance (police/statistics connection).
- Create a reservation doing a POST to CheKin API, sending Police Credentials, and get a “CheKin online link” in response on field “signup_form_link”. Optionally, you can send data of guests that you have, in field guest_group.
POST https://a.chekin.io/api/v3/reservations/ { "check_in_date":"2019-10-07", "check_out_date":"2019-10-08", "housing": { "type": "HOU", "name": "My Rental House POL", "police_account": { "type":"POL", "username":"webpol user", "password":"webpol password" } }, "guest_group":{ "number_of_guests":2, "type":"G", "members":[ { "is_leader":true, "name":"Pedro", "surname":"Perez", "birth_date":"1974-03-20", "nationality":"ES", "document":{ "type":"P", "number":"ABC12345", "issue_date":"2015-03-20" } }, { "name":"Laura", "surname":"Garcia", "birth_date":"1988-11-22", "nationality":"IT", "document":{ "type":"P", "number":"CDE5466", "issue_date":"2012-05-11" } } ] } } Response: { "id": "7a2b3fe5c5d34463aa2583f09de5ab75", ... // Housing daa "check_in_date": "2019-10-07T00:00:00Z", "check_out_date": "2019-10-08T00:00:00Z", "nights_of_stay": 1, "origin": "DEFAULT", "created_at": "2019-10-15T21:26:30.735665Z", "guest_group": { "id": "06adcc1c9a194f858335ee22bbb1d3e3", "url": "https://a.chekin.io/api/v3/guest-groups/06adcc1c-9a19-4f85-8335-ee22bbb1d3e3/", "number_of_guests": 2, "members": [ ... // the added guests ], "leader_id": "74567767b20f47f5a14b4333b55a26b0", "type": "G" }, ... "signup_form_link": "https://a.chekin.io/L/NQS0-d0RSHqLzvPQfjmlnA", // chekin online link, to be sent to guests "aggregated_status": "NEW" // reservation level status }
- Share the link with the guests through emails, whatsapp, or your preferred medium.
- The guests will add their data using the CheKin Online form, which includes a document scanner to make data entry easier as possible.
- There are different options to get guests data from reservation later, as described in Use Case #1 – 1.4.
- You can check the legal compliance status later using webhooks or polling.
- In case of ERROR you can restart a registration.