智能搜索

circle-exclamation

Smart Search(Only For TMC)

post

Advantages of Smart Search:

  • Supports real-time search for booking windows and routes not covered in "Search API".

  • Enhances search result rate and overall coverage.

Points to note:

  • Smart Search will be activated "on demand". Please contact your account manager or sales director if you want this feature to be activated.

  • The ist response will return the results from the cache. if the "smartEnd"=false, send the subsequent requests until if the "smartEnd"=true to get all the results from the LIVE search.

  • Use production endpoint being used for APls other than search APl.

Workflow:

  • Send the "Smart Search" request(called First Request) and receive the response, which includes an ID (requestId) used to identify the entire search process, and may also contain part of the flight data(routings).

  • After receiving the response, if thesmartEnd=false, then send another request (called Subsequent Request) only with therequestId.

  • Follow this flow untilsmartEnd=true. This means that the smart search has been completed.

Endpoint: https://sandbox.atriptech.com/smartSearch.do

Header parameters
AcceptstringRequiredExample: application/json
Content-TypestringRequiredExample: application/json
Accept-EncodingstringRequiredExample: gzip
x-atlas-client-idstringRequiredExample: <YOUR_CLIENT_ID>
x-atlas-client-secretstringRequiredExample: <YOUR_CLIENT_SECRET>
Body
requestIdstringRequired

Only required in Subsequent Request

tripTypestring · enumRequired

The trip type(1=one way or 2=round trip) you want to search

Example: 1Possible values:
adultNuminteger · min: 1 · max: 9Required

Adult passenger count. Please note that the total number of adults(adultNum) and children(childNum) cannot exceed 9.

Default: 0Example: 1
childNuminteger · max: 8Required

Child passenger count. Please note that the total number of adults(adultNum) and children(childNum) cannot exceed 9

Default: 0Example: 0
infantNuminteger · max: 9Required

Infant passenger count, no more than the number of adult

Default: 0Example: 0
fromCitystringRequired

IATA code of the departure city or airport (in capital letters).When the airport code you sent is different from the code of the city where the airport is located, we can recognize that it is an airport, otherwise we will treat it as a city code. We will filter flights based on your departure location type.

Example: LON
toCitystringRequired

IATA code of the arrival city or airport (in capital letters).When the airport code you sent is different from the code of the city where the airport is located, we can recognize that it is an airport, otherwise we will treat it as a city code. We will filter flights based on your departure location type.

Example: PAR
fromAirportstring · nullableOptional

IATA code of the departure airport

Example: AAA
toAirportstring · nullableOptional

IATA code of the arrival airport

Example: AAA
fromDatestring · dateRequired

Departure date, the format is YYYYMMDD

Example: 20251010
retDatestring · date · nullableOptional

Return date, the format is YYYYMMDD. If you are searching for round-trip, the return date is mandatory.

airlinesstring[] · nullableOptional

An array of IATA Codes(in capital letters) of airlines. The result will only contain the airlines specified in the search request.

fromFlightNumbersstring[] · nullableOptional

Search for specified departure flights. Each element represents one flight. Connecting flight numbers are separated by "," (comma). Example:

  • ["FR123"]: A direct flight
  • ["FR456,FR789"]: A connecting flight
  • ["FR123", "FR456,FR789"]: 2 flights, a direct flight and a connecting flight
retFlightNumbersstring[] · nullableOptional

Search for specified return flights. Each element represents one flight. Connecting flight numbers are separated by "," (comma).

includeMultipleFareFamilyboolean · nullableOptional

Search only for the lowest fare or for the Fare Families. By default, each flight only returns the lowest fare, and each array element in the response represents: flight - lowest fare. If this parameter is turned on, each element of the search results will be a combination of flight and one of the fares, that is, different elements will have the same flight but different ticket fare.

Default: false
currencystring · nullableOptional

This is the settlement currency. The 3-letter currency code should be entered. This field is optional, and when you want to settle with Atlas in different currencies (especially when you have opened multiple deposit accounts in different currencies in Atlas), you need to use this parameter.

displayCurrencystring · nullableOptional

The currency for the display fares in response. If no display currency is specified, the display amount will be null.

requestSourcestring · nullableOptional

Identify the source of the search traffic, E.g. Google Flights, Oganic Search, SkyScanner.

syncbooleanOptional

Is smart search synchronized return, default is asynchronous

residentCodestring · nullableOptional

Resident discount code

Responses
chevron-right
200Success
application/json
statusinteger · enumRequired
  • 100: Missing required request data. Description: You should pass the necessary parameters in the HTTP request body.
  • 101: Illegal request data. Description: Check the format of request
  • 102: Illegal request param. Description: Some parameters do not meet the requirements. Please adjust them according to the error message.
  • 105: OD is not in client's round-trip white list. Description: This city pair has not been whitelisted. Check with your account manager if there is a restriction to your account.
  • 106: You are not allowed to search. Description: Check with your account manager if there is a restriction to your account.
  • 107: Insufficient balance. Description: The account balance is below the agreed threshold. Top-up your account on a priority.
  • 108: Route is restricted / System limitations. Description: The airline has flights and quotations, but Atlas has closed sales for some reasons. The reasons can be 1) The sales were manually closed 2) The system has detected a risk of sold out 3) Prohibitions on nearby flights.
  • 109: The number of searches exceeded the limit. Description: The searches per day have exceeded the allowed limit. Check with your account manager if there is a restriction to your account.
  • 110: Too many concurrent requests.. Description: The QPS (Queries Per Second) is higher than the allowed limit. If your business requires more resources, please contact your account manager.
  • 111: Real time search is not allowed. Description: This feature is not activated for your account. Connect with your account manager if you require this service.
  • 112: Timed out. Description: The search request has timed-out. For further details please refer to FAQs --> Atlas API General Information.
  • 113: Airline is under maintenance. Description: Airline is in "Inactive" or "Maintenance" status with Atlas. This does not necessarily mean that there is an issue with the Airline website itself. Wait for the status to change to “active”.
  • 114: No flights present. Description: This may happen when: - The airline does not fly on that date for the searched city pair. Check the airline website to see if the flight is operational for that date.
  • 116: Search data not captured. Description: An error was reported during the search data stoprage at Atlas' end. If this error is not constantly reported, you can try trying again. If the error persists, then it is necessary to contact the account manager.
  • 123: Too many requests but too few paid orders. Description: The service has been blocked as the search requests are too many and the paid orders are very less.
  • 124: Unsupported settlement currency. Description: The settlement currency is different than what is accepted by Atlas. Change the currency to the currency accepted by Atlas for settlement.
  • 126: requestId does not exist or request is already ended. Description:
  • 900: Unauthorized access. Description: Incorrect credentials Or the account status is incorrect Or try to access other customer's data. Check credentials. If the error still persists, contact your account manager.
  • 9999: Inner error. Description: There is a problem or a bug in the system. Contact your account manager.
Possible values:
msgstring · nullableOptional

It serves as an additional description of the response result. Especially when the interface reports an error (status !=0), it is usually a human-readable error message. Note: Do not use this field in any programming scenarios. For example, do not judge whether the interface responds successfully based on this field. Instead, you should only determine it by checking whether the status is equal to0at any time.

requestIdstringRequired

Unique identifier for the search process.

smartEndbooleanRequired

Informing whether the request has been completed. -true: Indicates that the search has ended -false: Indicates that the search is still in progress

post
/smartSearch.do
200Success

Last updated

Was this helpful?