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

qimen.alitrip.bus.product.querystation (查询上车点接口)

汽车票查询上车点接口

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
cityCode String 可选 810100 城市编码
cityName String 可选 香港 城市名称

响应参数

名称 类型 示例值 描述
retCode String 0 返回错误码
retDesc String 成功 返回错误信息
stationList BusStation [] 上车点list(是必填)
  • └ stationCode
  • String
  • 123456789
  • 上车点编码(code定位时必传)
  • └ stationName
  • String
  • 香港机场
  • 上车点名称(name定位时必传)
  • └ stationAddress
  • String
  • 香港机场南口
  • 上车点地址(是必填)
  • └ longitude
  • String
  • 105.469673
  • 经度(是必填)
  • └ latitude
  • String
  • 32.033114
  • 维度(是必填)
  • └ cityName
  • String
  • 香港
  • 城市名称(是必填)
  • └ provinceName
  • String
  • 香港
  • 省份名称(是必填)
  • └ presellDay
  • Number
  • 7
  • 预售期 单位分钟,不传默认设置为60
  • └ presellTime
  • Number
  • 120
  • 班次发车前可售时间,单位分钟,不传默认设置为60(非必填)
  • └ maxSellNum
  • Number
  • 5
  • 一单最大乘车人数, 不传默认无限制
  • └ sellStartTime
  • String
  • 05:00
  • 网上可售开始时间HH:mm(06:00),不传默认无限制
  • └ sellEndTime
  • String
  • 18:00
  • 网上可售结束时间HH:mm(18:00),不传默认无限制
  • └ refundTime
  • Number
  • 120
  • 发车前允许退票时间
  • └ isRefund
  • Boolean
  • true
  • 是否会允许退票(是必填)
  • └ isOrderRefund
  • Boolean
  • true
  • 是否按照整个订单退款(是必填)
  • └ refundMsg
  • String
  • 1
  • 退票提示(1:在线退票 2:不可在线退票 3:不可退票)(是必填)
  • └ obtainVoucher
  • String
  • 0
  • 取票方式(0:凭身份证自助机取票 1:凭取票号取票,2:支持刷身份证乘车,3:-柜台取票,默认为0)
  • └ supportEticket
  • Boolean
  • true
  • 是否支持电子票(是必填)
  • └ status
  • Number
  • 1
  • 是否暂停售票,1:可售 0:不可售 不传默认为1
  • └ servicePrice
  • String
  • 100
  • 服务费
  • └ attribute
  • String
  • {"param":"param"}
  • 扩展属性 json格式
  • └ supportWithChild
  • Boolean
  • false
  • 是否支持携童票
  • └ supportChild
  • Boolean
  • true
  • 是否支持儿童票
  • └ refundStructuredInfo
  • String
  • "[{"key":"发车前4-6小时","seq":"1","value":"不收取退票手续费"},{"ext":"如有紧急情况请联系车站","key":"发车前2-4小时","seq":"2","value":"收取5%手续费"},{"key":"发车前1-2小时","seq":"3","value":"收取10%手续费"}]"
  • 退票提示文案结构化展示文案,数据为json列表
success Boolean true 成功状态

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
QimenCloudClient client = new DefaultQimenCloudClient(url, appkey, secret);
AlitripBusProductQuerystationRequest req = new AlitripBusProductQuerystationRequest();
req.setCityCode("810100");
req.setCityName("香港");
AlitripBusProductQuerystationResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<retCode>0</retCode>
<retDesc>成功</retDesc>
<stationList>
    <bus_station>
        <stationCode>123456789</stationCode>
        <stationName>香港机场</stationName>
        <stationAddress>香港机场南口</stationAddress>
        <longitude>105.469673</longitude>
        <latitude>32.033114</latitude>
        <cityName>香港</cityName>
        <provinceName>香港</provinceName>
        <presellDay>7</presellDay>
        <presellTime>120</presellTime>
        <maxSellNum>5</maxSellNum>
        <sellStartTime>05:00</sellStartTime>
        <sellEndTime>18:00</sellEndTime>
        <refundTime>120</refundTime>
        <isRefund>true</isRefund>
        <isOrderRefund>true</isOrderRefund>
        <refundMsg>1</refundMsg>
        <obtainVoucher>0</obtainVoucher>
        <supportEticket>true</supportEticket>
        <status>1</status>
        <servicePrice>100</servicePrice>
        <attribute>{&quot;param&quot;:&quot;param&quot;}</attribute>
        <supportWithChild>false</supportWithChild>
        <supportChild>true</supportChild>
        <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>
    </bus_station>
</stationList>
<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

返回
顶部