# Hotels

{% hint style="warning" %}
At the moment, you are not able to obtain ARI data from the following Publishers: **Little Hotelier** and **SiteMinder Channel Manager**.
{% endhint %}

## GET /publishers/{publisherCode}/hotels

> Get hotel metadata for a publisher and subscriber

````json
{"openapi":"3.0.2","info":{"title":"SubscriberX Public API","version":"1.0.0"},"servers":[{"url":"/"}],"security":[{"BearerAuthorization":[]}],"components":{"securitySchemes":{"BearerAuthorization":{"type":"apiKey","name":"Authorization","in":"header","description":"This API uses JWT for Authentication/Authorisation (please see [jwt.io](https://jwt.io) for further details).\n\nThe token can be obtained via the [SMX Subscriber Admin portal](https://exchange.siteminder.com).\n\nThe request header must be in the following format (where 'token' is the encoded JWT string):\n```\nAuthorization: Bearer token\n```\n\nThe decoded JWT must include the following claims for it to be accepted by the API:\n* iat - Token issued time\n* jti - ID of the token\n* aud - Audience of the token. This API expects the value to be 'subscriberx/api'.\n* sub - Subject of the token. This API expects the value to be the code of the subscriber.\n\nExample of JWT claims in a decoded token for the subscriber with code 'subscriberCode':\n```\n{\n  'iat': 1576812219,\n  'jti': 'e07f7327-490c-4dd7-8d63-c1bdd1f93001',\n  'aud': 'subscriberx/api',\n  'sub': 'subscriberCode'\n}\n```\n"}},"parameters":{"publisherCodeParam":{"in":"path","name":"publisherCode","description":"Publisher code","required":true,"schema":{"type":"string","minLength":1,"maxLength":50}}},"schemas":{"Hotel":{"type":"object","properties":{"name":{"type":"string","description":"Hotel name"},"code":{"$ref":"#/components/schemas/StringLength1To255ForHotelCode"},"currency":{"type":"string","pattern":"^[A-Z]{3}$","description":"ISO 4217 currency codes for the hotel currency"},"timezone":{"type":"string","description":"IANA time zone database (tz database) value representing timezone for the hotel"},"messageTypes":{"type":"array","items":{"$ref":"#/components/schemas/MessageType"},"description":"Message types supported by the hotel"}},"required":["name","code","currency","timezone","messageTypes"]},"StringLength1To255ForHotelCode":{"allOf":[{"$ref":"#/components/schemas/StringLength1To255"}],"description":"Hotel code"},"StringLength1To255":{"type":"string","description":"Character strings with length 1 to 255","minLength":1,"maxLength":255},"MessageType":{"type":"string","description":"Message types that may be supported by the publisher or hotel","enum":["Reservations","ARI","RateCreate","RateUpdate","RestrictionUpdate"]},"Error":{"type":"object","description":"Contains information on the error encountered","properties":{"message":{"type":"string","description":"Description of the error"},"name":{"type":"string","description":"Name of the error"}}}},"responses":{"NotAuthorised":{"description":"Not Authorised","headers":{"X-SM-REFERENCE-ID":{"description":"The reference ID used for the request","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"}]}}}},"AccessDenied":{"description":"Do not have access to the specified resource","headers":{"X-SM-REFERENCE-ID":{"description":"The reference ID used for the request","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"}]}}}},"NotFound":{"description":"Resource does not exist","headers":{"X-SM-REFERENCE-ID":{"description":"The reference ID used for the request","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"}]}}}},"TooManyRequests":{"description":"Exceeded API quota for the time period","headers":{"X-SM-REFERENCE-ID":{"description":"The reference ID used for the request","schema":{"type":"string"}},"RETRY-AFTER":{"description":"The time in seconds to retry after","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"}]}}}},"InternalServerError":{"description":"Internal Server Error","headers":{"X-SM-REFERENCE-ID":{"description":"The reference ID used for the request","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"}]}}}}}},"paths":{"/publishers/{publisherCode}/hotels":{"get":{"description":"Get hotel metadata for a publisher and subscriber","tags":["Publisher","Subscriber","Metadata"],"parameters":[{"$ref":"#/components/parameters/publisherCodeParam"}],"responses":{"200":{"description":"OK","headers":{"X-SM-REFERENCE-ID":{"description":"The reference ID used for the request","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Hotel"}}}}},"401":{"$ref":"#/components/responses/NotAuthorised"},"403":{"$ref":"#/components/responses/AccessDenied"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
````

{% hint style="success" icon="sparkles" %}

## Still have questions?

Use the <i class="fa-gitbook-assistant">:gitbook-assistant:</i> **Ask** button at the top of the page to chat with our AI assistant — it can help you navigate the guide, understand requirements, and troubleshoot issues.

If you need more support, visit [Integration Support](/integration-support/integration-support.md).
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.siteminder.com/smx-api/reference/availability-and-rates/hotels.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
