Create Reservation

Create a reservation (Direct Booking) in Hostex.

Body Params
integer
required

The id of the property for the reservation.

integer
required

The id of the custom channel through which the reservation is booked. See Query Custom Channel for retrieving custom channels.

date
required

The check-in date for the reservation in YYYY-MM-DD format.

date
required

The check-out date for the reservation in YYYY-MM-DD format.

integer

The total number of guests included in the reservation.

string
required

The name of the primary guest.

string

The email address of the primary guest.

string

The mobile phone number of the primary guest.

string
required

The currency code for the reservation amounts. See Supported Currencies for more information.

integer
required

The total rate amount for the reservation.

integer
required

The commission amount for the reservation.

integer
required

The total amount received for the reservation.

integer
required

The identifier for the income method used for the reservation payment. See Query Income methods for retrieving all income methods.

string

Any additional remarks related to the reservation.

string
length ≤ 32
^[A-Za-z0-9]+$

Optional external reservation reference, typically the booking id in your own system. Supplying it makes the create idempotent: within one Hostex account a given channel_id can only ever produce one reservation, so a create that is retried after a timeout cannot result in a duplicate booking. Submitting the same channel_id again returns the existing reservation together with its current status instead of creating another one — check status rather than the HTTP status code, since a replay of a reservation that has since been cancelled also returns 200. The value is stored as the reservation's channel_id and can be queried back through Query Reservations. Uniqueness is scoped to the Hostex account, not to your application or to the custom channel, and a value stays claimed permanently — including after the reservation is cancelled. Letters and digits only — no punctuation of any kind, including hyphens, underscores and dots.

Response

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json