### Initialize Fastlane Setup Source: https://support.travelpayouts.com/hc/en-us/articles/17203770656530-Preparing-to-work-with-the-configuration-file-and-accessing-data-for-iOS Run this command in the project directory to install necessary dependencies like cocoapods, xcodegen, and needle. This is a prerequisite for further configuration. ```bash fastlane initialize ``` -------------------------------- ### Example Transfer Offers Request URL Source: https://support.travelpayouts.com/hc/en-us/articles/360016375920-GetTransfer-API Example URL for making a GET request to retrieve transfer offers. ```url https://gtrbox.org/api/transfers/16456/offers ``` -------------------------------- ### Get Latest Prices Response Example Source: https://support.travelpayouts.com/hc/en-us/articles/203956163-Travel-insights-with-Travelpayouts-Data-API Example JSON response from the get_latest_prices endpoint, showing flight details and ticket price. ```json { "success":true, "data":[{ "show_to_affiliates":true, "origin":"WMI", "destination":"WRO", "depart_date":"2021-12-07", "return_date":"2021-12-13", "number_of_changes":0, "value":1183, "found_at":"2021-09-22T14:08:45+04:00", "distance":-1, "actual":true }] } ``` -------------------------------- ### Example URL for Downloading a Voucher Source: https://support.travelpayouts.com/hc/en-us/articles/360016375920-GetTransfer-API An example URL demonstrating how to request a voucher for a specific transfer. ```HTTP https://gtrbox.org/api/transfers/voucher/13425 ``` -------------------------------- ### Request Example for Weekly Price Matrix Source: https://support.travelpayouts.com/hc/en-us/articles/203956163-Aviasales-Data-API This is an example of an HTTP GET request to the Aviasales API to retrieve a weekly price matrix. It includes parameters for currency, origin, destination, affiliate tracking, and specific departure and return dates. Remember to replace 'PutHereYourToken_' with your actual affiliate token. ```http http://api.travelpayouts.com/v2/prices/week-matrix?currency=usd &origin=BCN&destination=HKT&show_to_affiliates=true&depart_date=2021-09-04&return_date=2021-09-18&token=PutHereYourToken_ ``` -------------------------------- ### Example Airline Logo URL Source: https://support.travelpayouts.com/hc/en-us/articles/203956073-Airline-logos-by-Aviasales An example demonstrating how to specify dimensions for an airline logo. ```url http://img.wway.io/pics/root/UN@png?exar=1&rs=fit:200:200 ``` -------------------------------- ### Get Latest Flight Prices Request Example Source: https://support.travelpayouts.com/hc/en-us/articles/203956163-Aviasales-Data-API This is an example of a GET request to the /v3/get_latest_prices endpoint. It includes common parameters for specifying currency, period type, page, affiliate visibility, sorting, and a placeholder for the API token. ```http http://api.travelpayouts.com/aviasales/v3/get_latest_prices?currency=rub&period_type=year&page=1&show_to_affiliates=true&sorting=price&token=PutYourTokenHere ``` -------------------------------- ### Example with Specific Affiliate Links for Dual Tab Opening Source: https://support.travelpayouts.com/hc/en-us/articles/360018078000-How-to-make-Booking-com-tab-open-automatically This is a practical example demonstrating how to implement the dual-tab opening script with specific affiliate links for Aviasales and Booking.com. Ensure 'Link1' is generated via a deep link form for the desired customer website, and 'Link2' is a Booking.com affiliate link obtained from the deep link creation form. ```html
Link text
``` -------------------------------- ### Example Transfer Prices API Request Source: https://support.travelpayouts.com/hc/en-us/articles/360016375920-GetTransfer-API An example of a GET request to the API, specifying points, passenger count, date, currency, and distance unit. ```http GET /api/route_info?points[]=&points[]=&with_prices=true&pax=2&date_to=2025-11-15T18:30:00+07:00¤cy=USD&distance_unit=km ``` -------------------------------- ### Example app_config.json Structure Source: https://support.travelpayouts.com/hc/en-us/articles/17203938829586-Preparing-to-work-with-the-configuration-file-and-accessing-data-for-Android This JSON file configures various aspects of the application, including base identifiers, display names, API keys, styling, and screen configurations for white-labeling. ```json { "base_configuration": { "identifier": { "android": { "id": "com.travelapp", "versionName" : "1.0.0", "versionCode" : 1 }, "apple": { "id": "superpuper.travel-app", "team_id": "LKREN1N1GZ7", "version": "1.0.0", "build_number": 0 } }, "display_name": { "base": "en", "localized": { "en": "Travel App EN Git", "es": "Travel App ES Git" } } }, "constants": { "host" : "android.superpuper.travel-app", "api_key" : "test_api_key", "policy_url": { "base": "en", "localized": { "en": "https://google.com", "es": "https://www.google.es" } }, "advertising": { "appodeal_api_key": "", "google_admob_app_id": "", "placements": { "air_ticket_placement_interstitial": "", "air_ticket_placement_banner": "", "hotels_placement_interstitial": "", "hotels_placement_banner": "" } }, "feedback_email": "test@test.com", "google_maps_api_key": "your_tocken", "appstore_id": "", "marker": 233601, "client_device_host": "iphone.apartments" }, "style": { "base_color": "#7648C5", "corners_type": "default", "icons_type": "filled", "palette": "lab" }, "info_screen_config": { "items_to_display": [ "favorites", "about_app", "rate_app", "share_app" ], "about_app_info": { "description": { "base": "en", "localized": { "en": "Application description", "es": "Descripción de la aplicación" } }, "developer": { "base": "en", "localized": { "en": "CleverPunpkin Ltd.", "es": "OOO CleverPumpkin" } }, "partner_url": { "base": "en", "localized": { "en": "https://www.google.com", "es": "https://www.google.es" } } } }, "white_label_config": { "screens_to_display": [ { "type": "flights" }, { "type": "hotels" }, { "type": "other", "parameters": { "id": "Other1", "icon": "ic_default_other", "title": { "base": "en", "localized": { "en": "Other", "es": "Otros" } }, "url": { "base": "en", "localized": { "en": "https://www.google.com", "es": "https://www.google.es" } } } }, { "type": "other", "parameters": { "id": "Other2", "icon": "ic_default_other", "title": { "base": "en", "localized": { "en": "Other 2", "es": "Otros 2" } }, "url": { "base": "en", "localized": { "en": "https://www.google.com", "es": "https://www.google.es" } } } } ] } } ``` -------------------------------- ### Autocomplete API Request Example Source: https://support.travelpayouts.com/hc/en-us/articles/360002322572-Autocomplete-API-for-countries-cities-and-airports-by-Aviasales Example GET request to the Aviasales Autocomplete API to search for locations. Specify search term, locale, and types of locations to return. ```HTTP https://autocomplete.travelpayouts.com/places2?locale=en&types[]=airport&types[]=city&term=lond ``` -------------------------------- ### Setup Project with Fastlane Source: https://support.travelpayouts.com/hc/en-us/articles/17203770656530-Preparing-to-work-with-the-configuration-file-and-accessing-data-for-iOS Execute this command to apply changes to your project build, especially after modifying the configuration file. This command may need to be repeated after project changes. ```bash fastlane setup ``` -------------------------------- ### Manual Drive Script Installation Source: https://support.travelpayouts.com/hc/en-us/articles/21844864838290-How-to-install-Drive-on-your-website Copy this code and paste it into the '' section of your website's HTML. Ensure it is placed before any other scripts for optimal loading. ```html ``` -------------------------------- ### Get widget initializations for June 2025 Source: https://support.travelpayouts.com/hc/en-us/articles/360019864079-API-of-affiliate-programs-statistics Filter by date range and event type 'init' to get the number of widget initializations. This example uses 'ge' and 'lt' operators for date filtering. ```json [{"field":"date","op":"ge","value":"2025-06-01"},{"field":"date","op":"lt","value":"2025-07-01"},{"field":"type","op":"eq","value":"init"}] ``` -------------------------------- ### Nearest Places Matrix API Request Example Source: https://support.travelpayouts.com/hc/en-us/articles/203956163-Aviasales-Data-API Example of a GET request to the nearest-places-matrix endpoint to find flight prices between cities closest to BCN and HKT. Includes parameters for currency, origin, destination, affiliate visibility, distance, and limit. ```http https://api.travelpayouts.com/v2/prices/nearest-places-matrix?currency=usd &origin=BCN&destination=HKT&show_to_affiliates=true&distance=1000&limit=5&token=PutHereYourToken_ ``` -------------------------------- ### Example configuration.json for iOS App Source: https://support.travelpayouts.com/hc/en-us/articles/17203770656530-Preparing-to-work-with-the-configuration-file-and-accessing-data-for-iOS This JSON file defines various settings for an iOS application, including base configuration, API keys, styling, and screen display options. It supports localization for display names and URLs. ```json { "base_configuration": { "identifier": { "android": { "id": "com.travelapp", "versionName" : "1.0.0", "versionCode" : 1 }, "apple": { "id": "superpuper.travel-app", "team_id": "ID", "version": "1.0.0", "build_number": 0 } }, "display_name": { "base": "en", "localized": { "en": "Travel App EN Git", "es": "Travel App ES Git" } } }, "constants": { "host" : "ios.superpuper.travel-app", "api_key" : "test_api_key", "policy_url": { "base": "en", "localized": { "en": "https://google.com", "es": "https://www.google.es" } }, "advertising": { "appodeal_api_key": "", "google_admob_app_id": "", "placements": { "air_ticket_placement_interstitial": "", "air_ticket_placement_banner": "", "hotels_placement_interstitial": "", "hotels_placement_banner": "" } }, "feedback_email": "test@test.com", "google_maps_api_key": "token", "appstore_id": "", "marker": marker, "client_device_host": "iphone.apartments" }, "style": { "base_color": "#7648C5", "corners_type": "default", "icons_type": "filled", "palette": "lab" }, "info_screen_config": { "items_to_display": [ "favorites", "about_app", "rate_app", "share_app" ], "about_app_info": { "description": { "base": "en", "localized": { "en": "Application description", "es": "Descripción de la aplicación" } }, "developer": { "base": "en", "localized": { "en": "CleverPunpkin Ltd.", "es": "OOO CleverPumpkin" } }, "partner_url": { "base": "en", "localized": { "en": "https://www.google.com", "es": "https://www.google.es" } } } }, "white_label_config": { "screens_to_display": [ { "type": "flights" }, { "type": "hotels" }, { "type": "other", "parameters": { "id": "Other1", "icon": "ic_default_other", "title": { "base": "en", "localized": { "en": "Other", "es": "Otros" } }, "url": { "base": "en", "localized": { "en": "https://www.google.com", "es": "https://www.google.es" } } } }, { "type": "other", "parameters": { "id": "Other2", "icon": "ic_default_other", "title": { "base": "en", "localized": { "en": "Other 2", "es": "Otros 2" } }, "url": { "base": "en", "localized": { "en": "https://www.google.com", "es": "https://www.google.es" } } } } ] } } ``` -------------------------------- ### Request Example for Flight Tickets by Dates Source: https://support.travelpayouts.com/hc/en-us/articles/203956163-Aviasales-Data-API This example demonstrates how to construct a request URL to the /aviasales/v3/prices_for_dates API. It specifies origin, destination, departure and return months, and other query parameters. ```http https://api.travelpayouts.com/aviasales/v3/prices_for_dates?origin=MAD&destination=BCN&departure_at=2023-07&return_at=2023-08&unique=false&sorting=price&direct=false&cy=usd&limit=30&page=1&one_way=true&token=PutYourTokenHere ``` -------------------------------- ### Request Example for Popular Directions Source: https://support.travelpayouts.com/hc/en-us/articles/203956163-Aviasales-Data-API Construct a GET request to the `get_popular_directions` endpoint with specified parameters to find popular flight routes. ```http http://api.travelpayouts.com/aviasales/v3/get_popular_directions?destination=CDG&locale=ru¤cy=EUR&limit=20&page=1&token=PutYourTokenHere ``` -------------------------------- ### Constructing Data API URL with Language Code Source: https://support.travelpayouts.com/hc/en-us/articles/360018907280-Data-in-json-format To get a link to the required language version of a data file, append the language code to the base URL. This example shows the general format for accessing localized data. ```text http://api.travelpayouts.com/data/en/file-name.json ``` -------------------------------- ### Get Latest Flight Prices Response Example Source: https://support.travelpayouts.com/hc/en-us/articles/203956163-Aviasales-Data-API This JSON structure represents a successful response from the /v3/get_latest_prices endpoint. It includes a success flag and a data array containing details for found flights, such as origin, destination, dates, price, and more. ```json { "success":true, "data":[ { "show_to_affiliates":true, "origin":"WMI", "destination":"WRO", "depart_date":"2021-12-07", "return_date":"2021-12-13", "number_of_changes":0, "value":1183, "found_at":"2021-09-22T14:08:45+04:00", "distance":-1, "actual":true } ] } ``` -------------------------------- ### Example Direct Booking Link Source: https://support.travelpayouts.com/hc/en-us/articles/203956173-Aviasales-Flights-Search-API-real-time-and-multi-city-search This is an example of a direct booking link generated from the API response, including the affiliate marker. ```url https://www.flightnetwork.com/flights/showflight?cid=175&qid=b4efe7e975ff9eee42d420600345160e&utm_source=jetradar&utm_medium=3rdparty&client_ref=fnjtrus_tg2b&utm_campaign=metasearch¤cy=usd&cmpid=3P-CPC-JTR-USA-XXX-FLT-MET-PYP-cg0zkzxavu5c-DIR-XXX-2014-01-28&marker=7uh46i0v2 ``` -------------------------------- ### Example API Request for Flight Prices Source: https://support.travelpayouts.com/hc/en-us/articles/203956153-API-for-mobile-apps This GET request URL demonstrates how to query for flight prices. It includes parameters for origin, date period, direct flights, one-way or round trip, maximum price, visa requirements, and locale. ```http http://map.aviasales.com/prices.json?origin_iata=LON &period=2021-12-01:season&direct=true&one_way=false&price=50000&no_visa=true&schengen=true&need_visa=true&locale=ru&min_trip_duration_in_days=13&max_trip_duration_in_days=15 ```