Create/Update a Reservation

Create or update reservations using single API call

You should call this API whenever there are changes in the reservation (e.g. dates, owing, room, state changes ...).

The main usage of this API is automating the check-in process by generating PIN and SmartKey. As soon as the state of a reservation is changed to "started", Goki will generate generate them.

For PIN/SmartKey generation, Goki uses your spaceId as explained below. You need to make sure you have provided the getSpaces endpoint for this to work. You can read more at Keyless Check-in.

patch
Create or Update a Reservation

[environmentBaseUrl]/v1/reservations
It is important to use this API to have a copy of your reservation on Goki. Make sure you call it as soon as there is any update on the reservation.
Request
Response
Request
Body Parameters
pmsNumber
required
string
Code or number of the reservation in your system.
booker
required
object
Booker Info (please read Reservation page)
state
optional
string
Reservation state (please read Reservation page)
adultCount
optional
number
Number of adults
childCount
optional
number
Number of children
parentSpaceId
optional
string
Goki SpaceID of the reservation. (If you do not have the Goki SpaceID can provide parentSpaceId or spaceId in pmsMeta)
fromDate
required
string
Start date of reservation in YYYY-MM-DD format
toDate
required
string
End date of reservation in YYYY-MM-DD format
sourceName
optional
string
Name of the Company that mediated the reservation. (i.e. booking.com)
channelManager
optional
string
Name of the Channel manager (i.e. AvailPro, SiteMinder, TravelClick, etc).
channelNumber
optional
string
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).
owing
optional
number
Owing amount of the reservation.
owingCurrency
optional
string
Currency of the owing amount.
pmsMeta
required
object
Reservation info in the third-party app. (please read Reservations page)
Response
200: OK
Reservation successfully changed.
{
"data": {
...ReservationDocument // Check ReservationDocument page for the sample data
}
}
404: Not Found
Goki parent space not found.
{
"error": {
"code": 5,
"title": "NOT_FOUND",
"status": 404,
"message": "Parent space not found!"
}
}