Skip to content

Shopping

The Shopping API handles the first step of the booking process. It searches for the best and lowest-priced flight options based on criteria like origin, destination, dates, cabin class, and passenger details.

Based on this input, the system retrieves available flight routes. After the user selects a flight combination, the system calculates the final price using the lowest applicable fare. Finally, the reservation is completed by generating a PNR and confirmed reservation.

Endpoint

Method: POST

URL: /json/shopping

Request Headers

ParameterTypeRequiredExample
Accept-EncodingStringNogzip OR gzip,deflate

Request Parameters

ParameterTypeRequiredDescription
authenticationObjectYesAuthentication details
  └ partnerIdStringYesPartner Id
  └ signStringYesSignature for the request
searchObjectYesSearch criteria details
  └ adultsIntegerYesNumber of adult passengers (1-9)
  └ childrenIntegerNoNumber of children (age 2-12)
  └ infantsIntegerNoNumber of infants (age 0-2, no seat)
  └ cabinClass¹StringNoCabin class, refer to Сabin Class List (default: Economy)
  └ cabinClasses[String]NoArray of Cabin class
  └ includedAirlines[String]NoAirlines to include in the search
  └ excludedAirlines[String]NoAirlines to exclude from the search
  └ maxFaresIntegerNoMaximum number of results provided in response
  └ fareSources[String]NoAllows requesting a specific list of content sources from the partner. The list and names of these sources are provided by the partner. If the partner does not have any separation by content sources, TTN will not send this parameter
  └ searchAirLegs[Object]YesList of journey legs
   └ originStringYesOrigin IATA airport/city code
   └ destinationStringYesDestination IATA airport/city code
   └ departureDateStringYesDeparture date (yyyy-MM-dd)

Notes

¹ - The cabinClass field will be deprecated in the near future.
Currently, both cabinClass and cabinClasses are supported in requests.
In future versions, only cabinClasses will be used.
It is recommended to start using cabinClasses for specifying one or multiple cabin classes.

Request Example

json
{
  "authentication": {
    "partnerId": "{{PARTNER_ID}}",
    "sign": "{{SIGN}}"
  },
  "search": {
    "adults": 1,
    "children": 1,
    "infants": 0,
    "cabinClass": "Economy",
    "cabinClasses": ["Economy", "PremiumEconomy"],
    "includedAirlines": ["TK", "LO", "LH"],
    "excludedAirlines": ["BA", "AF", "KL"],
    "maxFares": 100,
    "fareSources": ["Regular", "Charter", "NDC", "B2B"],
    "searchAirLegs": [
      {
        "departureDate": "2026-08-14",
        "destination": "LON",
        "origin": "IST"
      },
      {
        "departureDate": "2026-08-22",
        "destination": "IST",
        "origin": "LON"
      }
    ]
  }
}

Response Parameters

ParameterTypeRequiredDescription
└ errorCodeStringYesError code, refer to Error Code List
└ errorMsgStringYesError message
dataObjectYesReturned data (not empty when errorCode is "0")
  └ searchKeyStringYesUnique search identification
  └ solutions[Object]YesList of flight & fare combinations
   └ solutionIdStringYesUnique solution identification
   └ fareSourceStringNoFare source type, e.g. Regular, Charter, NDC, B2B
   └ categoryStringNoProduct type, e.g. VI (virtual interlining)
   └ fareTypeStringNoFare type: Public or Private
   └ validatingCarrierStringYesValidating airline
   └ currencyStringYesCurrency code
   └ adtFareNumberYesAdult fare
   └ adtTaxNumberYesAdult tax
   └ chdFareNumberNoChildren (age 2-12) fare
   └ chdTaxNumberNoChildren (age 2-12) tax
   └ infFareNumberNoInfant (age 0-2, no seat) fare
   └ infTaxNumberNoInfant (age 0-2, no seat) tax
   └ tktFeeNumberNoTicketing service fee
   └ adultsIntegerNoNumber of adult passengers
   └ childrenIntegerNoNumber of child passengers
   └ infantsIntegerNoNumber of infant passengers
   └ journeysObjectYesJourney legs (journey_0, journey_1, ...)
    └ journey_0[String]YesArray of flightIds for outbound (flights -> flightId)
    └ journey_1[String]NoArray of flightIds for inbound (flights -> flightId)
    └ journey_2[String]NoArray of flightIds for multi-leg flight (flights -> flightId)
   └ baggageMapObjectNoBaggage rules Map by passenger type (ADT, CHD, INF)
    └ ADT[Object]NoBaggage rules for ADT
     └ segmentIdList[String]YesArray of segment IDs (segments -> segmentId)
     └ baggageAmountStringNoFree baggage amount: (e.g., "1PC")
     └ baggageWeightStringNoFree baggage weight:
Unity: KG - kilogram, LB - pounds
(e.g., "23KG")
     └ baggageSize[String]NoBaggage dimensions [L, W, H]:
Unity: CM - centimeter, IN - inches
(e.g., ["76CM", "50CM", "30CM"] or ["158CM"])
     └ carryOnAmountStringNoFree carry-on amount: (e.g., "1PC")
     └ carryOnWeightStringNoFree carry-on weight:
Unity: KG - kilogram, LB - pounds
(e.g., "10KG")
     └ carryOnSize[String]NoCarry-on dimensions [L, W, H]:
Unity: CM - centimeter, IN - inches
(e.g., ["55CM", "40CM", "20CM"] or ["115CM"])
    └ CHD[Object]NoBaggage rules for CHD (fields are the same as ADT)
    └ INF[Object]NoBaggage rules for INF (fields are the same as ADT)
  └ flights[Object]YesFlight information
   └ flightIdStringYesFlight ID, unique identification
   └ segmentIds[String]YesArray of segment IDs (segments -> segmentId)
   └ selfTransferSegmentIds[String]NoSelf-transfer segment IDs
  └ segments[Object]YesSegment details
   └ segmentIdStringYesSegment ID, unique identification
   └ marketingCarrierStringYesMarketing carrier [IATA airline code]
   └ flightNumIntegerYesFlight number
   └ operatingCarrierStringNoOperating carrier [IATA airline code]
   └ equipmentStringNoAircraft equipment IATA-code
   └ cabinClassStringYesCabin class, refer to Сabin Class List
   └ bookingCodeStringNoCabin code
   └ departureStringYesDeparture [IATA airport code]
   └ arrivalStringYesArrival [IATA airport code]
   └ departureTerminalStringNoDeparture terminal
   └ arrivalTerminalStringNoArrival terminal
   └ flightTimeIntegerNoFlight time in minutes
   └ departureDateStringYesDeparture date (yyyy-MM-dd)
   └ departureTimeStringYesDeparture time (HH:mm)
   └ arrivalDateStringYesArrival date (yyyy-MM-dd)
   └ arrivalTimeStringYesArrival time (HH:mm)
   └ fareBasisStringNoFare basis code
   └ stops[Object]NoDetails about technical stops
    └ locationStringYesAirport IATA code of the stop location
    └ arrivalDateStringYesTechnical stop arrival date (yyyy-MM-dd)
    └ arrivalTimeStringYesTechnical stop arrival time (HH:mm)
    └ departureDateStringYesTechnical stop departure date (yyyy-MM-dd)
    └ departureTimeStringYesTechnical stop departure time (HH:mm)

Response Example

json
{
  "errorCode": "0",
  "errorMsg": "ok",
  "data": {
    "searchKey": "ISTLON20260814YLONIST20260822Y1100",
    "solutions": [
      {
        "solutionId": "vSrVb9zmt23YfGA/rKGhiXMEyIgmJlu8j+/KIHd6u248iXhfaAuxqc3aQ4drRJxtZqlG+B6rrPcGmQm00nbBNd7oOLXElINA0FJ9Af8Ov5pC1D9aOHtnS4aZbiXahSTSUMab3mqgoHk/ZyAyTmNOKdTOsXqjzCbPJWtPzPDP5CmrSHfBYs1n/VYgIN3RpE+3IL75Wz4brOmXJn+R3NRqsZzm41JpgETXmiFpBIhlqitSVBirRdWmPUS9xE+JjCUbz7hI5o4uBCxR0+eKxFrFOLVMr72hL/FapLgjdzG87HJhVEtj/4zzw0S06gjiUIkJqnvj3JHh0hERdnnLsANTWXHlY7CoGumzCnfwWDrd1aNZwSsr2nJAl9+1OETfu++a0j6pVNXOmhcIB/QRQ64GPQJVSUOe3MzQilkZgNDFxYW6EsQQ00pLKwQkZotdvhPq6XqCb5Si2ddEfshN3FceavsEEyKM193fTDCd3IIAev4=",
        "fareSource": "Regular",
        "category": "VI",
        "fareType": "Private",
        "validatingCarrier": "VF",
        "currency": "EUR",
        "adtFare": 456.2,
        "adtTax": 0.86,
        "chdFare": 456.2,
        "chdTax": 0.86,
        "tktFee": 0,
        "journeys": {
          "journey_0": [
            "8c8f9324222a4d2e7c10da7f202072d3"
          ],
          "journey_1": [
            "99f92e2a5794e1c439acf5b0e748a219"
          ]
        },
        "baggageMap": {
          "CHD": [
            {
              "segmentIdList": [
                "1",
                "2",
                "3"
              ],
              "baggageAmount": "1PC",
              "baggageWeight": "23KG",
              "baggageSize": ["76", "50CM", "30CM"],
              "carryOnAmount": "1PC",
              "carryOnWeight": "10KG",
              "carryOnSize": ["55CM", "40CM", "20CM"]
            }
          ],
          "ADT": [
            {
              "segmentIdList": [
                "1",
                "2",
                "3"
              ],
              "baggageAmount": "1PC",
              "baggageWeight": "23KG",
              "baggageSize": ["158CM"],
              "carryOnAmount": "1PC",
              "carryOnWeight": "10KG",
              "carryOnSize": ["55CM", "40CM", "20CM"]
            }
          ]
        }
      },
      {
        "solutionId": "u5+dG2yYoSaj+ozGDLU+0/Ysn1e/hiPoXQGLcSmDmZAO27/U7W3VmWWzhv/f3v35tL1ls0JjPGI2mehD6O4MV5/znhihm96diZAVrQHEnw90SqVNYPfkR5cUwWxz2SU2gxVIS2lnNyLBi0Mdqptvj1UnaTe9hWRtmxzpCY4sH4ERw0f69/FIo9HabSkuCQeJ5/pqdcW0/JJlS+DDTjG4aUQ51UoFNpIA2O1FHaXyxdpgWxKt3JoH7B7Bs6NkriuRhr0gEqNtzpzAtIzOX2hS7WsX7tfCq5SZlkYJFMlDN+ivdDwU8z8alNMgHZWFi/QIDe2MOzkvfFhiMcO8eVwwNF2W9QoiDVAJcOWluBdutrA0gaF5F+GtfU+W0tjqol/HygrKPXh9unkfuVG50ZGJtvhT5chdaL23hqD/bHzQZSRhNvrlgv7q/KAEPtwEG7Jt81KWVmwZIZp7ksK37tH/kEREvZyax/RtwdZlRhGf+5InWXg9j7Jx6XkjLGDzLmD3GpFPu7tBmD4sncdPjRB5I+gib2HY9pZYEy1HK8eeKSHITjs4MloIZOl12tn7+/5K",
        "fareSource": "Regular",
        "category": "VI",
        "fareType": "Private",
        "validatingCarrier": "VY",
        "currency": "EUR",
        "adtFare": 908.42,
        "adtTax": 0.86,
        "chdFare": 908.42,
        "chdTax": 0.86,
        "infFare": null,
        "infTax": null,
        "tktFee": 0,
        "journeys": {
          "journey_0": [
            "dea4b3ac8290fe8a4147c13833947249"
          ],
          "journey_1": [
            "1ff31e945a1da99d7936a8679ba78827"
          ]
        },
        "baggageMap": {
          "CHD": [
            {
              "segmentIdList": [
                "1"
              ],
              "baggageAmount": "0PC",
              "baggageWeight": "23KG",
              "baggageSize": ["76", "50CM", "30CM"],
              "carryOnAmount": "1PC",
              "carryOnWeight": "10KG",
              "carryOnSize": ["55CM", "40CM", "20CM"]
            },
            {
              "segmentIdList": [
                "2"
              ],
              "baggageAmount": "1PC",
              "baggageWeight": "23KG",
              "baggageSize": ["76", "50CM", "30CM"],
              "carryOnAmount": "1PC",
              "carryOnWeight": "10KG",
              "carryOnSize": ["55CM", "40CM", "20CM"]
            },
            {
              "segmentIdList": [
                "3"
              ],
              "baggageAmount": "1PC",
              "baggageWeight": "23KG",
              "baggageSize": ["76", "50CM", "30CM"],
              "carryOnAmount": "1PC",
              "carryOnWeight": "10KG",
              "carryOnSize": ["55CM", "40CM", "20CM"]
            },
            {
              "segmentIdList": [
                "4"
              ],
              "baggageAmount": "1PC",
              "baggageWeight": "23KG",
              "baggageSize": ["76", "50CM", "30CM"],
              "carryOnAmount": "1PC",
              "carryOnWeight": "10KG",
              "carryOnSize": ["55CM", "40CM", "20CM"]
            }
          ],
          "ADT": [
            {
              "segmentIdList": [
                "1"
              ],
              "baggageAmount": "1PC",
              "baggageWeight": "23KG",
              "baggageSize": ["76", "50CM", "30CM"],
              "carryOnAmount": "1PC",
              "carryOnWeight": "10KG",
              "carryOnSize": ["55CM", "40CM", "20CM"]
            },
            {
              "segmentIdList": [
                "2"
              ],
              "baggageAmount": "1PC",
              "baggageWeight": "23KG",
              "baggageSize": ["76", "50CM", "30CM"],
              "carryOnAmount": "1PC",
              "carryOnWeight": "10KG",
              "carryOnSize": ["55CM", "40CM", "20CM"]
            },
            {
              "segmentIdList": [
                "3"
              ],
              "baggageAmount": "1PC",
              "baggageWeight": "23KG",
              "baggageSize": ["76", "50CM", "30CM"],
              "carryOnAmount": "1PC",
              "carryOnWeight": "10KG",
              "carryOnSize": ["55CM", "40CM", "20CM"]
            },
            {
              "segmentIdList": [
                "4"
              ],
              "baggageAmount": "1PC",
              "baggageWeight": "23KG",
              "baggageSize": ["76", "50CM", "30CM"],
              "carryOnAmount": "1PC",
              "carryOnWeight": "10KG",
              "carryOnSize": ["55CM", "40CM", "20CM"]
            }
          ]
        }
      }
    ],
    "flights": [
      {
        "flightId": "8c8f9324222a4d2e7c10da7f202072d3",
        "segmentIds": [
          "0",
          "1"
        ],
        "selfTransferSegmentIds": null
      },
      {
        "flightId": "99f92e2a5794e1c439acf5b0e748a219",
        "segmentIds": [
          "2",
          "3"
        ],
        "selfTransferSegmentIds": null
      },
      {
        "flightId": "dea4b3ac8290fe8a4147c13833947249",
        "segmentIds": [
          "4"
        ],
        "selfTransferSegmentIds": null
      },
      {
        "flightId": "1ff31e945a1da99d7936a8679ba78827",
        "segmentIds": [
          "5",
          "6"
        ],
        "selfTransferSegmentIds": null
      }
    ],
    "segments": [
      {
        "segmentId": "0",
        "marketingCarrier": "5F",
        "flightNum": "5547",
        "operatingCarrier": null,
        "equipment": "32S",
        "cabinClass": "Economy",
        "bookingCode": "M",
        "departure": "RMO",
        "arrival": "STN",
        "departureTerminal": "",
        "arrivalTerminal": "",
        "flightTime": 150,
        "departureDate": "2026-08-14",
        "departureTime": "16:50",
        "arrivalDate": "2026-08-15",
        "arrivalTime": "18:55",
        "fareBasis": "YRT",
        "stops": [
          {
            "location": "IST",
            "arrivalDate": "2026-08-15",
            "arrivalTime": "10:00",
            "departureDate": "2026-08-15",
            "departureTime": "12:30"
          }
        ]
      },
      {
        "segmentId": "1",
        "marketingCarrier": "VY",
        "flightNum": "3073",
        "operatingCarrier": null,
        "equipment": "JET",
        "cabinClass": "Economy",
        "bookingCode": "X",
        "departure": "IST",
        "arrival": "BCN",
        "departureTerminal": "",
        "arrivalTerminal": "1",
        "flightTime": 230,
        "departureDate": "2026-08-14",
        "departureTime": "04:35",
        "arrivalDate": "2026-08-14",
        "arrivalTime": "07:25",
        "fareBasis": "YRT",
        "stops": null
      },
      {
        "segmentId": "2",
        "marketingCarrier": "W9",
        "flightNum": "5729",
        "operatingCarrier": null,
        "equipment": "JET",
        "cabinClass": "Economy",
        "bookingCode": "X",
        "departure": "LGW",
        "arrival": "IST",
        "departureTerminal": "S",
        "arrivalTerminal": "",
        "flightTime": 240,
        "departureDate": "2026-08-22",
        "departureTime": "13:35",
        "arrivalDate": "2026-08-22",
        "arrivalTime": "19:35",
        "fareBasis": "YRT",
        "stops": null
      },
      {
        "segmentId": "3",
        "marketingCarrier": "VF",
        "flightNum": "3014",
        "operatingCarrier": null,
        "equipment": "JET",
        "cabinClass": "Economy",
        "bookingCode": "X",
        "departure": "SAW",
        "arrival": "ESB",
        "departureTerminal": "",
        "arrivalTerminal": "",
        "flightTime": 65,
        "departureDate": "2026-08-14",
        "departureTime": "01:10",
        "arrivalDate": "2026-08-14",
        "arrivalTime": "02:15",
        "fareBasis": "YRT",
        "stops": null
      },
      {
        "segmentId": "4",
        "marketingCarrier": "VF",
        "flightNum": "3510",
        "operatingCarrier": null,
        "equipment": "JET",
        "cabinClass": "Economy",
        "bookingCode": "X",
        "departure": "ESB",
        "arrival": "SAW",
        "departureTerminal": "",
        "arrivalTerminal": "",
        "flightTime": 70,
        "departureDate": "2026-08-22",
        "departureTime": "21:55",
        "arrivalDate": "2026-08-22",
        "arrivalTime": "23:05",
        "fareBasis": "YRT",
        "stops": null
      },
      {
        "segmentId": "5",
        "marketingCarrier": "5F",
        "flightNum": "5617",
        "operatingCarrier": null,
        "equipment": "32S",
        "cabinClass": "Economy",
        "bookingCode": "M",
        "departure": "RMO",
        "arrival": "LTN",
        "departureTerminal": "",
        "arrivalTerminal": "",
        "flightTime": 150,
        "departureDate": "2026-08-14",
        "departureTime": "19:40",
        "arrivalDate": "2026-08-14",
        "arrivalTime": "21:10",
        "fareBasis": "YRT",
        "stops": null
      },
      {
        "segmentId": "6",
        "marketingCarrier": "VY",
        "flightNum": "7833",
        "operatingCarrier": null,
        "equipment": "JET",
        "cabinClass": "Economy",
        "bookingCode": "X",
        "departure": "LGW",
        "arrival": "BCN",
        "departureTerminal": "S",
        "arrivalTerminal": "1",
        "flightTime": 135,
        "departureDate": "2026-08-22",
        "departureTime": "13:00",
        "arrivalDate": "2026-08-22",
        "arrivalTime": "16:15",
        "fareBasis": "YRT",
        "stops": null
      }
    ]
  }
}

Error Code List

errorCodeerrorMsgDescription
0okRequest has been processed successfully
S001System errorSystem error
B002Partner does not existPartnerID does not exist
B003Illegal signIllegal sign. Please check your signature
P001XXX is illegalThe field of XXX is illegal
P002XXX is missingThe field of XXX is missing
P004The maximum number of passengers with a seat is 9Wrong parameter. The maximum number of passengers with a seat is 9
P005There should be at least one adultWrong parameter. There should be at least one adult
P009The number of infant passengers can not exceed the number of adult passengersWrong parameter. The number of infant passengers can not exceed the number of adult passengers
B013Interface is limited, please contact the system administratorThe route that you request is limited, please contact system administrator
B014Shopping failedShopping failed caused by other reasons
B024Time-out, please try laterTime-out. You can try searching again after a few seconds
B034Shopping interface is offlineShopping service is limited
B035Concurrency limitedConcurrent users control
B038Departure date must be between today and one year from nowWrong parameter. Departure date must be between today and one year from now
B039Cannot find related data for XXXWrong parameter. Cannot find related data for XXX (e.g., invalid city/country/area/airline)
B046Interface is limited, the routing is offlineLook to book control
B059Shopping failed from upstreamShopping failed, shopping error from upstream
B060Interface is limitedInterface is limited, due to restriction rules
B009Supplier is offlineSupplier is not at working time
B066Only X journeys can be supported, please check your itineraryThe system supports a maximum of X journeys for shopping at this time

TTN Octo API documentation