Add or Update Booking Room Reservation
post
[PlatformAddress]
/api/1.0/venue?action=addOrUpdateBookingRoomReservation
Add or Update Booking Room Reservation

Booking Room Reservation

Property
Type
Required
Description
id
integer
optional
The unique id of the room reservation to update - a new room reservation will be created if this parameter is not present
venueId
integer
required
The unique id of the venue to which the booking belongs
bookingId
integer
required
The unique id of the booking to which the room reservation belongs
canBeEdited
boolean
optional
Whether or not updates to the booking room reservation are allowed
mainGuest
Guest
required on add, optional on update
Details of the main guest of the room reservation
rooms
array of Reserved Rooms
required on add, optional on update
Details of the individually reserved rooms on the reservation
removeRooms
array of integers
optional
The unique id of the individual rooms to remove from an existing reservation

Reserved Room

Property
Type
Required
Description
id
integer
optional
The unique id of the individual reserved room on the reservation to update. Omit this to create a new room on the reservation
guest
Guest
required on add, optional on update
Details of the guest on the individual reservation room
groupId
integer
required on add, optional on update
The unique id of the accommodation group from which the room is reserved
arrivalDate
date
required on add, optional on update
The arrival date of the reserved room
departureDate
date
required on add, optional on update
The departure date of the reserved room
excludedTaxIds
array of integers
optional
The unique ids of the taxes that are excluded from the daily rates
numAdultGuests
integer
required on add, optional on update
The number of adults on the reserved room. The value cannot exceed 10
numChildGuests
integer
required on add, optional on update
The number of children on the reserved room. The value cannot exceed 10
dayRates
array of Day Rates
required on add, optional on update
The daily rates of the reserved room
additionalGuests
array of Additional Guests
optional
The additional guests of the reserved room
overrideBlockCapacity
boolean
optional
Whether or not the reservations can exceed the block capacity
externalReference
text
optional
External system identifier for this reserved room. eg. PMS ID. Allowed max length is 254 Characters.
occType
integer
optional
The occupancy type of the reserverd room. See Occupancy Type

Reserved Room Day Rates

Property
Type
Required
Description
dayDate
date
required
The date of the reserved room to which the rate applies
cost
number
required
The rate amount for the reserved room on dayDate. The amount either includes or excludes tax depending on how the venue is configured

Reserved Room Additional Guests

Property
Type
Required
Description
Text
guestId
integer
required when guest is not set
The identifier of guest being updated on the reserved room
guest
Guest
required when guestId is not set
The additional guest details for the reserved room
arrivalDate
date
optional
The arrival date of the additional guest
departureDate
date
optional
The departure date of the additional guest
guestType
enum
optional (required for new guests)
The sharing type of additional guest. See Additional Guest Type

Guest

Property
Type
Required
Description
id
integer
optional
The unique id of the venue guest to update
contact
Contact
required on add, optional on update
The contact details of the guest
primaryPhone
string
optional
The primary phone number of the guest
address
Address
optional
The address of the guest

Guest Contact Details

Property
Type
Required
Description
firstName
string
required
The first name of the contact
lastName
string
required
The last name of the contact
email
string
required
The email address of the contact
phone
string
optional
The mobile phone number of the contact
groups
array
optional
This is an array of group objects with the ‘groupId’ key.

Additional Guest Type

One of the following values
#
Description
1
Sharer
2
Accompanying

Occupancy Type

One of the following values
#
Description
1
Single
2
Double
3
Triple
4
Quad

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:
1
"rooms": [
2
{
3
"id": 400,
4
"arrivalDate": "2019-01-01",
5
"departureDate": "2019-02-03",
6
"dayRates": [
7
{
8
"dayDate": "2019-01-01",
9
"cost": 100
10
},
11
{
12
"dayDate": "2019-01-02",
13
"cost": 101
14
}
15
]
16
},
17
{
18
"guest": {
19
"id": 301
20
},
21
"groupId": 1,
22
"arrivalDate": "2019-01-01",
23
"departureDate": "2019-02-03",
24
"numAdultGuests": 1,
25
"numChildGuests": 0,
26
"dayRates": [
27
{
28
"dayDate": "2019-01-01",
29
"cost": 100
30
},
31
{
32
"dayDate": "2019-01-02",
33
"cost": 101
34
}
35
]
36
]
Copied!
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:
1
{
2
"id": 101,
3
"primaryPhone": "123456789"
4
}
5
6
{
7
"contact": {
8
"firstName": "John",
9
"lastName": "Doe",
10
"email": "[email protected]",
11
"groups": [{"groupId": 10}],
12
},
13
"primaryPhone": "0419111222"
14
}
Copied!
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 "[email protected]" 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):
1
{
2
"venueId": 13,
3
"bookingId": 1413,
4
"mainGuest": {
5
"contact": {
6
"firstName": "John",
7
"lastName": "Doe",
8
"email": "[email protected]",
9
"phone": "12345678",
10
"groups": [{"groupId": 10}],
11
},
12
"primaryPhone": "12345678"
13
},
14
"rooms": [
15
{
16
"guest": {
17
"contact": {
18
"firstName": "John",
19
"lastName": "Doe",
20
"email": "[email protected]",
21
"phone": "87654321",
22
"groups": [{"groupId": 10}],
23
},
24
"primaryPhone": "87654321"
25
},
26
"groupId": 54,
27
"arrivalDate": "2019-01-01",
28
"departureDate": "2019-01-04"
29
},
30
{
31
"guest": {
32
"contact": {
33
"firstName": "Jane",
34
"lastName": "Doe",
35
"email": "[email protected]",
36
"phone": "123123123",
37
"groups": [{"groupId": 10}],
38
},
39
"primaryPhone": "123123123"
40
},
41
"groupId": 55,
42
"arrivalDate": "2019-01-01",
43
"departureDate": "2019-01-04"
44
}
45
]
46
}
Copied!
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 modified 8d ago