TravelCaster API - Flights - ImportExternalBooking operation

Back to Flights home.


The ImportExternalBooking operation imports a PNR made outside the TravelCaster booking flow into the TravelCaster system using a record locator and office ID.

This operation is only available via the JSON gateway. It is not exposed through the WebService endpoint.

To call this operation you will need a valid token, obtained previously with the GetAccessToken operation. If your token is no longer valid, you will receive a 1210 error. See the Transaction Codes page for more information.

Request

JSON

http://endpoint/api/version/FlightService.json/ImportExternalBooking [POST]

body - ImportExternalBookingRequest (JSON)

returns: FlightBookingImportExternalResponse

Structure of the ImportExternalBookingRequest object

ImportExternalBookingRequest
 |_ Token (string - mandatory)
 |_ TransactionID (string)
 |
 |_ RecordLocator (string - mandatory - GDS or provider record locator)
 |_ OfficeID (string - mandatory - office/queue ID associated with the record locator)
 |
 |_ BuyerFirstName (string - optional, see notes)
 |_ BuyerLastName (string - optional, see notes)
 |_ BuyerEmail (string - optional, see notes)
 |
 |_ MultiPaymentsInfo (array of ImportPaymentInfo - optional, see notes)
    |_ ImportPaymentInfo
       |_ PaymentType (string - CASH or CARD)
       |_ PaymentAmount (decimal)
       |_ PaymentCurrency (string - ISO-3 currency code)
       |_ AppliesToPassengers (string[] - passenger numbers this payment applies to)
       |_ PaymentCreditCardInfo (CreditCardImportInfo - required when PaymentType is CARD)
          |_ CardNumber (string)
          |_ CardType (string - VI, AX, EC, CA)
          |_ NameOnCard (string)
          |_ ExpiryDate (string - YYYY-MM format)
          |_ SecurityCode (string - optional)
          |_ AuthorizationCode (string - optional)
          |_ Installments (int - optional)

Structure of the FlightBookingImportExternalResponse object

FlightBookingImportExternalResponse
 |_ Token (string)
 |_ TransactionID (string)
 |_ TransactionCode (string)
 |_ TransactionMessage (string)
 |
 |_ Success (bool)
 |_ Errors (string[])

Notes

RecordLocator and OfficeID

These two fields identify the booking to be imported.

Buyer information

BuyerFirstName, BuyerLastName, and BuyerEmail are all optional. To associate the booking with a specific buyer rather than the API user's defaults, provide all three buyer fields explicitly. Each field falls back independently, if omitted, they default to the authenticated API user's account data:

  • BuyerFirstName — defaults to the API user's ClientCode, or their Username if ClientCode is not set.
  • BuyerLastName — defaults to the API user's Username.
  • BuyerEmail — defaults to the API user's registered email address. If the API user has no email on record, the field is omitted from the import request.

Payment information

MultiPaymentsInfo is optional. If omitted, the booking is imported without pre-assigned payment data.

When provided:

  • Each entry in the array represents one payment applied to the booking.
  • AppliesToPassengers accepts an array of passenger number strings (referencing the Number property of the PaxInformation objects returned by RetrieveBooking).
  • All passengers in the booking must be covered by the supplied payments.
  • PaymentCreditCardInfo is required when PaymentType is CARD and should be omitted or set to null when PaymentType is CASH.

Response

The response does not return a TravelCaster booking number — the record locator used in the request acts as the identifier. To retrieve the imported booking, use the RetrieveBooking operation with the record locator as the BookingNumber.

  • Success: true — the booking was imported successfully. TransactionCode will be null.
  • Success: false — the import failed. Errors will contain one or more messages. See TransactionCode and TransactionMessage for more details.

Timeout

The operation calls an internal management service with a 180-second timeout. Set your client timeout to at least 185 seconds for this operation.

Transaction codes

Code Description
1000 Unspecified error — see TransactionMessage and Errors
1002 Request body was null or empty
1003 Validation error — see TransactionMessage for the list of failing fields
1210 Session expired — obtain a new token via GetAccessToken

Back to Flights home.


See change history for this file
Loading...