Booking API
Ticket Status Check API
POST: /api/air-tickets/revalidate
Check ticket availability before booking
Request Body
Parameter | Description |
---|---|
searchId(String, Required) | Data used to refer to search results |
This data is taken from the return results of airline ticket search | |
groupId(String, Required) | Journey identifier in the list of journeys returned by search results |
fareSourceCode(String, Required) | Journey identifier information |
Example
Response
Parameter | Description |
---|---|
valid(Boolean, Required) | Is the ticket information still useful? |
duration(Integer, Optional) | |
errors (Array[Error], Optional) | |
infos(Array[Info], Optional) | |
success(Boolean, Optional) | |
textMessage(String, Optional) |
Example
Create draft booking API
POST: /api/air-tickets/draft-booking
Create draft booking with ticket info
Request Body
Parameter | Description |
---|---|
itineraryInfos (Array[ItineraryInfo], Required) | Outbound + return journey information (if any) |
searchId(String, Required) | Data used to refer to search results |
This data is taken from the return results of airline ticket search | |
groupId(String, Required) | Journey identifier in the list of journeys returned by search results |
fareSourceCode(String, Required) | Journey identifier information |
Example
Response
Parameter | Description |
---|---|
bookingCode (BookingCode, Required) | Booking identifier information |
bookingCode(String, Required) | Booking Identifier |
bookingNumber(String, Required) | Code used to refer to booking. This code is unique. |
bookingType(String, Required) | Information showing the type of booking: Domestic or international |
DOME: Domestic | |
INTE: International | |
departDraftItineraryInfo (DraftItineraryInfo, Required) | Outbound itinerary information |
bookingDirection(String, Required) | Direction information |
DEPARTURE: Departure direction | |
RETURN: Return direction | |
TRIP: Used for international tickets (outbound + return) | |
fareSourceCode(String, Required) | Journey identifier information |
groupId(String, Required) | Journey identifier in the list of journeys returned by search results |
itinTotalFare (ItinTotalFare, Required) | Information about the prices of the journey |
baseFare(FareInfo, required) | Basic fare information |
amount (Double, Required) | Amount of money |
decimalPlaces(Integer, Optional) | Decimal places rounded to |
equivFare (FareInfo, Optional) | Similar to baseFare |
Ticketing fee information | |
serviceTax (FareInfo, Required) | Similar to baseFare |
Service fee information | |
totalTax (FareInfo, Required) | Similar to baseFare |
Information about total service fee | |
totalFare (FareInfo, Required) | Similar to baseFare |
Total ticket price information | |
returnDraftItineraryInfo (DraftItineraryInfo, Optional) | Similar to the detailed information of the outbound journey |
Return journey information | |
duration(Integer, Optional) | |
errors (Array[Error], Optional) | |
infos(Array[Info], Optional) | |
success(Boolean, Optional) | |
textMessage(String, Optional) |
Example
Get booking detail API
GET: /api/products/booking-detail
Get details of booking
Parameter
Parameter | Description |
---|---|
bookingNumber (String, Required) | Reference code to booking |
Example
?bookingNumber=ADCO2107201223969
Response
Parameter | Description |
---|---|
id (String, Optional) | Booking identifier code |
agencyCode (String, Optional) | Agent code. Code used to refer to the author of the booking |
agentCode (String, Optional) | Agent employee code. Code used to refer to the author of the booking |
bookingCode(String, Required) | Code used to describe basic information of booking |
bookingDate (String, Optional) | Create booking date |
bookingDirection(String, Required) | Direction information |
DEPARTURE: Departure direction | |
RETURN: Return direction | |
TRIP: Used for international tickets (outbound + return) | |
bookingInfo (BookingInfo, Optional) | Booking information |
additionalFee (Number, Optional) | Other fees |
agencyCode(String, Optional) | Dealer code. Code used to refer to the author of the booking |
agentCode(String, Optional) | Agent employee code. Code used to refer to the author of the booking |
agentId(Integer, Optional) | Agent employee id |
agentName(String, Optional) | Agent staff name |
allowHold(Boolean, Optional) | Is it allowed to keep the plane ticket? |
true: allow to keep tickets | |
false: Not allowed to keep tickets | |
itinTotalFare (ItinTotalFare, Required) | Information about the prices of the journey |
baseFare(Number, Optional) | Basic fare information |
bookBy(String, Optional) | The person who booked the booking |
bookByCode(String, Optional) | Orderer code |
bookingCode(String, Optional) | Code used to describe basic information of booking |
bookingDate(String, Optional) | Booking creation date |
bookingNote(String, Optional) | Notes of booking |
bookingNumber(String, Optional) | Code used to refer to booking. This code is unique. |
bookingType(String, Optional) = [‘DOME’, ‘INTE’] | Determine whether the destination is domestic or international |
DOME: Domestic | |
INTE: International | |
branchCode(String, Optional) | Branch code |
cancellationBy(String, Optional) | Ticket cancellation by… |
cancellationDate(String, Optional) | Cancellation date |
cancellationFee(Number, Optional) | Cancellation fee |
cancellationNotes(String, Optional) | Cancellation Notes |
channelType(String, Optional) = [‘ONLINE’, ‘OFFLINE’] | Booking channel type |
contactInfos(Array[BookingContactInfo], Optional) | Array of objects with contact information |
bookingNumber(String, Optional) | Reference code to booking |
contactLevel(String, Optional) = [‘PRIMARY’, ‘SECONDARY’, ‘OTHER’], | Level of contact |
contactType(String, Optional) = [‘CUSTOMER’, ‘AGENCY’] | Type of contact person |
email(String, Optional) | Email address |
firstName(String, Optional) | Night name and contact name |
phoneCode1(String, Optional) | Country code |
phoneNumber1(String, Optional) | Phone number 1 |
surName(String, Optional) | Contact person’s last name |
customerCode(String, Optional) | Customer’s code |
customerEmail(String, Optional) | Customer’s email |
customerFirstName(String, Optional) | Client’s last name |
customerId(Integer, Optional) | Customer id |
customerLastName(String, Optional) | Customer’s name |
customerPhoneNumber1(String, Optional) | Customer’s phone number 1 |
customerPhoneNumber2(String, Optional) | Customer’s phone number 2 |
departureDate(String, Optional) | Departure day |
discountAmount (Number, Optional) | Amount to be reduced |
discountDate(String, Optional) | Date to use discount code |
discountRedeemCode(String, Optional) | Redemption Link Code |
discountRedeemId(String, Optional) | Normal link identifier id |
discountVoucherCode(String, Optional) | Voucher code |
discountVoucherName(String, Optional) | Name of the voucher |
equivFare (FareInfo, Optional) | Similar to baseFare |
Ticketing fee information | |
etickets(String, Optional) | Supplier link code, used to receive air tickets |
fromCity(String, Optional) | Departure city name |
fromLocationCode(String, Optional), | Departure Airport Identifier |
fromLocationName(String, Optional), | Departure airport name |
id(integer, Optional), | Id of booking |
issuedByCode(String, Optional), | Tickets issued by… |
issuedDate(String, Optional) | Check-out date |
issuedStatus(String, Optional) = [‘PENDING’, ‘TICKET_ON_PROCESS’, ‘SUCCEEDED’, ‘FAILED’], | Ticketing Status |
PENDING: Waiting to issue tickets | |
TICKET_ON_PROCESS: Ticket issue is being processed | |
SUCCEEDED: Successfully issued tickets | |
FAILED: Ticket issue failed | |
orgCode (String, Optional) | Organization code |
passengerNameRecords(String, Optional) | Supplier link code, used to receive air tickets |
paymentBy(String, Optional) | Paid by… |
paymentByCode(String, Optional) | Payer code |
paymentDate(String, Optional) | Payment time |
paymentFee (Number, Optional) | Payment Fees |
paymentRefNumber(String, Optional) | Payment reference code |
paymentStatus(String, Optional) = [‘SUCCEEDED’, ‘FAILED’, ‘REFUNDED’, ‘PENDING’], | Payment Status |
PENDING: Waiting for payment | |
SUCCEEDED: Successful payment | |
FAILED: Payment failed | |
REFUNDED: Refunds | |
paymentTotalAmount(Number, Optional) | Total payment amount |
paymentType(String, Optional) = [‘BALANCE’, ‘CREDIT’, ‘ATM_DEBIT’, ‘AIRPAY’, ‘VNPAYQR’, ‘VIETTELPAY’, ‘MOMO’, ‘ZALO’, ‘PAYOO’, ‘CASH’, ‘TRANSFER ‘, ‘PARTNER’, ‘OTHER’], | Payment method |
refundBy(String, Optional) | Refunder |
refundByCode(String, Optional), | Code of the person making the refund |
refundable (Boolean, Optional) | Refund date |
returnDate(String, Optional) | Check-out date |
roundType(String, Optional) = [‘RoundTrip] | |
saleChannel(String, Optional) = [‘B2B’, ‘B2C’, ‘B2B2C’, ‘B2C_WEB’, ‘B2C_WEB_APP’, ‘B2C_MOBILE’] | Distribution channel |
serviceTax(Number, Optional) | Taxes and fees |
status (String, Optional) = [‘PENDING’, ‘BOOKING_ON_PROCESS’, ‘BOOKED’, ‘FAILED’, ‘CANCELLED’, ‘EXPIRED’], | Status of booking |
PENDING: Waiting for booking confirmation | |
BOOKING_ON_PROCESS: Booking is being processed | |
BOOKED: Booking confirmed | |
FAILED: Booking failed | |
EXPIRED: Expired Booking | |
CANCELLED: Booking has been canceled | |
supplierType(String, Optional) = [‘AIR’, ‘HOTEL’, ‘TOURS’, ‘TRAIN’, ‘SHIP’, ‘OTHER’], | Supplier Type |
taxAddress1(String, Optional) | Invoicing address line 1 |
taxAddress2(String, Optional) | Invoicing address line 2 |
taxCompanyName(String, Optional) | Invoice company name |
taxNumber (String, Optional) | Tax code to be invoiced |
taxPersonalInfoContact(String, Optional) | Invoice recipients |
taxReceiptRequest(Boolean, Optional) | Request an invoice or not? |
timeToLive(String, Optional) | Waiting time for payment, after this time booking status will change to EXPIRED |
toCity(String, Optional) | Name of destination province, city |
toLocationCode(String, Optional) | Destination Identifier |
toLocationName(String, Optional) | Destination airport name |
totalFare(Number, Optional) | Total room rate |
totalSsrValue(Number, Optional) | Total price of luggage/extra service |
totalTax(Number, Optional) | Total amount of taxes and fees |
transactionInfos(Array[BookingTransactionInfo], Optional) | Array of objects containing transaction information |
id(integer, Optional) | Transaction identifier id |
allowHold(Boolean, Optional) | Is it allowed to keep tickets? |
bookingCode(String, Optional) | Code used to describe basic information of booking |
bookingDate(String, Optional) | Booking creation date |
bookingDirection(String, Optional) = [‘DEPARTURE’, ‘RETURN’] | |
bookingNumber(String, Optional) | Code used to refer to booking. |
bookingRefNo(String, Optional) | Supplier link code |
channelType(String, Optional) = [‘ONLINE’, ‘OFFLINE’] | Type of sales channel |
checkIn(String, Optional) | Flight date and time |
checkOut(String, Optional) | Time and date come |
destinationLocationCode(String, Optional) | Stadium Identifier |
detail(String, Optional) | Location name |
etickets(String, Optional) | Vendor affiliate code, used to receive tickets |
issuedDate(String, Optional) | Ticket issue date |
issuedStatus(String, Optional) = [‘PENDING’, ‘TICKET_ON_PROCESS’, ‘SUCCEEDED’, ‘FAILED’] | Ticketing Status |
PENDING: Waiting to issue tickets | |
TICKET_ON_PROCESS: Ticket issue is being processed | |
SUCCEEDED: Successfully issued tickets | |
FAILED: Ticket issue failed | |
noAdult(integer, Optional) | Number of adults |
noChild(integer, Optional) | Number of children |
onlyPayLater(Boolean, Optional) | Postpaid or not allowed? |
passengerNameRecord(String, Optional), | Vendor affiliate code, used to receive tickets |
paymentAmount(Number, Optional) | Payment amount |
productSeqNumber(String, Optional) | Product code |
refundable (Boolean, Optional) | Is there a refund for ticket cancellation? |
saleChannel(String, Optional) = [‘B2B’, ‘B2C’, ‘B2B2C’, ‘B2C_WEB’, ‘B2C_WEB_APP’, ‘B2C_MOBILE’] | Distribution channel |
serviceTax(Number, Optional) | Taxes and fees |
status (String, Optional) = [‘PENDING’, ‘BOOKING_ON_PROCESS’, ‘BOOKED’, ‘FAILED’, ‘CANCELLED’, ‘EXPIRED’], | Status of booking |
PENDING: Waiting for booking confirmation | |
BOOKING_ON_PROCESS: Booking is being processed | |
BOOKED: Booking confirmed | |
FAILED: Booking failed | |
EXPIRED: Expired Booking | |
CANCELLED: Booking has been canceled | |
supplierCode(String, Optional) | Supplier code |
supplierName(String, Optional) | Supplier Name |
supplierType(String, Optional) = [‘AIR’, ‘HOTEL’, ‘TOURS’, ‘TRAIN’, ‘SHIP’, ‘OTHER’] | Product Type |
totalFare(Number, Optional) | Total fare |
totalTax(Number, Optional) | Total taxes and fees |
baseFare(Number, Optional) | Ticket price does not include taxes |
travelerInfos(Array[BookingTravelerInfo], Optional) | Array of objects containing passenger information. |
bookingNumber(String) | Reference code to booking |
firstName(String) | Night name and passenger name |
surName(String) | Passenger’s surname |
bookingNumber(String, Optional) | Code used to refer to booking. This code is unique. |
bookingType(String, Optional) | Determine whether the destination is domestic or international |
DOME: Domestic | |
INTE: International | |
branchCode(String, Optional) | Branch code |
groupPricedItineraries (Array[GroupPricedItinerary], Optional), | Information about the list of journeys returned by search results |
Similar to getting flight ticket search information | |
OrgCode(String, Optional) | Organization code |
saleChannel(String, Optional) = [‘B2B’, ‘B2C’, ‘B2B2C’, ‘B2C_WEB’, ‘B2C_WEB_APP’, ‘B2C_MOBILE’], | Distribution channel |
supplierType(String, Optional) = [‘AIR’, ‘HOTEL’, ‘TOURS’, ‘TRAIN’, ‘SHIP’, ‘OTHER’], | Supplier Type |
Example