v1

latestSwagger 2.02026-07-141993129.2 KB
Bookings

Create a new booking.

Create a new booking as defined in the requests payload. You can get more information about the payload if you check out the documentation for the reservation request model.<br /> Please also have a look at the <a href="https://developer.hetras.com/docs/tutorials" onfocus="this.blur()">Tutorials</a>.<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

Query parameters

sendConfirmationboolean

Whether to send a confirmation email to the primary guest

Headers

App-Idstring required

Application identifier

App-Keystring required

Application key.

Request body

addonsstring[]

A list of addon service codes that should be booked for all reservations of this booking

adultsinteger

The number of adults per room

arrival_datestring date-time

The arrival date of the guests

channel_codestring

The channel code for this reservation. You can find available channels in the codes for the hotel.

commentstring

The comment you want to add for this reservation

departure_datestring date-time

The departure date of the guests

external_idstring

The external id for this reservation. You can put here your own id used by you or the external system you integrate hetras with

group_codestring

The group code based on which the reservation will be created.

hotel_idinteger required

The id of the hotel this reservation is valid for

payment_method'None' | 'Cash' | 'CreditCard' | 'WireTransfer' | 'ChargeToCompany' | 'Check' | 'Voucher' | 'DebitCard' | 'Token' | 'Miscellaneous' | 'DigitalPayment'

The payment method for this reservation

prepay_discountnumber double

If you create a booking for a rateplan requiring prepayment this amount will be deducted from the booking value before the prepayment will be taken. This feature is useful when the booker redeems a gift voucher and you want to only capture the remaining amount from the guest´s credit card

rate_planstring

The rate plan code this reservation is related to

room_typestring

The room type code this reservation is related to

roomsinteger

The number of rooms this reservation is for. After a multi-room booking is done there will be one reservation in hetras for all rooms. The hotel staff then will split this reservation into one reservation per room to be able to check in the guests

Response

The creation of the booking was successful. You will get back the confirmation id and maybe warnings, if e.g. the prepayment could not be captured.

_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

confirmation_idstring

The confirmation id for the newly created booking which the guest can use to check in on the kiosk, add the booking to the mobile app etc.

reservation_idinteger

The reservation number of the newly created reservation