Order | GetBookingDetail

Retrieves a booking details by the orderNumber generated from AeroHub.

Notice:
Product Scope :TechHub and FareMarket

POST

/flight/booking

Parameter

Field Mandatory Type Scope Description
action required String GetBookingDetail
key required String API security key applied from AeroHub
signature required String Refer to Guideline to generate.
timestamp required Int The ‘timestamp’ field should be a 10-digit Unix timestamp in seconds, used for encryption and data verification.
version optional String API version information, e.g. 3.2.0
request required Object
  orderNum required String AeroHub Order number generated by Commit. Unique ID for bookings for TechHub and FareMarket
  sync optional int TechHub 1, for TechHub booking, sytem will check and update information below from airline API;
- depTime
- arrTime
- pnrStatus
0 or Null, system retrieve original booking information when booking created.

Request_Example:

{
    "action": "GetBookingDetail",
    "key": "52uksRuqeAewqewq87xXYQa",
    "signature": "TIzve3ZP7oyfv8x/hlSQQQQHgSyAml0x0zM6Q5=",
    "timestamp": 1685116516,
    "request": {
        "orderNum": "1686212784620044288",
        "sync": 1
    }
}

Response

Field Type Description
status Int 0 for success, others for failure, refer to status error appendix for details
msg String Return message, maximum 64 char
contentStatus int Return the original code from airlines or suppliers.
contentMsg String Return the original message from airlines or suppliers, maximum 64 char
sessionId String Session id : unique identifier.Used for add ssrs to an existing order.
orderNum String Order number, maximun 100 char
itineraryUrl String Itinerary url. Itinerary file download url
orderStatus String Booking status: TICKETED: ticketing success. refer orderStatus enum from Appendix
routeType int Data source type, 1,FareMarket 2,TechHub
agencyAccountID String Agency accountID. For TechHub, agencyAccountID is the registered agent account at the Airline. For FareMarket, agencyAccountID is indicated to a supplier
amount Float Total cost for payment
currency String Currency information, 3-Letter Codes e.g. USD
originalAmount Float Total cost for payment
originalCurrency String Currency information, 3-Letter Codes e.g. USD
segmentCount Int Segment count
chargeFees Object[] Object for charge fee details from AeroHub
  chargeType Int charge Item
  chargeAmount Float amount
  currency String currency
passengers Object[] Object for Passenger information
  passengerId String Passengerid, start from 0, no duplicate, e.g.: 0, 1, 2, 3, 4, 5.
  withPassengerId String CHD or Infant realted to the adult number.
  firstName String FirstName,in case of middle name, format is firstName middleName
  lastName String LastName
  birthday String Birthday, format: YYYYMMDD
  gender String Gender, M: male F: female
  ageType Int Passenger type:
0:adult
1:child
2:infant
  nationality String Nationality, 2_letter country code
  cardType String Credential Type, PP: pasport
  cardNum String Credential Number, maximum 15 char, most case is passport number
  cardExpired String Credential expired date, format: YYYYMMDD
  cardIssuePlace String Credential issued country, country 2_letter code e.g. JP
contact Object Object for contact information
  lastName String LastName
  firstName String FirstName,in case of middle name, format is firstName middleName
  mobile String Mobile information, format country number + mobile number e.g.: 81 123412341234
  email String Email
  address String Detail address
  postCode String Post code of address
  otherPhone String Other contact mobile number
  countryCode String National code
  city String City
  title String Contact person title
  companyName String Company name
ssrs Object[] Object for ssr information
  passengerId String The passenger id associated with the ssr
  flightNumber String The flightNumber associated with the ssr
  depAirport String The depAirport associated with the ssr
  arrAirport String Arrival airport IATA 3-Letter Codes, The arrAirport associated with the ssr
  applyType String 0: ALL, 1: DURING_BOOKING, 2: POST_BOOKING
  type Int type, 0: Checkin Baggage; 1: Cabin Baggage; 2: Online Checkin; 3: Priority;
  code String Unique identify code for SSR Code
  name String ssr display name
  amount Float Total SSR price
  currency String Currency information, 3_letter code e.g. USD
  originalAmount Float Total SSR original price
  originalCurrency String Currency information, 3_letter code e.g. USD
  count Int SSR count
  unit String baggage unit, visible when type is 0
  weight String baggage weight, visible when type is 0
seats Object[] Object for ssr information
  passengerId String The passenger id associated with the ssr
  flightNumber String The flightNumber associated with the ssr
  depAirport String The depAirport associated with the ssr
  arrAirport String Arrival airport IATA 3-Letter Codes, The arrAirport associated with the ssr
  amount Float seat Price
  currency String Currency information, 3_letter code e.g. USD
  originalAmount Float seat Price
  originalCurrency String Currency information, 3_letter code e.g. USD
  seatIdentifier String Seat col, e.g:A
  rowNumber String Seat row, e.g:1
  designator String Seat identifier,e.g.: 1A
routing Object Object for routing information
  currency String Currency information, 3-Letter Codes e.g. USD
  originalCurrency String Currency information, 3-Letter Codes e.g. USD
  fromSegments Object[] Object for departure route segments.
    carrier String Carrier IATA 2_letter code
    flightNumber String Flight number, e.g. CA123
if flight number begin with 0, must waived all the zeros, e.g. CZ006 should be used as CZ6
    depAirport String Departure airport IATA 3-Letter Codes
    depTerminal String Departure terminal
    arrAirport String Arrival airport IATA 3-Letter Codes
    arrTerminal String Arrival terminal
    depTime String Departure date and time, format: YYYYMMDDHHMM e.g. 201203100315 means 2012/03/10 03:15
    arrTime String Arrival date and time, format: YYYYMMDDHHMM e.g. 201203101305 means 2012/03/10 13:05
    aircraftCode String aircraftCode
    stopAirports String stop airport IATA 3-Letter Codes
    duration Int Flight duration from departure to arrival, unit: minute
    fares Object[] Fare information
      productClass String product standardized code by AeroHub,
Y(Economy Class),
W(Premium Class),
C(Business Class),
F(First Class)
      cabinClass String RBD code generated from airline
      fareTypeCode String return fare type id defines by airline
      fareTypeDesc String return fare type name defines by airline
      paxFare Object fare for all passengers
        ADT Object[] fare for adults
          chargeType String Fare type, e.g. “FairPrice” “Tax”
          chargeDesc String Description of a charge
          chargeCode String chargeCode
          amount Float Fare amount
          currency String currency
          originalAmount Float Fare amount from airlines
        CHD Object[] fare for children
          chargeType String Fare type, e.g. “FairPrice” “Tax”
          chargeDesc String Description of a charge
          chargeCode String chargeCode
          amount Float Fare amount
          currency String currency
          originalAmount Float Fare amount from airlines
        INF Object[] fare for infant
          chargeType String Fare type, e.g. “FairPrice” “Tax”
          chargeDesc String Description of a charge
          chargeCode String chargeCode
          amount Float Fare amount
          currency String currency
          originalAmount Float Fare amount from airlines
  retSegments Object[]
    carrier String Carrier IATA 2_letter code
    flightNumber String Flight number, e.g. CA123
if flight number begin with 0, must waived all the zeros, e.g. CZ006 should be used as CZ6
    depAirport String Departure airport IATA 3-Letter Codes
    depTerminal String Departure terminal
    arrAirport String Arrival airport IATA 3-Letter Codes
    arrTerminal String Arrival terminal
    depTime String Departure date and time, format: YYYYMMDDHHMM e.g. 201203100315 means 2012/03/10 03:15
    arrTime String Arrival date and time, format: YYYYMMDDHHMM e.g. 201203101305 means 2012/03/10 13:05
    stopAirports String stop airport IATA 3-Letter Codes
    duration Int Flight duration from departure to arrival, unit: minute
    fares Object[] Fare information
      productClass String product standardized code by AeroHub,
Y(Economy Class),
W(Premium Class),
C(Business Class),
F(First Class)
      cabinClass String RBD code generated from airline.
      fareTypeCode String return fare type id defines by airline
      fareTypeDesc String return fare type name defines by airline
      paxFare Object fare for all passengers
        ADT Object[] fare for adults
          chargeType String Fare type, e.g. “FairPrice” “Tax”
          chargeCode String chargeCode
          currency String currency
          originalCurrency String originalCurrency
          chargeDesc String Description of a charge
          amount Float Fare amount
          originalAmount Float Fare amount from airlines
        CHD Object[] fare for children
          chargeType String Fare type, e.g. “FairPrice” “Tax”
          chargeCode String chargeCode
          currency String currency
          originalCurrency String originalCurrency
          chargeDesc String Description of a charge
          amount Float Fare amount
          originalAmount Float Fare amount from airlines
        INF Object[] fare for infant
          chargeType String Fare type, e.g. “FairPrice” “Tax”
          chargeCode String chargeCode
          currency String currency
          originalCurrency String originalCurrency
          chargeDesc String Description of a charge
          amount Float Fare amount
          originalAmount Float Fare amount from airlines
tickets Object[] Ticket number list, empty if the order is not in ‘TICKETED’ state.
  passengerId String Passenger Id
  flightNumber String Flight number
  productClass String product standardized code by AeroHub,
Y(Economy Class),
W(Premium Class),
C(Business Class),
F(First Class)
  cabinClass String RBD code generated from airline
  ticketNumber String Ticket Number from airline
  pnr String pnr from airline
  pnrStatus String pnr status from airline

Success-Response:

{
    "agencyAccountID": "AeroHub",
    "amount": 1153.62,
    "chargeFees":
    [
        {
            "chargeAmount": 1.0,
            "chargeType": 1,
            "currency": "USD"
        }
    ],
    "contact":
    {
        "address": "Manhattan(New York county), New York, United States",
        "city": "NewYork",
        "companyName": "XXX",
        "countryCode": "US",
        "email": "LongMike@gmail.com",
        "firstName": "Long",
        "lastName": "Mike",
        "mobile": "18888888888",
        "otherPhone": "001-18888888888",
        "postCode": "10001",
        "title": "MR"
    },
    "contentMsg": "success",
    "contentStatus": 0,
    "currency": "USD",
    "msg": "success",
    "orderNum": "1689900867685187584",
    "itineraryUrl ": "https://{url}/api/booking/itinerary?cipher=z%2BvMLOM%2BqPrFQfY1j6RWgKZnqZkcdaw5/O%2B2C8HI/d8=&iv=qKg13H706ylXTsHz",
    "orderStatus": "TICKETED",
    "originalAmount": 5286.0,
    "originalCurrency": "MYR",
    "passengers":
    [
        {
            "ageType": 0,
            "birthday": "20000820",
            "cardExpired": "20231119",
            "cardIssuePlace": "US",
            "cardNum": "014580835",
            "cardType": "PP",
            "firstName": "MIW",
            "gender": "F",
            "lastName": "AFO",
            "nationality": "US",
            "passengerId": "0",
            "withPassengerId": ""
        },
        {
            "ageType": 0,
            "birthday": "19500621",
            "cardExpired": "20231119",
            "cardIssuePlace": "US",
            "cardNum": "553487078",
            "cardType": "PP",
            "firstName": "GWX",
            "gender": "F",
            "lastName": "TYE",
            "nationality": "US",
            "passengerId": "1",
            "withPassengerId": ""
        }
    ],
    "routeType": 2,
    "routing":
    {
        "fromSegments":
        [
            {
                "aircraftCode": "330",
                "arrAirport": "AKL",
                "arrTerminal": "",
                "arrTime": "202309111720",
                "carrier": "D7",
                "currency": "USD",
                "data": "",
                "depAirport": "KUL",
                "depTerminal": "1",
                "depTime": "202309102310",
                "duration": 850,
                "fares":
                {
                    "availableCount": 20,
                    "cabinClass": "E",
                    "cabinName": "Economy",
                    "fareBasisCode": "E01H00",
                    "fareKey": "0~E~ ~AK~E01H00~AAX1~~1~1~NAKLKUL0010010~X",
                    "fareSequence": 1,
                    "fareTypeCode": "EP",
                    "fareTypeDesc": "Low Fare",
                    "paxFare":
                    {
                        "ADT":
                        [
                            {
                                "amount": 173.07,
                                "chargeCode": "",
                                "chargeDesc": "FarePrice",
                                "chargeType": "FarePrice",
                                "currency": "USD",
                                "originalAmount": 793.0,
                                "originalCurrency": "MYR"
                            },
                            {
                                "amount": 130.95,
                                "chargeCode": "",
                                "chargeDesc": "Tax",
                                "chargeType": "Tax",
                                "currency": "USD",
                                "originalAmount": 600.0,
                                "originalCurrency": "MYR"
                            }
                        ],
                        "CHD":
                        [],
                        "INF":
                        []
                    },
                    "productClass": "Y"
                },
                "flightNumber": "D7288",
                "stopAirports":
                [
                    {
                        "airport": "SYD",
                        "duration": 685
                    }
                ]
            }
        ],
        "retSegments":
        [
            {
                "aircraftCode": "330",
                "arrAirport": "KUL",
                "arrTerminal": "",
                "arrTime": "202309180335",
                "carrier": "D7",
                "currency": "USD",
                "data": "",
                "depAirport": "AKL",
                "depTerminal": "1",
                "depTime": "202309171845",
                "duration": 770,
                "fares":
                {
                    "availableCount": 20,
                    "cabinClass": "E",
                    "cabinName": "Economy",
                    "fareBasisCode": "E01H00",
                    "fareKey": "0~E~ ~AK~E01H00~AAX1~~1~1~NAKLKUL0010010~X",
                    "fareSequence": 1,
                    "fareTypeCode": "EP",
                    "fareTypeDesc": "Low Fare",
                    "paxFare":
                    {
                        "ADT":
                        [
                            {
                                "amount": 173.07,
                                "chargeCode": "",
                                "chargeDesc": "FarePrice",
                                "chargeType": "FarePrice",
                                "currency": "USD",
                                "originalAmount": 793.0,
                                "originalCurrency": "MYR"
                            },
                            {
                                "amount": 99.74,
                                "chargeCode": "",
                                "chargeDesc": "Tax",
                                "chargeType": "Tax",
                                "currency": "USD",
                                "originalAmount": 457.0,
                                "originalCurrency": "MYR"
                            }
                        ],
                        "CHD":
                        [],
                        "INF":
                        []
                    },
                    "productClass": "Y"
                },
                "flightNumber": "D7289",
                "stopAirports":
                [
                    {
                        "airport": "SYD",
                        "duration": 95
                    }
                ]
            }
        ]
    },
    "seats":
    [],
    "segmentCount": 2,
    "sessionId": "b96deff1f5c4600ef902aff78c26d8e4",
    "ssrs":
    [],
    "status": 0,
    "tickets":
    [
        {
            "cabinClass": "E",
            "flightNumber": "D7289",
            "passengerId": "0",
            "pnr": "QRRY7D",
            "pnrStatus": "TICKETED",
            "productClass": "Y",
            "ticketNumber": "QRRY7D"
        },
        {
            "cabinClass": "E",
            "flightNumber": "D7289",
            "passengerId": "1",
            "pnr": "QRRY7D",
            "pnrStatus": "TICKETED",
            "productClass": "Y",
            "ticketNumber": "QRRY7D"
        }
    ]
}

Status Code

Name Description
1000 General system error
1001 Request parameters or part of parameters missing
1002 Invalid Action
1003 API request timeout, please request again
1004 Invalid request parameter
1005 Service system error
1006 System busy, please try again
1101 Authentication fail, wrong signature
1102 Account disabled, please contact with account administrator

Error-Response

{
    "status": 1000,
    "msg": "Letslfy flight internal error"
}
Author:fulei  Create time:2023-05-24 16:14
Last editor:AeroHub  Update time:2024-09-10 16:26