Note This API provides Postman examples, which you can obtain by contacting your account manager.UTF-8 .Notes The production environment call address is provided after you finish the API development and testing, and before the official launch. You can replace the {{apiHost}} in the production environment call address with the provided domain name.| name | type | description |
|---|---|---|
| param | The value after Base64 encoding the Basic Request. The Basic Request is a JSON-structured data, and the detailed explanation is provided in the following text. | Text |
{
"authentication": {
"partnerId": "sIxxcsRCtssslnHt+BiT4bwONbMw=",
"sign": "234f554590789459af1e610e872896a3c6"
},
"data": {
"allPaxOfOrder": 0,
"refundReason": "2",
"refundType": "1",
"uploadedFileIds": [
"d0asisuddfjasld",
"asdfasdasdas158"
],
"orderNum": "916783592892089401",
"pnrList": [
{
"arrival": "SEA",
"bookingCode": "string",
"cabinClass": "string",
"departure": "LAX",
"flightNum": "DL1473",
"segmentNo": 1,
"ticketNums": [
{
"birthday": "2003-05-11",
"cardNum": "string",
"cardType": "string",
"firstName": "Joshua",
"pnr": "AB8SED",
"airPnr": "AB8SED",
"lastName": "Perez",
"sex": "M",
"ticketNum": "123456"
}
]
}
]
}
}| name | type | required | description |
|---|---|---|---|
| ticketNum | String | no | ticket number |
| lastName | String | yes | last name |
| firstName | String | yes | first name |
| cardType | String | no | ID type |
| cardNum | String | no | ID number |
| sex | String | yes | sex |
| birthday | String | yes | date of birth,format[YYYY-MM-DD] |
{
"authentication": {
"partnerId": "sIxxcsRCtSIlnHt+BiT4bwONbMw=",
"sign": "234f55459079289af1e610e872896a3c6"
},
"data": {
"allPaxOfOrder": 0
"refundReason": "2",
"refundType": "1",
"uploadedFileIds": [
"d0asisuddfjasld",
"asdfasdasdas158"
],
"orderNum": "916783592892089401",
"pnrList": [
{
"arrival": "SEA",
"bookingCode": "string",
"cabinClass": "string",
"departure": "LAX",
"flightNum": "DL1473",
"segmentNo": 1,
"ticketNums": [
{
"birthday": "2003-05-11",
"cardNum": "string",
"cardType": "string",
"firstName": "Joshua",
"lastName": "Perez",
"sex": "M",
"ticketNum": "123456"
}
]
}
]
}
}eyJhdXRoZW50aWNhdGlv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XSwib3JkZXJOdW0iOiI5MTY3ODM1OTI4OTIwODk0MDEiLCJwbnJMaXN0IjpbeyJhcnJpdmFsIjoiU0VBIiwiYm9va2luZ0NvZGUiOiJzdHJpbmciLCJjYWJpbkNsYXNzIjoic3RyaW5nIiwiZGVwYXJ0dXJlIjoiTEFYIiwiZmxpZ2h0TnVtIjoiREwxNDczIiwic2VnbWVudE5vIjoxLCJ0aWNrZXROdW1zIjpbeyJiaXJ0aGRheSI6IjIwMDMtMDUtMTEiLCJjYXJkTnVtIjoic3RyaW5nIiwiY2FyZFR5cGUiOiJzdHJpbmciLCJmaXJzdE5hbWUiOiJKb3NodWEiLCJsYXN0TmFtZSI6IlBlcmV6Iiwic2V4IjoiTSIsInRpY2tldE51bSI6IjEyMzQ1NiJ9XX1dfX0={
"errorCode": "0",
"errorMsg": "ok",
"data": {
"needUploadFileId": 0,
"orderNum": "916777559161841201",
"refundPriceId": "16786066309484323",
"refundPricingStatus": "refund pricing",
"refundReason": 0,
"refundType": 0,
"lastComfirmTime": "2022-02-03 13:00:00"
"passengerPriceList": [
{
"birthday": "2003-06-05",
"cardNum": "G47350571",
"cardType": "P",
"firstName": "Justin",
"lastName": "Lopez",
"sex": "M",
"ticketNum": "123456",
"solutions": {
"currency": "USD",
"paidAmount": 1.00,
"usedAmount": 1.00,
"nonRefundableAmount": 1.00,
"refundServiceFee": 1.00,
"refundAmount": 1.00,
"FormOfPayment": "PrePay"
},
"segmentList": [
{
"arrival": "SIN",
"bookingCode": "Z",
"cabinClass": "ECONOMY",
"departure": "KUL",
"flightNum": "AK703",
"pnr": "YMERBD",
"airPnr": "YMERBD",
"segmentNo": 1,
"ticketNum": "1677755872384"
}
]
}
]
}
}| name | type | required | description |
|---|---|---|---|
| errorCode | String | Yes | error code,refer to error code list |
| errorMsg | String | No | error message |
| warningMsg | String | No | warning message |
| data | Object | No | The returned data, this parameter is not empty only when the error code returns "0", refer to section 3.2.1. |
| name | type | required | description |
|---|---|---|---|
| refundPriceId | String | yes | refund price ID |
| refundPricingStatus | String | yes | refund status: 1-Refund Pricing和Supplier Pricing,2-Refund Priced, 3-Canceled |
| orderNum | String | yes | PKFARE order number |
| lastComfirmTime | String | no | last mintue to confirm refund; YYYY-MM-DD HH:MM (UTC+0) |
| passengerPriceList | Array | yes | the flight segments that are refunded and price information |
| refundType | String | yes | refund type:0-Voluntary, 1-Involuntary - |
| refundReason | Integer | yes | reasons for refund:0-Personal Reason, 1-Illness Reason, 2-Schedule Change Reason, 3-Crisis Reason, 4-Visa Refusal |
| needUploadFileId | Integer | yes | When submit refund request, sometimes the supporting documents are needed, including passport photo and so on; 0-no need; 1-need |
| name | type | required | description |
|---|---|---|---|
| segmentList | Array | yes | segment information,refer to 3.2.4 |
| lastName | String | yes | last name |
| firstName | String | yes | first name |
| cardType | String | no | identification type |
| cardNum | String | no | ID number |
| sex | String | yes | sex |
| birthday | String | yes | birthday, format [yyyy-MM-dd] |
| solutions | Object | no | Refund amount details, refer to 3.2.4 |
| name | type | required | description |
|---|---|---|---|
| segmentNo | Integer | yes | segment sequence |
| departure | String | yes | departure airport |
| arrival | String | yes | arrival airport |
| flightNum | String | yes | flight number |
| cabinClass | String | yes | cabin class |
| bookingCode | String | yes | booking code |
| pnr | String | no | PNR |
| airPnr | String | no | airlines PNR |
| ticketNum | String | no | ticket number |
| name | type | required | description |
|---|---|---|---|
| currency | String | yes | currency |
| paidAmount | BigDecimal | yes | paid amount |
| usedAmount | BigDecimal | yes | used amount |
| nonRefundableAmount | BigDecimal | yes | non-refundable amount(Includes airline penalties, non-refundable taxes, and supplier refund service fees) |
| refundServiceFee | BigDecimal | yes | refund service fees(PKFARE) |
| refundAmount | BigDecimal | yes | refundable amount |
| FormOfPayment | String | yes | payment method:Depends on payment method, Airline voucher, Depends on refund result, EMD |
Sample
partnerId: abcdefg123456
partnerKey: jkHKhkikdhy258dffj
Sign = MD5(abcdefg123456jkHKhkikdhy258dffj) = d7e99ae9d5c3c7d7113aced071e3ca08| error code | error message | description |
|---|---|---|
| 0 | Ok | success |
| P001 | xxx is illegal | invalid parameters |
| B002 | Partner is not exists | invalid partner |
| B003 | Illegal sign | Illegal sign |
| B048 | Invalid buyer | Invalid buyer |
| B037 | Order is not exist | Order is not exist |
| S001 | System error | system error |
| B134 | Refund is not applicable for passenger [pax name] | The passenger and ticket in the application already have an associated voided ticket or refund order and the status of the voided ticket or refund order is valid, and it is not allowed to initiate another refund offer application. |
| B142 | Passenger or ticket number is not in the order | The order number in the request does not match the passenger or ticket number |
| B143 | Involuntary Refund is not applicable to check refundable price, please request refund request directly. | Refund Pricing does not provide quotes for Involuntary Refund. |
| B136 | This is not all passengers and routings of the order, please kindly check. | The parameter "allPaxOfOrder" is 1, but part of the ticket information is missing from the pnrList. |
| B146 | Order#[Order number] is not applicable for refund. | The order in the request is not a ticket issuance or change order and cannot be requested for a refund. |
| B140 | Refund is not applicable for ticket number [ticket number] | The ticket in the application is found to have a status of USED for all segments after the ticket is extracted, and it is not allowed to initiate a refund offer request again. |
| B147 | Ticket(s) [ticket number] is No-show, refund is not applicable. | The ticket in the application has exceeded the No-show time limit and no refunds are allowed. |
| B145 | Passenger(s) must request to refund same routing for one time. If routing is varies, please request per passenger. | In the case of multiple passengers, the itineraries for which refunds are requested must be the same. If the itineraries are not identical, the itinerary must be as requested by the passenger |
| B148 | UploadFileId is not exist. | The Upload Filed ID in the request does not exist |
| B150 | This order was changed, please kindly use change order number. | The order number specified in the request is the original order, and the passenger+segment specified in the PnrList already has a change order |
| B152 | pnrList information is not same as order, please kindly check. | In the request, the journey of the order number and the information of the pnrList do not match |
