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 them.

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

Create or Update a Reservation

PATCH [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 Body

Name
Type
Description

pmsNumber

string

Code or number of the reservation in your system.

booker

object

Booker Info (please read Reservation page)

state

string

Reservation state (please read Reservation page)

adultCount

number

Number of adults

childCount

number

Number of children

parentSpaceId

string

Goki SpaceID of the reservation. (If you do not have the Goki SpaceID can provide parentSpaceId or spaceId in pmsMeta)

fromDate

string

Start date of reservation in YYYY-MM-DD format

toDate

string

End date of reservation in YYYY-MM-DD format

sourceName

string

Name of the Company that mediated the reservation. (i.e. booking.com)

channelManager

string

Name of the Channel manager (i.e. AvailPro, SiteMinder, TravelClick, etc).

channelNumber

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

number

Owing amount of the reservation.

owingCurrency

string

Currency of the owing amount.

pmsMeta

object

Reservation info in the third-party app. (please read Reservations page)

from

string

Start date & time of reservation in ISO 8601 format.

to

string

End date & time of reservation in ISO 8601 format.

{
  "data": {
    ...ReservationDocument // Check ReservationDocument page for the sample data
  }
}

For reservation dates, set from or fromDate, and to or toDate. Setting both fields at the same time will encounter 400 error.

To get the PIN for a reservation, you need to use webhooks as explained here.

Last updated