Booking | Commit
Commit the request data which is made in previous steps.
Notice:
- Product Scope : TechHub, FareMarket
- AeroHub will perform availability checking everytime when this API is called.
- Maximum response time is 30 seconds.
POST
/flight/booking
Parameter
Field | Mandatory | Type | Scope | Description |
---|---|---|---|---|
action | required |
String | Commit | |
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.0.0 | |
request | required |
Object | ||
sessionId | required |
String | Generated from AirPricing | |
timeout | optional |
String | Maximum response time setting, by seconds. e.g. 10 | |
customerOrderNum | optional |
String | A unique identifier assigned to each order placed by a customer |
Request_Example:
{ "action": "Commit", "key": "n93mPT7WzN6cLKC2", "signature": "YhQ2EoBQOfOnf/EOnuuuK5i+K+ncydeQhjFpoXYiEMo=", "timestamp": 1685116516, "request": { "sessionId": "78b53781fc514ffde1aee517b3673218", "timeout": 200 } }
Response
Notes
The price included in the API response comprises the total price of both the ticket and ancillary products when purchased together with the ticket. When purchasing ancillary products separately, it only includes the price of the ancillary products.
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 |
balanceDue | Float | Amount to be paid |
isPriceChanged | Boolean | Determining whether the fare is changed or not comparing to AirPricing True: changed False: remain the same |
orderNum | String | Order number generated by Aerohub |
orderStatus | String | AeroHub Order status Please refer orderStatus enum from Appendix |
pnr | String | TechHub: return PNR information retrieved from airline FareMarket: return a hold PNR generated by AeroHub, the actual Passenger PNR can be retrieved from GetBookingDetail |
amount | Float | Total cost for payment |
currency | String | Currency information, 3_letter code e.g. USD |
originalAmount | Float | Total cost for payment |
originalCurrency | String | Currency information, 3_letter code e.g. USD |
Success-Response:
{ "status": 0, "msg": "success", "originalCurrency": "TWD", "originalAmount": 13320.00, "currency": "JPY", "amount": 59805.02, "balanceDue": 13320.00, "orderNum": "1684888866336538624", "pnr": "Y42NAN", "orderStatus": "NEED_PAYMENT", "isPriceChanged": false, "contentStatus": 0, "contentMsg": "success" }
Status Code
Name | Description |
---|---|
423 | Error returned by hub airline |
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 |
1040 | Traffic has exceeded daily limitation |
1101 | Authentication fail, wrong signature |
1102 | Account disabled, please contact with account administrator |
1201 | Insufficient balance in account (Commit after SetPaymentToBooking) |
2002 | No valid Journey in the session |
2003 | No passengers in the current session |
2004 | The order creation failed. For specific reasons, please refer to the msg field. |
2026 | The pre-payment verification failed. For specific reasons, please refer to the msg field. |
2012 | This flight is sold out (Commit with no payment set) |
2013 | Price is not available, please order again (Commit with payment set) |
Error-Response
{ "status": 1000, "msg": "Letslfy flight internal error" }
Author:admin Create time:2023-05-24 16:09
Last editor:AeroHub Update time:2025-05-19 15:12
Last editor:AeroHub Update time:2025-05-19 15:12