TravelCaster API - Flights - ListBookings operation
Back to Flights home.
You can list all your bookings for a specific date range, for a maximum range of 30 days. This operation returns basic booking information that you can extend by using the RetrieveBooking operation for a specific booking number.
The ListBookings operation uses the FlightBookingListRequest to specify the date range, for which will return a FlightBookingListResponse object with an array of bookings containing a list of FlightBookingListItem objects. 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.
Remember that the bookings will be listed from the environment that matches your token. If you have a token for test environment, bookings will be from the that environment.
Request
JSON
http://endpoint/api/version/FlightService.json/ListBookings
url-encoded parameter: request ([FlightBookingListRequest])
returns: FlightBookingListResponse
WebService
http://endpoint/api/version/FlightService.asmx
operation: ListBookings
parameters: request ([FlightBookingListRequest])
returns: FlightBookingListResponse
Structure of the FlightBookingListRequest object
FlightBookingListRequest
|
|_ Token (string)
|_ FromDate (string - date range start in ISO 8601 YYYY-MM-DD format)
|_ ToDate (string - date range end -inclusive- in ISO 8601 YYYY-MM-DD format)
Structure of the FlightBookingListResponseobject
FlightBookingListResponse
|
|_ Token (string)
|_ TransactionID (string)
|_ TransactionCode (string)
|_ TransactionMessage (string)
|_ Items (FlightBookingListItem[])
|
|_ BookingDate (string in ISO 8601 - UTC time)
|_ BookingNumber (string)
|_ BookingExternalID (string - if available)
|_ LastTicketingDate (string in ISO 8601 YYYY-MM-DD HH:mm:ss format)
|_ PassengerCount (int)
|_ BookingStatus (int, see RetrieveBooking operation)
|_ PaymentStatus (int, see RetrieveBooking operation)
Notes
- Dates sent to and from the API are all string-based and in the YYYY-MM-DD ISO-8061 format.
Back to Flights home.