1. AncillaryBooking
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
        • PreciseBooking V7
      • 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. AncillaryBooking

AncillaryBooking

1 Function#

You can add ancillary products and create an ancillary order in PKFARE through AncillaryBooking API. It is necessary to use AncillaryPricing service before using this interface.

2 Versioning#

VersionSandbox Invoking AddressUpdate
ancillaryBooking_V2http://api.pkfare.com/ancillaryBookingV2Support postbooking paid baggage
Below is the most updated version

#

3 Charater Encoding#

The character code of this API is UTF-8.

#

4 Request#

4.1 Schema#

Please structure parameter as JSON format. Request should be transmitted after BASE64 encrypted.
NameTypeRequiredDescriptionSample
Basic Parameters
authenticationobjectYesauthentication information-
buyerOrderstringNoyour order number if you want to store at PKFARE side-
airOrderNumstringYesPKFARE air order number917049521951368301
ancillaryBookingobjectYesancillary booking information-
Authentification
partnerIdstringYesPartner IDRksVSX7PfZyF04adBWYsCD7M4=
signstringYessignature, sign=MD5 (partnerId+partnerKey)17e705d9dae8459065dbb139e5f1bd
AncillaryBooking
baggagesarrayYesbaggage detail-
Baggages
passengerobjectYespassenger detail-
productsarrayYesproduct detail-
Passenger
lastNamestringYeslast nameZhong
firstNamestringYesfirst nameXiaoJun
psgTypestringYespassenger type including ADT for adults, CHD for childrenADT
sexstringYesgender, including M for male, F for femaleM
birthdaystringYesbirthday2003-03-23
Products
ancillaryKeystringYesunique identification of ancillary9298386105acb75ed148af00cb

4.3 Request Example#

{
    "airOrderNum": "917049521951368301",
    "authentication": {
        "sign": "09516fe5668d5d92695d3af62d55a2d0",
        "partnerId": "hrXpLEy2wxdO7PXjh7WoMPpjw3U="
    },
    "ancillaryBooking": {
        "baggages": [
            {
                "passenger": {
                    "birthday": "2003-03-23",
                    "firstName": "XiaoJun",
                    "lastName": "Zhong",
                    "psgType": "ADT",
                    "sex": "M"
                },
                "products": [
                    {
                        "ancillaryKey": "38781f820e9ee25737d7b313410b5317"
                    },
                    {
                        "ancillaryKey": "2781c40741271185391c4ef5dab51df5"
                    }
                ]
            },
            {
                "passenger": {
                    "birthday": "2003-03-23",
                    "firstName": "Harris",
                    "lastName": "Kaufman",
                    "psgType": "ADT",
                    "sex": "M"
                },
                "products": [
                    {
                        "ancillaryKey": "38781f820e9ee25737d7b313410b5317"
                    },
                    {
                        "ancillaryKey": "2781c40741271185391c4ef5dab51df5"
                    }
                ]
            },
            {
                "passenger": {
                    "birthday": "2015-03-23",
                    "firstName": "Yue",
                    "lastName": "Hong",
                    "psgType": "CHD",
                    "sex": "M"
                },
                "products": [
                    {
                        "ancillaryKey": "38781f820e9ee25737d7b313410b5317"
                    },
                    {
                        "ancillaryKey": "2781c40741271185391c4ef5dab51df5"
                    }
                ]
            }
        ]
    }
}

5 Response#

5.1 Schema#

NameTypeDescriptionSample
Basic Parameters
errorCodestringerror code, refer to Error Code List0
errorMsgstringerror msgok
dataobjectOnly if the errorCode returns "0", returned data would not be null.-
Data
baggageOrderobjectbaggage order detail-
BaggageOrder
buyerOrderstringyour order number if you want to store at PKFARE side
ancillaryOrderNumstringPKFARE ancillary order number917049521951368302
baggagesarraybaggage details-
Baggages
passengerobjectpassenger details
baggageDetailsarraybaggage details
Passenger
lastNamestringlast nameZhong
firstNamestringfirst nameXiaoJun
psgTypestringpassenger type including ADT for adults, CHD for childrenADT
birthdaystringbirthdayM
sexstringGender, including M for male, F for female2003-03-23
BaggageDetails
ancillaryKeystringunique identification of ancillary9298386105acb75ed148af00cb
payBaggageTypeintegerbaggage type; 1-checked baggage, 2-carry-on baggage1
baggagePieceintegerbaggage piece; -1 - no limit to baggage piece1
baggageWeightstringbaggage weight20KG
baggageCurrencystringcurrencyCNY
baggagePricebigDecimalprice198.00
descriptionstringbaggage description1PC x 25lb Cabin Bag
journeyarrayjourney details-
Journey
airlinestringairline codeFD
departurestringorigin[IATA airport code]DMK
departureDatestringdeparture date[yyyy-MM-dd]2022-10-01
departureTimestringdeparture time[hh:mm]09:55
arrivalstringdestination[IATA airport code]CNX
arrivalDatestringarrival date[yyyy-MM-dd]2022-10-01
arrivalTimestringarrival time[hh:mm]11:25
flightNumstringflight number513
cabinClassstringcabin classECONOMY
bookingCodestringcabin codeN

5.2 Example#

Success response
{
    "errorCode": "0",
    "errorMsg": "ok",
    "data": {
        "baggageOrder": {
            "ancillaryOrderNum": "917049521951368302",
            "baggages": [
                {
                    "passenger": {
                        "birthday": "2003-03-23",
                        "firstName": "XiaoJun",
                        "lastName": "Zhong",
                        "psgType": "ADT",
                        "sex": "M"
                    },
                    "baggageDetails": [
                        {
                            "ancillaryKey": "38781f820e9ee25737d7b313410b5317",
                            "payBaggageType": 1,
                            "baggagePiece": 1,
                            "baggageWeight": "18KG",
                            "baggageCurrency": "CNY",
                            "baggagePrice": 521.00,
                            "description": "1PC x 40lb Checked Bag",
                            "journey": [
                                {
                                    "airline": "NK",
                                    "flightNum": "1850",
                                    "departure": "LAS",
                                    "departureDate": "2024-02-10",
                                    "departureTime": "21:53",
                                    "arrival": "SAN",
                                    "arrivalDate": "2024-02-10",
                                    "arrivalTime": "23:11",
                                    "bookingCode": "W",
                                    "cabinClass": "ECONOMY"
                                }
                            ]
                        },
                        {
                            "ancillaryKey": "2781c40741271185391c4ef5dab51df5",
                            "payBaggageType": 2,
                            "baggagePiece": 1,
                            "baggageWeight": "11KG",
                            "baggageCurrency": "CNY",
                            "baggagePrice": 556.00,
                            "description": "1PC x 25lb Cabin Bag",
                            "journey": [
                                {
                                    "airline": "NK",
                                    "flightNum": "744",
                                    "departure": "SAN",
                                    "departureDate": "2024-01-26",
                                    "departureTime": "20:06",
                                    "arrival": "LAS",
                                    "arrivalDate": "2024-01-26",
                                    "arrivalTime": "21:31",
                                    "bookingCode": "U",
                                    "cabinClass": "ECONOMY"
                                }
                            ]
                        }
                    ]
                },
                {
                    "passenger": {
                        "birthday": "2003-03-23",
                        "firstName": "Harris",
                        "lastName": "Kaufman",
                        "psgType": "ADT",
                        "sex": "M"
                    },
                    "baggageDetails": [
                        {
                            "ancillaryKey": "38781f820e9ee25737d7b313410b5317",
                            "payBaggageType": 1,
                            "baggagePiece": 1,
                            "baggageWeight": "18KG",
                            "baggageCurrency": "CNY",
                            "baggagePrice": 521.00,
                            "description": "1PC x 40lb Checked Bag",
                            "journey": [
                                {
                                    "airline": "NK",
                                    "flightNum": "1850",
                                    "departure": "LAS",
                                    "departureDate": "2024-02-10",
                                    "departureTime": "21:53",
                                    "arrival": "SAN",
                                    "arrivalDate": "2024-02-10",
                                    "arrivalTime": "23:11",
                                    "bookingCode": "W",
                                    "cabinClass": "ECONOMY"
                                }
                            ]
                        },
                        {
                            "ancillaryKey": "2781c40741271185391c4ef5dab51df5",
                            "payBaggageType": 2,
                            "baggagePiece": 1,
                            "baggageWeight": "11KG",
                            "baggageCurrency": "CNY",
                            "baggagePrice": 556.00,
                            "description": "1PC x 25lb Cabin Bag",
                            "journey": [
                                {
                                    "airline": "NK",
                                    "flightNum": "744",
                                    "departure": "SAN",
                                    "departureDate": "2024-01-26",
                                    "departureTime": "20:06",
                                    "arrival": "LAS",
                                    "arrivalDate": "2024-01-26",
                                    "arrivalTime": "21:31",
                                    "bookingCode": "U",
                                    "cabinClass": "ECONOMY"
                                }
                            ]
                        }
                    ]
                },
                {
                    "passenger": {
                        "birthday": "2015-03-23",
                        "firstName": "Yue",
                        "lastName": "Hong",
                        "psgType": "CHD",
                        "sex": "M"
                    },
                    "baggageDetails": [
                        {
                            "ancillaryKey": "38781f820e9ee25737d7b313410b5317",
                            "payBaggageType": 1,
                            "baggagePiece": 1,
                            "baggageWeight": "18KG",
                            "baggageCurrency": "CNY",
                            "baggagePrice": 521.00,
                            "description": "1PC x 40lb Checked Bag",
                            "journey": [
                                {
                                    "airline": "NK",
                                    "flightNum": "1850",
                                    "departure": "LAS",
                                    "departureDate": "2024-02-10",
                                    "departureTime": "21:53",
                                    "arrival": "SAN",
                                    "arrivalDate": "2024-02-10",
                                    "arrivalTime": "23:11",
                                    "bookingCode": "W",
                                    "cabinClass": "ECONOMY"
                                }
                            ]
                        },
                        {
                            "ancillaryKey": "2781c40741271185391c4ef5dab51df5",
                            "payBaggageType": 2,
                            "baggagePiece": 1,
                            "baggageWeight": "11KG",
                            "baggageCurrency": "CNY",
                            "baggagePrice": 556.00,
                            "description": "1PC x 25lb Cabin Bag",
                            "journey": [
                                {
                                    "airline": "NK",
                                    "flightNum": "744",
                                    "departure": "SAN",
                                    "departureDate": "2024-01-26",
                                    "departureTime": "20:06",
                                    "arrival": "LAS",
                                    "arrivalDate": "2024-01-26",
                                    "arrivalTime": "21:31",
                                    "bookingCode": "U",
                                    "cabinClass": "ECONOMY"
                                }
                            ]
                        }
                    ]
                }
            ]
        }
    }
}

6 Error Code List#

errorCodeerrorMsg
0ok
S001System error.
P001XXX is illegal.
P002XXX is missing.
P006Invalid parameter.
B002Partner is not exists.
B003Illegal sign.
B005Can not find any matching ancillaryPricing result within 30 minutes.
B009Order status is invalid
B010The order was not found
B017Price is changed.
B029Duplicate reservations have been found for passenger XXX/XXX in order XXX.
B071Itinerary is different between request and order.
B075There are duplicate bookings and the same passenger is only allowed to choose one of baggage weights in the same journey.
Modified at 2024-05-06 01:55:23
Previous
AncillaryPricing V5
Next
CancelAncillaryOrder