Order | OrderCancel
This API enables authorized users to cancel existing orders. It can be called repeatedly, and the status of an already cancelled order will not change.
Notice:
Product Scope :TechHub and FareMarket
POST
/flight/booking
Parameter
Field | Mandatory | Type | Scope | Description |
---|---|---|---|---|
action | required |
String | OrderCancel | |
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. It serves as a unique identifier for bookings made through TechHub and FareMarket, whether for flight bookings or ancillary services. |
Request_Example:
{ "action": "OrderCancel", "key": "n93mPT7WzN6cLKC2", "signature": "YhQ2EoBQOfOnf/EOnuuuK5i+K+ncydeQhjFpoXYiEMo=", "timestamp": 1685116516, "request": { "orderNum": "1686212784620044288" } }
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 |
postAncillaryInfo | Object[] | After-sales ancillary details from AeroHub |
ancillaryNum | String | Order number containing after-sales ancillary information |
status | String | status |
amount | Float | amount |
originalAmount | Float | originalAmount |
currency | String | currency |
originalCurrency | String | originalCurrency |
itineraryUrl | String | Itinerary url. Itinerary file download url |
orderStatus | String | Booking status: TICKETED: ticketing success. refer orderStatus enum from Appendix |
failureReason | int | failureReason:Incorrect information,Withdraw before issuing,Duplicate booking,Other Rreasons,Fare change,Flight sold out,Ancillary not available,Airline error,Payment card error |
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: Passport ID: Identity number UN: Other Credential Type |
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 |
String | ||
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 |
orderNum | String | Order number, maximun 100 char |
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: Cabin Baggage + Priority Boarding Package; |
code | String | Unique identify code for SSR Code |
name | String | ssr display name |
amount | Float | SSR Price |
currency | String | Currency information, 3_letter code e.g. USD |
originalAmount | Float | SSR 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 | Int | baggage weight, visible when type is 0 |
seats | Object[] | Object for ssr information |
orderNum | String | Order number, maximun 100 char |
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 |
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 |
codeShare | Boolean | Whether it is a shared flight true : yes false: no |
operatingFlightNumber | String | Actual operating flight number |
operatingCarrier | String | Actual operating airline. |
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 in minutes. Available on TechHub only. |
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. For reference only. |
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 |
codeShare | Boolean | Whether it is a shared flight true : yes false: no |
operatingFlightNumber | String | Actual operating flight number |
operatingCarrier | String | Actual operating airline. |
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 in minutes. Available on TechHub only. |
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. For reference only. |
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 |
accountName | String | in case the airline requires the account credentails to manage the booking, the account ID is provided in this parameter |
accountPass | String | in case the airline requires the account credentails to manage the booking, the account password is provided in this parameter |
airlineOtherFees | Object[] | Details of the payment amount. |
type | int | Type of amount. 1: Airline discount amount. 2: Airline payment fee. |
orderNum | String | Order number, maximun 100 char. |
desc | String | Description of the payment. |
originalAmount | Float | Amount in the original currency. |
originalCurrency | String | The original currency code. |
amount | Float | Amount in the customer’s quoted currency. |
currency | String | The customer’s currency code. |
Success-Response:
{ "amount": 86.91, "originalAmount": 125.2, "currency": "EUR", "originalCurrency": "SGD", "orderNum": "1962780672225595392", "sessionId": "bfaab096fbb402000993287ec02592eb", "agencyAccountID": "AeroHub", "routeType": 2, "orderStatus": "CANCELED", "fromImport": 0, "failureReason": "Order Canceled", "airlineOtherFees": [], "segmentCount": 1, "contact": { "mobile": "86-18888888888", "contact_mobile_country_code": "", "email": "18888309762@163.com", "address": "Manhattan(New York county), New York, United States", "firstName": "hbk", "lastName": "maq", "otherPhone": "", "postCode": "10001", "countryCode": "MY", "city": "New York", "title": "Ms", "companyName": "" }, "chargeFees": [ { "chargeType": 1, "chargeAmount": 5.5, "currency": "EUR" } ], "passengers": [ { "passengerId": "0", "firstName": "hbk", "lastName": "maq", "ageType": 0, "birthday": "19580123", "gender": "F", "cardNum": "A571104016", "cardType": "PP", "cardIssuePlace": "CN", "cardExpired": "20270803", "nationality": "CN", "withPassengerId": "" } ], "ssrs": [], "seats": [], "tickets": [ { "ticketNumber": "", "pnr": "", "pnrStatus": "", "flightNumber": "TR870", "passengerId": "0", "accountName": "", "accountPass": "", "cabinClass": "O", "productClass": "Y" } ], "routing": { "fromSegments": [ { "aircraftCode": "789", "arrAirport": "TPE", "arrTerminal": "", "arrTime": "202509181430", "carrier": "TR", "data": "e30=", "depAirport": "SIN", "depTerminal": "", "depTime": "202509180945", "duration": 285, "fares": { "paxFare": { "ADT": [ { "chargeCode": "", "chargeType": "FarePrice", "originalAmount": 60.0, "originalCurrency": "SGD", "chargeDesc": "FarePrice", "amount": 41.65, "currency": "EUR" }, { "chargeCode": "", "chargeType": "TAX", "originalAmount": 65.2, "originalCurrency": "SGD", "chargeDesc": "TaxSummary", "amount": 45.26, "currency": "EUR" } ], "CHD": [], "INF": [] }, "availableCount": 5, "fareKey": "Basic", "fareBasisCode": "O1CCOLA", "fareSequence": 1, "productClass": "Y", "cabinName": "Economy", "cabinClass": "O", "fareTypeCode": "E1", "fareTypeDesc": "Basic" }, "flightNumber": "TR870", "stopAirports": [], "operatingCarrier": "", "codeShare": false, "operatingFlightNumber": "", "currency": "EUR" } ], "retSegments": [] }, "status": 0, "msg": "success", "contentMsg": "success", "contentStatus": 0, "itineraryUrl": "", "postAncillaryInfo": [] }
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:AeroHub Create time:2025-09-02 16:48
Last editor:AeroHub Update time:2025-09-02 17:39
Last editor:AeroHub Update time:2025-09-02 17:39