HK Ramble
  1. Booking
HK Ramble
  • Booking Flow
  • Booking
    • Search
      POST
    • Verify
      POST
    • Order
      POST
    • Pay
      POST
    • Confirm
      POST
    • SSR
      POST
    • OrderDetail
      POST
  • Change
    • ChangePricePush
      POST
    • ChangeResultPush
      POST
  • IssueNofity
    • IssueNotify
      POST
  1. Booking

Order

POST
/json/order
erroCode erroMsg Description
0 ok Request has been processed successfully.
S001 System error. System error.
B002 Partner is not exists. PartnerID does not exist.
B003 Illegal sign. Illegal sign. Please check your signature.
B035 Concurrency limited. Please contact TSYFare API support team for assistant. Concurrency exceeded system limits.
P001 XXX is illegal. The field of XXX is illegal.
P002 XXX is missing. The field of XXX is missing.
P006 Invalid parameter. Value of request cannot pass the validation, please check on the request.
0307 Reservation failed - Booking class is sold out. Reservation failed. Seats have been sold out.
B004 There are errors in the passenger type of Adults. Adult passenger's age does not meet the requirements.
B005 Can 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.
B006 Reservation failed - Other. OrderNum is XXX. Booking fail for other reason. The order has been created which is indicated in Other.OrderNum field
B006 Reservation failed. Booking fail for other reason.
B007 Reservation failed - Segment status is not HK. Segment status is invalid from GDS. Please select other flight options.
B008 Itinerary 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.
B011 Reservation failed - Fare is unavailable. Fare is unavailable form GDS. Please select other flight options.
B012 Reservation failed - Create PNR time out. Create PNR time out from GDS. Please wait some minutes or select other flight options.
B017 Price is changed. Price is changed.
B023 Reservation failed - Save price fail. Fail to save price from GDS.
B022 There are errors in the passenger type of Children Child passenger's age does not meet the requirements.
B025 Reservation failed - RT PNR fail. Fail to retieve PNR from GDS.
B027 Airline PNR is missing. Airline PNR is missing from GDS.
B028 Reservation failed - Time out. Booking time out from GDS.
B029 Duplicate 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.
B030 Illegal 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.
B031 Illegal 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.
B032 Illegal 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.
B043 Reservation failed: Create PNR failed. Booking failed from GDS.
B044 Reservation failed - Create PNR failed, end transaction failed. Booking failed from GDS.
B062 The 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.
B064 The lastName of passegner should be within 2-30 English alphabet. Passenger's last name should be within 2-30 English alphabet.
B065 Passenger'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 TSYFare API support.
B069 Reservation failed, this fare has passenger age limitation. Reservation failed, because this fare has a passenger age limition.
B077 There are erros in the passenger type of infants. Infant passenger's age does not meet the requirements.
B078 Lack of passengerIndex. For bookings contain infant(s) , passengerIndex is required for each passenger.
B079 Each 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.
B080 Invalid or duplicated or discontinuous passengerIndex PassengerIndex must be positive and continuous integers starting from 1.
B081 Error in ancillary passenger info. Error in ancillary passenger info.
B087 Booking Failed. System has recognized possible churning. Churning booking behaviour were detected and booking request with the same passenger will be restricted.
B192 Duplicate 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.
B193 Multiple 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
authentication
object 
required
sign
string 
required
partnerId
string 
required
booking
object 
required
passengers
array [object {16}] 
required
solution
object 
required
contact
object 
required
ancillary
array [object {2}] 
required
Example
{
    "authentication": {
        "sign": "0d83b8d315788029b979d10b67192b31",
        "partnerId": "9y1hYW6AQv4QcCs95wsuMNSzHwc="
    },
    "booking": {
        "passengers": [
            {
                "passengerIndex": 1,
                "birthday": "1999-06-22",
                "firstName": "ZI",
                "lastName": "WANG",
                "nationality": "PH",
                "psgType": "ADT",
                "sex": "F",
                "cardType": "PP",
                "cardNum":"PP0123",
                "cardExpiredDate":"20291001",
                "cardIssuePlace":"CN",
                "ffpNumber": "125003559853",
                "ffpAirline": "CA",
                "ktn": "1029490",
                "redress": "2039401"
            },
            {
                "passengerIndex": 2,
                "birthday": "19980623",
                "firstName": "ZI",
                "lastName": "WANG",
                "nationality": "PH",
                "psgType": "ADT",
                "sex": "F",
                "cardType": "PP",
                "cardNum":"PP0123",
                "cardExpiredDate":"20291001",
                "cardIssuePlace":"CN",
                "ffpNumber": "125003559854",
                "ffpAirline": "CA",
                "ktn": "1029490",
                "redress": "2039402"
            }
        ],
        "solution": {
            "solutionId": "a5b5fd22bb014d4d9ad3ba98c0958cd6|VrInIfYjIjUjJBRRNbzYvMja_v",
            "adtFare": 281.0,
            "adtTax": 409.0,
            "chdFare": 280.0,
            "chdTax": 409.0,
            "tktFee": 0.0,
            "journeys": {
                "journey_0": [
                    {
                        "airline": "FD",
                        "flightNum": "3438",
                        "arrival": "DMK",
                        "arrivalDate": "2024-12-20",
                        "arrivalTime": "09:40",
                        "departure": "CNX",
                        "departureDate": "2024-12-20",
                        "departureTime": "08:30",
                        "bookingCode": null,
                        "segmentKey": null
                    }
                ]
            }
        },
        "contact": {
            "name": "WNGZI",
            "email": "11111@xx.com",
            "telCode": "+86",
            "mobile": "15912341234",
            "buyerEmail": "11111@xx.com",
            "buyerTelCode": "+86",
            "buyerMobile": "17643214321"
        },
        "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": "RrIiRqhFxakfBQcCHOVbm9GTzaMuttWeCcFnMTOJpmo=",
                            "ancillaryType": "2",
                            "ancillarySegment": {
                                "airline": "FD",
                                "flightNum": "3446",
                                "arrival": "DMK",
                                "arrivalDate": "2024-12-20",
                                "arrivalTime": "09:40",
                                "departure": "CNX",
                                "departureDate": "2024-12-20",
                                "departureTime": "08:30",
                                "bookingCode": null,
                                "segmentKey": null
                            }
                        }
                    ]
                },
                "ancillaryPassenger": {
                    "firstName": "ZI",
                    "lastName": "WANG",
                    "psgType": "ADT",
                    "sex": "F"
                }
            }
        ]
    }
}

Request 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 --request POST '/json/order' \
--header 'Content-Type: application/json' \
--data-raw '{
    "authentication": {
        "sign": "0d83b8d315788029b979d10b67192b31",
        "partnerId": "9y1hYW6AQv4QcCs95wsuMNSzHwc="
    },
    "booking": {
        "passengers": [
            {
                "passengerIndex": 1,
                "birthday": "1999-06-22",
                "firstName": "ZI",
                "lastName": "WANG",
                "nationality": "PH",
                "psgType": "ADT",
                "sex": "F",
                "cardType": "PP",
                "cardNum":"PP0123",
                "cardExpiredDate":"20291001",
                "cardIssuePlace":"CN",
                "ffpNumber": "125003559853",
                "ffpAirline": "CA",
                "ktn": "1029490",
                "redress": "2039401"
            },
            {
                "passengerIndex": 2,
                "birthday": "19980623",
                "firstName": "ZI",
                "lastName": "WANG",
                "nationality": "PH",
                "psgType": "ADT",
                "sex": "F",
                "cardType": "PP",
                "cardNum":"PP0123",
                "cardExpiredDate":"20291001",
                "cardIssuePlace":"CN",
                "ffpNumber": "125003559854",
                "ffpAirline": "CA",
                "ktn": "1029490",
                "redress": "2039402"
            }
        ],
        "solution": {
            "solutionId": "a5b5fd22bb014d4d9ad3ba98c0958cd6|VrInIfYjIjUjJBRRNbzYvMja_v",
            "adtFare": 281.0,
            "adtTax": 409.0,
            "chdFare": 280.0,
            "chdTax": 409.0,
            "tktFee": 0.0,
            "journeys": {
                "journey_0": [
                    {
                        "airline": "FD",
                        "flightNum": "3438",
                        "arrival": "DMK",
                        "arrivalDate": "2024-12-20",
                        "arrivalTime": "09:40",
                        "departure": "CNX",
                        "departureDate": "2024-12-20",
                        "departureTime": "08:30",
                        "bookingCode": null,
                        "segmentKey": null
                    }
                ]
            }
        },
        "contact": {
            "name": "WNGZI",
            "email": "11111@xx.com",
            "telCode": "+86",
            "mobile": "15912341234",
            "buyerEmail": "11111@xx.com",
            "buyerTelCode": "+86",
            "buyerMobile": "17643214321"
        },
        "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": "RrIiRqhFxakfBQcCHOVbm9GTzaMuttWeCcFnMTOJpmo=",
                            "ancillaryType": "2",
                            "ancillarySegment": {
                                "airline": "FD",
                                "flightNum": "3446",
                                "arrival": "DMK",
                                "arrivalDate": "2024-12-20",
                                "arrivalTime": "09:40",
                                "departure": "CNX",
                                "departureDate": "2024-12-20",
                                "departureTime": "08:30",
                                "bookingCode": null,
                                "segmentKey": null
                            }
                        }
                    ]
                },
                "ancillaryPassenger": {
                    "firstName": "ZI",
                    "lastName": "WANG",
                    "psgType": "ADT",
                    "sex": "F"
                }
            }
        ]
    }
}'

Responses

🟢200Success
application/json
Body
java.lang.Object
errorCode
string 
required
errorMsg
string 
required
data
object 
required
orderNum
string 
required
pnr
string 
required
totalPrice
string 
required
totalPrice
solutions
array [object {26}] 
required
flights
array [object {5}] 
required
segments
array [object {24}] 
required
Examples
{
    "errorCode": "0",
    "errorMsg": "成功",
    "data": {
        "orderNum": "10972501310072",
        "pnr": "W6VMFB",
        "solutions": [
            {
                "solutionKey": "Zb6NFzfeiEfe3UBzEnRFnyaa_o",
                "solutionId": "1498bab4bfb04da9b9ead18b4551fb78|Zb6NFzfeiEfe3UBzEnRFnyaa_o",
                "fareType": "PRIVATE",
                "currency": "CNY",
                "adtFare": 484,
                "adtTax": 62,
                "chdFare": 484,
                "chdTax": 62,
                "infFare": 0,
                "infTax": 0,
                "tktFee": 0,
                "platformServiceFee": 0,
                "comments": null,
                "journeys": {
                    "journey_0": [
                        "393babfa36af48799ecb49d08f03a7fd"
                    ]
                },
                "fareRule": null,
                "rule": null,
                "platingCarrier": "FD",
                "prices": null,
                "merchantFee": 0,
                "adults": 1,
                "children": 0,
                "infants": 0,
                "baggageMap": {
                    "ADT": [
                        {
                            "segmentIndexList": [
                                1
                            ],
                            "baggageAmount": "0PC",
                            "baggageWeight": null,
                            "carryOnAmount": "1",
                            "carryOnWeight": "7",
                            "carryOnSize": null
                        }
                    ]
                },
                "miniRuleMap": null,
                "afterSaleRule": null,
                "qcharge": 0
            }
        ],
        "flights": [
            {
                "flightId": "393babfa36af48799ecb49d08f03a7fd",
                "journeyTime": 125,
                "transferCount": 0,
                "lastTktTime": null,
                "segmengtIds": [
                    "bf957ff8c0af46d3a164cee0cb2df8e2"
                ]
            }
        ],
        "segments": [
            {
                "segmentId": "bf957ff8c0af46d3a164cee0cb2df8e2",
                "airline": "FD",
                "flightNum": "3430",
                "equipment": null,
                "cabinClass": "Economy",
                "bookingCode": "I",
                "availabilityCount": 7,
                "departure": "CNX",
                "arrival": "DMK",
                "departureTerminal": null,
                "arrivalTerminal": null,
                "departureDate": 1739100000000,
                "arrivalDate": 1739105100000,
                "flightTime": 125,
                "stayTime": null,
                "codeShare": null,
                "opFltNo": null,
                "opFltAirline": null,
                "stopover": null,
                "fareBasis": null,
                "strDepartureDate": "2025-02-09",
                "strDepartureTime": "19:20",
                "strArrivalDate": "2025-02-09",
                "strArrivalTime": "20:45"
            }
        ]
    }
}
Modified at 2025-02-18 11:35:12
Previous
Verify
Next
Pay
Built with