> For the complete documentation index, see [llms.txt](https://docs.phptravels.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.phptravels.com/modules/stays/amadeus.md).

# Amadeus

Amadeus hotels for PHPTRAVELS: connect your Amadeus account to the stays module, enter API credentials, set markups and test hotel search and booking.

### Amadeus hotels in PHPTRAVELS

Amadeus is a global travel distribution system that supplies flight and hotel content through APIs. In the PHPTRAVELS **Stays** module, Amadeus is one hotel supplier among several: its rooms are merged into the same guest search as your own hotels and other APIs, and your markup is added before the price is shown. Amadeus flights are configured separately under [Flights](https://docs.phptravels.com/modules/flights).

### What you need

* An Amadeus account with hotel API access approved for your business. Amadeus decides access and commercial terms.
* The API credentials from your Amadeus account (typically a client ID and client secret), with test keys for setup and production keys once Amadeus approves you. The [Amadeus Enterprise guide](https://docs.phptravels.com/modules/flights/amadeus-entreprise) shows how Amadeus apps and keys are created.
* Admin access to your PHPTRAVELS website.

### Set it up

1. Log in at `yourdomain.com/admin`.
2. Go to **Settings > Modules** and open the **Amadeus** entry for stays.
3. On **General**, enable the module and keep **Dev mode** on development for testing.
4. On **Credentials**, enter your Amadeus keys in the labelled fields. Click **Test** if it is shown, then save.
5. Add your B2C and B2B margin on the **Markup** tab.

### Test it

1. Search hotels in a large city for dates a few weeks out.
2. Check that Amadeus rooms appear with board type and cancellation rules.
3. Make a test booking with the test keys and confirm the voucher and supplier reference.
4. Replace the keys with production ones and switch **Dev mode** to production only when the test booking is correct.

### Common errors

* **Invalid client or token error** -- the key and secret do not match, or test keys are being used in production mode.
* **No hotel results** -- the hotel API is not active on your Amadeus app, or the city has no Amadeus availability for those dates.
* **Rate not available** -- the room sold out between search and booking; search again.

Questions? [Submit a ticket](https://docs.phptravels.com/support/submit-ticket) with your Order ID and the error text.
