文档中心 > 综合交通-商家对接

qimen.alitrip.bus.product.query.batchnumber (批量查询车次接口)

汽车票批量查询班次

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
fromCityCode String 可选 C001 出发城市编码
fromCityName String 可选 北京 出发城市名称
departDate String 可选 2018-08-08 出发日期

响应参数

名称 类型 示例值 描述
retCode String 0 错误码
retDesc String 成功 错误描述(是必填)
numberList NumberInfo [] 班次列表(必填 ,返回结果参照查询?次返回示例)
  • └ agentFromStationId
  • String
  • A0001
  • 代理商车站id
  • └ busNumber
  • String
  • AP6A6A70
  • 班次号
  • └ fullPrice
  • Number
  • 12000
  • 价格,单位分
  • └ busType
  • String
  • 特级高等车
  • 客车车型
  • └ maxSellNum
  • Number
  • 5
  • 一单最大乘车人数
  • └ fromCityCode
  • String
  • 110100
  • 上车点城市编号 选
  • └ fromCityName
  • String
  • 北京
  • 上车点城市名称
  • └ fromStationCode
  • String
  • 001
  • 上车点编码
  • └ fromStationName
  • String
  • 六里桥
  • 上车点名称
  • └ departTime
  • String
  • 2018-11-30 05:00
  • 发车时间
  • └ arriveTime
  • String
  • 2018-11-30 11:30
  • 到达时间
  • └ distance
  • Number
  • 380
  • 里程
  • └ totalSeats
  • Number
  • 55
  • 总座位数
  • └ scheduleId
  • String
  • A1K001_AP6A6A70_2366_201811301520
  • 班次id
  • └ toCityName
  • String
  • 北京
  • 下车点归属城市
  • └ toProvinceName
  • String
  • 北京市
  • 下车点所属省份
  • └ shiftType
  • Number
  • 1
  • 班次类型0:固定班 1:流水班2:加班班次
  • └ lastSchedule
  • String
  • 18:00
  • 最晚发车时间 mm:ss 流水班返回
  • └ realNameGrade
  • String
  • 2|3
  • 实名校验规则
  • └ isRefund
  • Boolean
  • true
  • 是否会允许退票(可空,为空时以查询车站接口出参中的isRefund字段为准)
  • └ refundTime
  • Number
  • 30
  • 发车前允许退票时间,分钟。发车前允许退票时间,分钟
  • └ isOrderRefund
  • Boolean
  • true
  • 是否按照整个订单退款
  • └ refundType
  • String
  • 1
  • 退票类型1:在线退票 2:不可在线退票 3:不可退票
  • └ refundMsg
  • String
  • 本产品可在线退票,退票手续费3元
  • 退票提示文案
  • └ presellTime
  • Number
  • 120
  • 班次发车前可售时间
  • └ toStationCode
  • String
  • 111
  • 下车点区域code
  • └ toStationName
  • String
  • 古北水镇
  • 下车点名称
  • └ serviceInfo
  • String
  • 发票说明,温馨提示
  • 服务须知
  • └ productInfo
  • String
  • 本产品可领取上车礼,可能根据预订人数升级车型
  • 产品信息
  • └ supportEticket
  • Boolean
  • true
  • 是否支持电子票true:表示支持,false:表示不支持
  • └ destLongitude
  • String
  • 100.12456004
  • 目的地经度
  • └ destLatitude
  • String
  • 25.12456004
  • 目的地维度
  • └ status
  • String
  • 1:可售 0:不可售 不填默认为1
  • 是否暂停售票
  • obtainTicket
  • ObtainTicket
  • 取票信息
  • └ address
  • String
  • 四惠汽车站对面
  • 取票详细地址
  • └ invoice
  • Boolean
  • true
  • 是否可以作为发票凭证
  • └ voucher
  • String
  • 凭预订短信验证码取票
  • 取票凭证描述
  • └ longitude
  • String
  • 25.62456004
  • 取票地址经度
  • └ latitude
  • String
  • 100.12456004
  • 取票地址纬度
  • └ ticketTel
  • String
  • 4000535411
  • 取票电话
  • parkingPoints
  • ParkingPoints []
  • 游玩点
  • └ name
  • String
  • 卧佛寺
  • 游玩点名称
  • └ desc
  • String
  • 植物园停车游玩一小时
  • 游玩点详细说明
  • └ parkingMinutes
  • Number
  • 60
  • 游玩时间
  • transferPoints
  • TransferPoints []
  • 换乘信息,中途需要换乘的填写
  • └ name
  • String
  • 长城附件公交站
  • 换车点名称
  • └ desc
  • String
  • 换什么车
  • 换乘说明
  • numberGoods
  • NumberGoods []
  • 商品goods
  • └ goodsId
  • String
  • 0001
  • 商品id
  • └ price
  • Number
  • 125
  • 价格
  • └ originPrice
  • Number
  • 200
  • 原始价格
  • └ stock
  • String
  • 38
  • 库存
  • └ goodsType
  • String
  • 2|4|5
  • 商品类型1:单程票 2:门票套餐 3:当日往返票 4:次日往返票 5:上车礼 6:酒店 7:其他 如是多个类型组合则用'|'分隔 eg:1|2|5 表示单程票+门票套餐+上车礼
  • └ goodsName
  • String
  • 三等B
  • 商品名称
  • └ goodsDesc
  • String
  • 8人间
  • 商品描述
  • └ servicePrice
  • Number
  • 100
  • 服务费 单位(分)
  • └ attribute
  • String
  • {"param":"param"}
  • 扩展属性 json格式
  • └ refundStructuredInfo
  • String
  • "[{"key":"发车前4-6小时","seq":"1","value":"不收取退票手续费"},{"ext":"如有紧急情况请联系车站","key":"发车前2-4小时","seq":"2","value":"收取5%手续费"},{"key":"发车前1-2小时","seq":"3","value":"收取10%手续费"}]"
  • 退票提示文案结构化展示文案,数据为json列表
  • └ busBizType
  • String
  • 1
  • 0:普通汽车票(从客运站始发的班线);1:景区巴士(出发或目的地为景点的班线,可市内可跨城);2:船票;3:机场巴士(出发或目的地为机场的班线,可市内可跨城);4:跨城巴士(城市A到城市B跨城移动的班线,如广州XX地铁口-深圳XX人才市场);5: 市内班线(同城市内的a地到b地之间移动,如郑州市XX地铁口-XX医院);6:高铁班线(出发或目的地为火车站/高铁站的班线,可市内可跨城;如机场到高铁,两个都标记);
success Boolean true 业务是否成功

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
QimenCloudClient client = new DefaultQimenCloudClient(url, appkey, secret);
AlitripBusProductQueryBatchnumberRequest req = new AlitripBusProductQueryBatchnumberRequest();
req.setFromCityCode("C001");
req.setFromCityName("北京");
req.setDepartDate("2018-08-08");
AlitripBusProductQueryBatchnumberResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<retCode>0</retCode>
<retDesc>成功</retDesc>
<numberList>
    <number_info>
        <agentFromStationId>A0001</agentFromStationId>
        <busNumber>AP6A6A70</busNumber>
        <fullPrice>12000</fullPrice>
        <busType>特级高等车</busType>
        <maxSellNum>5</maxSellNum>
        <fromCityCode>110100</fromCityCode>
        <fromCityName>北京</fromCityName>
        <fromStationCode>001</fromStationCode>
        <fromStationName>六里桥</fromStationName>
        <departTime>2018-11-30 05:00</departTime>
        <arriveTime>2018-11-30 11:30</arriveTime>
        <distance>380</distance>
        <totalSeats>55</totalSeats>
        <scheduleId>A1K001_AP6A6A70_2366_201811301520</scheduleId>
        <toCityName>北京</toCityName>
        <toProvinceName>北京市</toProvinceName>
        <shiftType>1</shiftType>
        <lastSchedule>18:00</lastSchedule>
        <realNameGrade>2|3</realNameGrade>
        <isRefund>true</isRefund>
        <refundTime>30</refundTime>
        <isOrderRefund>true</isOrderRefund>
        <refundType>1</refundType>
        <refundMsg>本产品可在线退票,退票手续费3元</refundMsg>
        <presellTime>120</presellTime>
        <toStationCode>111</toStationCode>
        <toStationName>古北水镇</toStationName>
        <serviceInfo>发票说明,温馨提示</serviceInfo>
        <productInfo>本产品可领取上车礼,可能根据预订人数升级车型</productInfo>
        <supportEticket>true</supportEticket>
        <destLongitude>100.12456004</destLongitude>
        <destLatitude>25.12456004</destLatitude>
        <status>1:可售 0:不可售 不填默认为1</status>
        <obtainTicket>
            <address>四惠汽车站对面</address>
            <invoice>true</invoice>
            <voucher>凭预订短信验证码取票</voucher>
            <longitude>25.62456004</longitude>
            <latitude>100.12456004</latitude>
            <ticketTel>4000535411</ticketTel>
        </obtainTicket>
        <parkingPoints>
            <parking_points>
                <name>卧佛寺</name>
                <desc>植物园停车游玩一小时</desc>
                <parkingMinutes>60</parkingMinutes>
            </parking_points>
        </parkingPoints>
        <transferPoints>
            <transfer_points>
                <name>长城附件公交站</name>
                <desc>换什么车</desc>
            </transfer_points>
        </transferPoints>
        <numberGoods>
            <number_goods>
                <goodsId>0001</goodsId>
                <price>125</price>
                <originPrice>200</originPrice>
                <stock>38</stock>
                <goodsType>2|4|5</goodsType>
                <goodsName>三等B</goodsName>
                <goodsDesc>8人间</goodsDesc>
            </number_goods>
        </numberGoods>
        <servicePrice>100</servicePrice>
        <attribute>{&quot;param&quot;:&quot;param&quot;}</attribute>
        <refundStructuredInfo>&quot;[{&quot;key&quot;:&quot;发车前4-6小时&quot;,&quot;seq&quot;:&quot;1&quot;,&quot;value&quot;:&quot;不收取退票手续费&quot;},{&quot;ext&quot;:&quot;如有紧急情况请联系车站&quot;,&quot;key&quot;:&quot;发车前2-4小时&quot;,&quot;seq&quot;:&quot;2&quot;,&quot;value&quot;:&quot;收取5%手续费&quot;},{&quot;key&quot;:&quot;发车前1-2小时&quot;,&quot;seq&quot;:&quot;3&quot;,&quot;value&quot;:&quot;收取10%手续费&quot;}]&quot;</refundStructuredInfo>
        <busBizType>1</busBizType>
    </number_info>
</numberList>
<success>true</success>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部