Hermeseus Docs
Legacy docs

Hotel orders

An order is a booking made from a confirmed rate, in two steps. Create it to reserve the room — a preliminary booking that charges and holds nothing. Confirm it to place it: only then is its price held on your wallet and the booking sent to our team. You can also read it, cancel it, and extend its payment deadline.

Lifecycle

statusMeaning
heldPreliminary: the room is reserved until payment_deadline (24 hours after creation). Nothing is charged or held on your wallet. Not confirmed by then, it is cancelled automatically. Cancelling it is immediate.
confirmingConfirmed by you: the price is held on your wallet and our team is booking it. Cancelling is immediate until our team takes it up, then it is a request we review.
confirmedThe booking is confirmed; a voucher and confirmation number are issued.
cancelledThe order was cancelled; any amount held for it is released.

Create an order

POST/v3/HAPI/hotels/orders

Requires the hotels:write scope. Confirm the rate first (confirm a rate) in the same session, or this returns 409 rate_not_revalidated.

Body

FieldTypeRequiredDescription
rate_idstringYesThe confirmed hrt_ id.
roomsarrayYesOne entry per room booked, each with its guests. Repeat a room to book several of the same rate.
rooms[].rate_idstringNoBook this room on another confirmed rate of the same search (another room type). Defaults to rate_id.
rooms[].guests[].given_namestringYesGuest first name.
rooms[].guests[].family_namestringYesGuest last name.
rooms[].guests[].typestringYesadult, child or infant.
rooms[].guests[].titlestringYesmr, mrs, ms, miss or master.
rooms[].guests[].nationalitystringYesThe guest's citizenship, a two-letter ISO 3166-1 country code, for example AE.
rooms[].guests[].national_idstringNoNational ID number.
contact.emailstringYesContact email.
contact.phonestringYesContact phone.
nationalitystringYesThe nationality the rate was searched and priced for, two-letter ISO country code. Each guest's own citizenship goes in rooms[].guests[].nationality.
notestringNoA note for the hotel.
client_referencestringNoYour own reference.
curl -X POST https://api.hermeseus.com/v3/HAPI/hotels/orders \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 5f2b8c1a-3e4d-4a6b-9c7e-1d2f3a4b5c6d" \
  -d '{
    "rate_id": "hrt_Ym9va2FwcDphYmMxMjM",
    "rooms": [
      { "guests": [
        { "given_name": "Jane", "family_name": "Doe", "type": "adult", "title": "ms", "nationality": "US" },
        { "given_name": "John", "family_name": "Doe", "type": "adult", "title": "mr", "nationality": "US" }
      ] },
      { "guests": [
        { "given_name": "Ann", "family_name": "Doe", "type": "adult", "title": "miss", "nationality": "GB" }
      ] }
    ],
    "contact": { "email": "jane@example.com", "phone": "+14155550100" },
    "nationality": "US"
  }'

A missing or invalid guest field returns 422 validation_failed; error.param names the field, for example rooms.0.guests.1.nationality.

Rooms and guests must fit the rates. Each rate's price is for one room for the whole stay, so booking it twice costs twice its total (a rate priced for several rooms together is booked as exactly those rooms). You can book at most available_rooms of a rate. Every room needs an adult and must not exceed its room's capacity (rooms[].adults adults; adults + children guests in all; infants do not count). Confirm every rate you use first. Otherwise the order returns 422 occupancy_mismatch (or 409 rate_not_revalidated) and nothing is held.

Response

{
  "object": "hotel_order",
  "id": "hord_8f3c81d2-4a5b-4c6d-9e0f-1a2b3c4d5e6f",
  "status": "held",
  "payment_deadline": "2026-11-13T20:00:00+00:00",
  "check_in": "2026-11-14",
  "check_out": "2026-11-16",
  "nights": 2,
  "total": { "amount": "360.00", "currency": "USD" },
  "confirmation_number": null,
  "voucher_number": null,
  "hotel_pnr": null,
  "hotel": { /* … */ },
  "contact": { "phone": "+14155550100", "email": "jane@example.com" },
  "rooms": [
    { "name": "Double Room", "adults": 2, "children": 0, "board": "Breakfast included",
      "rate_id": "hrt_Ym9va2FwcDphYmMxMjM", "guests": 2 },
    { "name": "Double Room", "adults": 2, "children": 0, "board": "Breakfast included",
      "rate_id": "hrt_Ym9va2FwcDphYmMxMjM", "guests": 1 }
  ],
  "cancellation": { "non_refundable": false, "policy_text": "…", "policies": [ /* … */ ] }
}
StatusCodeMeaning
409duplicate_bookingAn active order already exists for this rate.
409rate_not_revalidatedConfirm every rate the order uses before ordering.
422validation_failedA required field is missing or invalid; error.param names it.
422occupancy_mismatchThe guests sent for a room exceed its capacity, a room has no adult, or more rooms were booked than are left. Nothing is held.

Read an order

GET/v3/HAPI/hotels/orders/{id}

Requires hotels:read. Returns the hotel_order, with the confirmation and voucher numbers once confirmed.

Confirm the order

POST/v3/HAPI/hotels/orders/{id}/confirm

Requires hotels:write. Places a held order: its price is now held on your wallet and our team books it. Poll the order until it becomes confirmed. Returns 402 insufficient_balance when the wallet's available amount cannot cover the price, and 409 confirm_failed once the payment deadline has passed.

Cancellation

Preview the penalty, then request cancellation.

GET/v3/HAPI/hotels/orders/{id}/cancellation
{
  "object": "hotel_cancellation_quote",
  "order_id": "hord_8f3c81d2-…",
  "penalty": { "amount": "0.00", "currency": "USD" },
  "status": 2,
  "expires_at": "2026-11-13T21:00:00+00:00"
}
POST/v3/HAPI/hotels/orders/{id}/cancellation

Requires hotels:write. A held order, or a confirming order our team has not taken up yet, is cancelled at once ("status": "cancelled") and any held amount is released. Once our team has taken it up, cancellation is a request we review ("status": "pending_review"): the order and its hold stay until we approve it.

{
  "object": "cancellation_request",
  "order_id": "hord_8f3c81d2-…",
  "status": "cancelled",
  "message": "Order cancelled.",
  "requested_at": "2026-10-28T18:03:00+00:00"
}

Extend the payment deadline

POST/v3/HAPI/hotels/orders/{id}/extend-deadline

Requires hotels:write. Gives a held order 24 more hours from now; it never shortens the deadline.

{ "object": "hotel_order", "id": "hord_8f3c81d2-…", "payment_deadline": "2026-11-14T20:00:00+00:00" }