Add or Update Booking Room Reservation

Add or Update Booking Room Reservation

POST [PlatformAddress]/api/1.0/venue?action=addOrUpdateBookingRoomReservation

Adds or updates the details of a specific room reservation on a specific venue booking. The booking must satisfy the following:* Accommodation is included, and the booking has accommodation groups.* The status must be "not confirmed", "confirmed", "checked in" or "checked out"

{
  "success": true,
  "id": 123,
  "reference": "45",
  "mainGuest": {
    "id": 101,
    "guestContactId": 43213
  },
  "rooms": [
    {
      "id": 4001,
      "guest": {
        "id": 101,
        "guestContactId": 43213
      },
      "additionalGuests": []
    },
    {
      "id": 4002,
      "guest": {
        "id": 102,
        "guestContactId": 44321
      },
      "additionalGuests": [
        {
          "guestId": 103,
          "guestContactId": 43277,
          "guestType": 2
        }
      ]
    }
  ]
}

Booking Room Reservation

Reserved Room

Reserved Room Day Rates

Reserved Room Additional Guests

Guest

Guest Contact Details

Additional Guest Type

One of the following values

Occupancy Type

One of the following values

Notes on adding a room reservation

This action only supports adding a "not confirmed" room reservation. To add a "confirmed" room reservation, you will need to call the confirmBookingRoomReservation action after a successfull add.

This action only supports adding a room reservation to a booking that has accommodation groups. The rooms on the reservation must be assigned to a group.

Notes on updating a room reservation

Updating an existing room reservation overlays the existing data. Optional request data that is excluded will not change existing data (with the exception of additionalGuests - see below). This does not guarantee that the request data will validate if other data is changed. For example, if the departure date of a reserved room is extended, rates for the new dates will be required.

The following is an example of an update request that updates an existing room (id 400) and adds a new room:

"rooms": [
  {
    "id": 400,
    "arrivalDate": "2019-01-01",
    "departureDate": "2019-02-03",
    "dayRates": [
      {
        "dayDate": "2019-01-01",
        "cost": 100
      },
      {
        "dayDate": "2019-01-02",
        "cost": 101
      }
    ]
  },
  {
    "guest": {
      "id": 301
    },
    "groupId": 1,
    "arrivalDate": "2019-01-01",
    "departureDate": "2019-02-03",
    "numAdultGuests": 1,
    "numChildGuests": 0,
    "dayRates": [
      {
        "dayDate": "2019-01-01",
        "cost": 100
      },
      {
        "dayDate": "2019-01-02",
        "cost": 101
      }
    ]
]

Existing rooms can be removed from a reservation by passing their unique identifier in the removeRooms of the request. Rooms are removed before other rooms in the request are added/updated.

Updating additional guests on a reserved room

The additionalGuests request param can be used to set the additional guest details of a reserved room. If this value is present in the request, it will become the new list of additional guests on the room. Therefore if you do not want to remove an additional guest, it must be present (at least the guestId value) in the array.

If the value is not present in the request, the existing list of additional guests will remain. The details of the additional guests will still be validated against the updated reservation details. For example, if the arrivalDate of the reserved rooms is updated, the new value will be validated against the existing additional guests. If the arrivalDate of an existing additional guest is invalid, the request will be rejected.

Notes on guest details in the request

Guests are uniquely identified based on the following (in order): 1) The unique id value of the guest. 2) The combination of the guest's email, firstName, and lastName (case insensitive).

Consider the following guest objects:

{
  "id": 101,
  "primaryPhone": "123456789"
}

{
  "guestContact": {
    "firstName": "John",
    "lastName": "Doe",
    "email": "john.doe@somewhere.com",
  },
  "primaryPhone": "0419111222"
}

The first object will update the guest with the unique id 101. The request will fail if the guest does not exist. Only the primaryPhone of the guest will be updated.

The second object will either create a new guest or update an existing one. If a guest already exists with the firstName "John", lastName "Doe", and email "john.doe@somewhere.com" then that guest will be updated (only the primaryPhone of the guest will be updated). Otherwise a new guest will be created.

If the same guest details appear multiple times in the request, only the details of the first guest are applied. For example, consider the following request data (some details are omitted for simplicity):

{
  "venueId": 13,
  "bookingId": 1413,
  "mainGuest": {
    "guestContact": {
      "firstName": "John",
      "lastName": "Doe",
      "email": "John.Doe@somewhere.com",
      "phone": "12345678",
    },
    "primaryPhone": "12345678"
  },
  "rooms": [
    {
      "guest": {
        "guestContact": {
          "firstName": "John",
          "lastName": "Doe",
          "email": "John.Doe@somewhere.com",
          "phone": "87654321",
        },
        "primaryPhone": "87654321"
      },
      "groupId": 54,
      "arrivalDate": "2019-01-01",
      "departureDate": "2019-01-04"
    },
    {
      "guest": {
        "guestContact": {
          "firstName": "Jane",
          "lastName": "Doe",
          "email": "Jane.Doe@somewhere.com",
          "phone": "123123123",
        },
        "primaryPhone": "123123123"
      },
      "groupId": 55,
      "arrivalDate": "2019-01-01",
      "departureDate": "2019-01-04"
    }
  ]
}

There are 2 unique guests in the above request data: John Doe, and Jane Doe. John Doe appears in the request twice (first as mainGuest and second as the guest on the first room). The details of the first appearance will be used when updating John Doe, therefore the primaryPhone value will be "12345678", not "87654321".

Last updated