---
title: "Smart Search(Only For TMC)"
method: POST
path: "/smartSearch.do"
tags: ["Shopping and Ticketing"]
---

# Smart Search(Only For TMC)

`POST /smartSearch.do`

**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.
* <span style="color:rgb(255, 140, 0)">**Use production endpoint being used for APls other than search APl.**</span>

**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 the`smartEnd`=`false`, then send another request (called **Subsequent Request**) only with the`requestId`.
* Follow this flow until`smartEnd`=`true`. This means that the smart search has been completed. 

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

## Headers

- `Accept` string, required
- `Content-Type` string, required
- `Accept-Encoding` string, required
- `x-atlas-client-id` string, required
- `x-atlas-client-secret` string, required

## Request body

- object
  - `requestId` string, required — Only required in **Subsequent Request**
  - `tripType` '1' | '2', required — The trip type(1=one way or 2=round trip) you want to search
  - `adultNum` integer, required — Adult passenger count. Please note that the total number of adults(`adultNum`) and children(`childNum`) cannot exceed 9.
  - `childNum` integer, required — Child passenger count. Please note that the total number of adults(`adultNum`) and children(`childNum`) cannot exceed 9
  - `infantNum` integer, required — Infant passenger count, no more than the number of adult
  - `fromCity` string, required — 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.
  - `toCity` string, required — 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.
  - `fromAirport` string, nullable — IATA code of the departure airport
  - `toAirport` string, nullable — IATA code of the arrival airport
  - `fromDate` string, date, required — Departure date, the format is `YYYYMMDD`
  - `retDate` string, date, nullable — Return date, the format is `YYYYMMDD`. If you are searching for round-trip, the return date is mandatory.
  - `airlines` string[], nullable — An array of IATA Codes(in capital letters) of airlines. The result will only contain the airlines specified in the search request.
  - `fromFlightNumbers` string[], nullable — 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
  - `retFlightNumbers` string[], nullable — Search for specified return flights. Each element represents one flight. Connecting flight numbers are separated by "`,`" (comma).
  - `includeMultipleFareFamily` boolean, nullable — 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.
  - `currency` string, nullable — 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.
  - `displayCurrency` string, nullable — The currency for the display fares in response. If no display currency is specified, the display amount will be null.
  - `requestSource` string, nullable — Identify the source of the search traffic, E.g. Google Flights, Oganic Search, SkyScanner.
  - `sync` boolean — Is smart search synchronized return, default is asynchronous
  - `residentCode` string, nullable — Resident discount code

## Response `200`

- object
  - `status` 100 | 101 | 102 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 116 | 123 | 124 | 126 | 900 | 9999, required
  - `msg` string — 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 to`0`at any time.
  - `requestId` string, required — Unique identifier for the search process.
  - `smartEnd` boolean, required — Informing whether the request has been completed. -`true`: Indicates that the search has ended -`false`: Indicates that the search is still in progress
  - `routings` Routing[], nullable — The array of the routings include suitable flights and fares.
    - `routingIdentifier` string, required — This unique string identifier is used to verify requests for a particular route. **Note:** Has a certain validity period (generally not exceeding 6 hours).
    - `supportCreditTransPayment` '0' | '1', required — This tag is used to identify if the fare is support to be paid using the client's credit card(known as vcc passthrough). This field has been deprecated, please use `supportPaymentMethods` instead.
    - `supportPaymentMethods` PaymentMethod[], required — Support payment methods for this fare. If payment is not supported in any way, this will be `null`or`[]`. Each item in this array is one of the following: - 1: deposit - 3: vcc passthrough - 4: BYOA(Bring Your Own Account) - 5: MoR
    - `currency` string, required — The currency in which Atlas settles transactions with you.
    - `adultPrice` number, required — Adult fare per passenger.
    - `adultTax` number, required — Adult tax per passenger.
    - `adultDetails` PriceItem[], nullable — Details of the adult price composition.
      - `code` string, required — Machine readable code used to identify this price item.
      - `type` 'base' | 'tax' | 'fee', required — Type of this price item.
      - `amount` number, required
      - `description` string, nullable — Human-readable description for this price item.
    - `childPrice` number, required — Child fare per passenger.
    - `childTax` number, required — Child tax per passenger.
    - `childDetails` PriceItem[], nullable — Details of the child price composition.
      - `code` string, required — Machine readable code used to identify this price item.
      - `type` 'base' | 'tax' | 'fee', required — Type of this price item.
      - `amount` number, required
      - `description` string, nullable — Human-readable description for this price item.
    - `infantPrice` number, required — Infant fare per passenger.
    - `infantTax` integer, required — Infant tax per passenger.
    - `infantDetails` PriceItem[], nullable — Details of the child infant composition.
      - `code` string, required — Machine readable code used to identify this price item.
      - `type` 'base' | 'tax' | 'fee', required — Type of this price item.
      - `amount` number, required
      - `description` string, nullable — Human-readable description for this price item.
    - `infantAllowed` boolean, nullable — Since `infantPrice` and `infantTax` will never be `null`, when the fare does not support infants or is free for infants, both `infantPrice` and `infantTax` display `0`. In this case, you need this field to distinguish which situation it is. **Scenario description:** - `true`: infants is supported by this fare, `infantPrice` and `infantTax` will >= `0` - `false`: infants is not supported by this fare, `infantPrice` and `infantTax`will be displayed as `0`
    - `childMandatorySeatingFee` number, nullable — Only valid for FR integration. **FR Seat Selection Rules:** - Children under 12 years old are provided with free seats. - Children must be seated in the same row as an adult. - Each adult may accompany up to 4 children. For fare families that do not include seat selection fees (e.g., Basic or Family Plus), FR offers discounted seat selection fees for adults traveling with children. The`childMandatorySeatingFee`field displays this discounted fee. For fare families that already include seat selection fees, this field will be `null`. **Handling by Atlas for Fare Families Without Seat Selection Fees:** - The number of children cannot exceed 4. - Customers cannot select seats manually. - Atlas will automatically assign seats randomly to one adult and all children according to FR's rules. The adult will be charged the `childMandatorySeatingFee` for their seat. **For Fare Families That Include Seat Selection Fees:** - Seat selection is free. - Users may call the seat map API to select seats; otherwise, Atlas will automatically assign seats.
    - `transactionFeePerPax` number, required — Technical service fee per passenger. This field has been deprecated and final total transaction fee will calculated based on `transactionFee` and `transactionFeeMode`.
    - `transactionFee` number, required — Technical service fee as per `transactionFeeMode`. The following lists the calculation methods for the final technical service fee in various situations. - `transactionFeeMode`=`PER_SEGMENT`:`transactionFee` * number of passengers * number of segments. - `transactionFeeMode`=`PER_TICKET`:`transactionFee` * number of passengers * number of orders on airline side. - `transactionFeeMode`=`PER_PAX`:`transactionFee` * number of passengers. - `transactionFeeMode`=`PER_BOOKING`:`transactionFee`.
    - `transactionFeeMode` 'PER_SEGMENT' | 'PER_TICKET' | 'PER_PAX' | 'PER_BOOKING', required
    - `fromSegments` RoutingSegment[], required — For outbound segments.
      - `aircraftCode` string, nullable — IATA Code of aircraft type
      - `arrAirport` string, required — 3-letter iata code for the arrival airport at which the segment is scheduled to arrive.
      - `arrTerminal` string, nullable — The terminal at the destination airport where the segment is scheduled to arrive.
      - `arrTime` string, required — The datetime at which the segment is scheduled to arrive, in the arrival airport timezone. The format is `YYYYMMDD`.
      - `cabin` string, nullable — RBD(known as Reservation Booking Designator) displayed by the airline.
      - `cabinClass` 1 | 2 | 3 | 4, required
      - `carrier` string, required — IATA code of marketing carrier.
      - `codeShare` boolean, required — A flag used to identify whether it is a code share flight.
      - `depAirport` string, required — 3-letter iata code for the airport at which the segment is scheduled to depart.
      - `depTerminal` string, nullable — The terminal at the departure airport from which the segment is scheduled to depart.
      - `depTime` string, required — The datetime at which the segment is scheduled to depart, in the departure airport timezone. The format is`YYYYMMSS`.
      - `duration` integer, required — The duration of the segment in munites.
      - `fareFamily` string, required — Fare Family as per the information received from the airline
      - `flightNumber` string, required — Marketing flight number. The format is: CA123 or TR021 or FR1290, with the first two letters representing the carrier and the following number representing the flight number.
      - `operatingCarrier` string, nullable — 2-letter iata code for the operating carrier. The airline actually operating this segment. This may differ from the marketing carrier in the case of a "codeshare", where one airline sells flights operated by another airline.
      - `operatingFlightnumber` string, nullable — Operating flight number.
      - `seatCount` integer, required — Max booking seats for the fare.
      - `segmentIndex` integer, required — Segment sequence. Starts from 1. If it is return trip, sequence for outbound trip and inbound trip would be together. The segment index also represents the flight sequence of the segment.
      - `stopCities` string, nullable — IATA code/Name of cities from where the passengers will take stopover flights. Include IATA code of cities and use a comma in case of multiple cities to separate transfer airports count is higher than 1. For example: `CGK, SUB`. `null` or blank means non-stop flight.
    - `retSegments` RoutingSegment[], nullable — For inbound segments. For one-way, this field will be `null` or `[]`.
      - `aircraftCode` string, nullable — IATA Code of aircraft type
      - `arrAirport` string, required — 3-letter iata code for the arrival airport at which the segment is scheduled to arrive.
      - `arrTerminal` string, nullable — The terminal at the destination airport where the segment is scheduled to arrive.
      - `arrTime` string, required — The datetime at which the segment is scheduled to arrive, in the arrival airport timezone. The format is `YYYYMMDD`.
      - `cabin` string, nullable — RBD(known as Reservation Booking Designator) displayed by the airline.
      - `cabinClass` 1 | 2 | 3 | 4, required
      - `carrier` string, required — IATA code of marketing carrier.
      - `codeShare` boolean, required — A flag used to identify whether it is a code share flight.
      - `depAirport` string, required — 3-letter iata code for the airport at which the segment is scheduled to depart.
      - `depTerminal` string, nullable — The terminal at the departure airport from which the segment is scheduled to depart.
      - `depTime` string, required — The datetime at which the segment is scheduled to depart, in the departure airport timezone. The format is`YYYYMMSS`.
      - `duration` integer, required — The duration of the segment in munites.
      - `fareFamily` string, required — Fare Family as per the information received from the airline
      - `flightNumber` string, required — Marketing flight number. The format is: CA123 or TR021 or FR1290, with the first two letters representing the carrier and the following number representing the flight number.
      - `operatingCarrier` string, nullable — 2-letter iata code for the operating carrier. The airline actually operating this segment. This may differ from the marketing carrier in the case of a "codeshare", where one airline sells flights operated by another airline.
      - `operatingFlightnumber` string, nullable — Operating flight number.
      - `seatCount` integer, required — Max booking seats for the fare.
      - `segmentIndex` integer, required — Segment sequence. Starts from 1. If it is return trip, sequence for outbound trip and inbound trip would be together. The segment index also represents the flight sequence of the segment.
      - `stopCities` string, nullable — IATA code/Name of cities from where the passengers will take stopover flights. Include IATA code of cities and use a comma in case of multiple cities to separate transfer airports count is higher than 1. For example: `CGK, SUB`. `null` or blank means non-stop flight.
    - `rule` object, required
      - `hasBaggage` integer, required — This tag is used to identify if the fare includes free checked-in or cabin baggage. - `0`: Not included - `1`: Included
      - `baggageElements` object[], required — The free baggage allowance
        - `segmentNo` integer, required — The index of segment the baggage allowance applies to.
        - `baggageType` 'StandardCheckInBaggage' | 'CabinBaggage' | 'CabinBaggageUnderSeat' | 'CabinBaggageOverheadLocker', required
        - `passengerType` 0 | 1 | 2, required
        - `baggagePiece` integer, required — Baggage pieces: - `0`: No limitation - `>0`: Maximum pieces
        - `baggageWeight` integer, required — Baggage Weight, with the unit of KG. - `0`: No Free baggage - `-1`: No limitation on weight - `>0`: Maximum weight
        - `baggageSize` string, required — Baggage Size: length＊width＊height and units. eg. `56＊36＊23cm`, `18＊14＊8inch`. Or Total dimensions (length + width + height) of each piece. eg. `L+W+H<=158cm`. Empty means no limitation.
        - `isAllWeight` boolean, nullable — Baggage is all weight: true or false
      - `refundRules` object[], required — This node is used to fetch the refund rules of the fare. There is only one array element for one way, and two elements for round-trip. The first element is for the outbound, and the second element is for the inbound.
        - `refundType` integer, required — Type of refund allowed. - 0: Wholly unused ticket - 1: Partially used ticket (For example, when the passenger has used an outbound flight and wants to refund an inbound flight.)
        - `refundStatus` 'T' | 'H' | 'F'
        - `refundFee` integer, nullable — Refund penalty amount (for the most restrictive condition)
        - `currency` string, nullable — The currency of refund penalty
        - `refNoshow` string, required — Indicates if a no-show affects refunds (for the most restrictive condition). - T: Non refundable - H: Refundable with restrictions - F: Free for refund
        - `refNoShowCondition` integer, required — Time before scheduled flight departure
        - `refNoshowFee` number, required — Total refund fee (for the most restrictive condition): If refNoshow = H, it should not be "null". This value includes the refund fee and no-show penalty
        - `refundMethod` 'CashBackToOriginalPayment' | 'Voucher', nullable — Refund method: CashBackToOriginalPayment or Voucher. - CashBackToOriginalPayment: Refund cash back to the original form of payment. - Voucher: Refund in the form of a voucher.
        - `ruleDetailList` AirlineRuleRes[]
          - `status` 'T' | 'H' | 'F', required
          - `startMinute` string, required — Starting time of rule application. Positive numbers represent XXX minutes before departure. Negative numbers represent XXX minutes after departure.
          - `endMinute` string, required — Ending time of rule application. Positive numbers represent XXX minutes before departure. Negative numbers represent XXX minutes after departure.
          - `amount` string, nullable — Penalty amount for refund/change. If the`status`indicates free refund/change, then this field will be either`0`or`null`.
          - `currency` string, nullable — The currency of penalty
          - `refundMethod` 'CashBackToOriginalPayment' | 'Voucher', nullable — Refund method: CashBackToOriginalPayment or Voucher. - CashBackToOriginalPayment: Refund cash back to the original form of payment. - Voucher: Refund in the form of a voucher.
      - `changesRules` object[], required — This node is used to fetch the change rules of the fare. There is only one array element for one way, and two elements for round-trip. The first element is for the outbound, and the second element is for the inbound.
        - `changesType` integer, required — Change flight type. - `0`: Wholly unused ticket - `1`: Partially used ticket (For example. When the passenger has used an outbound flight and wants to change an inbound flight)
        - `changesStatus` 'T' | 'H' | 'F'
        - `changesFee` number, nullable — Change flight fee (for the most restrictive condition): - If`changesStatus`=`H`, it should not be`null` - If`changesStatus`=`T/F`, it can be`null`
        - `currency` string, nullable — The currency of change flight fee
        - `revNoshow` string, required — Indicates if a no-show affects changes (for the most restrictive condition). Valid values: - T: Non changeable - H: Changeable with restrictions - F: Free flight change
        - `revNoShowCondition` integer, required — Time before scheduled flight departure.
        - `revNoshowFee` number, required — The total fee charged to change flight in case of no show. If revNoshow = H, it should not be "null." This value includes the change flight fee and no-show penalty.
        - `ruleDetailList` object[] — Change conditions
          - `status` 'T' | 'H' | 'F', required
          - `startMinute` string, required — Starting time of rule application. Positive numbers represent XXX minutes before departure. Negative numbers represent XXX minutes after departure.
          - `endMinute` string, required — Ending time of rule application. Positive numbers represent XXX minutes before departure. Negative numbers represent XXX minutes after departure.
          - `amount` string, nullable — Penalty amount for refund/change. If the`status`indicates free refund/change, then this field will be either`0`or`null`.
          - `currency` string, nullable — The currency of penalty
      - `serviceElements` object[], nullable — This function is used to fetch the other service rules of the fare. There is only one array for one way, and two arrays for round-trip. The first array is for the outbound, and the second array is for the inbound.
        - `hasFreeSeat` integer — A marker used to indicate whether free seat selection is included. - `0`: Not included - `1`: Included - `2`: Partially free
        - `hasFreeMeal` integer — A marker used to indicate whether free meals are included. - `0`: Not included - `1`: Included
    - `ancillaryProductElements` AncillaryProduct[], nullable
      - `ancillaryCode` string, required — A code that is relatively readable by humans and contains information about auxiliary business specifications (such as weight and quantity limitations of luggage). **Note:** This content is only for display purposes and should not be used for programming purposes. That is to say, do not attempt to parse the information about auxiliary business specifications from this code. If you want to access the auxiliary business specifications, please use structured fields. For example, for luggage, please use`auxBaggageElement`.
      - `auxBaggageElement` object, nullable — Baggage specification limitations. This node is valid only when the ancillary type (`categoryCode`) is baggage.
        - `allWeight` boolean, required — Mark whether the`weight`field restricts the total weight or the weight of a single piece. - `true`: The weight is for all the pieces - `false`: The weight is for each piece
        - `piece` integer, required — The maximum number of pieces that can be purchased per person. - `0`: No Limitation about piece - `>0`: Maximum pieces
        - `size` string, nullable — Maximum size for the baggage
        - `weight` integer, required — The maximum weight that can be purchased per person. - `0`: No limitation for weight - `>0`: Weight limit (KG)
      - `canPurchasePostTicket` integer, required — A flag used to mark if this ancillary product can be purchased in the post-ticketing flow. - `0`: No - `1`: Yes
      - `canPurchaseWithTicket` integer, required — A flag used to mark if this ancillary product can be purchased during the booking flow. - `0`: No - `1`: Yes
      - `categoryCode` 'StandardCheckInBaggage' | 'CabinBaggage' | 'CabinBaggageUnderSeat' | 'CabinBaggageOverheadLocker', required
      - `clientTechnicalServiceFee` number, nullable — The service fee charged by Atlas for the purchase of the ancillary.
      - `currency` string, required — The currency in which Atlas settles transactions with you
      - `maxQty` integer, required — The maximum number of purchases allowed per person per flight segment
      - `minQty` integer, required — The minimum quantity allowed to be purchased per person per flight segment.
      - `price` number, required — Price for this ancillary.
      - `productCode` string, required — Unique identifier for the ancillary product. It would be used in the order request.
      - `segmentIndex` integer, required — The index of segment the ancillary applies to.
      - `vendorCurrency` string, required — The currency in which the vendor charges for the ancillary. If the fare does not allow for the VCC pass-through or BYOA payment, this information will be`null`.
      - `vendorPrice` number, required — The price charged by the vendor for the ancillary. If the fare does not allow for the VCC pass-through or BYOA payment, this information will be`null`.
      - `productName` string, required — Ancillary category code. Its current value is the same as categoryCode. It is not a customer-facing product name.
      - `productType` string, required — Numeric identifier of the ancillary category, sourced from the ancillary category configuration. This value is used for category identification and does not represent baggage quantity, weight, or specification.
    - `vendorFare` object, required — To identify the vendor’s fare with vendor’s currency. It is only available when`supportPaymentMethods`contains`3`or`4`.
      - `vendorAdultPrice` number, required — Adult fare per passenger in vendor’s currency
      - `vendorAdultTax` number, required — Adult tax per passenger in vendor’s currency
      - `vendorChildPrice` number, required — Child fare per passenger in vendor’s currency
      - `vendorChildTax` number, required — Child tax per passenger in vendor’s currency
      - `vendorInfantPrice` number, required — Infant fare per passenger in vendor’s currency
      - `vendorInfantTax` integer, required — Infant tax per passenger in vendor’s currency
      - `vendorCurrency` string, required — Vendor’s currency
    - `links` TAndCLink, required
      - `carrier` string, required — IATA code for the airline
      - `kind` string, required — always:`terms`
      - `link` string, required — URL to the carrier's terms and conditions
      - `description` string, required — Carrier terms and conditions
    - `separateBookings` boolean, required — When the outbound and inbound of round trip need to be booked separately, it will be true.
    - `refreshTime` string, required — If the fare is from the cache of Atlas, this field is used to indicate the refresh time of the cache. The time is a certain moment in the past (UTC), and the format is:`yyyy-MM-dd'T'HH:mm:ss'Z'`.
    - `expireTime` string, required — If the current fare comes from the cache of Atlas, this field is used to indicate the estimated expiration time of the cache. This time is a certain moment in the future (UTC), and the format is:`yyyy-MM-dd'T'HH:mm:ss'Z'`. **Note:** This time is estimated, which means Atlas may refresh the cache before or after that time.
    - `ancillarySupported` string[], required — A list of ancillary service types that the fare allows for additional purchase. Possible value contains: - `luggage` - `seat`: You can carry out the subsequent seat selection process through our seat map interface.
    - `cardChargeList` CardCharge[], nullable — Payment handling fee for MoR/VCC
      - `cardType` 'Amex' | 'Visa' | 'MasterCard' | 'JCB' | 'Discover' | 'DinersClub', required
      - `percentage` number, nullable — Percentage of payment handling fee
      - `charge` number, nullable — The amount of payment handling fee
      - `currency` string, nullable — Currency of `charge`

---

[API](https://skmtc.net/atriptech/apis/default-module.md) · [All operations](https://skmtc.net/atriptech/apis/default-module/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/atriptech/default-module/revisions/8e9a8f8010ab/schema)
