Goki API
Search…
ReservationDocument
Response Model for Reservation Document
This is the representation of the ReservationDocument data structure which you receive in the Reservation API response.
1
{
2
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
3
"hostelId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
4
"booker": {
5
"firstName": "Bob",
6
"lastName": "Smith",
7
"email": "[email protected]"
8
},
9
"adultCount": 1,
10
"childCount": 0,
11
"pmsNumber": "1284",
12
"channelManager": "SiteMinder",
13
"channelNumber": "87456",
14
"sourceName": "booking.com",
15
"parentSpaceId": "00001187-a4c2-4b3f-9c12-287725113e60",
16
"fromDate": "2020-12-06",
17
"toDate": "2020-12-08",
18
"price": 0,
19
"owing": 0,
20
"owingCurrency": "AUD",
21
"state": "started",
22
"pmsMeta": {
23
"id": "00308227-05ba-48d3-a42d-2e8d13313984",
24
"groupId": "00a2b97a-ca89-4f91-b513-3dea5cbeba3c",
25
"spaceId": "00e6c132-3693-4979-a735-57cd63e26729",
26
"parentSpaceId": "012a8c0c-2a6b-44a2-b1e9-4be860e3f51e",
27
"companionIds": [
28
"013b7f4b-7551-4110-a0ed-4a3cc7c3325a"
29
],
30
"updatedAt": "2020-12-22T06:17:30+00:00"
31
},
32
"from": "2020-12-06T11:30:00+01:00",
33
"to": "2020-12-08T10:00:00+01:00",
34
"createdAt": "2020-12-06T08:50:14+00:00",
35
"updatedAt": "2020-12-08T07:10:18+00:00",
36
"mainCustomer": {
37
"firstName": "Brad",
38
"lastName": "Pitt",
39
"email": "[email protected]",
40
"hometown": {
41
"city": "Sydney",
42
"country": "Australia"
43
},
44
"passport": {
45
"number": "123454",
46
"expiry": "2025-05-05"
47
},
48
"driversLicense": {
49
"number": "456778",
50
"expiry": "2025-05-06"
51
},
52
"idCard": {
53
"number": "876545",
54
"expiry": "2025-05-07"
55
}
56
},
57
"companions": [
58
{
59
"firstName": "Jon",
60
"lastName": "Snow",
61
"email": "[email protected]",
62
"hometown": {
63
"city": "Australia",
64
"country": "Sydney"
65
},
66
"passport": {
67
"number": "563422",
68
"expiry": "2026-01-02"
69
},
70
"driversLicense": {
71
"number": "942945",
72
"expiry": "2027-12-21"
73
},
74
"idCard": {
75
"number": "481233",
76
"expiry": "2028-12-11"
77
}
78
}
79
]
80
}
Copied!
Property
Type
Required
Description
id
string
N
The ID of the reservation in Goki.
hostelId
string
N
The ID of the property in Goki.
booker
object
Y
adultCount
number
N
Number of adults
childCount
number
N
Number of children
pmsNumber
string
Y
Code or number of the reservation in your system.
channelManager
string
N
Name of the Channel manager (i.e. AvailPro, SiteMinder, TravelClick, etc).
channelNumber
string
N
Number of the reservation within the Channel (i.e. OTA, GDS, CRS, etc) in case the reservation group originates there (i.e. Booking.com confirmation number).
sourceName
string
N
Name of the Company that mediated the reservation. (i.e. booking.com)
parentSpaceId
string
N
Goki SpaceId of the reservation.
fromDate
string
N
Start date of reservation in YYYY-MM-DD format
toDate
string
N
End date of reservation in YYYY-MM-DD format
price
number
N
Total price of the reservation.
owing
number
N
Owing amount of the reservation.
owingCurrency
string
N
Currency of the owing amount.
state
string
Y
from
string
N
The start date of reservation in the property's timezone
to
string
N
The end date of reservation in the property's timezone
createdAt
string
Y
Reservation creation date

Booker Info

Property
Type
Required
Description
firstName
string
N
First name of the booker
lastName
string
Y
Last name of the booker
email
string
N
The email address of the booker

PMS Meta

Property
Type
Required
Description
id
string
Y
Identifier of reservation in your system
groupId
string
N
Identifier of reservation group in your system
spaceId
string
N
Identifier of assigned space in your system
parentSpaceId
string
N
Identifier of parent space in your system (if the assigned space is a bed)
companionIds
array
N
List of reservation companions ID in your system
updatedAt
string
N
Last modification date of the reservation in your system in ISO format

Reservation state

State
Description
Enquired
Confirmed neither by the customer nor enterprise
Requested
Confirmed by the customer but not by the enterprise (waitlist)
Optional
Confirmed by enterprise but not by the guest (the enterprise is holding resource for the guest)
Confirmed
Confirmed by both parties, before check-in
Started
Checked in
Processed
Checked out
Canceled
Canceled

Main Customer & Companions

In case we have collected guests' information during the check-in process. We will provide it in the main customer and companions list.
parentSpaceId v.s. pmsMeta(spaceId, parentSpaceId)
  • parentSpaceId is the id that is generated in Goki. You only have it if you have done integration with Goki to fetch and store our spaces into yours.
  • meta(spaceId, parentSpaceId) is what you have in your system. Usually, you want to only send these fields to Goki as you already know them.
Sending both parentSpaceId and pmsMeta(spaceId, parentSpaceId) will throw an error in the API calls.
Multi-room Reservations
In order to send a reservation that has multiple rooms, you need to break it into multiple reservations with a unique meta(id) for each reservation. You can use any logic like appending an index (XYZ-1, XYZ-2, XYZ-3 ...) to the id. And use meta(groupId) to link them together. You can use any identifer including the original reservation id as the groupId.