KingTravel Shopping API
  1. Ticket Booking API
KingTravel Shopping API
ShoppingAPI
  • ShoppingAPI
  • Ticket Booking Process
    • Booking Process
  • Ticket Booking API
    • Search
      POST
    • Verify
      POST
    • Booking
      POST
    • Cancel
      POST
    • Pay
      POST
    • Query
      POST
  • Ticket Booking Notification
    • Notify
      POST
  • Error Codes
    • Search
    • Verify
    • Booking
  • Attachment
    • About Booking AES Encryption
  1. Ticket Booking API

Search

POST
/ndc/v1/search
Search is the first interface for booking airline tickets. By searching for the destination itinerary and selecting a suitable quote, the next steps include price verification, booking, and ticket issuance.

Request

Authorization
API Key
Add parameter in header
appKey
Example:
appKey: ********************
API Key
Add parameter in header
appSecret
Example:
appSecret: ********************
or
Body Params application/jsonRequired

Examples

Responses

🟢200成功
application/json
success
Body

Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://localhost:9002/api/ndc/v1/search' \
--header 'appKey: <api-key>' \
--header 'appSecret: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "tripType": 1,
    "fromCity": "SHA",
    "toCity": "TYO",
    "fromDate": "20251125",
    "retDate": "20251125",
    "adultNumber": 2,
    "childNumber": 1,
    "infantNumber": 1
}'
Response Response Example
{
    "status": 0,
    "msg": "success",
    "shoppingResultList": [
        {
            "flightRefList": [
                {
                    "flightRefNum": 0,
                    "segmentNo": 0,
                    "flightSeq": 0,
                    "tuSequence": 0,
                    "seatGrade": "string",
                    "seatClass": "string",
                    "seatCount": 0,
                    "originSeatClass": "string",
                    "brandName": "string",
                    "flightNo": "string",
                    "depPort": "string",
                    "arrPort": "string",
                    "depTime": "string"
                }
            ],
            "data": "string",
            "tuList": [
                {
                    "tuSequence": 0,
                    "priceList": [
                        {
                            "passengerType": 0,
                            "publishPrice": 0,
                            "price": 0,
                            "taxFeeAmount": 0,
                            "ruleId": 0
                        }
                    ],
                    "eligibility": "string",
                    "validatingCarrier": "string",
                    "productType": "string",
                    "fareBasis": "string",
                    "isUseOtaRule": true,
                    "tariffNo": "string",
                    "ruleNo": "string",
                    "bookingOfficeNo": "string",
                    "ticketingOfficeNo": "string",
                    "reservationType": "string",
                    "posCode": "string",
                    "complexTerm": 0,
                    "minAge": 0,
                    "maxAge": 0,
                    "nationalityType": 0,
                    "nationality": "string",
                    "planCategory": 0,
                    "invoiceType": "string",
                    "minPassengerCount": 0,
                    "maxPassengerCount": 0,
                    "note": "string",
                    "airlineAncillaries": {
                        "baggageService": true,
                        "unFreeBaggage": true
                    },
                    "formatBaggageDetailList": [
                        {
                            "segmentNo": 0,
                            "flightSeq": 0,
                            "passengerType": 0,
                            "baggageType": 0,
                            "baggagePiece": 0,
                            "baggageWeight": 0
                        }
                    ],
                    "refundInfoList": [
                        {
                            "passengerType": 0,
                            "refundType": 0,
                            "refundStatus": "string",
                            "refundFee": 0,
                            "refNoshow": "string",
                            "refNoShowCondition": 0,
                            "refNoshowFee": 0,
                            "conditionList": [
                                {
                                    "status": "string",
                                    "endMinute": 0,
                                    "amount": 0
                                }
                            ]
                        }
                    ],
                    "changesInfoList": [
                        {
                            "passengerType": 0,
                            "changesType": 0,
                            "changesStatus": "string",
                            "changesFee": 0,
                            "revNoshow": "string",
                            "revNoShowCondition": 0,
                            "revNoshowFee": 0,
                            "conditionList": [
                                {
                                    "status": "string",
                                    "endMinute": 0,
                                    "amount": 0
                                }
                            ]
                        }
                    ],
                    "packageInfo": {
                        "packageType": "string",
                        "packageName": "string"
                    },
                    "currency": "string",
                    "applyType": 0,
                    "ticketTimeUnit": 0,
                    "tuanType": 0,
                    "combineIndexs": [
                        0
                    ],
                    "endorsement": 0,
                    "extraInfo": {
                        "property1": "string",
                        "property2": "string"
                    }
                }
            ]
        }
    ],
    "flightList": [
        {
            "flightRefNum": 0,
            "marketingCarrier": "CA",
            "flightNumber": "CA123",
            "operatingCarrier": "string",
            "operatingFlightNo": "string",
            "depAirport": "PVG",
            "arrAirport": "NRT",
            "depTerminal": "T1",
            "arrTerminal": "T3",
            "depTime": "201203100300",
            "arrTime": "201203101305",
            "codeShare": false,
            "aircraftCode": "string",
            "stops": [
                {
                    "stopAirport": "string",
                    "stopDuration": 0,
                    "stopCity": "string"
                }
            ]
        }
    ],
    "cacheTime": 120
}
Modified at 2025-12-03 04:24:53
Previous
Booking Process
Next
Verify
Built with