Hermeseus

Book a hotel

Hold a room with the validated rate and the guest details.

POST/v2/Hotel/HotelBook

Access requires the permission hotel_book

Book after you validate the rate. Send the guests and a lead contact. The response returns a UniqueId. This is a temporary hold. Nothing is charged yet. Place the order to finalize it.

Two versions. The v1 path /Hotel/HotelBook is the same operation with the same body. New integrations should use the v2 path above.

Path parameters

None.

Query parameters

None.

Body parameters

NameTypeRequiredDescription
SessionIdstringYesYour session id.
FareSourceCodestringYesThe validated code from check rate.
PhoneNumberstringYesLead contact phone.
EmailstringYesLead contact email.
HotelTransfersarrayPresentMust be present. Send [] when there are no transfers.
NationalitystringNoLead guest nationality (ISO country code). Some rates are nationality scoped.
ClientUniqueIdstringNoYour own reference. Usable later in booking data.
NotestringNoFree-text request passed to the property.
Rooms array of object, required

One entry per booked room. The count must match the occupancy you searched.

NameTypeRequiredDescription
Passengersarray of objectYesGuests in the room. Minimum 1.
Passengers[].FirstNamestringYesGiven name.
Passengers[].LastNamestringYesSurname.
Passengers[].PassengerTypeintegerYesGuest type code (adult or child), matched to your search.
Passengers[].PassengerTitleintegerYesTitle code, for example Mr, Mrs, Ms.
Passengers[].NationalIdstringNoNational id where the property needs it.
Passengers[].PassportNumberstringNoPassport number where required.

Request

curl -X POST https://api.hermeseus.com/api/v2/Hotel/HotelBook \
  -H "Content-Type: application/json" \
  -d '{
    "SessionId": "8f3c81d2-4a5b-4c6d-9e0f-1a2b3c4d5e6f",
    "FareSourceCode": "YmE6OTk4MjE6cnI3ZjMy",
    "PhoneNumber": "+441234567890",
    "Email": "traveller@example.com",
    "Nationality": "GB",
    "ClientUniqueId": "hotel-order-0001",
    "Rooms": [
      {
        "Passengers": [
          { "FirstName": "Jane", "LastName": "Doe", "PassengerType": 1, "PassengerTitle": 2 }
        ]
      }
    ],
    "HotelTransfers": []
  }'
const res = await fetch("https://api.hermeseus.com/api/v2/Hotel/HotelBook", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    SessionId: "8f3c81d2-4a5b-4c6d-9e0f-1a2b3c4d5e6f",
    FareSourceCode: "YmE6OTk4MjE6cnI3ZjMy",
    PhoneNumber: "+441234567890",
    Email: "traveller@example.com",
    Nationality: "GB",
    ClientUniqueId: "hotel-order-0001",
    Rooms: [
      { Passengers: [ { FirstName: "Jane", LastName: "Doe", PassengerType: 1, PassengerTitle: 2 } ] }
    ],
    HotelTransfers: []
  })
});

const data = await res.json();
import requests

res = requests.post(
    "https://api.hermeseus.com/api/v2/Hotel/HotelBook",
    json={
        "SessionId": "8f3c81d2-4a5b-4c6d-9e0f-1a2b3c4d5e6f",
        "FareSourceCode": "YmE6OTk4MjE6cnI3ZjMy",
        "PhoneNumber": "+441234567890",
        "Email": "traveller@example.com",
        "Nationality": "GB",
        "ClientUniqueId": "hotel-order-0001",
        "Rooms": [
            {"Passengers": [
                {"FirstName": "Jane", "LastName": "Doe", "PassengerType": 1, "PassengerTitle": 2}
            ]}
        ],
        "HotelTransfers": [],
    },
)

data = res.json()

Response

FieldTypeDescription
Successbooleantrue on success.
UniqueIdstringThe booking id. Carry it into order, tracking, and cancellation.
StatusintegerBooking status. Held, awaiting the order.
Errorobjectnull on success.
{
  "Success": true,
  "UniqueId": "HB-2026-004417",
  "Status": 10,
  "Error": null
}
This is a hold, not a confirmation. Nothing is charged at book. The hold lasts about 15 minutes. Place the order before it lapses.

Errors

CodeMeaningFix
Err0106001A required guest or contact field is missing.Fix the field named in the message.
Err0102003The rate is no longer available.Validate the rate again.