POST/v1/hotels/book

Reservar hotel

Crea una reserva de hotel para habitaciones seleccionadas usando datos del titular, huéspedes, tarifas y estadía.

Crea una reserva de hotel para habitaciones seleccionadas usando datos del titular, huéspedes, tarifas y estadía.

Endpoint

MétodoRutaAuth
POST/v1/hotels/bookAPI key requerida
Headers obligatorios:
HeaderDescripción
AuthorizationBearer <secret_key>. The secret is shown only once when the credential is created.
X-Travelandz-Id<public_key>:<profile_code>. The profile_code is the dp_-prefixed Developer Profile code shown in your dashboard. This binds the request to a profile and credential.
Content-TypeUse application/json for requests with a body.

Esquema del cuerpo de la petición

PropiedadTipoDetallesRequeridoNotas
gdsprovidernumber-
hotelCodestring-
holderobject-
holdername
string-
holderlastName
string-
holderemail
string-
holderlanguage
stringNo-
holderphone
stringNo-
roomsarray-
rooms[]rateKey
string-
rooms[]roomName
string-
rooms[]roomBoard
string-
rooms[]cancellationPolicies
array-
rooms[]cancellationPolicies[]amount
number-
rooms[]cancellationPolicies[]fromDate
string
Format: ISO 8601
-
rooms[]ratePrice
number-
rooms[]priceRangeCurrency
enum
EURUSDCNY
No-
rooms[]priceRangeMinimum
numberNoMinimum of the 25% of the original price of the booking
rooms[]priceRangeMaximum
numberNoMaximum of the 100% of the original price of the booking.
rooms[]passengers
array-
rooms[]passengers[]roomId
number-
rooms[]passengers[]title
enum
mrmsmrsmiss
-
rooms[]passengers[]type
enum
adultchild
-
rooms[]passengers[]name
string-
rooms[]passengers[]lastName
string-
rooms[]passengers[]nationality
string
Format: 2 digits
-
rooms[]passengers[]age
numberNo-
rooms[]passengers[]gender
enum
fm
No-
rooms[]checkIn
string
Format: YYYY-MM-DD
-
rooms[]checkOut
string
Format: YYYY-MM-DD
-
searchBodyobject-
searchBodylanguage
enum
eneszh
NoDefault en
searchBodygdsprovider
number-
searchBodyhotelCode
string-
searchBodycheckIn
string
Format: YYYY-MM-DD
-
searchBodycheckOut
string
Format: YYYY-MM-DD
-
searchBodycountryCode
string
Format: 2 digits
-
searchBodyguestNationality
string
Format: 2 digits
-
searchBodyminRatePrice
numberNo-
searchBodymaxRatePrice
numberNo-
searchBodyrooms
array-
searchBodyrooms[]adults
numberMinimum value: 1, Maximum value: 4
searchBodyrooms[]children
numberNoMinimum value: 0, Maximum value: 4
searchBodyrooms[]childrenAges
array-
searchBodyrooms[]childrenAges[]
number[]-
searchBodycurrency
enum
EURUSDCNY
NoDefault EUR
checkInstring
Format: YYYY-MM-DD
-
checkOutstring
Format: YYYY-MM-DD
-

Respuesta exitosa

Devuelve booking reference, status, provider response and confirmation details when available.

Esquema del cuerpo de la respuesta

PropiedadTipoDetallesRequeridoNotas
bookingReferencestring-
clientReferencestring-

Errores

EstadoCódigoCaso
400unable_to_execute_bookingProvider could not execute the booking.
400-Invalid payload or provider error.
401/403auth codesInvalid credentials.
500-Internal error.