Skip to content

Precise Booking ​

This method is used to directly create a flight booking. It is called after the search (/json/shopping) and price validation (/json/precisePricing) steps. The method takes an offer identifier and detailed passenger data, and returns a booking locator (PNR) in the response.

Endpoint ​

Method: POST

URL: /json/preciseBooking

Request Parameters ​

ParameterTypeRequiredDescription
└ authenticationObjectYesAuthentication details
  └ partnerIdStringYesPartner Id
  └ signStringYesSignature for the request
└ bookingObjectYes
  └ solutionObjectYesJourney information
   └ searchKeyStringYesUnique search identification from Shopping API
   └ solutionIdStringYesUnique solution identification from Shopping API
  └ passengers[Object]YesPassenger information
   └ passengerIdStringYesPassenger sequence ID
   └ firstNameStringYesFirst name
   └ lastNameStringYesLast name
   └ nationalityStringYesNationality [country code]
   └ psgTypeStringYesPassenger type including ADT - Adult, CHD - Child, INF - Infant (no seat)
   └ genderStringYesGender, including M for male, F for female
   └ birthdayStringYesDate of birth [yyyy-mm-dd]
   └ cardTypeStringYesType of travel document
   └ cardNumStringYesTravel document number
   └ cardExpiredDateStringYesTravel document expired date [yyyy-mm-dd]
  └ contactObjectYes
   └ emailStringYesEmail address
   └ phoneStringYesPhone number
  └ notifyUrlStringNoIf the Partner implements callback functionality, the URL should be provided here
(e.g.,https://example.com/order_notification_callback?provider=xxxxx&key=yyyyy)

Request Example ​

json
{
  "authentication": {
    "partnerId": "{{PARTNER_ID}}",
    "sign": "{{SIGN}}"
  },
  "booking": {
    "solution": {
      "searchKey": "ISTLON20260814YLONIST20260822Y1100",
      "solutionId": "rmm6MrVT9sqQd6BrNDONH2MLhoKdwGcddhXh9+Wwl8soDBwvLz7qDNm0hFcAay5m8Y5MXjGhKMbeM8hbDKZVZrjalM3U3ixzSpgiWMhbc0l54Wodx2d1VRrzJw3i39+IchK14mM4usIbL83NjLAsXqKS95fnSKUwlOA4V7tOTE6RALKScJ3jiJ4/quVebRmw1Smum12qAkec11m82wghahMq9NTfh0tXP1ZBnuCK/Yot3k/qX69k/gMOyQRG6KQT/KRnH1eB3yynOaiRtpWM7hh2AvrBwwZ9I0bDHzySwhJhGJtYc4SYrmIrH22lmw9XGjQ0ego+9NM0Z3RuRFxLVpB8FHLwKQ4PPJFEO+DpXWGKnjQI0keZrRRm6kg3B6oDcBToRtVU35VBDLAm+hp39w=="
    },
    "passengers": [
      {
        "passengerId": "1",
        "firstName": "GEORGE",
        "lastName": "TAYLOR",
        "nationality": "GB",
        "psgType": "ADT",
        "gender": "M",
        "birthday": "1998-04-26",
        "cardType": "P",
        "cardNum": "6970406",
        "cardExpiredDate": "2030-04-26"
      },
      {
        "passengerId": "2",
        "firstName": "SOPHIA",
        "lastName": "TAYLOR",
        "nationality": "GB",
        "psgType": "CHD",
        "gender": "F",
        "birthday": "2023-06-14",
        "cardType": "P",
        "cardNum": "54645854",
        "cardExpiredDate": "2028-07-25"
      }
    ],
    "contact": {
      "email": "[email protected]",
      "phone": "447911123456"
    },
    "notifyUrl": "https://example.com/order_notification_callback?provider=xxxxx&key=yyyyy"
  }
}

Response Parameters ​

The response parameters are identical to those in the orderDetail response.
Please refer to the Order Detail - Response Parameters section for a complete description.

TIP

In case of failed response, Partner should return only two parameters in the response: errorCode and errorMsg, with the corrsponding error code from Error Code List and explonation in the error message.

TIP

All textual data in the response must be provided in English. Regardless of the request language, market, or user locale, every field value (names, descriptions, error messages, statuses, etc.) must be returned in English only. Responses containing text in any other language are considered invalid.

Success Response Example ​

json
{
  "errorCode": "0",
  "errorMsg": "ok",
  "data": {
    "orderStatus": "TO_BE_PAID",
    "orderNum": "917685547687690201",
    "createdTime": "2026-03-20T19:10:15+05:00",
    "ticketTimeLimit": "2026-03-20T19:12:15+05:00",
    "pnr": "WCREDC",
    "passengers": [
      {
        "passengerId": "1",
        "firstName": "GEORGE",
        "lastName": "TAYLOR",
        "nationality": "GB",
        "psgType": "ADT",
        "gender": "M",
        "birthday": "1998-04-26",
        "cardType": "P",
        "cardNum": "6970406",
        "cardExpiredDate": "2030-04-26",
        "ticketNum": null
      },
      {
        "passengerId": "2",
        "firstName": "SOPHIA",
        "lastName": "TAYLOR",
        "nationality": "GB",
        "psgType": "CHD",
        "gender": "F",
        "birthday": "2023-06-14",
        "cardType": "P",
        "cardNum": "54645854",
        "cardExpiredDate": "2028-07-25",
        "ticketNum": null
      }
    ],
    "solutions": [
      {
        "fareSource": "Regular",
        "category": "VI",
        "fareType": "Private",
        "validatingCarrier": "W9",
        "currency": "EUR",
        "adtFare": 146.93,
        "adtTax": 0.86,
        "chdFare": 146.93,
        "chdTax": 0.86,
        "infFare": null,
        "infTax": null,
        "tktFee": 0,
        "baggageMap": {
          "ADT": [
            {
              "segmentIdList": [
                "1"
              ],
              "baggageAmount": "1PC",
              "baggageWeight": "23KG",
              "baggageSize": ["76CM", "50CM", "30CM"],
              "carryOnAmount": "1PC",
              "carryOnWeight": "10KG",
              "carryOnSize": ["55CM", "40CM", "20CM"]
            },
            {
              "segmentIdList": [
                "2"
              ],
              "baggageAmount": "1PC",
              "baggageWeight": "23KG",
              "baggageSize": ["76CM", "50CM", "30CM"],
              "carryOnAmount": "1PC",
              "carryOnWeight": "10KG",
              "carryOnSize": ["55CM", "40CM", "20CM"]
            }
          ],
          "CHD": [
            {
              "segmentIdList": [
                "1"
              ],
              "baggageAmount": "1PC",
              "baggageWeight": "23KG",
              "baggageSize": ["76CM", "50CM", "30CM"],
              "carryOnAmount": "1PC",
              "carryOnWeight": "10KG",
              "carryOnSize": ["55CM", "40CM", "20CM"]
            },
            {
              "segmentIdList": [
                "2"
              ],
              "baggageAmount": "1PC",
              "baggageWeight": "23KG",
              "baggageSize": ["76CM", "50CM", "30CM"],
              "carryOnAmount": "1PC",
              "carryOnWeight": "10KG",
              "carryOnSize": ["55CM", "40CM", "20CM"]
            }
          ]
        }
      }
    ],
    "journeys": [
      {
        "segments": [
          {
            "segmentId": "1",
            "marketingCarrier": "W9",
            "flightNum": 5772,
            "operatingCarrier": null,
            "equipment": "JET",
            "cabinClass": "Economy",
            "bookingCode": "X",
            "departure": "IST",
            "arrival": "LGW",
            "departureTerminal": "",
            "arrivalTerminal": "0",
            "flightTime": 245,
            "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"
              }
            ]
          }
        ]
      },
      {
        "segments": [
          {
            "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
          }
        ]
      }
    ],
    "pnrList": [
      {
        "segmentId": "1",
        "ticketNums": [
          {
            "airPnr": null,
            "ticketNum": null,
            "passengerId": "1"
          },
          {
            "airPnr": null,
            "ticketNum": null,
            "passengerId": "2"
          }
        ]
      },
      {
        "segmentId": "2",
        "ticketNums": [
          {
            "airPnr": null,
            "ticketNum": null,
            "passengerId": "1"
          },
          {
            "airPnr": null,
            "ticketNum": null,
            "passengerId": "2"
          }
        ]
      }
    ]
  }
}

Success Response Example with price change ​

json
{
  "errorCode": "0",
  "errorMsg": "ok",
  "data": {
    "orderStatus": "TO_BE_PAID",
    ...
}

TIP

In case of a price change in the recommendation, the Partner should return a regular successful response with all current values, including the new price in the corresponding parameters. The TTN side will automatically detect the price change - there is no need to return any additional errors.

Failed Response Example ​

json
{
  "errorCode": "B307",
  "errorMsg": "Reservation failed. Seats have been sold out"
}

TIP

It's important to note that in the case of a regular response, the Partner should return only 2 parameters in the response - errorCode and errorMsg. There is no need to return any additionally created locators or any other data.

Error Code List ​

errorCodeerrorMsgDescription
0okRequest has been processed successfully
S001System errorSystem error
B307Reservation failed. Seats have been sold outReservation failed. Seats have been sold out
B002Partner is not existsPartnerID 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
P006Invalid parameterValue of request cannot pass the validation, please check on the request
B004There are errors in the passenger type of AdultsAdult passenger's age does not meet the requirements
B005precisePricing result expiresprecisePricing result expires. PreciseBooking has to be invoked before the price expires
B006Reservation failedBooking fail for other reason
B022There are errors in the passenger type of ChildrenChild passenger's age does not meet the requirements
B029Duplicate reservations have been foundDuplicated reservation is not allowed. If there is an order with same segment and passenger, system will block the second reservation and return error. Please cancel the last duplicated order or pay the last order directly
B030Illegal passenger nameWrong passenger name
B032Illegal documentIllegal document
B062The name of passenger should be within 2-30 charactersPassenger's name should be within 2-30 English alphabet
B064The lastName of passenger should be within 2-30 charactersPassenger's last name should be within 2-30 English alphabet
B065Passenger's document information must be filled in for this tripPassenger's document information must be filled in for this trip. Passenger's document information contains cardType, cardNum, cardExpiredDate and nationality
B069Reservation failed, this fare has passenger age limitationReservation failed, because this fare has a passenger age limitation
B080Invalid or duplicated passengerIdPassengerId must be positive and continuous integers starting from 1
B087Booking Failed. System has recognized possible churningChurning booking behaviour were detected and booking request with the same passenger will be restricted

TTN Octo API documentation