1. PreciseBooking
PKFARE Flight Buyer API
  • Guides
    • Quick Start
    • Tricks for Playing with PKFARE API
    • Book air tickets with ancillaries
    • Raise refund requests
    • Raise change requests
    • Receive flight rescheduled notification
    • Add Paid Bags after the Booking
    • Branded Fare Integration Guide
  • API Reference
    • Air ticket booking APIs
      • TicketIssuanceNotify_V2
      • Shopping V10
      • PrecisePricing V12
      • Penalty V4
      • PreciseBooking V8
      • CancelOrder
      • OrderPricing V6
      • Ticketing
      • OrderDetail V14
      • RequestTicketing
      • ModifyOrderStatus
    • Ancillary booking APIs
      • AncillaryStatusPush
      • AncillaryPricing V6
      • AncillaryBooking
      • CancelAncillaryOrder
      • AncillaryTicketing
      • AncillaryOrderDetail
    • Flight schedule change APIs
      • ScheduleChangeNotify
      • GetScheduleChangeReply
      • GetScheduleChangeList
      • AcknowledgeScheduleChange
      • AcceptScheduleChange
    • Refund APIs
      • RefundResultNotify
      • ReimbursedResultNotify
      • Refund Pricing
      • CheckRefundPricing
      • RefundRequest
      • CheckRefund
      • CheckReimbursed
      • DownloadAttachmentFile API
      • UploadAttachmentFile API
    • Change APIs
      • ChangeResultPush
      • Change Reshop
      • Change Request
      • Change Passenger Info
      • Change Reprice
      • ChangeRepricePush
    • Void APIs
      • ReimbursedResultPush
      • VoidRequest
    • Cache APIs
      • CacheShopping
      • ValidateItinerary API
    • APIs with all versions
      • CheckInInfoPush
      • Raise change requests Copy
      • Shopping
        • Shopping
        • Shopping_V2
        • Shopping_V4
        • Shopping V7
        • Shopping V9
        • Shopping V8
      • PrecisePricing
        • PrecisePricing
        • PrecisePricing_V2
        • PrecisePricing_V6
        • PrecisePricing V9
        • PrecisePricing V10
        • PrecisePricing V11
      • Penalty
        • Penalty
        • Penalty V2
        • Penalty V3
      • PreciseBooking
        • PreciseBooking
        • PreciseBooking_V2
        • PreciseBooking_V5
        • PreciseBooking V6
          POST
        • PreciseBooking V7
          POST
      • OrderPricing
        • OrderPricing_V2
        • OrderPricing V4
        • OrderPricing V5
      • Ticketing
        • Ticketing
      • TicketNumPush
        • TicketingNumPush
        • TicketingNumPush_V2
        • TicketingNumPush_V3
        • TicketIssuanceNotify
      • CancelOrder
        • CancelOrder
      • OrderDetail
        • OrderDetail_V2
        • OrderDetail_V3
        • OrderDetail_V4
        • OrderDetail_V5
        • Json_OrderDetail_V7
        • Json_OrderDetail_V8
        • OrderDetail V9
        • OrderDetail V13
      • AncillaryPricing
        • AncillaryPricing
        • AncillaryPricing V5
      • AncillaryBooking
        • AncillaryBooking
      • CancelAncillaryOrder
        • CancelAncillaryOrder
      • AncillaryTicketing
        • AncillaryTicketing_V2
      • AncillaryStatusPush
        • AncillaryStatusPush
      • AncillaryOrderDetail
        • AncillaryOrderDetail
      • RequestTicketing
        • RequestTicketing
      • ScheduleChangeNotify
        • ScheduleChangeNotify
      • GetScheduleChangeList
        • GetScheduleChangeList
      • AcknowledgeScheduleChange
        • AcknowledgeScheduleChange
      • AcceptScheduleChange
        • AcceptScheduleChange
      • GetScheduleChangeReply
        • GetScheduleChangeReply
      • RefundPricing
        • RefundPricing
      • CheckRefundPricing
        • CheckRefundPricing
      • RefundRequest
        • RefundRequest
      • RefundResultNotify
        • RefundResultNotify
      • CheckRefund
        • CheckRefund
      • ReimbursedResultNotify
        • ReimbursedResultNotify
      • CheckReimbursed
        • CheckReimbursed
      • UploadAttachmentFile
        • UploadAttachmentFile
      • DownloadAttachmentFile
        • DownloadAttachmentFile
      • ChangeReshop
        • ChangeReshop
      • ChangeRequest
        • ChangeRequest
      • ChangePassengerInfo
        • ChangePassengerInfo
      • VoidRequest
        • VoidRequest
        • VoidRequest_V2
      • ReimbursedResultPush
        • ReimburseResultPush_V2
  • Development Instructions
    • Signature
    • Order Status Explanation
    • Booking errors explanation and suggestions
    • Price Breakdown Explanation
    • Airlines available from PKFARE
    • PKFARE Operation Notice
    • How to retrieve airlines'PNR and ticket numbers
    • PKFARE Buyer API solutionId Usage Guide
  • Notice
    • Release Note
  • Schemas
    • Schemas
      • ShoppingReq
      • Result«ShoppingResult»
      • Authentication
      • SearchDTO
      • JourneysDTO_1
      • PassengersDTO
      • ShoppingResult
      • SegmentsDTO
      • SolutionsDTO
      • BaggageDTO
      • ConditionsDTO
      • ChangeDTO
      • OtherDTO
      • RefundDTO
      • JourneysDTO
      • SegmentInfoDTO
  1. PreciseBooking

PreciseBooking V7

POST
/json/preciseBooking_V7

Function

Through the most updated version PreciseBooking_V5 API, Seat selection in  the bookings are supported based on the results from AncillaryPricing_V3. 

It's not supported that multiple paid checked bags or multiple paid carry-on bags are added for the same passenger on a single journey, but it's allowed to add a checked bag and a carry-on baggage on a single journey at the same time.

Besides,  it's not allowed to add multiple seats for the same passenger in a flight or select the same seat for multiple passengers in a flight.

It is necessary to use PrecisePricing service before using this interface. The whole process should be limited to 30 mins.

Versioning

VersionSandbox Invoking AddressUpdate
PreciseBookinghttps://api.pkfare.com/preciseBooking
PreciseBooking_V2https://api.pkfare.com/preciseBooking_V2It is capable of buying ancillaries
PreciseBooking_V3https://api.pkfare.com/preciseBooking_V3Support infant (no seat) bookings.
PreciseBooking_V4https://api.pkfare.com/preciseBooking_V4support seat selection in the initial booking
PreciseBooking_V5https://api.pkfare.com/preciseBooking_V5Add solutionId to enhance tracebility and visibility
PreciseBooking_V5(json format)https://api.pkfare.com/json/preciseBooking_V5Add solutionId to enhance tracebility and visibility; Support json formatted requesting structure
PreciseBooking_V6(json format)https://api.pkfare.com/json/preciseBooking_V6Add solutionId to enhance tracebility and visibility; Support json formatted requesting structure
PreciseBooking_V7(json format)https://api.pkfare.com/json/preciseBooking_V7support booking prices for different product tags, including PKFARE-defined special product types and airline-standard branded fares, etc.

Below is the most updated version

Error Code List

erroCodeerroMsgDescription
0okRequest has been processed successfully.
S001System error.System error.
B002Partner is not exists.PartnerID does not exist.
B003Illegal sign.Illegal sign. Please check your signature.
B035Concurrency limited. Please contact PKFARE API support team for assistant.Concurrency exceeded system limits.
P001XXX is illegal.The field of XXX is illegal.
P002XXX is missing.The field of XXX is missing.
P006Invalid parameter.Value of request cannot pass the validation, please check on the request.
0307Reservation failed - Booking class is sold out.Reservation failed. Seats have been sold out.
B004There are errors in the passenger type of Adults.Adult passenger's age does not meet the requirements.
B005Can not find any matching precisePricing result within 30 minutes.Can not find the corresponding precisePricing record. Please check the itinerary and passenger numbers. PreciseBooking has to be invoked within 30 minutes after pricing.
B006Reservation failed - Other. OrderNum is XXX.Booking fail for other reason. The order has been created which is indicated in Other.OrderNum field
B006Reservation failed.Booking fail for other reason.
B007Reservation failed - Segment status is not HK.Segment status is invalid from GDS. Please select other flight options.
B008Itinerary is different between PNR and order.Itinerary in reservation is different from precisePricing. There might be a flight re-schedule. Please select other flight options.
B011Reservation failed - Fare is unavailable.Fare is unavailable form GDS. Please select other flight options.
B012Reservation failed - Create PNR time out.Create PNR time out from GDS. Please wait some minutes or select other flight options.
B017Price is changed.Price is changed.
B023Reservation failed - Save price fail.Fail to save price from GDS.
B022There are errors in the passenger type of ChildrenChild passenger's age does not meet the requirements.
B025Reservation failed - RT PNR fail.Fail to retieve PNR from GDS.
B027Airline PNR is missing.Airline PNR is missing from GDS.
B028Reservation failed - Time out.Booking time out from GDS.
B029Duplicate reservations have been found for passenger XXX/XXX in order XXX, in pnr XXX.Duplicated reservation is not allowed. If there is an order with same segment and passenger, system will block the second reservation and return error. Please cancel the last duplicated order or pay the last order directly.
B030Illegal passenger name, please use Chinese character.Wrong passenger name. If passengers use Chinese ID card to make reservation for China domestic flight, please use Chinese character.
B031Illegal passenger name, please use correct Chinese character.Wrong passenger name. If passengers use chinese ID card to make reservation, the chinese name length is over the limitation.
B032Illegal passport, please use 'N' as document type if you are using Chinese ID card to make reservation.Illegal passport. If passengers book Chinese flight, please use correct passport.
B043Reservation failed: Create PNR failed.Booking failed from GDS.
B044Reservation failed - Create PNR failed, end transaction failed.Booking failed from GDS.
B062The length of passenger name should be 40 English alphabet including / between last name and first name.Passenger's name should be within 40 English alphabet, including "/" between last name and first name.
B064The lastName of passegner should be within 2-30 English alphabet.Passenger's last name should be within 2-30 English alphabet.
B065Passenger's document information must be filled in for this trip. Passenger's document information contains cardType, cardNum, cardExpiredDate and nationality.Passenger's document information must be filled in for this trip. Passenger's document information contains cardType, cardNum, cardExpiredDate and nationality.Please contact PKFARE API support.
B069Reservation failed, this fare has passenger age limitation.Reservation failed, because this fare has a passenger age limition.
B077There are erros in the passenger type of infants.Infant passenger's age does not meet the requirements.
B078Lack of passengerIndex.For bookings contain infant(s) , passengerIndex is required for each passenger.
B079Each infant must be associated to one adult and each adult can only be associated to one infant maximum.Each infant must be associated to one adult and each adult can only be associated to one infant maximum.
B080Invalid or duplicated or discontinuous passengerIndexPassengerIndex must be positive and continuous integers starting from 1.
B081Error in ancillary passenger info.Error in ancillary passenger info.
B087Booking Failed. System has recognized possible churning.Churning booking behaviour were detected and booking request with the same passenger will be restricted.
B192Duplicate baggages are not allowed in the same journey.Only one baggage purchase is allowed for the same journey, all subsequent attempts will be granted with this response.
B193Multiple seat selection is not allowed in the same flight.Only one seat selection is allowed for the same journey, all subsequent attempts will be granted with this response.

Request

Body Params application/json

Example
{
    "authentication": {
        "sign": "",
        "partnerId": ""
    },
    "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.250,
            "adtTax": 59.110,
            "chdFare": 108.870,
            "chdTax": 59.110,
            "infFare": 28.450,
            "infTax": 0.000,
            "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"
                }
            }
        ]
    }
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://api.pkfare.com/json/preciseBooking_V7' \
--header 'Content-Type: application/json' \
--data-raw '{
    "authentication": {
        "sign": "",
        "partnerId": ""
    },
    "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.250,
            "adtTax": 59.110,
            "chdFare": 108.870,
            "chdTax": 59.110,
            "infFare": 28.450,
            "infTax": 0.000,
            "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"
                }
            }
        ]
    }
}'

Responses

🟢200Success
application/json
Bodyapplication/json

Examples
{
    "errorCode": "0",
    "errorMsg": "ok",
    "data": {
        "orderNum": "917132752968703001",
        "pnr": "WC7JP4",
        "solution": {
            "solutionKey": "0bbef6a2cfbaf9188b344fbb7229dd2b",
            "solutionId": "OqDCC1j2GhG9XTKOd0/KF+6M/7Mn+gurPNfAlXIf00HtDIJIZmfk2/NfuNJ8U2NS4KZ5IHjxWoNYHt7SgOgt+PwbtwEji+tazJ+2u2Gmmtxr0fPZjbWUBzlNkMCRhoB3Rzt0Av7jBdhCM4LocbIrD0YzA4S6SxfrTr0woQVRPS1WLvZhJwx7IzWEctrqdnv7TOEK5QbnBDh8RalKJoykngem8SOx/0E4p6mjulWQH8XYvBwaq+THRi7ZdDLHgOLvAWpM+ja0R8Rzzu3yPfD5iNXaG1LUs87R+yDEjYQH7fY0BkctfLCoLVVZSMVyyA2UgwLRCazQwDXmYe29tsiNAg==",
            "fareType": "PRIVATE",
            "currency": "USD",
            "adtFare": 117.25,
            "adtTax": 59.11,
            "chdFare": 108.87,
            "chdTax": 59.11,
            "infFare": 28.45,
            "infTax": 0,
            "qCharge": 0,
            "tktFee": 0,
            "platformServiceFee": 0,
            "journeys": {
                "journey_0": [
                    "3ca255ac07063fd19f13a4c4055aade2"
                ]
            },
            "platingCarrier": "FD",
            "merchantFee": 0,
            "adults": 1,
            "children": 1,
            "infants": 1,
            "baggageMap": {
                "CHD": [
                    {
                        "segmentIndexList": [
                            1
                        ],
                        "baggageAmount": "0PC",
                        "carryOnAmount": "1PC",
                        "carryOnWeight": "7KG"
                    }
                ],
                "INF": [
                    {
                        "segmentIndexList": [
                            1
                        ]
                    }
                ],
                "ADT": [
                    {
                        "segmentIndexList": [
                            1
                        ],
                        "baggageAmount": "0PC",
                        "carryOnAmount": "1PC",
                        "carryOnWeight": "7KG"
                    }
                ]
            }
        },
        "flights": [
            {
                "flightId": "3ca255ac07063fd19f13a4c4055aade2",
                "journeyTime": 180,
                "transferCount": 0,
                "segmengtIds": [
                    "ea3506f2711c19a82c12bf157fa6b153"
                ]
            }
        ],
        "segments": [
            {
                "segmentId": "ea3506f2711c19a82c12bf157fa6b153",
                "airline": "FD",
                "flightNum": "503",
                "equipment": "320",
                "cabinClass": "ECONOMY",
                "bookingCode": "A",
                "availabilityCount": 5,
                "departure": "HKG",
                "arrival": "DMK",
                "departureTerminal": "1",
                "arrivalTerminal": "2",
                "departureDate": 1735568400000,
                "arrivalDate": 1735575600000,
                "flightTime": 180,
                "codeShare": "N",
                "strDepartureDate": "2024-12-30",
                "strDepartureTime": "22:20",
                "strArrivalDate": "2024-12-31",
                "strArrivalTime": "00:20"
            }
        ]
    }
}
🟢200Error
Modified at 2026-08-13 06:35:20
Previous
PreciseBooking V6
Next
OrderPricing_V2