Scenario Mark plans to travel from Hong Kong to Singapore. He will depart on May 8 and return on June 8. He prefers Economy Class and would also like to purchase additional baggage.
User action Mark enters the origin, destination, travel dates, and cabin class to search for available flights.
{
"search": {
"nonstop": 0,
"children": 0,
"solutions": 0,
"adults": 1,
"airline": "",
"searchAirLegs": [
{
"cabinClass": "Economy",
"origin": "BKK",
"destination": "SIN",
"departureDate": "2023-05-08"
},
{
"cabinClass": "Economy",
"origin": "SIN",
"destination": "BKK",
"departureDate": "2023-06-08"
}
]
},
"authentication": {
"sign": "111",
"partnerId": "111"
}
}journey_0journey_0 (outbound) and journey_1 (inbound)journey_0 and journey_1 for the two journeyssign field must be generated by combining partnerId and partnerKey, then encrypting them with MD5.miniRule returned in the Shopping response is for reference only. If you need fare rules in text format, please call the Penalty API.User action Mark reviews the returned flight options and selects one that he is interested in.
{
"pricing": {
"journeys": {
"journey_0": [
{
"airline": "FD",
"flightNum": "501",
"arrival": "DMK",
"arrivalDate": "2024-12-15",
"arrivalTime": "16:40",
"departure": "HKG",
"departureDate": "2024-12-15",
"departureTime": "14:40",
"bookingCode": "Z"
}
],
"journey_1": [
{
"airline": "FD",
"flightNum": "504",
"arrival": "HKG",
"arrivalDate": "2024-12-30",
"arrivalTime": "19:15",
"departure": "DMK",
"departureDate": "2024-12-30",
"departureTime": "15:30",
"bookingCode": "A"
}
]
},
"adults": 1,
"children": 1,
"infants": 0,
"solutionId": "iXf1ufZoOsBU+MpHfwQD6vzfcE3X5BFe1Vxl3oa9iNn1Noc75XschKYpLVXfU17PcPI7oU/EVSKjQj2Xuxt9QoSJGTP7oW12BBtDUQvlAzaZ1z0zhjr4N5cJVh2fElsdEXXtCGI00H3Nvx98/d2z6lUfU0Yhuny0kj/rOz4IMMmghIhWyGDa4e4T7y3BrTjFwEPZh0nHoEykVO13sMp0vXt8ub60T12OXl9dooXkhpqN51MhNjyCkSYjIYff//DJ1cRBps9+3e58SI0ifR8P6FiCKSCYOmCQLFKKLU0P8+Xlv4BsqxNY0pdOKT7LeR3w2YGgt1zSCyEXZCwy/+BBLA66j01ytAzieUvdZ3sqLyc8+7IG23vo1JfqVtlJo/pvRdlQyp6gQGJDPraSkTCSvA==",
"cabin": ""
}
}Additional requirement Mark would like to purchase extra baggage.
{
"authentication": {
"sign": "111",
"partnerId": "111"
},
"pricing": {
"journeys": {
"journey_0": [
{
"departureTime": "14:40",
"flightNum": "501",
"arrival": "DMK",
"arrivalTime": "16:40",
"bookingCode": "Z",
"departure": "HKG",
"departureDate": "2024-12-15",
"airline": "FD",
"arrivalDate": "2024-12-15"
}
],
"journey_1": [
{
"departureTime": "15:30",
"flightNum": "504",
"arrival": "HKG",
"arrivalTime": "17:15",
"bookingCode": "A",
"departure": "DMK",
"departureDate": "2024-12-30",
"airline": "FD",
"arrivalDate": "2024-12-30"
}
]
},
"children": "0",
"solutionId": "iXf1ufZoOsBU+MpHfwQD6vzfcE3X5BFe1Vxl3oa9iNn1Noc75XschKYpLVXfU17PcPI7oU/EVSKjQj2Xuxt9QoSJGTP7oW12BBtDUQvlAzaZ1z0zhjr4N5cJVh2fElsdEXXtCGI00H3Nvx98/d2z6lUfU0Yhuny0kj/rOz4IMMmghIhWyGDa4e4T7y3BrTjFwEPZh0nHoEykVO13sMp0vXt8ub60T12OXl9dooXkhpqN51MhNjyCkSYjIYff//DJ1cRBps9+3e58SI0ifR8P6FiCKSCYOmCQLFKKLU0P8+Xlv4BsqxNY0pdOKT7LeR3w2YGgt1zSCyEXZCwy/+BBLA66j01ytAzieUvdZ3sqLyc8+7IG23vo1JfqVtlJo/pvRdlQyp6gQGJDPraSkTCSvA==",
"adults": "1",
"ancillary": [
1,
2
]
}
}solutionId, the solution may become unavailable for various reasons. If you still want to try booking the flight, you can resend the request with solutionId set to "direct pricing". In this case, we will attempt to retrieve available seats from another booking code and fare.PrecisePricing_V6 is for reference only. Please use the Penalty API when making a reservation.solutionId to "direct pricing".PrecisePricing_V2 within the previous 30 minutes.User action Mark is now on the booking page and is entering passenger and contact details.
{
"authentication": {
"sign": "111",
"partnerId": "111"
},
"booking": {
"passengers": [
{
"passengerIndex": 1,
"birthday": "1993-06-22",
"firstName": "Mary",
"lastName": "Jones",
"nationality": "PH",
"psgType": "ADT",
"sex": "F",
"ffpNumber": "125003559853",
"ffpAirline": "CA",
"ktn": "1029490",
"redress": "2039401"
},
{
"passengerIndex": 2,
"birthday": "2021-04-12",
"firstName": "Jason",
"lastName": "Smith",
"nationality": "PH",
"psgType": "CHD",
"sex": "M",
"ffpNumber": "125003559853",
"ffpAirline": "CA",
"ktn": null,
"redress": null
},
{
"passengerIndex": 3,
"birthday": "2023-11-24",
"firstName": "Laura",
"lastName": "Smith",
"nationality": "PH",
"psgType": "INF",
"sex": "F",
"associatedPassengerIndex": 1
}
],
"solution": {
"solutionId": "OqDCC1j2GhG9XTKOd0/KF+6M/7Mn+gurPNfAlXIf00HtDIJIZmfk2/NfuNJ8U2NS4KZ5IHjxWoNYHt7SgOgt+PwbtwEji+tazJ+2u2Gmmtxr0fPZjbWUBzlNkMCRhoB3Rzt0Av7jBdhCM4LocbIrD0YzA4S6SxfrTr0woQVRPS1WLvZhJwx7IzWEctrqdnv7TOEK5QbnBDh8RalKJoykngem8SOx/0E4p6mjulWQH8XYvBwaq+THRi7ZdDLHgOLvAWpM+ja0R8Rzzu3yPfD5iNXaG1LUs87R+yDEjYQH7fY0BkctfLCoLVVZSMVyyA2UgwLRCazQwDXmYe29tsiNAg==",
"adtFare": 117.25,
"adtTax": 59.11,
"chdFare": 108.87,
"chdTax": 59.11,
"infFare": 28.45,
"infTax": 0,
"journeys": {
"journey_0": [
{
"airline": "FD",
"flightNum": "503",
"arrival": "DMK",
"arrivalDate": "2024-12-31",
"arrivalTime": "00:20",
"departure": "HKG",
"departureDate": "2024-12-30",
"departureTime": "22:20",
"bookingCode": "A"
}
]
}
},
"contact": {
"name": "AndyGuan",
"email": "an-dy.gu_an@pkfare.com",
"telCode": "+86",
"mobile": "17826050868",
"buyerEmail": "alan.wang@pkfare.com",
"buyerTelCode": "+86",
"buyerMobile": "18066793072"
},
"ancillary": [
{
"ancillaries": {
"baggage": [
{
"ancillaryType": 1,
"ancillaryKey": "0c3596cc08171e66748b91bdad5c1e57",
"payBaggageType": "1",
"baggagePiece": "2",
"baggageWeight": "36KG",
"baggageCurrency": "CNY",
"baggagePrice": "95.0",
"description": "",
"ancillaryJourneys": [
{
"airline": "FD",
"flightNum": "503",
"arrival": "DMK",
"arrivalDate": "2024-12-31",
"arrivalTime": "00:20",
"departure": "HKG",
"departureDate": "2024-12-30",
"departureTime": "22:20",
"bookingCode": "A"
}
],
"buyerOrder": " "
}
],
"seat": [
{
"ancillaryKey": "4f556396a9e7490cccb75a91ae19dbca",
"ancillaryType": "2",
"ancillarySegment": {
"departureTime": "00:05",
"flightNum": "896",
"arrival": "SGN",
"arrivalTime": "06:20",
"bookingCode": "I",
"departure": "DEL",
"departureDate": "2023-11-30",
"airline": "VJ",
"arrivalDate": "2023-11-30"
}
},
{
"ancillaryKey": "b9fb374c9c7fb51d88b04b415027be67",
"ancillaryType": "2",
"ancillarySegment": {
"departureTime": "17:20",
"flightNum": "632",
"arrival": "DAD",
"arrivalTime": "18:35",
"bookingCode": "I",
"departure": "SGN",
"departureDate": "2023-11-30",
"airline": "VJ",
"arrivalDate": "2023-11-30"
}
}
]
},
"ancillaryPassenger": {
"firstName": "Mary",
"lastName": "Jones",
"psgType": "ADT",
"sex": "F"
}
}
]
}
}User action On the payment page, Mark enters his credit card details to complete payment.
{
"orderPricing": {
"orderNum": "916798290874043301"
},
"authentication": {
"sign": "111",
"partnerId": "111"
}
}{
"ticketing": {
"pnr": "TOWTAR",
"name": "",
"telNum": "",
"orderNum": "916798290874043301",
"email": "321@qq.com"
},
"authentication": {
"sign": "111",
"partnerId": "111"
}
}null, orUser expectation Mark waits for the airline PNR and ticket number confirmation.
