### How to Create a Signature (MD5) Source: https://support.travelpayouts.com/hc/en-us/sections/200989107-Aviasales-flights-search-API/index A guide explaining the process of generating an MD5 signature for authenticating requests made to the Aviasales Flight Search API. ```APIDOC ## How to Create a Signature (MD5) ### Description This guide provides step-by-step instructions on how to create an MD5 signature, which is essential for authenticating your requests to the Aviasales Flight Search API. Proper signature generation ensures secure and valid API interactions. ### Method N/A (Informational) ### Endpoint N/A ### Parameters #### Query Parameters - **Required Parameters**: List of parameters required for signature generation (e.g., origin, destination, dates, partner ID). - **Secret Key**: Your unique secret key provided by Travelpayouts. ### Request Example ``` // Pseudocode for MD5 signature generation const params = { fly_from: 'NYC', fly_to: 'PAR', date_from: '2023-12-01', date_to: '2023-12-31', partner: 12345 }; const secretKey = 'YOUR_SECRET_KEY'; let queryString = Object.keys(params).map(key => `${key}=${params[key]}`).join('&'); const signature = md5(queryString + secretKey); ``` ### Response N/A ### Additional Information Ensure that the parameters used in the signature match exactly those sent in the API request. The order of parameters may also be important. ``` -------------------------------- ### Troubleshooting AJAX Requests Source: https://support.travelpayouts.com/hc/en-us/sections/200989107-Aviasales-flights-search-API/index Explanation and solutions for common issues encountered when making AJAX requests to the Aviasales Flight Search API. ```APIDOC ## Why AJAX Request Does Not Work ### Description This documentation addresses common reasons why AJAX requests to the Aviasales Flight Search API might fail. It provides troubleshooting steps and potential solutions to ensure successful integration. ### Method N/A (Informational) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ### Potential Issues - **CORS Policy**: Ensure your server is configured to handle Cross-Origin Resource Sharing. - **Incorrect Signature**: Verify that the MD5 signature is generated correctly. - **Invalid Parameters**: Check for correct parameter names, formats, and values. - **Network Errors**: Investigate general network connectivity and server status. ``` -------------------------------- ### Aviasales Flights Search API (Old Version) Source: https://support.travelpayouts.com/hc/en-us/sections/200989107-Aviasales-flights-search-API/index Documentation for the previous version of the Aviasales Flights Search API, which provided real-time response capabilities. ```APIDOC ## Aviasales Flights Search API: Old Version ### Description This section provides documentation for the older version of the Aviasales Flights Search API. This version was designed to deliver real-time responses for flight searches. ### Method GET (for the old version) ### Endpoint (Specific endpoint for the old version would be detailed here, e.g., `/api/v1/search`) ### Parameters (Parameters specific to the old version would be listed here, potentially differing from the current version.) ### Request Example (Example request for the old version) ### Response #### Success Response (200) (Structure of the success response for the old version, potentially different from the current version.) #### Response Example (Example response for the old version) ### Note It is recommended to migrate to the latest version of the API for improved features and support. Refer to the main Aviasales Flights Search API documentation for current details. ``` -------------------------------- ### Aviasales Flights Search API Overview Source: https://support.travelpayouts.com/hc/en-us/sections/200989107-Aviasales-flights-search-API/index This API allows you to build flight-search pages, display search results, and create complex flight-related features by accessing real-time flight data from Aviasales. ```APIDOC ## Aviasales Flights Search API ### Description The Aviasales Flights Search API provides real-time and multi-city flight search capabilities. It enables developers to integrate flight search functionality into their applications, display search results, and build advanced travel planning tools. ### Method GET ### Endpoint `/api/v3/search` (Example endpoint, actual endpoint may vary) ### Parameters #### Query Parameters - **fly_from** (string) - Required - Origin airport code or city name. - **fly_to** (string) - Required - Destination airport code or city name. - **date_from** (date) - Required - Start date for the search (YYYY-MM-DD). - **date_to** (date) - Required - End date for the search (YYYY-MM-DD). - **partner** (integer) - Required - Your partner ID. - **signature** (string) - Required - MD5 hash signature for request authentication. ### Request Example ```json { "fly_from": "NYC", "fly_to": "PAR", "date_from": "2023-12-01", "date_to": "2023-12-31", "partner": 12345, "signature": "a1b2c3d4e5f678901234567890abcdef" } ``` ### Response #### Success Response (200) - **data** (array) - An array of flight search results. - **route** (array) - Details of the flight route. - **airlines** (array) - List of airlines operating the flight. - **price** (number) - Price of the flight. - **deep_link** (string) - URL to the flight booking page. #### Response Example ```json { "data": [ { "route": [ { "flight_number": "AA100", "operating_carrier": "AA" } ], "airlines": ["AA"], "price": 500, "deep_link": "https://www.aviasales.com/flights?params..." } ] } ``` ``` -------------------------------- ### Requirements for Aviasales Flight Search API Access Source: https://support.travelpayouts.com/hc/en-us/sections/200989107-Aviasales-flights-search-API/index Information regarding the necessary requirements and prerequisites for gaining access to the Aviasales Flight Search API. ```APIDOC ## Requirements for Aviasales Flight Search API Access ### Description This documentation outlines the specific requirements and conditions that must be met to obtain access to the Aviasales Flight Search API. Please review these carefully before proceeding with integration. ### Method N/A (Informational) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ### Additional Information Refer to the Help Center article for detailed information on access requirements. ``` -------------------------------- ### Aviasales Search API Rules and Limitations Source: https://support.travelpayouts.com/hc/en-us/sections/200989107-Aviasales-flights-search-API/index Details on the rules governing the Aviasales Search API, including limitations on conversion rates and automatic link collection. ```APIDOC ## Why the Search API Rules Limit Conversion Rate and Prohibit Automatic Collection of Links to a Booking ### Description This document outlines the rules and policies associated with the Aviasales Search API. Understanding these rules is crucial for maintaining compliance and ensuring optimal performance and fair usage of the API. It specifically addresses limitations related to conversion rates and the automatic collection of booking links. ### Method N/A (Informational) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ### Key Rules - **Conversion Rate Limits**: Understand the policies that may affect your conversion rate calculations. - **Link Collection Restrictions**: Learn about the prohibition of automatically collecting direct booking links from the API. - **Data Usage Policy**: Adhere to the terms of service regarding the use of Aviasales data. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.