1. Shopping
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
          POST
        • Shopping V9
          POST
        • Shopping V8
          POST
      • 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. Shopping

Shopping_V2

1 Document Description#

1.1 Function Description#

Through Shopping API, users can check flight availability and its price by using relevant parameters. Shopping service supports one-way trip, round trip and open jaw (2 journeys max).
Note The amount of data returned by shopping API is huge. In regards to network transmission and other factors, we compressed it with GZIP. Please decompress it before data analysis.
Note You could use routes: HKG - SIN, HKG - MEL, HKG - BKK, HKG - LON, HKG - LAX, HKG - TYO, MEL - LAX for test. Please test with departure date that is far away from today to collect data.
Note Shopping_V2 has same request structure as Shopping. But Shopping_V2 response includes structuralized fare rule. The baggage rule and penalty you collect in Shopping_V2 is for reference only. Please refer to baggage and penalty from PrecisePricing API and Penalty API if you need to make a reservation.

1.2 Target Reader#

The Shopping_V2 API document targets developers who work in the fields of network development, maintenance as well as management. They should have the knowledge of at least one of following programming language: ASP, PHP, JAVA, ASP.NET or SQL.

1.3 Character Encoding#

The character code of this API is UTF-8.

1.4 Invoking Address#

Address in test environment: https://api.pkfare.com/shoppingV2
Address in production environment: https://pending.com/shoppingV2
Notes PKFARE will provide production domain after Buyer Partners finish integration and co-test. Please replace 'pending.com' with the domain which PKFARE provides individually.

2 Request Parameter#

2.1 Parameter Construction#

Please structure parameter as JSON format. Request should be transmitted after BASE64 encrypted. Response would be compressed by GZIP. Please decompress response.
2.1.1 Authentication#
NameTypeRequired or NotParameter DescriptionSample
partnerIdStringYesPartner ID-
signStringYessignature, sign=MD5(partnerId+partnerKey), refer to 4.1 and 4.2-
2.1.2 Search#
NameTypeRequired or NotParameter DescriptionSample
adultsIntegerYesadult passenger number1
childrenIntegerNochildren [age 2-12] passenger number1
nonstopIntegerNoonly search for non-stop flight[0- No 1-Yes]0
airlineStringNospecified airline. Support one airline onlyCA
solutionsIntegernot supported yetsuggested quantity of returned solutions0
searchAirLegsArrayYesjourney object array, refer to 2.1.3-
2.1.3 SearchAirLegs#
NameTypeRequired or notParameter DescriptionSample
cabinClassStringNocabin class[default : Economy]refer to 5.3Economy
destinationStringYesdestination [IATA airport/city code]SIN
originStringYesorigin [IATA airport/city code ]HKG
departureDateStringYesdeparture date [yyyy-MM-dd]2015-10-22

2.2 Request Sample#

2.2.1 JSON Format Sample#
Case 1 : One way request sample as following:
{
    "authentication": {
        "partnerId": "sVSX7PfZm1yF04adBWYsCD7M4=",
        "sign": "e707b5d9dae8459065dbb139e5f1bd"
    },
    "search": {
        "adults": 1,
        "airline": "",
        "children": 1,
        "nonstop": 0,
        "searchAirLegs": [
            {
                "cabinClass": "Economy",
                "departureDate": "2019-01-16",
                "destination": "MEL",
                "origin": "HKG"
            }
        ],
        "solutions": 0
    }
}
Case 2 : Round trip request sample as following:
{
    "authentication": {
        "partnerId": "sVSX7PfZm1yF04adBWYsCD7M4=",
        "sign": "e707b5d9dae8459065dbb139e5f1bd"
    },
    "search": {
        "adults": 1,
        "airline": "",
        "children": 1,
        "nonstop": 0,
        "searchAirLegs": [
            {
                "cabinClass": "Economy",
                "departureDate": "2019-01-16",
                "destination": "LAX",
                "origin": "HKG"
            },
            {
                "cabinClass": "Economy",
                "departureDate": "2019-01-23",
                "destination": "HKG",
                "origin": "LAX"
            }
        ],
        "solutions": 0
    }
}
Case 3 : Open jaw request sample as following:
{
    "authentication": {
        "partnerId": "sVSX7PfZm1yF04adBWYsCD7M4=",
        "sign": "e707b5d9dae8459065dbb139e5f1bd"
    },
    "search": {
        "adults": 1,
        "airline": "",
        "children": 1,
        "nonstop": 0,
        "searchAirLegs": [
            {
                "cabinClass": "Economy",
                "departureDate": "2019-01-16",
                "destination": "LAX",
                "origin": "HKG"
            },
            {
                "cabinClass": "Economy",
                "departureDate": "2019-01-23",
                "destination": "SEA",
                "origin": "LAX"
            }
        ],
        "solutions": 0
    }
}
2.2.2 Base64 Encryption#
Use BASE64 to encode results from 2.2.1 Case 1:
eyJhdXRoZW50aWNhdGlvbiI6eyJwYXJ0bmVySWQiOiJSa3NWU1g3UGZabTF5RjA0YWRCV1lzQ0Q3TTQ9Iiwic2lnbiI6IjE3ZTcwN2I1ZDlkYWU4NDU5MDY1ZGJiMTM5ZTVmMWJkIn0sInNlYXJjaCI6eyJhZHVsdHMiOjEsImFpcmxpbmUiOiIiLCJjaGlsZHJlbiI6MCwiaW5mYW50cyI6MCwibm9uc3RvcCI6MSwic2VhcmNoQWlyTGVncyI6W3siY2FiaW5DbGFzcyI6IkVjb25vbXkiLCJkZXBhcnR1cmVEYXRlIjoiMjAxNi0wMS0xNiIsImRlc3RpbmF0aW9uIjoiSEtHIiwib3JpZ2luIjoiQkpTIn0seyJjYWJpbkNsYXNzIjoiRWNvbm9teSIsImRlcGFydHVyZURhdGUiOiIyMDE2LTAxLTIzIiwiZGVzdGluYXRpb24iOiJCSlMiLCJvcmlnaW4iOiJIS0cifV0sInNvbHV0aW9ucyI6MjB9fQ=
2.2.3 Encryption Request Sample#
This sample is for reference only:
http://api.pkfare.com/shopping?param=eyJhdXRoZW50aWNhdGlvbiI6eyJwYXJ0bmVySWQiOiJSa3NWU1g3UGZabTF5RjA0YWRCV1lzQ0Q3TTQ9Iiwic2lnbiI6IjE3ZTcwN2I1ZDlkYWU4NDU5MDY1ZGJiMTM5ZTVmMWJkIn0sInNlYXJjaCI6eyJhZHVsdHMiOjEsImFpcmxpbmUiOiIiLCJjaGlsZHJlbiI6MCwiaW5mYW50cyI6MCwibm9uc3RvcCI6MSwic2VhcmNoQWlyTGVncyI6W3siY2FiaW5DbGFzcyI6IkVjb25vbXkiLCJkZXBhcnR1cmVEYXRlIjoiMjAxNi0wMS0xNiIsImRlc3RpbmF0aW9uIjoiSEtHIiwib3JpZ2luIjoiQkpTIn0seyJjYWJpbkNsYXNzIjoiRWNvbm9teSIsImRlcGFydHVyZURhdGUiOiIyMDE2LTAxLTIzIiwiZGVzdGluYXRpb24iOiJCSlMiLCJvcmlnaW4iOiJIS0cifV0sInNvbHV0aW9ucyI6MjB9fQ

3 Response Parameter#

3.1 Response Parameter Construction#

After decompressing the returned data by GZIP, you would get the JSON data. About concrete fields, please refer to following tables.
__Price breakdown description: __
Individual Adult Price = Adult Ticket Fare [adtFare] + Adult Ticket Tax [adtTax] + Ticketing Fee [tktFee]
Individual Child Price = Child Ticket Fare [chdFare] + Child Ticket Tax [chdTax] + Ticketing Fee [tktFee]
Total Price = Individual Adult Price * adult passenger number [adults] + Individual Child Price] * child passenger number [children] + Platform Service Fee [platformServiceFee] + Payment Transaction Fee [merchantFee]
Notes
1 There is no charge for "platformServiceFee" at present; it can be ignored.
2 No payment transaction fee ("merchantFee") will be charged if the mode of payment is "Prepaid". "Alipay" will charge 0.1% of the Total Price.
3.1.1 Basic Parameter#
NameTypeParameter DescriptionSample
errorCodeStringerror number, refer to 5.10
errorMsgStringerror messageOK
dataObjectonly if the errorCode returns "0", returned data would not be null. Data is in JSON format, which contains three collection objects: solutions (3.1.2), flights (3.1.3), segments (3.1.4)-
3.1.2 Solutions#
NameTypeParameter DescriptionSample
solutionIdStringunique identification25a061970d8a7ebeb5e63391b9788f36
solutionKeyStringunique identification0357301bf213453389fcb55c379a4667
fareTypeStringfare type, refer to 5.2 Fare TypePUBLIC
currencyStringcurrencyCNY
adtFareBigDecimaladult fare1011
adtTaxBigDecimaladult tax527
chdFareBigDecimalchildren [age 2-12] fare500
chdTaxBigDecimalchildren [age 2-12] tax250
infFareBigDecimalinfant[age 0-2] fare, not supported yet0
infTaxBigDecimalinfant[age 0-2] tax, not supported yet0
qChargeBigDecimalQ charge, bunker adjustment surcharge, for reference only0
tktFeeBigDecimalticketing service fee0
baggageMapObjectbaggage rule. For reference only. Including 'ADT' and 'CHD'. If the request does not include children, 'CHD' would be NULL. Refer to 3.1.5-
MiniRuleMapObjectpenalty rule. For reference only, please find precise penalty rule on Penalty API. Refer to 3.1.6-
platformServiceFeeBigDecimalplatform service fee, defaults to 00
commentsStringcomments-
journeysObjectcontent: flightID(3.1.3)-
fareRuleObjectsupplier rule, not supported yet-
ruleObjectPKFARE API rule, not supported yet-
platingCarrierStringticketing airlineCA
merchantFeeBigDecimalpayment transaction fee7.39
afterSaleRuleObjectnot supported yet.-
3.1.3 Flights#
NameTypeParameter DescriptionSample
flightIdStringflight ID, unique identification9ef88fd9dae30560c683911f534c6c49
journeyTimeLongjourney time, unit: minute350
transferCountIntegertransfer times1
lastTktTimeStringlast ticketing time (GMT)2015-10-28 23:59:00
segmengtIdsString[]Including segment [segmentId] array, refer to 3.1.4 (please note the segmengtIds is a typo due to history edition)-
3.1.4 Segments#
NameTypeParameter DescriptionSample
segmentIdStringsegment ID, unique identification4ee200cb7feab403d6babbf797ac92aa
airlineStringairline codeCA
flightNumStringflight number6509
equipmentStringequipment737
cabinClassStringcabin class, refer to 5.3 Cabin ClassEconomy
bookingCodeStringcabin codeE
availabilityCountIntegeravailable seats, for reference only7
departureStringdeparture airportPEK
arrivalStringarrival airportHKG
departureTerminalStringdeparture airport terminal3
arrivalTerminalStringarrival airport terminal1
departureDateLongdeparture date [unix time]1446009600000
arrivalDateLongarrival date [unix time]1446017400000
flightTimeIntegerflight time, unit: minute130
stayTimeIntegerstay time, valid with 'stopover' , unit: minute60
codeShareStringcode share or not: [Y-yes, N-no]Y
opFltNoStringflight number of operated carrier202
opFltAirlineStringoperated carrierKA
stopoverStringstopover airportPVG
strDepartureDateStringdeparture date[yyyy-MM-dd], local time2016-08-27
strDepartureTimeStringdeparture time[HH:mm], local time09:30
strArrivalDateStringarrival date[yyyy-MM-dd], local time2016-08-27
strArrivalTimeStringarrival time[HH:mm], local time11:50
fareBasisStringfare basis codeSLCPWFR
3.1.5 baggageMap#
NameTypeParameter DescriptionSample
segmentIndexListString[]segment index list for baggage. Index begins with '1'. If 1st segment has same baggage allowance with 3rd segment, please refer to sample[1,3]
baggageAmountStringfree baggage amount allowance. '1PC' for 1 piece1PC
baggageWeightStringfree baggage weight allowance15KG
carryOnAmountStringfree carry-on baggage amount allowance. '1PC' for 1 piece1PC
carryOnWeightStringfree carry-on baggage weight allowance7KG
3.1.6 MiniRuleMap#
NameTypeParameter DescriptionSample
segmentIndexString[]segment index list for penalty. Index begins with '1'. If 1st segment has same penalty rule with 3rd segment, please refer to sample[1,3]
miniRulesObjectrefer to 3.1.6.1-
3.1.6.1 miniRules#
NameTypeParameter DescriptionSample
penaltyTypeIntegerpenalty type. [0 - refund, 1 - noShow refund, 2 - change, 3 - noShow change]0
isPermitedIntegerallow refund/change or not. [0 - not allow, 1 - allow, 2 - unknown]1
whenIntegerappropriate situation. [0 - Both Outbound and Inbound are not used, 1- Outbound Flight used, 2 - all Situation]2
noShowTimeStringnoShow definition. Apply with 'noShowTimeUnit'2
noShowTimeUnitStringnoShow Unit. Apply with 'noShowTime'. [H - hour, M - minute]H
amountBigDecimalpenalty300
currencyCodeStringpenalty currencyCNY
percentBigDecimalpenalty percentage. Apply with 'baseType'. Penalty and penalty percentage would not go into effect at the same. Please take the strict one. Unit: %10
baseTypeIntegerapply with 'percent'. Multiply corresponding value of 'baseType' by 'percent' would be the penalty. [0 - fare, 1 - fare+tax+ticketingFee, 2 - cabin basic fare]0

3.2 Response Sample#

3.2.1 Normal Response#
{
    "errorCode" : "0",
    "errorMsg" : "ok",
    "data" :
    {
        "searchKey" : "HKGSEL20181019Y110**0",
        "shoppingKey" : "cache-9707df4692624f659b3363f8e8dc7f0c",
        "solutions" : [
            {
                "solutionKey" : "501e714f0978d39c4c50106c0a83328d",
                "solutionId" : "1882074142ecb4d1e6ecb244dd9cd03c",
                "fareType" : "PUBLIC",
                "currency" : "CNY",
                "adtFare" : 411,
                "adtTax" : 207.0,
                "chdFare" : 329,
                "chdTax" : 110.0,
                "infFare" : 0,
                "infTax" : 0,
                "qCharge" : 0,
                "tktFee" : 0,
                "platformServiceFee" : 0,
                "comments" : null,
                "journeys" :
                {
                    "journey_0" : ["644d51948ae2a86f63627db172b991e7"]
                },
                "fareRule" : null,
                "rule" : null,
                "platingCarrier" : "RS",
                "prices" : null,
                "merchantFee" : 0.00,
                "baggageMap" :
                {
                    "CHD" : [
                        {
                            "segmentIndexList" : [1],
                            "baggageAmount" : "0PC",
                            "baggageWeight" : null,
                            "carryOnAmount" : null,
                            "carryOnWeight" : null
                        }
                    ],
                    "ADT" : [
                        {
                            "segmentIndexList" : [1],
                            "baggageAmount" : "1PC",
                            "baggageWeight" : null,
                            "carryOnAmount" : null,
                            "carryOnWeight" : null
                        }
                    ]
                },
                "miniRuleMap" :
                {
                    "CHD" : [
                        {
                            "segmentIndex" : [1],
                            "miniRules" : [
                                {
                                    "penaltyType" : 2,
                                    "isPermited" : 1,
                                    "when" : 0,
                                    "noShowTime" : null,
                                    "noShowTimeUnit" : null,
                                    "amount" : 192,
                                    "currencyCode" : "CNY",
                                    "percent" : null,
                                    "baseType" : null
                                },
                                {
                                    "penaltyType" : 2,
                                    "isPermited" : 1,
                                    "when" : 1,
                                    "noShowTime" : null,
                                    "noShowTimeUnit" : null,
                                    "amount" : 192,
                                    "currencyCode" : "CNY",
                                    "percent" : null,
                                    "baseType" : null
                                },
                                {
                                    "penaltyType" : 0,
                                    "isPermited" : 1,
                                    "when" : 0,
                                    "noShowTime" : null,
                                    "noShowTimeUnit" : null,
                                    "amount" : 192,
                                    "currencyCode" : "CNY",
                                    "percent" : null,
                                    "baseType" : null
                                },
                                {
                                    "penaltyType" : 0,
                                    "isPermited" : 1,
                                    "when" : 1,
                                    "noShowTime" : null,
                                    "noShowTimeUnit" : null,
                                    "amount" : 192,
                                    "currencyCode" : "CNY",
                                    "percent" : null,
                                    "baseType" : null
                                }
                            ]
                        }
                    ],
                    "ADT" : [
                        {
                            "segmentIndex" : [1],
                            "miniRules" : [
                                {
                                    "penaltyType" : 2,
                                    "isPermited" : 1,
                                    "when" : 0,
                                    "noShowTime" : null,
                                    "noShowTimeUnit" : null,
                                    "amount" : 192,
                                    "currencyCode" : "CNY",
                                    "percent" : null,
                                    "baseType" : null
                                },
                                {
                                    "penaltyType" : 2,
                                    "isPermited" : 1,
                                    "when" : 1,
                                    "noShowTime" : null,
                                    "noShowTimeUnit" : null,
                                    "amount" : 192,
                                    "currencyCode" : "CNY",
                                    "percent" : null,
                                    "baseType" : null
                                },
                                {
                                    "penaltyType" : 0,
                                    "isPermited" : 1,
                                    "when" : 0,
                                    "noShowTime" : null,
                                    "noShowTimeUnit" : null,
                                    "amount" : 192,
                                    "currencyCode" : "CNY",
                                    "percent" : null,
                                    "baseType" : null
                                },
                                {
                                    "penaltyType" : 0,
                                    "isPermited" : 1,
                                    "when" : 1,
                                    "noShowTime" : null,
                                    "noShowTimeUnit" : null,
                                    "amount" : 192,
                                    "currencyCode" : "CNY",
                                    "percent" : null,
                                    "baseType" : null
                                }
                            ]
                        }
                    ]
                },
                "afterSaleRule" : null
            },
            {
                "solutionKey" : "8980dcce4049a73fa3d3d25427edc16d",
                "solutionId" : "9cedd014ef3a50baacf41ec7bb72e1e9",
                "fareType" : "PRIVATE",
                "currency" : "CNY",
                "adtFare" : 732,
                "adtTax" : 207.0,
                "chdFare" : 553,
                "chdTax" : 110.0,
                "chnFare" : 0,
                "chnTax" : 0,
                "infFare" : 0,
                "infTax" : 0,
                "qCharge" : 0,
                "tktFee" : 0,
                "platformServiceFee" : 0,
                "comments" : null,
                "journeys" :
                {
                    "journey_0" : ["36d73b2362981379b4468393111fc65b"]
                },
                "fareRule" : null,
                "rule" : null,
                "platingCarrier" : "LJ",
                "prices" : null,
                "merchantFee" : 0.00,
                "baggageMap" :
                {
                    "CHD" : null,
                    "ADT" : [
                        {
                            "segmentIndexList" : [1],
                            "baggageAmount" : null,
                            "baggageWeight" : "15KG",
                            "carryOnAmount" : null,
                            "carryOnWeight" : null
                        }
                    ]
                },
                "miniRuleMap" :
                {
                    "CHD" : [
                        {
                            "segmentIndex" : [1],
                            "miniRules" : null
                        }
                    ],
                    "ADT" : [
                        {
                            "segmentIndex" : [1],
                            "miniRules" : [
                                {
                                    "penaltyType" : 2,
                                    "isPermited" : 1,
                                    "when" : 0,
                                    "noShowTime" : null,
                                    "noShowTimeUnit" : null,
                                    "amount" : 163,
                                    "currencyCode" : "CNY",
                                    "percent" : null,
                                    "baseType" : null
                                },
                                {
                                    "penaltyType" : 0,
                                    "isPermited" : 1,
                                    "when" : 0,
                                    "noShowTime" : null,
                                    "noShowTimeUnit" : null,
                                    "amount" : 203,
                                    "currencyCode" : "CNY",
                                    "percent" : null,
                                    "baseType" : null
                                }
                            ]
                        }
                    ]
                },
                "afterSaleRule" : null
            }
        ],
        "flights" : [
            {
                "flightId" : "644d51948ae2a86f63627db172b991e7",
                "journeyTime" : 220,
                "transferCount" : 0,
                "lastTktTime" : null,
                "segmengtIds" : ["23fe9e63f16bffcb78664a583151ee47"]
            },
            {
                "flightId" : "36d73b2362981379b4468393111fc65b",
                "journeyTime" : 225,
                "transferCount" : 0,
                "lastTktTime" : "2018-05-10 23:59:00",
                "segmengtIds" : ["58bc78d6d810133978b00f94d843f2f3"]
            }
        ],
        "segments" : [
            {
                "segmentId" : "23fe9e63f16bffcb78664a583151ee47",
                "airline" : "RS",
                "flightNum" : "532",
                "equipment" : "321",
                "cabinClass" : "ECONOMY",
                "bookingCode" : "U",
                "availabilityCount" : 9,
                "departure" : "HKG",
                "arrival" : "ICN",
                "departureTerminal" : "0",
                "arrivalTerminal" : "1",
                "departureDate" : 1539881400000,
                "arrivalDate" : 1539898200000,
                "flightTime" : 220,
                "stayTime" : null,
                "codeShare" : "N",
                "opFltNo" : null,
                "opFltAirline" : null,
                "stopover" : null,
                "strDepartureDate" : "2018-10-19",
                "strDepartureTime" : "00:50",
                "strArrivalDate" : "2018-10-19",
                "strArrivalTime" : "05:30",
                "fareBasis" : "KNNDJ"
            },
            {
                "segmentId" : "58bc78d6d810133978b00f94d843f2f3",
                "airline" : "LJ",
                "flightNum" : "114",
                "equipment" : "738",
                "cabinClass" : "ECONOMY",
                "bookingCode" : "N",
                "availabilityCount" : 9,
                "departure" : "HKG",
                "arrival" : "ICN",
                "departureTerminal" : "1",
                "arrivalTerminal" : "1",
                "departureDate" : 1539926400000,
                "arrivalDate" : 1539943500000,
                "flightTime" : 225,
                "stayTime" : null,
                "codeShare" : "N",
                "opFltNo" : null,
                "opFltAirline" : "",
                "stopover" : null,
                "strDepartureDate" : "2018-10-19",
                "strDepartureTime" : "13:20",
                "strArrivalDate" : "2018-10-19",
                "strArrivalTime" : "18:05",
                "fareBasis" : "KNNDJ"
            }
        ]
    }
}
3.2.2 Error Response#
{
    "errorCode": "P001", 
    "errorMsg": "Invalid authentication.", 
    "data": null
}

4 Signature#

4.1 Parameters for Signature#

partnerId, partnerKey

4.2 Signature#

Combine partnerId and partnerKey to make an MD5 encryption on final value.
Sign = MD5 (partnerId + partnerKey).
e.g.
partnerId: abcdefg123456
partnerKey: jkHKhkikdhy258dffj
Sign = MD5(abcdefg123456jkHKhkikdhy258dffj) = d7e99ae9d5c3c7d7113aced071e3ca08

5 Appendix#

5.1 Error Code List#

errorCodeerrorMsgDescription
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.
P001XXX is illegal.The field of XXX is illegal.
P002XXX is missing.The field of XXX is missing.
P003Not support Inf yet.Wrong parameter. Infant booking is not supported yet.
P004The maximum number of passengers is 9.Wrong parameter. The maximum number of passengers is 9.
P005There should be at least one adult.Wrong parameter. There should be at least one adult.
B013Interface is limited, please contact the system administrator.The route that you request is limited, please contact system administrator.
B014Shopping failed.Shopping failed caused by other reasons.
B024Time-out, please try later.Time-out. You can try the second searching after a few seconds.
B034Shopping interface is offline.Shopping service is limited.
B035Concurrency limited. Please contact PKFARE API support team for assistant.Concurrent users contral. Please contact PKFARE API support for assistant.
B038Departure date must be today to a year.Wrong parameter. Departure date must be today to a year.
B039Can't find the related data of XXX.Wrong parameter. Can't find the related data of XXX, like illegal city/country/area/airline.
B046Interface is limited, the routing is offlined by PKFARE.Look to book control. If you need this routing, please contact PKFARE API for assistant.
B059Shopping failed from upstream.Shopping failed, shopping error from upstream. Please contact PKFARE API support.
B060Interface is limited, please contact PKFARE.Interface is limited, due to restriction rules, please contact PKFARE API support.
B009Supplier is offlineSupplier is not at working time, please contact PKFARE API support.
B066Only 2 journeys can be supported, please check your itinerary.System support maximum 2 journeys shopping at this moment.

5.2 Fare Type#

EnumDescription
PUBLICpublic fare
PRIVATEprivate fare

5.3 Cabin Class#

EnumDescription
Economyeconomy class
PremiumEconomypremium economy class
Businessbusiness class
Firstfirst class
Top
Modified at 2024-05-06 01:09:54
Previous
Shopping
Next
Shopping_V4