ReservationDocument

Response Model for Reservation Document

This is the representation of the ReservationDocument data structure which you receive in the Reservation API response.

{
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "hostelId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "booker": {
      "firstName": "Bob",
      "lastName": "Smith",
      "email": "bob.smith@gmail.com",
      "mobile": "+61432000000"
    },
    "adultCount": 1,
    "childCount": 0,
    "pmsNumber": "1284",
    "channelManager": "SiteMinder",
    "channelNumber": "87456",
    "sourceName": "booking.com",
    "parentSpaceId": "00001187-a4c2-4b3f-9c12-287725113e60",
    "fromDate": "2020-12-06",
    "toDate": "2020-12-08",
    "price": 0,
    "owing": 0,
    "owingCurrency": "AUD",
    "state": "started",
    "pmsMeta": {
      "id": "00308227-05ba-48d3-a42d-2e8d13313984",
      "groupId": "00a2b97a-ca89-4f91-b513-3dea5cbeba3c",
      "spaceId": "00e6c132-3693-4979-a735-57cd63e26729",
      "parentSpaceId": "012a8c0c-2a6b-44a2-b1e9-4be860e3f51e",
      "companionIds": [
        "013b7f4b-7551-4110-a0ed-4a3cc7c3325a"
      ],
      "updatedAt": "2020-12-22T06:17:30+00:00"
    },  
    "from": "2020-12-06T11:30:00+01:00",
    "to": "2020-12-08T10:00:00+01:00",
    "createdAt": "2020-12-06T08:50:14+00:00",
    "updatedAt": "2020-12-08T07:10:18+00:00",
    "mainCustomer": {
      "firstName": "Brad",
      "lastName": "Pitt",
      "email": "brad.pitt@gmail.com",
      "hometown": {
        "city": "Sydney",
        "country": "Australia"
      },
      "passport": {
        "number": "123454",
        "expiry": "2025-05-05"
      },
      "driversLicense": {
        "number": "456778",
        "expiry": "2025-05-06"
      },
      "idCard": {
        "number": "876545",
        "expiry": "2025-05-07"
      }
    },
    "companions": [
      {
        "firstName": "Jon",
        "lastName": "Snow",
        "email": "jon.snow@gmail.com",
        "hometown": {
          "city": "Australia",
          "country": "Sydney"
        },
        "passport": {
          "number": "563422",
          "expiry": "2026-01-02"
        },
        "driversLicense": {
          "number": "942945",
          "expiry": "2027-12-21"
        },
        "idCard": {
          "number": "481233",
          "expiry": "2028-12-11"
        }
      }
    ]
}

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

The 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

updatedAt

string

Y

Reservation modification date

pmsMeta

object

Y

mainCustomer

object

N

Main customer info collected in the self check-in process.

companions

array

N

The companions info collected in the self check-in process

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

mobile

string

N

The mobile number 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 the enterprise

Requested

Confirmed by the customer but not by the enterprise (waitlist)

Optional

Confirmed by the 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

Only reservations with the status confirmed are shown to users in check-in apps.

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 identifier including the original reservation id as the groupId.

Last updated