国内机票模块在提供航班查询、验舱验价等API数据查询服务同时,亦向开发者提供了预订下单、支付出票、退票、改签等API预订服务。从而帮助开发者在自己的平台上完成从查询到预订到退改一条龙服务(PS:API预订服务是作为增值服务提供给开发者,非必选接入项,开发者有自己的出票渠道亦可使用自己的)。
此接口可以通过指定航线、航班、出发日期、航空公司等条件查询,查询结果包括航班数据、库存、票面价、机建税、燃油费、结算价、返点返现政策等 信息。
往返或联程查询通过两次单程查询实现即可!
参数名称 | 类型 | 必填 | 说明 |
---|---|---|---|
fromCityCode | string | 是 | 出发城市三字码或机场三字码 |
toCityCode | string | 是 | 到达城市三字码或机场三字码 |
fromDate | string | 是 | 出发日期(格式:yyyy-MM-dd 如:2020-10-01 ) |
cabinLevel | int | 否 | 仓位类型(等级): 1=经济舱,2=公务舱,3=头等舱 |
airlineCode | string | 否 | 航司二字代码,如: CZ (即南方航空) |
flightNo | string | 否 | 航班号,只查询指定航班号的航班 |
sign | string | 是 | 签名校验值,md5(secretKey+fromCityCode+toCityCode+fromDate+secretKey) ,secretKey为请求密钥,开通账户时即可获得,加密结果转为32位小写 。【注意:加密前的拼接原串不包含'+'】 |
参数名称 | 类型 | 说明 |
---|---|---|
voyage | voyageInfo | 航程信息 |
fromCityCode | string | 出发城市三字码 |
toCityCode | string | 到达城市三字码 |
fromCityName | string | 出发城市名称 |
toCityName | string | 到达城市名称 |
fromDate | string | 出发日期 格式:yyyy-MM-dd |
flights | flightInfo[] | 航程对应的航班信息 |
flightNo | string | 航班号 |
airlineCompany | string | 航空公司名称 |
airlineCode | string | 航空公司二字码 |
airlineLogoUrl | string | 航空公司 logo |
fromAirportCode | string | 出发机场三字码 |
toAirportCode | string | 到达机场三字码 |
fromAirportName | string | 出发机场名称 |
toAirportName | string | 到达机场名称 |
isShareFlight | bool | 是否为共享航班 |
realFlightNo | string | 当为共享航班时,实际承运的航班号 |
fromDateTime | datetime | 出发时间(格式:yyyy-MM-dd HH:mm:ss) |
toDateTime | datetime | 到达时间(格式:yyyy-MM-dd HH:mm:ss) |
fromTerminal | string | 出发航站楼,如:T1 |
toTerminal | string | 到达航站楼,如:T2 |
flyDuration | string | 飞行时长,格式HH:mm,如:03:05,表示飞行 3小时5分钟 |
adultTax | int | 成人机建费 |
adultFuel | int | 成人燃油税 |
childTax | int | 儿童机建费 |
childFuel | int | 儿童燃油税 |
babyTax | int | 婴儿机建费 |
babyFuel | int | 婴儿燃油税 |
stopNum | int | 经停次数 |
craftType | string | 机型,如:空客A320 |
meals | string | 餐食情况(值:有餐食|无餐食) |
cabins | cabinInfo[] | 航班舱位列表 |
cabinCode | string | 舱位代码 |
cabinLevel | int | 国内机票舱位等级(经济舱 =1 ,公务舱 = 2, 头等舱=3) |
cabinName | string | 舱位名称 |
seatLeftNum | int | 舱位剩余座位数 :1-10(备注:<10表示实际座位余数 10表示余票充足,泛指) |
discount | double | 折扣,如:0.29 表示29折 |
cabinBookPara | string | 舱位下单参数,下单原样传入即可(备注:下单必传字段) |
cabinPrice | CabinPriceInfo | 舱位价格信息 |
adultFarePrice | int | 成人票面价(即官网公布运价,行程单上的票面价) |
adultSalePrice | float | 成人销售价(不含税),即贵司在平台的采购价 |
childFarePrice | int | 儿童票面价(一般为成人所选舱等的全价票的50%) |
childSalePrice | float | 儿童销售价(不含税) |
babyFarePrice | int | 婴儿票面价(一般为成人所选舱等的全价票的10%) |
babySalePrice | float | 婴儿销售价(不含税) |
{ "data": { "voyage": { "fromCityCode": "KRL", "toCityCode": "CTU", "fromCityName": "库尔勒", "toCityName": "成都", "fromDate": "2020-06-10", "flights": [ { "flightNo": "CZ6925", "airlineCompany": "南方航空", "airlineCode": "CZ", "airlineLogoUrl":"http://api.panhe.net/Content/Images/AirLineLogo/CZ.png", "fromAirportCode": "KRL", "toAirportCode": "CTU", "fromAirportName": "库尔勒", "toAirportName": "成都双流", "isShareFlight": false, "realFlightNo": null, "fromDateTime": "2020-06-10 09:40:00", "toDateTime": "2020-06-10 15:45:00", "fromTerminal": "--", "toTerminal": "T2", "flyDuration": "06:05", "adultTax": 50, "adultFuel": 0, "childTax": 0, "childFuel": 0, "babyTax": 0, "babyFuel": 0, "cabins": [ { "cabinCode": "M", "cabinLevel": 1, "cabinName": "经济舱", "seatLeftNum": 10, "discount": 0.84, "cabinBookPara": "117BD92FEA4F0821324606EB5854A95B88DAE807DCFF74193A88B739B1FD885420038AE8EF89BC10A72B9A12EBD4E616F2B69D936EEAC20BE2D9C2B34B8DAB7F75D2A1BEAE88C5D853C2466C8CD698EACA33BBBFA2E24218A6FF167C726EB928EC95B30107D5B02C79E35E8426C9DD283852F21072BFBEC4267EE346A9C2F7CCDFAD9B24DA74E891F6A99213FF2C271B170C115209BC476727FCFD68902A3638A6D92DD3E204634838C8BC26BDE38BFC21CDC3FCB5BF39E6D33DF8FA2F1CEF0A22386762FCA4FD91CF3F10DFD853CC339619E5F2599E185DBC726C15FEBDB6D21892FDBEFA88420BECC2A1D6BB92C643114274DE1AAADC16119A6E889796A663B074510CC773C96B8DFB75D60EDC6A49D97EEC666AA36F296040F6950C3204B02C6B3E3F18F69E4192053803763F004681832ED7CF366D6EF7B33C2BCE43D7BB6400A90010850DC27A48CB3A987C7EC9703A8D34EC067267F671142CC223113F780FA8CE7F7F7B794904492DF96D3BC7F95DC3E66BE2A749EE508CDD3A5D42E0291FA8A1D97D904442992A88E70C34C84FEADE25719D55E2089FAAC37C1010592038805A63B29F46F7533DEC509E6CCE661D1F8C04C88556DFDAF286015EC0B654384544D2D54D49BDBB29E8F5B9480EB3E47AD9D2D7FF5141DE856698935C7E62E417A09ED465AE1B7498E24E9FA9DA7942E48E9DE3FF9216809DC4E53F9ADFEB4A70665E133C6391971DDB74F418B1", "cabinPrice": { "adultFarePrice": 2110, "adultSalePrice": 2097, "childFarePrice": 1260, "childSalePrice": 1266.0, "babyFarePrice": 260, "babySalePrice": 270.0, "cabinClassFullFarePrice": 0 } }, { "cabinCode": "S", "cabinLevel": 1, "cabinName": "特价舱位", "seatLeftNum": 6, "discount": 0.86, "cabinBookPara": "117BD92FEA4F0821324606EB5854A95B88DAE807DCFF74193A88B739B1FD885420038AE8EF89BC10A72B9A12EBD4E616F2B69D936EEAC20BE2D9C2B34B8DAB7F75D2A1BEAE88C5D853C2466C8CD698EACA33BBBFA2E24218A6FF167C726EB928EC95B30107D5B02C79E35E8426C9DD283852F21072BFBEC4267EE346A9C2F7CCDFAD9B24DA74E891F6A99213FF2C271B170C115209BC476727FCFD68902A3638A6D92DD3E204634838C8BC26BDE38BFC21CDC3FCB5BF39E6D33DF8FA2F1CEF0A22386762FCA4FD91CF3F10DFD853CC339619E5F2599E185DBC726C15FEBDB6D2AE802E29B8C496892AA06B48447600CE70C0154193BF4C8B959FBDEF4BDD2B575663F5D3AF7017FAC65060D4EA2071D4A939F6D142A1B9BBE9A5A1A6BD2487EC08565C20810DA1895DAB6A55835007C381648A3DF6CD6F6E9283CDA8606A63CCE02EF57ED8A5B678A23E8E3DAF7AEF5E57D447F670266B9B04A6A7E5792CD7C26D2FAEACEE623F90D32A1B39F383E55D27E3797174DE7874BF8E94EFD84A49A43DE7D03D4ACF252D35434BF65B318BE1A515B15BC65E59BACC97CD70F9A8C2C5A4ECE3DE9EEDF1EFAEFBE755EE95A46AAD09391ECDFEB5BE3D85B42C541134336E29183D5D3DF4F66CE226CA5B7FD830B8DD19D65522C7375527CFBA9134E155DA06D8554571E1FABB1CBAB865081455D379A7D3A06F9244F39DCF4564A943429F1A15D5AE4B790BBF5BB29D32EE0256", "cabinPrice": { "adultFarePrice": 2160, "adultSalePrice": 2151, "childFarePrice": 1260, "childSalePrice": 1266.0, "babyFarePrice": 260, "babySalePrice": 270.0, "cabinClassFullFarePrice": 0 } }, { "cabinCode": "Y", "cabinLevel": 1, "cabinName": "经济舱", "seatLeftNum": 10, "discount": 1.0, "cabinBookPara": "117BD92FEA4F0821324606EB5854A95B88DAE807DCFF74193A88B739B1FD885420038AE8EF89BC10A72B9A12EBD4E616F2B69D936EEAC20BE2D9C2B34B8DAB7F75D2A1BEAE88C5D853C2466C8CD698EACA33BBBFA2E24218A6FF167C726EB928EC95B30107D5B02C79E35E8426C9DD283852F21072BFBEC4267EE346A9C2F7CCDFAD9B24DA74E891F6A99213FF2C271B170C115209BC476727FCFD68902A3638A6D92DD3E204634838C8BC26BDE38BFC21CDC3FCB5BF39E6D33DF8FA2F1CEF0A22386762FCA4FD91CF3F10DFD853CC339619E5F2599E185DBC726C15FEBDB6D27B28D82CB1D7A047488A030326C4CAD941542CBA78EAF87F991634FC4A1681858804FED882F4D4DE7790D81A4274AAFEB6A581ECA2B4EEF41D3D799F785ED802DC0C519E099CDB97DFBA987619E782A073FE58C002F754517E15ED90F7303CBFF3317FE9285B109ED23567884869829731B4DCD8104BDFAEAA20349F9B445D9C3C1FA2616F23D66AC9702EA403FA102545F3898907B2B119E6754DD1FDC9EE1ADAC44B91E5C2B87B87A348A1BE237B714CED46C1B91E2739AEFCC224CC941CF62F8E98852C2AB186574FDC4597E6FC114682FE42C3A642817B5128B4545CC41CD458C6843F47C3063C93019D9D57FA702173241DCDFBBE9D1016AE6416505AD6785F466E437B08C916BF1F0C1D8AF472658465CDF6CDF2BDAE043CA3D17809C87250DC65EDFCE561FD729777C623EE2C", "cabinPrice": { "adultFarePrice": 2510, "adultSalePrice": 2494, "childFarePrice": 1260, "childSalePrice": 1266.0, "babyFarePrice": 260, "babySalePrice": 270.0, "cabinClassFullFarePrice": 0 } }, { "cabinCode": "C", "cabinLevel": 2, "cabinName": "特价舱位", "seatLeftNum": 4, "discount": 1.8, "cabinBookPara": "117BD92FEA4F0821324606EB5854A95B88DAE807DCFF74193A88B739B1FD885420038AE8EF89BC10A72B9A12EBD4E616F2B69D936EEAC20BE2D9C2B34B8DAB7F75D2A1BEAE88C5D853C2466C8CD698EACA33BBBFA2E24218A6FF167C726EB928EC95B30107D5B02C79E35E8426C9DD283852F21072BFBEC4267EE346A9C2F7CCDFAD9B24DA74E891F6A99213FF2C271B170C115209BC476727FCFD68902A3638A6D92DD3E204634838C8BC26BDE38BFC21CDC3FCB5BF39E6D33DF8FA2F1CEF0A22386762FCA4FD91CF3F10DFD853CC339619E5F2599E185DBC726C15FEBDB6D2912301FEE9235C9807509C8050C3CF1FC6FC3C481C79693F70F3299410EEF962F14751A3286C1CCF936CD35AE196BA767D10AD2BE74BE48B312E2BEEB404C2F921A20A280B615C9F17DEEB19914687B9BD0B84462C95C339D243D6F93D325C9416F7085EC6FA1860D2A84AECF2235560BDE5D64B295E9B14F23F122D146311FFC2473E5984C06253D1DD9A575ED40271F8BF02473924A1A153B2ACA4267B94538D94826016ECA6E81224FD1043688E348D059FE3E18C7C085FCD6040AD372C143CDB5AFD98EB011A8D6C436A572864CC48F9A280B2B0D19BB783B4E8472DE33F1D45236F053E402D4A1514C6C0308DCCAAF981ABAFB2711CF07CE9387593E0BF4DE851B7533C20C7B7270D442C4531C46520862AC65795BB5CDE5DB946119B301913FBB06FDE882E2007D4A2329B8A2B", "cabinPrice": { "adultFarePrice": 4520, "adultSalePrice": 4492, "childFarePrice": 2890, "childSalePrice": 2896.0, "babyFarePrice": 580, "babySalePrice": 590.0, "cabinClassFullFarePrice": 0 } }, { "cabinCode": "J", "cabinLevel": 2, "cabinName": "商务舱", "seatLeftNum": 8, "discount": 2.3, "cabinBookPara": "117BD92FEA4F0821324606EB5854A95B88DAE807DCFF74193A88B739B1FD885420038AE8EF89BC10A72B9A12EBD4E616F2B69D936EEAC20BE2D9C2B34B8DAB7F75D2A1BEAE88C5D853C2466C8CD698EACA33BBBFA2E24218A6FF167C726EB928EC95B30107D5B02C79E35E8426C9DD283852F21072BFBEC4267EE346A9C2F7CCDFAD9B24DA74E891F6A99213FF2C271B170C115209BC476727FCFD68902A3638A6D92DD3E204634838C8BC26BDE38BFC21CDC3FCB5BF39E6D33DF8FA2F1CEF0A22386762FCA4FD91CF3F10DFD853CC339619E5F2599E185DBC726C15FEBDB6D21D18CF6E6435F33514754BD16C4670A6998A6BBE6A7CC2A4FBAD923B21FE5D2F400F6E952E0CD17FD4FB1B690AA7780FA3D5CCC1A550D1216F942494AD286701C17DBFECDA0614E1153451500D4BC61782EFB5857EE3EEE768DE3F89A80503DB81314E39D934090031666C8FE9FCBD9D68061CE8A231160CEB631CE3C95FFEC0D40C9BA64058615BD386FE6D8F0315C67978EC509BF7E47CBA2698C9F174C17B6F2688DFDABA28C6A84E350B04DCC8B7008102898EC8BDC9C33B516CA263C03B0F5E8FB193B756107B1AB50B87DCDB3517725A566A21F922718E53388130A22C61225F612D0E0472CD6843F2C3E42A2F86114BD5A7263A90784EBB4E30DA4561B0C0D7DC2DDF61A29F96CA1175C806448BD838D1AFB89D6D731F1CB4A75B9BA596BF5F0E7F89A0F9", "cabinPrice": { "adultFarePrice": 5770, "adultSalePrice": 5735, "childFarePrice": 2890, "childSalePrice": 2896.0, "babyFarePrice": 580, "babySalePrice": 590.0, "cabinClassFullFarePrice": 0 } } ], "yCabinLevelFullPrice": 2510, "cCabinLevelFullPrice": 5770, "fCabinLevelFullPrice": null, "stopNum": 1, "craftType": "波音738" } ] } }, "success": true, "msg": "请求成功" }