diff --git a/docs/resources/destination-experiences.md b/docs/resources/destination-experiences.md index ab720d41..5612d274 100644 --- a/docs/resources/destination-experiences.md +++ b/docs/resources/destination-experiences.md @@ -2,15 +2,13 @@ With Amadeus Self-Service APIs, you can find data on over two million places and 150,000 activities and show travelers the best things to see and do. In the **Destination Experiences** category, we have two APIs available for that. -!!! information - Our catalogue of [Self-Service APIs](https://developers.amadeus.com/self-service){:target="\_blank"} is currently organised by categories that are different to what you see on this page. - | APIs | Description | |------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------| | [Points of Interest](https://developers.amadeus.com/self-service/category/destination-content/api-doc/points-of-interest/api-reference){:target="\_blank"} | Find the best sights, shops, and restaurants in any city or neighborhood. | | [Tours and Activities](https://developers.amadeus.com/self-service/category/destination-content/api-doc/tours-and-activities/api-reference){:target="\_blank"} | Find the best tours, activities, and tickets in any city or neighborhood. Includes a deep link to book with the provider. | +| [City Search](https://developers.amadeus.com/self-service/category/trip/api-doc/city-search){:target="\_blank"} | Finds cities that match a specific word or string of letters. | -These two APIs have the same behavior. You can search by radius or by a square, and retrieve results by ID. Let's go through them one by one. +The first two APIs have the same behavior. You can search by radius or by a square, and retrieve results by ID. Let's go through them one by one. ## Show Travelers the best sights, shops, and restaurants @@ -178,3 +176,64 @@ Same as [Points of Interest API](https://developers.amadeus.com/self-service/ca ```bash curl https://test.api.amadeus.com/v1/shopping/activities/23642 ``` + +## Find a city by keywords + +If you are unsure of the exact spelling of a city, you can reach out to the [City Search API](https://developers.amadeus.com/self-service/category/trip/api-doc/city-search){:target="\_blank"}. This API uses a keyword, which is a string containing a minimum of 3 and a maximum of 10 characters, to search for a city whose name contains this keyword. It is not critical whether you enter the entire city name or only a part of it. For example, `Paris`, `Par` or `ari` will all return `Paris` in the search results. + +There are two optional parameters to help you make the query more precise - `countryCode` and `max`. The `countryCode` is a string for the ISO 3166 Alpha-2 code of the country where you need to locate a city, for example, `FR` for France. The `max` is an integer that defines the maximum number of search results. + +You can also include a list of airports for each city returned in the search results. To do this, you need to add `AIRPORTS` to the include field, which is an array of strings defining additional resources for your search. + +Let's check out the results for keyword `PAR`. We will limit the search scope to `FR` and the number of results to two. + +```bash +GET https://test.api.amadeus.com/v1/reference-data/locations/cities?countryCode=FR&keyword=PAR&max=2 +``` + +The results are probably rather predictable: + +```json +{ + "meta": { + "count": 2, + "links": { + "self": "https://test.api.amadeus.com/v1/reference-data/locations/cities?countryCode=FR&keyword=PAR&max=2" + } + }, + "data": [ + { + "type": "location", + "subType": "city", + "name": "Paris", + "iataCode": "PAR", + "address": { + "countryCode": "FR", + "stateCode": "FR-75" + }, + "geoCode": { + "latitude": 48.85341, + "longitude": 2.3488 + } + }, + { + "type": "location", + "subType": "city", + "name": "Le Touquet-Paris-Plage", + "iataCode": "LTQ", + "address": { + "countryCode": "FR", + "stateCode": "FR-62" + }, + "geoCode": { + "latitude": 50.52432, + "longitude": 1.58571 + } + } + ] +} +``` + +First of all we see the French capital at the top of the list. The second result refers to the town Le Touquet-Paris-Plage, whose official name contains three letters that match our keyword. If we want to see more results, we can always adjust the `max` number of results. + +The main difference between the [Airport & City Search API](https://developers.amadeus.com/self-service/category/air/api-doc/airport-and-city-search){:target="\_blank"} and [City Search API](https://developers.amadeus.com/self-service/category/trip/api-doc/city-search){:target="\_blank"} is that the [Airport & City Search API](https://developers.amadeus.com/self-service/category/air/api-doc/airport-and-city-search){:target="\_blank"} only shows cities that have an airport, while the [City Search API](https://developers.amadeus.com/self-service/category/trip/api-doc/city-search){:target="\_blank"} retrieves any city that matches a keyword. \ No newline at end of file diff --git a/docs/resources/flights.md b/docs/resources/flights.md index 5634768b..1f812b1f 100644 --- a/docs/resources/flights.md +++ b/docs/resources/flights.md @@ -2,9 +2,6 @@ The **Flights** category contains a wide array of APIs that can help you manage flights, from searching for flight options to actually booking a flight. -!!! information - Our catalogue of [Self-Service APIs](https://developers.amadeus.com/self-service){:target="\_blank"} is currently organised by categories that are different to what you see on this page. - | APIs | Description | |---------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------| | **Flight booking** | diff --git a/docs/resources/hotels.md b/docs/resources/hotels.md index 5b9fac02..e16305c4 100644 --- a/docs/resources/hotels.md +++ b/docs/resources/hotels.md @@ -2,9 +2,6 @@ The **Hotels** category contains APIs that can help you find the right hotel and complete the booking. -!!! information - Our catalogue of [Self-Service APIs](https://developers.amadeus.com/self-service){:target="\_blank"} is currently organised by categories that are different to what you see on this page. - | APIs | Description | |---------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------| | [Hotel List](https://developers.amadeus.com/self-service/category/hotel/api-doc/hotel-list/api-reference){:target="\_blank"} | Returns the name, address, geoCode, and time zone for each hotel bookable in Amadeus. | diff --git a/docs/resources/index.md b/docs/resources/index.md index 3007fdf2..66b82c14 100644 --- a/docs/resources/index.md +++ b/docs/resources/index.md @@ -2,10 +2,11 @@ In this section, you'll discover a comprehensive collection of tutorials for each Self-Service API, organized by their respective categories. These tutorials delve into the typical use cases for each API and offer illustrative examples of parameters, along with clear explanations of their function. -| **Tutorial** | **Coverage** | +| **Tutorial** | **Coverage** | | ----------- | ----------- | -| [Destination Experiences](./destination-experiences.md) | | -| [Flights](./flights.md) | | -| [Hotels](./hotels.md) | | -| [Itinerary Management](./itinerary-managment.md) | | +| [Flights](./flights.md) | | +| [Destination Experiences](./destination-experiences.md) | | +| [Cars and Transfers](./cars-transfers.md) | | | [Market insights](./market-insight.md) | | +| [Hotels](./hotels.md) | | +| [Itinerary Management](./itinerary-managment.md) | | \ No newline at end of file diff --git a/docs/resources/itinerary-managment.md b/docs/resources/itinerary-managment.md index 765e5438..947ffa9a 100644 --- a/docs/resources/itinerary-managment.md +++ b/docs/resources/itinerary-managment.md @@ -2,13 +2,9 @@ In the **Itinerary Management** category, you can give travelers a simple and personalized way to view their itinerary. -!!! information - Our catalogue of [Self-Service APIs](https://developers.amadeus.com/self-service){:target="\_blank"} is currently organised by categories that are different to what you see on this page. - | APIs | Description | |------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------| | [Trip Purpose Prediction](https://developers.amadeus.com/self-service/category/trip/api-doc/trip-purpose-prediction/api-reference){:target="\_blank"} | Analyze a flight itinerary and predict whether the trip is for business or leisure. | -| [City Search](https://developers.amadeus.com/self-service/category/trip/api-doc/city-search){:target="\_blank"} | Finds cities that match a specific word or string of letters. | ## Predict the trip purpose from a flight diff --git a/docs/resources/market-insight.md b/docs/resources/market-insight.md index 7e347082..4793059c 100644 --- a/docs/resources/market-insight.md +++ b/docs/resources/market-insight.md @@ -2,9 +2,6 @@ With Amadeus Self-Service APIs, you can get insights from millions of bookings and our technology partners. In the **Market insights** category, we have four APIs available. -!!! information - Our catalogue of [Self-Service APIs](https://developers.amadeus.com/self-service){:target="\_blank"} is currently organised by categories that are different to what you see on this page. - | APIs | Description | |---------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------| | [Flight Most Traveled Destinations](https://developers.amadeus.com/self-service/category/air/api-doc/flight-most-traveled-destinations/api-reference){:target="\_blank"} | See the top destinations by passenger volume for a given city and month. | diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css index 6a07ac0f..7bc36e4e 100644 --- a/docs/stylesheets/extra.css +++ b/docs/stylesheets/extra.css @@ -8,6 +8,9 @@ .md-header { background-color: #000835; } + /* .md-search__form { + background-color: #C5D5F9; + } */ .md-typeset a { color: #3A8BFF; } diff --git a/mkdocs.yml b/mkdocs.yml index f9a363b0..1a7f8a09 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -121,11 +121,11 @@ nav: - API Tutorials: - resources/index.md - Flights: resources/flights.md - - Hotels: resources/hotels.md - Destination experiences: resources/destination-experiences.md - - Itinerary management: resources/itinerary-managment.md - - Market insights: resources/market-insight.md - Cars and Transfers: resources/cars-transfers.md + - Market insights: resources/market-insight.md + - Hotels: resources/hotels.md + - Itinerary management: resources/itinerary-managment.md - Developer tools: - developer-tools/index.md - Node: developer-tools/node.md