Endpoints

Let Goki query or update your system

You can add some endpoints to your integration which Goki will use to interact with you. This helps us to get some information from you or trigger events on your system.

Available endpoints

1) getSpaces

Goki uses this endpoint to get the list of your spaces (rooms/beds). Staff can use the Goki Dashboard (which uses this endpoint) to map their Goki spaces/locks to your rooms/beds. Goki also uses background jobs to regularly check the mapping and make sure nothing is broken.

Your response format should be an array of rooms/beds like below

[
{
"id": "7123487134",
"type": "Room",
"name": "101",
"isPrivate": false,
"isActive": true
},
{
"id": "7123487134",
"type": "Bed",
"name": "101 A",
"isPrivate": false,
"isActive": true
},
...
]

Property

Type

Required

Description

id

string

Y

ID of the room or bed in your system (PMS)

type

string

Y

Can be only Room, Bed, Dorm. (Make sure you have used uppercase - these names are shown in the Goki dashboard to help staff map their rooms and beds)

name

string

Y

Room name in your system

isPrivate

boolean

Y

Mark it as false if the room is shared. (In case you have a shared room which also can be booked as a private room, mark it false too)

isActive

boolean

Y

If the room is out of service permanently and should not be used by staff, mark it as false. (This is for PMSes which still have a room but it is not used and cannot delete from their system otherwise you normally set this to active=true )

2) getCheckeInStatus

Goki uses this endpoint to check the status of a reservation on your system during the check-in process. Your response should be as bellow:

{
"owing": 111.11,
"owingCurrency": "AUD",
"roomReady": true
}

Property

Type

Required

Description

owing

number

Y

The owing amount which user should still pay and cannot check-in unless it is settled

owingCurrency

string

Y

The currency of the owing amount

roomReady

boolean

Y

In case the room is not clean and we should stop users from checking-in. If the room is dirty we show a message at the end of check-in process to the user to sit and we inform them as soon as we get a reservation update from PMS with state=started.

3) checkIn

In self-check-in automation, Goki uses this endpoint to let your system know, you can check the reservation in. We also submit the collected check-in information when calling the endpoint. It is optional for you to store it or ignore it.

This endpoint method MUST be POST.

Request Body

This is a sample request data we submit to your endpoint.

{
"reservationId": "00308227-05ba-48d3-a42d-2e8d13313984", // ID of reservation on your side
"mainCustomer": {
"firstName": "Bob",
"lastName": "Smith",
"email": "[email protected]",
"address": "1 Bringa Avenue",
"mobile": "0401408439",
"gender": "male",
"nationality": "Australia",
"dob": "1986-12-13",
"hometown": {
"city": "Sydney",
"country": "Australia",
},
"passport": {
"number": "563422",
"expiry": "2026-01-02",
"image": {
"publicId": "refhncvdkfns",
"gokiSecureUrl": "https://dashboard.goki.travel/secured?property=ce95acc-d3e2-459e-9b65-fda25c7acd&id=a9f0b29f-d279-4d1a-8ca5-9c034fd1b271&type=1"
}
},
"driversLicense": {
"number": "942945",
"expiry": "2027-12-21",
"image": {
"publicId": "dkwhfewiuhapewo",
"gokiSecureUrl": "https://dashboard.goki.travel/secured?property=ce95acc-d3e2-459e-9b65-fda25c7acd&id=a9f0b29f-d279-4d1a-8ca5-9c034fd1b271&type=2"
}
},
"idCard": {
"number": "481233",
"expiry": "2028-12-11",
"image": {
"publicId": "odwifheuowfhwewwefw",
"gokiSecureUrl": "https://dashboard.goki.travel/secured?property=ce95acc-d3e2-459e-9b65-fda25c7acd&id=a9f0b29f-d279-4d1a-8ca5-9c034fd1b271&type=3"
}
},
"visa" {
"image": {
"publicId": "cn2nxarbomkoxpy2vmmk",
"gokiSecureUrl": "https://dashboard.goki.travel/secured?property=ce95acc-d3e2-459e-9b65-fda25c7acd&id=a9f0b29f-d279-4d1a-8ca5-9c034fd1b271&type=4"
}
}
},
"companions": [
{
"firstName": "Jon",
"lastName": "Snow",
"email": "[email protected]",
"hometown": {
"city": "Sydney",
"country": "Australia"
},
"passport": {
"number": "563422",
"expiry": "2026-01-02"
},
"driversLicense": {
"number": "942945",
"expiry": "2027-12-21"
},
"idCard": {
"number": "481233",
"expiry": "2028-12-11"
}
},
...
]
}

Your response should be as follows (you should provide a reason when success is false):

{
"success": false,
"reason": "roomIsNotReady" // reason is mandatory if success is false
}

Property

Type

Required

Description

success

boolean

Y

Set it to true if you can check the guest in successfully.

reason

string

N

If success if false and you cannot check guest in, you MUST provide a reason. Reason can be one of these:

  • roomIsNotReady: Room is not ready yet

  • hasOwing: Reservation had owing which must be paid before check-in

  • alreadyCheckedIn: Reservation was already checked-in

Data Structure

APIs