### Flight Offers Search with GET Request Source: https://context7.com/amadeus4dev/amadeus-open-api-specification/llms.txt Shows how to search for flight offers using a GET request with parameters such as origin, destination, dates, and passenger details. Includes an example response with flight offer details. ```bash curl -X GET "https://test.api.amadeus.com/v2/shopping/flight-offers?originLocationCode=SYD&destinationLocationCode=BKK&departureDate=2023-05-02&adults=1&travelClass=ECONOMY&nonStop=false&max=10" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/vnd.amadeus+json" ``` -------------------------------- ### Flight Offers Search with POST Request Source: https://context7.com/amadeus4dev/amadeus-open-api-specification/llms.txt Illustrates a more detailed flight search using a POST request with a JSON payload specifying search criteria such as origin-destination pairs, traveler details, and cabin restrictions. Includes an example response with pricing and flight details. ```bash curl -X POST https://test.api.amadeus.com/v2/shopping/flight-offers \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/vnd.amadeus+json" \ -d '{ "originDestinations": [ { "id": "1", "originLocationCode": "SYD", "destinationLocationCode": "BKK", "departureDateTimeRange": { "date": "2023-05-02" } } ], "travelers": [ { "id": "1", "travelerType": "ADULT" } ], "sources": ["GDS"], "searchCriteria": { "maxFlightOffers": 10, "flightFilters": { "cabinRestrictions": [ { "cabin": "ECONOMY", "coverage": "MOST_SEGMENTS", "originDestinationIds": ["1"] } ] } } }' ``` -------------------------------- ### OAuth2 Authentication with Client Credentials Flow Source: https://context7.com/amadeus4dev/amadeus-open-api-specification/llms.txt Demonstrates how to obtain an access token using the Client Credentials Grant flow, required for all Amadeus API requests. Includes the request format and example response with token details. ```bash curl -X POST https://test.api.amadeus.com/v1/security/oauth2/token \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "grant_type=client_credentials" \ -d "client_id=YOUR_CLIENT_ID" \ -d "client_secret=YOUR_CLIENT_SECRET" ``` -------------------------------- ### Flight Offers Search (GET) Source: https://context7.com/amadeus4dev/amadeus-open-api-specification/llms.txt Search for available flight offers using query parameters for origin, destination, dates, and other criteria. ```APIDOC ## GET /v2/shopping/flight-offers ### Description Search for available flight offers based on origin, destination, dates, and passenger details using GET request parameters. ### Method GET ### Endpoint /v2/shopping/flight-offers ### Parameters #### Query Parameters - **originLocationCode** (string) - Required - The IATA code of the origin airport (e.g., 'SYD'). - **destinationLocationCode** (string) - Required - The IATA code of the destination airport (e.g., 'BKK'). - **departureDate** (string) - Required - The desired departure date in 'YYYY-MM-DD' format. - **adults** (integer) - Optional - The number of adult passengers. Defaults to 1. - **travelClass** (string) - Optional - The preferred travel class (e.g., 'ECONOMY', 'BUSINESS'). Defaults to 'ECONOMY'. - **nonStop** (boolean) - Optional - Whether to only return non-stop flights. Defaults to 'false'. - **max** (integer) - Optional - The maximum number of flight offers to return. Defaults to 10. ### Request Example ```bash curl -X GET "https://test.api.amadeus.com/v2/shopping/flight-offers?originLocationCode=SYD&destinationLocationCode=BKK&departureDate=2023-05-02&adults=1&travelClass=ECONOMY&nonStop=false&max=10" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" ``` ### Response #### Success Response (200) - **data** (array) - An array of flight offer objects. - **price** (object) - Pricing details for the flight offer. - **currency** (string) - The currency code (e.g., 'USD'). - **total** (string) - The total price for the offer. - **travelerPricings** (array) - Pricing breakdown per traveler. #### Response Example (excerpt) ```json { "data": [ { "type": "flight-offer", "id": "1", "source": "GDS", "instantTicketingRequired": false, "nonHomogeneous": false, "lastTicketingDate": "2023-05-01", "price": { "currency": "USD", "total": "567.89", "base": "450.00", "fees": [], "grandTotal": "567.89" }, "pricingOptions": { "fareType": ["PUBLISHED"], "includedCheckedBagsOnly": true }, "validatingAirlineCodes": ["TG"], "travelerPricings": [ { "travelerId": "1", "fareOption": "STANDARD", "travelerType": "ADULT", "price": { "currency": "USD", "total": "567.89", "base": "450.00" } } ] } ] } ``` ``` -------------------------------- ### GET /shopping/activities Source: https://context7.com/amadeus4dev/amadeus-open-api-specification/llms.txt Search for tours and activities available at a specific geographic location. ```APIDOC ## GET /shopping/activities ### Description Search for tours and activities available at a destination based on geographic coordinates. ### Method GET ### Endpoint /v1/shopping/activities ### Parameters #### Query Parameters - **latitude** (number) - Required - The latitude of the desired location. - **longitude** (number) - Required - The longitude of the desired location. - **radius** (number) - Optional - The search radius in kilometers. ### Request Example ```bash curl -X GET "https://test.api.amadeus.com/v1/shopping/activities?latitude=41.397158&longitude=2.160873&radius=1" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/vnd.amadeus+json" ``` ### Response #### Success Response (200) - **data** (array) - A list of available activities. - **type** (string) - The type of the activity. - **id** (string) - The unique identifier for the activity. - **name** (string) - The name of the activity. - **shortDescription** (string) - A brief description of the activity. - **geoCode** (object) - Geographic coordinates of the activity. - **latitude** (number) - Latitude. - **longitude** (number) - Longitude. - **rating** (string) - The user rating of the activity. - **price** (object) - The price of the activity. - **currencyCode** (string) - The currency code (e.g., EUR). - **amount** (string) - The price amount. - **pictures** (array) - An array of URLs for activity pictures. - **bookingLink** (string) - A link to book the activity. #### Response Example ```json { "data": [ { "type": "activity", "id": "23642", "name": "Skip-the-line tickets to Park Güell", "shortDescription": "Book your skip-the-line tickets to Park Güell.", "geoCode": { "latitude": 41.414495, "longitude": 2.152695 }, "rating": "4.5", "price": { "currencyCode": "EUR", "amount": "10.00" }, "pictures": [ "https://images.example.com/park-guell-1.jpg" ], "bookingLink": "https://activities.amadeus.com/23642" } ] } ``` ``` -------------------------------- ### GET /v1/analytics/itinerary-price-metrics Source: https://context7.com/amadeus4dev/amadeus-open-api-specification/llms.txt Analyze historical flight price trends and predictions for specific routes. ```APIDOC ## GET /v1/analytics/itinerary-price-metrics ### Description Analyze historical flight price trends and predictions for specific routes. ### Method GET ### Endpoint /v1/analytics/itinerary-price-metrics ### Parameters #### Query Parameters - **originIataCode** (string) - Required - IATA code of the origin airport (e.g., 'MAD'). - **destinationIataCode** (string) - Required - IATA code of the destination airport (e.g., 'CDG'). - **departureDate** (string) - Required - Departure date in YYYY-MM-DD format (e.g., '2023-05-15'). - **currencyCode** (string) - Required - Currency code (e.g., 'EUR'). ### Request Example ```bash curl -X GET "https://test.api.amadeus.com/v1/analytics/itinerary-price-metrics?originIataCode=MAD&destinationIataCode=CDG&departureDate=2023-05-15¤cyCode=EUR" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/vnd.amadeus+json" ``` ### Response #### Success Response (200) - **data** (array) - An array of itinerary price metrics. - **type** (string) - Type of the data, 'itinerary-price-metric'. - **origin** (object) - Origin airport details. - **iataCode** (string) - IATA code of the origin airport. - **destination** (object) - Destination airport details. - **iataCode** (string) - IATA code of the destination airport. - **departureDate** (string) - Departure date. - **transportType** (string) - Type of transport (e.g., 'FLIGHT'). - **currencyCode** (string) - Currency code. - **oneWay** (boolean) - Indicates if the itinerary is one-way. - **priceMetrics** (array) - Price metrics for the itinerary. - **amount** (string) - The price amount. - **quartileRanking** (string) - The quartile ranking of the price (e.g., 'MINIMUM', 'FIRST', 'MEDIAN', 'THIRD', 'MAXIMUM'). #### Response Example ```json { "data": [ { "type": "itinerary-price-metric", "origin": { "iataCode": "MAD" }, "destination": { "iataCode": "CDG" }, "departureDate": "2023-05-15", "transportType": "FLIGHT", "currencyCode": "EUR", "oneWay": false, "priceMetrics": [ { "amount": "75.00", "quartileRanking": "MINIMUM" }, { "amount": "95.00", "quartileRanking": "FIRST" }, { "amount": "120.00", "quartileRanking": "MEDIAN" }, { "amount": "155.00", "quartileRanking": "THIRD" }, { "amount": "210.00", "quartileRanking": "MAXIMUM" } ] } ] } ``` ``` -------------------------------- ### GET /v3/shopping/hotel-offers Source: https://context7.com/amadeus4dev/amadeus-open-api-specification/llms.txt This endpoint searches for available hotels in a specific city or by hotel IDs, specifying check-in/check-out dates, number of adults, room quantity, and currency. It returns hotel offers with pricing and availability details. Authentication is required via Bearer token. ```APIDOC ## GET /v3/shopping/hotel-offers ### Description Search for available hotels in a specific city with check-in/check-out dates and guest details. ### Method GET ### Endpoint /v3/shopping/hotel-offers ### Parameters #### Path Parameters None #### Query Parameters - **hotelIds** (string) - Optional - Comma-separated hotel IDs (e.g., RTLON338). - **adults** (integer) - Required - Number of adults (e.g., 1). - **checkInDate** (string) - Required - Check-in date in YYYY-MM-DD format. - **checkOutDate** (string) - Required - Check-out date in YYYY-MM-DD format. - **roomQuantity** (integer) - Required - Number of rooms (e.g., 1). - **currency** (string) - Optional - Currency code (e.g., EUR). #### Request Body None ### Request Example None (query parameters used) ### Response #### Success Response (200) Response structure not provided in source; typically includes hotel offers with details like name, price, and availability. #### Response Example Not available in provided documentation. ``` -------------------------------- ### GET /airport/predictions/on-time Source: https://context7.com/amadeus4dev/amadeus-open-api-specification/llms.txt Retrieve on-time performance statistics for specific airports based on airport code and date. ```APIDOC ## GET /airport/predictions/on-time ### Description Retrieve on-time performance statistics for specific airports. ### Method GET ### Endpoint /v1/airport/predictions/on-time ### Parameters #### Query Parameters - **airportCode** (string) - Required - The IATA airport code (e.g., JFK). - **date** (string) - Required - The date for which to retrieve on-time performance (YYYY-MM-DD). ### Request Example ```bash curl -X GET "https://test.api.amadeus.com/v1/airport/predictions/on-time?airportCode=JFK&date=2023-05-15" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/vnd.amadeus+json" ``` ### Response #### Success Response (200) - **data** (object) - Contains the prediction result. - **type** (string) - The type of prediction. - **subType** (string) - The sub-type of prediction. - **id** (string) - The unique identifier for the prediction. - **result** (object) - The on-time performance result. - **category** (string) - The on-time performance category (e.g., ON_TIME). - **probability** (string) - The probability of the category. #### Response Example ```json { "data": { "type": "prediction", "subType": "on-time", "id": "JFK20230515", "result": { "category": "ON-TIME", "probability": "0.7842" } } } ``` ``` -------------------------------- ### GET /v1/reference-data/locations Source: https://context7.com/amadeus4dev/amadeus-open-api-specification/llms.txt This endpoint searches for airports and cities using keywords with autocomplete support. It allows filtering by subType like AIRPORT or CITY, pagination, sorting, and view options. Returns a list of locations with details like IATA codes, geo coordinates, and analytics scores. ```APIDOC ## GET /v1/reference-data/locations ### Description Find airports and cities by keyword with autocomplete functionality. ### Method GET ### Endpoint /v1/reference-data/locations ### Parameters #### Path Parameters None #### Query Parameters - **subType** (string) - Required - Comma-separated values like AIRPORT,CITY. - **keyword** (string) - Required - Search keyword (e.g., MUC). - **page[limit]** (integer) - Optional - Number of results per page (default 10). - **page[offset]** (integer) - Optional - Offset for pagination (default 0). - **sort** (string) - Optional - Sort by analytics.travelers.score. - **view** (string) - Optional - Set to FULL for detailed response. #### Request Body None ### Request Example None (query parameters used) ### Response #### Success Response (200) - **meta** (object) - Pagination info with count and links. - **data** (array) - Array of location objects with type, subType, name, id, iataCode, geoCode, address, and analytics. #### Response Example { "meta": { "count": 10, "links": { "self": "https://test.api.amadeus.com/v1/reference-data/locations?..." } }, "data": [ { "type": "location", "subType": "AIRPORT", "name": "MUNICH INTERNATIONAL", "detailedName": "MUNICH/DE:MUNICH INTERNATIONAL", "id": "CMUC", "self": { "href": "https://test.api.amadeus.com/v1/reference-data/locations/CMUC", "methods": ["GET"] }, "timeZoneOffset": "+02:00", "iataCode": "MUC", "geoCode": { "latitude": 48.35378, "longitude": 11.78609 }, "address": { "cityName": "MUNICH", "cityCode": "MUC", "countryName": "GERMANY", "countryCode": "DE", "regionCode": "EUROP" }, "analytics": { "travelers": { "score": 27 } } } ] } ``` -------------------------------- ### Create Hotel Booking with Amadeus API Source: https://context7.com/amadeus4dev/amadeus-open-api-specification/llms.txt Books a hotel room by creating an order with guest information and payment details. Requires a valid access token and specific guest, room, and payment information. Returns booking confirmation with hotel booking ID and status. ```bash curl -X POST https://test.api.amadeus.com/v2/booking/hotel-orders \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/vnd.amadeus+json" \ -d '{ "data": { "type": "hotel-order", "guests": [ { "tid": 1, "title": "MR", "firstName": "JOHN", "lastName": "SMITH", "phone": "+15551234567", "email": "john.smith@example.com" } ], "travelAgent": { "contact": { "email": "agent@example.com" } }, "roomAssociations": [ { "guestReferences": [ { "guestReference": "1" } ], "hotelOfferId": "ABC123DEF456" } ], "payment": { "method": "CREDIT_CARD", "card": { "vendorCode": "VI", "cardNumber": "4111111111111111", "expiryDate": "2025-12", "holderName": "JOHN SMITH" } } } }' ``` -------------------------------- ### POST /v2/booking/hotel-orders Source: https://context7.com/amadeus4dev/amadeus-open-api-specification/llms.txt Book a hotel room by creating an order with guest information and payment details. ```APIDOC ## POST /v2/booking/hotel-orders ### Description Book a hotel room by creating an order with guest information and payment details. ### Method POST ### Endpoint /v2/booking/hotel-orders ### Parameters #### Request Body - **data** (object) - Required - Hotel order details. - **type** (string) - Required - Type of the order, should be 'hotel-order'. - **guests** (array) - Required - List of guests. - **tid** (integer) - Required - Guest sequence number. - **title** (string) - Required - Guest title (e.g., 'MR', 'MS'). - **firstName** (string) - Required - Guest first name. - **lastName** (string) - Required - Guest last name. - **phone** (string) - Optional - Guest phone number. - **email** (string) - Optional - Guest email address. - **travelAgent** (object) - Optional - Travel agent details. - **contact** (object) - Required - Travel agent contact information. - **email** (string) - Required - Travel agent email address. - **roomAssociations** (array) - Required - Associations between guests and hotel offers. - **guestReferences** (array) - Required - References to guests. - **guestReference** (string) - Required - Reference to a guest. - **hotelOfferId** (string) - Required - ID of the hotel offer. - **payment** (object) - Required - Payment details. - **method** (string) - Required - Payment method (e.g., 'CREDIT_CARD'). - **card** (object) - Required if method is 'CREDIT_CARD' - Credit card details. - **vendorCode** (string) - Required - Credit card vendor code (e.g., 'VI'). - **cardNumber** (string) - Required - Credit card number. - **expiryDate** (string) - Required - Expiry date in YYYY-MM format. - **holderName** (string) - Required - Name of the cardholder. ### Request Example ```json { "data": { "type": "hotel-order", "guests": [ { "tid": 1, "title": "MR", "firstName": "JOHN", "lastName": "SMITH", "phone": "+15551234567", "email": "john.smith@example.com" } ], "travelAgent": { "contact": { "email": "agent@example.com" } }, "roomAssociations": [ { "guestReferences": [ { "guestReference": "1" } ], "hotelOfferId": "ABC123DEF456" } ], "payment": { "method": "CREDIT_CARD", "card": { "vendorCode": "VI", "cardNumber": "4111111111111111", "expiryDate": "2025-12", "holderName": "JOHN SMITH" } } } } ``` ### Response #### Success Response (200) - **data** (object) - Hotel order confirmation details. - **type** (string) - Type of the response, 'hotel-order'. - **id** (string) - Unique identifier for the hotel order. - **hotelBookings** (array) - Details of the confirmed hotel bookings. - **type** (string) - Type of the booking, 'hotel-booking'. - **id** (string) - Unique identifier for the hotel booking. - **bookingStatus** (string) - Status of the booking (e.g., 'CONFIRMED'). - **hotelProviderInformation** (array) - Information from the hotel provider. - **hotelProviderCode** (string) - Code of the hotel provider. - **confirmationNumber** (string) - Confirmation number from the provider. - **roomAssociations** (array) - Associations between hotel offers and guest references. - **hotelOfferId** (string) - ID of the hotel offer. - **guestReferences** (array) - References to guests. - **guestReference** (string) - Reference to a guest. - **hotelOffer** (object) - Details of the booked hotel offer. - **id** (string) - ID of the hotel offer. - **type** (string) - Type of the offer, 'hotel-offer'. - **checkInDate** (string) - Check-in date. - **checkOutDate** (string) - Check-out date. - **guests** (object) - Guest information for the offer. - **adults** (integer) - Number of adults. - **price** (object) - Price details. - **currency** (string) - Currency code. - **base** (string) - Base price. - **total** (string) - Total price. - **sellingTotal** (string) - Selling total price. - **guests** (array) - List of guests associated with the order. - **tid** (integer) - Guest sequence number. - **title** (string) - Guest title. - **firstName** (string) - Guest first name. - **lastName** (string) - Guest last name. #### Response Example ```json { "data": { "type": "hotel-order", "id": "V0g2VFJaLzIwMjQtMDYtMDc=", "hotelBookings": [ { "type": "hotel-booking", "id": "MS44OTkyMjcxMC85MDIyNDU0OQ==", "bookingStatus": "CONFIRMED", "hotelProviderInformation": [ { "hotelProviderCode": "AR", "confirmationNumber": "89922710" } ], "roomAssociations": [ { "hotelOfferId": "ABC123DEF456", "guestReferences": [ { "guestReference": "1" } ] } ], "hotelOffer": { "id": "ABC123DEF456", "type": "hotel-offer", "checkInDate": "2024-06-07", "checkOutDate": "2024-06-08", "guests": { "adults": 1 }, "price": { "currency": "EUR", "base": "195.50", "total": "215.05", "sellingTotal": "215.05" } } } ], "guests": [ { "tid": 1, "title": "MR", "firstName": "JOHN", "lastName": "SMITH" } ] } } ``` ``` -------------------------------- ### Create Flight Order using Amadeus API (Bash) Source: https://context7.com/amadeus4dev/amadeus-open-api-specification/llms.txt This endpoint books a flight by submitting passenger details, flight offers, and contact information in a JSON payload. It requires an access token for authentication and operates in the test environment. Inputs include itinerary segments, pricing, and traveler documents; outputs a flight order ID and associated records. Limitations include mandatory fields like departure/arrival codes and potential queuing in GDS systems. ```bash curl -X POST https://test.api.amadeus.com/v1/booking/flight-orders \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/vnd.amadeus+json" \ -d '{ "data": { "type": "flight-order", "flightOffers": [ { "type": "flight-offer", "id": "1", "source": "GDS", "instantTicketingRequired": false, "nonHomogeneous": false, "paymentCardRequired": false, "lastTicketingDate": "2023-05-01", "itineraries": [ { "segments": [ { "departure": { "iataCode": "SYD", "at": "2023-05-02T10:00:00" }, "arrival": { "iataCode": "BKK", "at": "2023-05-02T16:30:00" }, "carrierCode": "TG", "number": "476", "aircraft": {"code": "77W"}, "duration": "PT9H30M" } ] } ], "price": { "currency": "USD", "total": "567.89", "base": "450.00" }, "travelerPricings": [ { "travelerId": "1", "fareOption": "STANDARD", "travelerType": "ADULT" } ] } ], "travelers": [ { "id": "1", "dateOfBirth": "1990-01-15", "name": { "firstName": "JOHN", "lastName": "SMITH" }, "gender": "MALE", "contact": { "emailAddress": "john.smith@example.com", "phones": [ { "deviceType": "MOBILE", "countryCallingCode": "1", "number": "5551234567" } ] }, "documents": [ { "documentType": "PASSPORT", "birthPlace": "New York", "issuanceLocation": "New York", "issuanceDate": "2015-04-14", "number": "00000000", "expiryDate": "2025-04-14", "issuanceCountry": "US", "validityCountry": "US", "nationality": "US", "holder": true } ] } ] } }' ``` -------------------------------- ### Search Hotels using Amadeus API (Bash) Source: https://context7.com/amadeus4dev/amadeus-open-api-specification/llms.txt This endpoint queries available hotel offers in a city by specifying hotel IDs, dates, and guest counts. Authentication via access token is required in the test environment. Inputs cover check-in/out dates, adults, room quantity, and currency; outputs hotel offers with pricing and availability. Limitations include dependency on specific hotel IDs and date range constraints. ```bash curl -X GET "https://test.api.amadeus.com/v3/shopping/hotel-offers?hotelIds=RTLON338&adults=1&checkInDate=2024-06-07&checkOutDate=2024-06-08&roomQuantity=1¤cy=EUR" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/vnd.amadeus+json" ``` -------------------------------- ### Flight Offers Search (POST) Source: https://context7.com/amadeus4dev/amadeus-open-api-specification/llms.txt Search for available flight offers using a JSON request body for more detailed search criteria. ```APIDOC ## POST /v2/shopping/flight-offers ### Description Search for available flight offers using a JSON request body for detailed search criteria, including origin-destination pairs, traveler information, and specific search constraints. ### Method POST ### Endpoint /v2/shopping/flight-offers ### Parameters #### Request Body - **originDestinations** (array) - Required - An array of objects defining origin and destination pairs and departure date/time ranges. - **id** (string) - Required - Identifier for the origin-destination pair. - **originLocationCode** (string) - Required - IATA code of the origin airport. - **destinationLocationCode** (string) - Required - IATA code of the destination airport. - **departureDateTimeRange** (object) - Optional - Range for departure date and time. - **date** (string) - Required - The departure date in 'YYYY-MM-DD' format. - **travelers** (array) - Required - An array of traveler objects. - **id** (string) - Required - Identifier for the traveler. - **travelerType** (string) - Required - Type of traveler (e.g., 'ADULT', 'CHILD'). - **sources** (array) - Required - An array of data sources to query (e.g., ['GDS']). - **searchCriteria** (object) - Optional - Criteria to filter flight offers. - **maxFlightOffers** (integer) - Optional - Maximum number of flight offers to return. - **flightFilters** (object) - Optional - Filters for flight characteristics. - **cabinRestrictions** (array) - Optional - Restrictions for cabin class. - **cabin** (string) - Required - The cabin class (e.g., 'ECONOMY'). - **coverage** (string) - Required - Coverage scope (e.g., 'MOST_SEGMENTS'). - **originDestinationIds** (array) - Required - IDs of origin-destination pairs this restriction applies to. ### Request Example ```bash curl -X POST https://test.api.amadeus.com/v2/shopping/flight-offers \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/vnd.amadeus+json" \ -d '{ "originDestinations": [ { "id": "1", "originLocationCode": "SYD", "destinationLocationCode": "BKK", "departureDateTimeRange": { "date": "2023-05-02" } } ], "travelers": [ { "id": "1", "travelerType": "ADULT" } ], "sources": ["GDS"], "searchCriteria": { "maxFlightOffers": 10, "flightFilters": { "cabinRestrictions": [ { "cabin": "ECONOMY", "coverage": "MOST_SEGMENTS", "originDestinationIds": ["1"] } ] } } }' ``` ### Response #### Success Response (200) - **data** (array) - An array of flight offer objects. - **price** (object) - Pricing details for the flight offer. - **currency** (string) - The currency code (e.g., 'USD'). - **total** (string) - The total price for the offer. - **travelerPricings** (array) - Pricing breakdown per traveler. #### Response Example (excerpt) ```json { "data": [ { "type": "flight-offer", "id": "1", "source": "GDS", "instantTicketingRequired": false, "nonHomogeneous": false, "lastTicketingDate": "2023-05-01", "price": { "currency": "USD", "total": "567.89", "base": "450.00", "fees": [], "grandTotal": "567.89" }, "pricingOptions": { "fareType": ["PUBLISHED"], "includedCheckedBagsOnly": true }, "validatingAirlineCodes": ["TG"], "travelerPricings": [ { "travelerId": "1", "fareOption": "STANDARD", "travelerType": "ADULT", "price": { "currency": "USD", "total": "567.89", "base": "450.00" } } ] } ] } ``` ``` -------------------------------- ### POST /v1/booking/flight-orders Source: https://context7.com/amadeus4dev/amadeus-open-api-specification/llms.txt This endpoint creates a flight order by submitting passenger details, flight offers, and payment information to book a flight. It requires authentication and uses a JSON payload structured with flight offers and traveler data. Successful calls return the order ID and associated details. ```APIDOC ## POST /v1/booking/flight-orders ### Description Book a flight by creating an order with passenger details and payment information. ### Method POST ### Endpoint /v1/booking/flight-orders ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **data** (object) - Required - Contains flight-order type, flightOffers array, and travelers array. - **type** (string) - Required - Set to "flight-order". - **flightOffers** (array) - Required - Array of flight-offer objects with itineraries, price, and travelerPricings. - **travelers** (array) - Required - Array of traveler objects with id, dateOfBirth, name, gender, contact, and documents. ### Request Example { "data": { "type": "flight-order", "flightOffers": [ { "type": "flight-offer", "id": "1", "source": "GDS", "instantTicketingRequired": false, "nonHomogeneous": false, "paymentCardRequired": false, "lastTicketingDate": "2023-05-01", "itineraries": [ { "segments": [ { "departure": { "iataCode": "SYD", "at": "2023-05-02T10:00:00" }, "arrival": { "iataCode": "BKK", "at": "2023-05-02T16:30:00" }, "carrierCode": "TG", "number": "476", "aircraft": {"code": "77W"}, "duration": "PT9H30M" } ] } ], "price": { "currency": "USD", "total": "567.89", "base": "450.00" }, "travelerPricings": [ { "travelerId": "1", "fareOption": "STANDARD", "travelerType": "ADULT" } ] } ], "travelers": [ { "id": "1", "dateOfBirth": "1990-01-15", "name": { "firstName": "JOHN", "lastName": "SMITH" }, "gender": "MALE", "contact": { "emailAddress": "john.smith@example.com", "phones": [ { "deviceType": "MOBILE", "countryCallingCode": "1", "number": "5551234567" } ] }, "documents": [ { "documentType": "PASSPORT", "birthPlace": "New York", "issuanceLocation": "New York", "issuanceDate": "2015-04-14", "number": "00000000", "expiryDate": "2025-04-14", "issuanceCountry": "US", "validityCountry": "US", "nationality": "US", "holder": true } ] } ] } } ### Response #### Success Response (200) - **data** (object) - Flight order details including type, id, queuingOfficeId, associatedRecords, and travelers. #### Response Example { "data": { "type": "flight-order", "id": "eJzTd9f3NjIJdzUGAAp%2fAiY=", "queuingOfficeId": "NCE1A0950", "associatedRecords": [ { "reference": "QJ5D5K", "creationDate": "2023-04-15T00:00:00.000", "originSystemCode": "GDS", "flightOfferId": "1" } ], "travelers": [ { "id": "1", "dateOfBirth": "1990-01-15", "name": { "firstName": "JOHN", "lastName": "SMITH" } } ] } } ``` -------------------------------- ### Search Airports and Cities using Amadeus API (Bash) Source: https://context7.com/amadeus4dev/amadeus-open-api-specification/llms.txt This endpoint retrieves airports and cities matching a keyword with autocomplete, sorted by traveler analytics. It requires an access token and supports pagination via limit and offset parameters. Inputs include keyword, subType (AIRPORT,CITY), and view (FULL); outputs location details like IATA codes, geo coordinates, and addresses. Limitations apply to test environment and maximum page limits. ```bash curl -X GET "https://test.api.amadeus.com/v1/reference-data/locations?subType=AIRPORT,CITY&keyword=MUC&page[limit]=10&page[offset]=0&sort=analytics.travelers.score&view=FULL" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/vnd.amadeus+json" ``` -------------------------------- ### Analyze Flight Price Trends with Amadeus API Source: https://context7.com/amadeus4dev/amadeus-open-api-specification/llms.txt Retrieves historical flight price metrics and predictions for specific routes. Requires origin/destination IATA codes, departure date, and currency code. Returns price quartiles including minimum, first, median, third, and maximum prices. ```bash curl -X GET "https://test.api.amadeus.com/v1/analytics/itinerary-price-metrics?originIataCode=MAD&destinationIataCode=CDG&departureDate=2023-05-15¤cyCode=EUR" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/vnd.amadeus+json" ``` -------------------------------- ### OAuth2 Authentication Source: https://context7.com/amadeus4dev/amadeus-open-api-specification/llms.txt Obtain access tokens using the Client Credentials Grant flow. This token is required for all subsequent Amadeus API requests. ```APIDOC ## POST /v1/security/oauth2/token ### Description Obtain access tokens using the Client Credentials Grant flow required for all Amadeus API requests. ### Method POST ### Endpoint /v1/security/oauth2/token ### Parameters #### Query Parameters - **grant_type** (string) - Required - The grant type for the request, typically 'client_credentials'. - **client_id** (string) - Required - Your application's client ID. - **client_secret** (string) - Required - Your application's client secret. ### Request Example ```bash curl -X POST https://test.api.amadeus.com/v1/security/oauth2/token \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "grant_type=client_credentials" \ -d "client_id=YOUR_CLIENT_ID" \ -d "client_secret=YOUR_CLIENT_SECRET" ``` ### Response #### Success Response (200) - **access_token** (string) - The obtained Bearer token. - **expires_in** (integer) - The token's expiration time in seconds. - **token_type** (string) - The type of token, usually 'Bearer'. #### Response Example ```json { "type": "amadeusOAuth2Token", "username": "your_username", "application_name": "your_app", "client_id": "YOUR_CLIENT_ID", "token_type": "Bearer", "access_token": "AnT9efPbzZqFqVl2Yj...", "expires_in": 1799, "state": "approved" } ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.