1. VoidRequest
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. VoidRequest

VoidRequest

VoidRequest#

Please use VoidRequest_v2, this service will offline soon

1 Document Description#

1.1 Function Description#

Through VoidRequest API, users could apply for voiding tickets after tickets are issued. Passengers that are included in the order are allowed to void ticket if void service time is available. Please refer to void service time that is provided in TicketingNumPush_V2 API.

1.2 Target Reader#

The VoidRequest API document targets developers who work in the fields of network development, maintenance as well as management, and they should have the knowledge of at least one of the following programming languages: 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: not supported yet.
Address in production environment: https://pending.com/voiding

2 Request Parameter#

Request should be structuralized in JSON format.

2.1 Parameter Construction#

2.1.1 Authentication#
NameTypeRequired or NotDescriptionSample
partnerIdStringYespartner ID-
signstringYessignature, refer to 4.1 and 4.2-
2.1.2 VoidRequest#
NameTypeRequired or NotDescriptionSample
orderNumLongYes[PKFARE] order Number1012694529
passengersArrayNopassengers that request to void. Refer to 2.1.2.1. Please make sure that void service time is available-
2.1.2.1 Passengers#
NameTypeRequired or NotDescriptionSample
cardTypeStringYestravel document type. Refer to 5.2P
cardNumStringYestravel document numberP123
lastNameStringYeslast nameWANG
firstNameStringYesfirst nameJANGO

2.2 Request Sample#

2.2.1 Request Structure#
{
    "authentication": {
        "partnerId": "sVSX7PfZm1yF04adBWYfCD7M4=",
        "sign": "e707b5d9dae8459085dbb139e5f1bd"
    },
    "voidRequest": {
        "orderNum": 1234568788,
        "passengers": [
          {
            "cardType": "P",
            "cardNum": "G1234567",
            "lastName": "SMITH",
            "firstName": "JOHN"
          },
          {
            "cardType": "P",
            "cardNum": "G1357902",
            "lastName": "SMITH",
            "firstName": "MARY"
          }
        ]
    }
}
2.2.2 BASE64 Encryption#
eyJhdXRoZW50aWNhdGlvbiI6eyJwYXJ0bmVySWQiOiJSa3NWU1g3UGZabTF5RjA0YWRCV1lzQ0Q3TTQ9Iiwic2lnbiI6IjE3ZTcwN2I1ZDlkYWU4NDU5MDY1ZGJiMTM5ZTVmMWJkIn0sInNlYXJjCI6eyJhZHVsdHMiOjEsImFpcmxpbmUiOiIiLCJjaGlsZHJlbiI6MCwiaW5mY9teSIsImRlcGFydHVyZURhdGUiOiIyMDE2LTAxLTIzIiwiZGVzdGluYXRpb24iOiJCSlMiLCJvcmlnaW4iOiJIS0cifV0sInNvbHV0aW9ucyI6MjB9fQ=
2.2.3 Request Sample#
http://api.pkfare.com/voiding?param=eyJhdXRoZW50aWNhdGlvbiI6eyJwYXJ0bmVySWQiOiJSa3NWU1g3UGZabTF5RjA0YWRCV1lzQ0Q3TTQ9Iiwic2lnbiI6IjE3ZTcwN2I1ZDlkYWU4NDU5MDY1ZGJiMTM5ZTVmMWJkIn0sInNlYXJjaCI6eyJhZHVsdHMiOjEsImFpcmxpbmUiOiIiLCJjaGlsZHJlbiI6MCwiaW5mY9teSIsImRlcGFydHVyZURhdGUiOiIyDE2LTAxLTIzIiwiZGVzdGluYXRpb24iOiJCSlMiLCJvcmlnaW4iOiJIS0cifV0sInNvbHV0aW9ucyI6MjB9fQ=

3 Response Parameter#

The data returned is in JSON format. For specific fields, please refer to following charts.

3.1 Response Parameter Construction#

NameTypeParameter DescriptionSample
errorCodeStringerror code. Refer to 5.10
errorMsgStringerror messageok
dataObjectreturn data. Not empty when error code is '0'. Refer to 3.1.1-
3.1.1 Data#
NameTypeParameter DescriptionSample
orderNumLong[PKFARE] order Number1012694529
voidOrderNumLong[PKFARE] void order number (after a void request is submitted, a void order would be generated in PKFARE system)1012694589
passengersArraypassengers that request to void. Refer to 3.1.1.1. Please make sure that void service time is available-
3.1.1.1 Passengers#
NameTypeParameter DescriptionSample
cardTypeStringtravel document type. Refer to 5.2P
cardNumStringtravel document numberP123
lastNameStringlast nameWANG
firstNameStringfirst nameJANGO

3.2 Response Sample#

3.2.1 Normal Response#
{
    "errorCode": "0",
    "errorMsg": "ok",
    "data": {
      "orderNum": 1234568788,
      "voidOrderNum": 1432558799,
      "passengers": [
          {
            "cardType": "P",
            "cardNum": "G1234567",
            "lastName": "SMITH",
            "firstName": "JOHN"
          },
          {
            "cardType": "P",
            "cardNum": "G1357902",
            "lastName": "SMITH",
            "firstName": "MARY"
          }
       ]
    }
}
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 errorsystem error
P001-wrong parameter
B002Partner is not existspartnerID does not exist
B003Illegal signillegal sign. Please check your signature
V001Illegal void timevoiding deadline has passed
V002passenger(s) not allowed to void. Origin order has no ADT remainvoiding request is rejected. If there are partial passengers submitting voiding request, one adult at least should be remain in original order.
O001passenger does not match the orderpassenger information does not match original order
O002passenger(s) not allowed to submit request, there is an order with a state of "XXX", order number: XXXpassenger(s) is not allowed to submit voiding request due to on-going after-sale procedure
O003order create failedorder create failed
B010order does not existorder does not exist

5.2 Travel Document Type#

EnumDescription
Ppassport
NChinese ID card
Oothers
Top
Modified at 2024-05-06 03:36:24
Previous
ChangePassengerInfo
Next
VoidRequest_V2