Skip to Content
OpenRoam Docs
Hotels

Get a hotel

Returns one hotel's content: the item that search returns, without `offers`.

GET
/v1/hotels/properties/{id}

Returns one hotel's content: the item that search returns, without offers.

Use it to show a hotel's information: name, description, star rating, address, images, amenities and contact. A hotel has no price without a stay, so the response has no offers key; send the id in a search's searchCriteria.hotelIds for its rates. The route serves the hotels of the OpenRoam catalog, as the catalog files list them. An ID that is unknown, not a hotel ID, or not in the catalog (such as a temporary ID a search gave a hotel outside the catalog) gives 404 / 10004. The route takes no query parameters.

Authorization

PartnerApiKey
headerX-Partner-Key<token>

Partner API Key (X-Partner-Key)

Path Parameters

id*string

The hotel's id (hotel_…) from search or the catalog files.

Response Body

OK

  1. response

One catalog hotel's content, as properties/{id} and the catalog files return it: the search item (Hotel) without offers, because a hotel has no price without a stay. Search its id in searchCriteria.hotelIds for its rates.

id*string

The hotel's stable catalog ID (hotel_…).

name*string

The hotel's name.

countryCode?|

ISO 3166-1 alpha-2 code of the hotel's country; null when it is not known.

category?|

Always null: the property type is not available yet.

logoUrl?|

The hotel's main image, hosted by OpenRoam; null when there is none.

description?|

The stored hotel description, in HTML.

details*

Hotel facts outside the item keys every partner service shares.

Example Request
curl -X GET 'https://api.sandbox.openroam.com/v1/hotels/properties/hotel_q7m2k4t6v3x5z2b4d6f3h5jn2p'
Example Response
{  "id": "string",  "name": "string",  "countryCode": "string",  "category": "string",  "logoUrl": "string",  "description": "string",  "details": {    "starRating": 0,    "address": {      "line1": "string",      "line2": "string",      "city": "string",      "stateProvince": "string",      "postalCode": "string",      "countryCode": "string",      "countryName": "string"    },    "coordinates": {      "latitude": 0.1,      "longitude": 0.1    },    "imageUrls": [      "string"    ],    "amenityGroups": [      {        "key": "string",        "codes": [          "string"        ]      }    ],    "contact": {      "phone": "string",      "email": "string",      "website": "string",      "address": {        "line1": "string",        "line2": "string",        "city": "string",        "stateProvince": "string",        "postalCode": "string",        "countryCode": "string",        "countryName": "string"      }    },    "displayGroup": {      "availableUnitCount": 0,      "bookingRequiresUnitSelection": true    }  }}

Search hotel destinations GET

Finds the places to search hotels in by name: a country, a region, a city or a district. Returns `{ items }`: at most `limit` places whose names match `q`, most relevant first, without paging. Send a place's `id` as `searchCriteria.location.geoNodeId` in a search; it finds the hotels of every place inside it. `name` includes the place's parents, for example "Downtown Dubai, Dubai, United Arab Emirates", and `category` is its level: `country`, `region`, `city` or `area`. Only places where OpenRoam has had hotels are listed. `q` is required: plain text, at most 100 characters, without control characters. `countryCode` keeps the places of one ISO 3166-1 alpha-2 country; `limit` is 1–100 (default 10). An invalid or blank value, or any other query parameter, gives 400 / 10001. 503 / 10007 when the destination index is unavailable or does not answer within 5 seconds: retry.

Quote hotel rates POST

Prices up to 5 searched or quoted rates again with the hotel system and issues a new offer for each. Takes the same body as order, `{ currency, referenceId, items }`, and checks it the same way: the whole body first, so a body error gives 400 / 10001 also when it is in a later item, then each item completely (its inputs, its `publicId`, then a fresh price from the hotel system) before the next, in request order. `inputs` may be left out; when sent, they are checked as the order checks them. The body and every object in it reject an unknown member (400 / 10001). Stay dates and rooms come from the offer and are returned in each item's `details`. Nothing is charged or reserved. Each item returns a new `publicId` for its rate at the current `price` (the whole stay, all rooms and nights): order with it before `details.expiresAt`, which is at most 30 minutes away and never past an expiry the hotel system states. A price that rose since the search is returned with 200; only `inputs.maxPrice` stops a quote, with 409 / 11002 at `items[i].inputs.maxPrice`. `details.availability` is `onRequest` for a rate that is held only on request, which an order refuses with 409 / 11003. Errors name the failing item: a rate that is no longer sold is 409 / 11003, and an unknown, expired or another partner's `publicId`, another product's offer, a hotel's own `id` or an expired search session (search again) is 400 / 11004, each at `items[i]`; input errors (400 / 10001) are at `items[i].inputs…`. Offer and hotel-system failures return their hotel codes without a path: 503 / 21003 when offers are temporarily unavailable, 21007–21009, and 400 / 21010 when the hotel's room layout no longer matches the searched occupancy (search again).