v1

latestSwagger 2.02026-07-141993129.2 KB
Bookings

Assign a room to a reservation.

By default this API call assigns a random room, which has the proper room type, is not already assigned to another reservation or has any maintenance status set for the stay period of the underlying reservation. If the arrival date for the underlying reservation is the current business day dirty rooms are excluded by default. For reservation arriving on any latter day the room condition is not taken into account.<br /> By specifiying the room selection criteria in the request body you can influence which room will be assigned. See the request model for further details.<br /> For more details on how the API responds to errors please check our documentation on <a href="https://developer.hetras.com/docs/errors/" onfocus="this.blur()">Error Handling</a>.

post/api/booking/v0/bookings/{confirmationId}/reservations/{reservationNumber}/assign_room

Path parameters

confirmationIdstring required

The confirmation id for the booking the reservation was made.

reservationNumberinteger required

Specifies the reservation number for the reservation the room should be assigned to.

Headers

App-Idstring required

Application identifier

App-Keystring required

Application key.

Request body

amenitiesstring[]

Ensure the assigned room will have all the amenities specified. You can provide a comma seperated list of amenity codes.

condition'CleanNotInspected' | 'Clean' | 'Dirty' | 'Any'

Here you can define to limit the list of assignable rooms based on their current condition. This is only applicable if the underlying reservation is due to arrive on the current business day. If not set by default only clean rooms will be assigned.

include_out_of_serviceboolean

Sometimes you might want to assign rooms which are out of service (small repair needed) if no other rooms are available anymore. If you set include_out_of_service to true even those rooms will be considered. The default is false.

locationsstring[]

Ensure the assigned room will have at least one of the specified locations. You can provide a comma seperated list of location codes.

respect_guest_preferencesboolean

Defines if the preferences for locations, amenities and views of the primary guest should be taken into account. All defined preferences in the guest profile override any of the criteria defined in the request body. The default is false.

room_numberstring

If you define a specific room number this room will be assigned if not assigned to another reservation, has proper room type and is not OutOfOrder or OutOfInventory for the stay duration of the underlying reservaton. If set all other filter criteria will be ignored.

viewsstring[]

Ensure the assigned room will have at least one of the specified views. You can provide a comma seperated list of view codes.

Response

The room assignment was successful. The Reponse would contain the room number assigned.

_warningsstring[]

Warnings that came up when your request was processed. Your request will still be processed successfull when you see such warnings in your response

room_numberstring

The room number assigned