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

qimen.alitrip.ship.product.queryseat (查询余票)

船票查询余票

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
to_station_name String 可选 古北水镇 到达港口名称
from_city_code String 可选 C001 出发城市编码
ship_number_param_list ShipNumber [] 可选
  • 最大列表长度:999
  • 班次信息
    • └ depart_time
    • String
    • 可选
    • 2018-08-80 08:00:00
    • 发车时间
    • └ goods_id
    • String
    • 可选
    • 99988800
    • 商品id(舱位类型)
    • └ schedule_id
    • String
    • 可选
    • 123456789
    • 班次id
    • └ ship_number
    • String
    • 可选
    • b001
    • 航线班次号
    from_city_name String 可选 北京 出发城市名称
    depart_date String 可选 2018-08-80 出发日期
    extAttr String 可选 {"param":"param"} 扩展属性

    响应参数

    名称 类型 示例值 描述
    ret_desc String 成功 错误描述
    ship_seat_list ShipSeat [] 列表
    • └ distance
    • Number
    • 380
    • 历程(单位公里)
    • └ depart_time
    • String
    • 2014-12-02 16:23:23
    • 发车时间
    • └ goods_id
    • String
    • 001
    • 商品id(舱位类型)
    • └ number
    • String
    • 1111
    • 班次号
    • └ to_station_name
    • String
    • 石家庄
    • 到达港口名称
    • └ from_city_code
    • String
    • 001
    • 出发城市编号
    • └ service_price
    • Number
    • 100
    • 服务费
    • └ from_city_name
    • String
    • 北京
    • 出发城市名称
    • └ run_time
    • String
    • 130
    • 该班次车程的耗时
    • └ schedule_id
    • String
    • 22104DC8D66FE5B6C97F508154CD8F20
    • 车次id
    • └ to_station_code
    • String
    • 1111
    • 到达港口编码
    • price_types
    • PriceTypes []
    • 价格类型
    • └ price_type_rule
    • String
    • 1.1.2-1.5米(不含1.5米)之间的儿童可至港口购买儿童票,超过1.5米请购买全价票;14周岁以上请购成人票。
    • 格类型说明(多个用|分隔)
    • └ price_type
    • Number
    • 3
    • 价格类型(0:全价票,1:儿童票,2:携童票,3:残疾人,4:军人,5:高龄老人,6:学生票)
    • └ price
    • Number
    • 40
    • 余票数
    • └ support_age_min
    • Number
    • 2
    • 支持最小年龄
    • └ support_age_max
    • Number
    • 14
    • 支持最大年龄
    • └ stock
    • Number
    • 10
    • 库存
    • └ origin_price
    • Number
    • 40
    • 原始价格
    • └ price_type_id
    • String
    • 10001
    • 价格类型
    • └ stock
    • Number
    • 100
    • 总库存数
    ret_code String 0 错误码
    success Boolean true 成功状态

    请求示例

    • JAVA
    • .NET
    • PHP
    • CURL
    • Python
    • C/C++
    • NodeJS
    QimenCloudClient client = new DefaultQimenCloudClient(url, appkey, secret);
    AlitripShipProductQueryseatRequest req = new AlitripShipProductQueryseatRequest();
    req.setToStationName("古北水镇");
    req.setFromCityCode("C001");
    List<AlitripShipProductQueryseatRequest.ShipNumber> list2 = new ArrayList<AlitripShipProductQueryseatRequest.ShipNumber>();
    AlitripShipProductQueryseatRequest.ShipNumber obj3 = new AlitripShipProductQueryseatRequest.ShipNumber();
    list2.add(obj3);
    obj3.setDepartTime("2018-08-80 08:00:00");
    obj3.setGoodsId("99988800");
    obj3.setScheduleId("123456789");
    obj3.setShipNumber("b001");
    req.setShipNumberParamList(list2);
    req.setFromCityName("北京");
    req.setDepartDate("2018-08-80");
    req.setExtAttr("{\"param\":\"param\"}");
    AlitripShipProductQueryseatResponse rsp = client.execute(req);
    System.out.println(rsp.getBody());

    响应示例

    • XML示例
    • JSON示例
    <ret_desc>成功</ret_desc>
    <ship_seat_list>
        <ship_seat>
            <distance>380</distance>
            <depart_time>2014-12-02 16:23:23</depart_time>
            <goods_id>001</goods_id>
            <number>1111</number>
            <to_station_name>石家庄</to_station_name>
            <from_city_code>001</from_city_code>
            <service_price>100</service_price>
            <from_city_name>北京</from_city_name>
            <run_time>130</run_time>
            <schedule_id>22104DC8D66FE5B6C97F508154CD8F20</schedule_id>
            <to_station_code>1111</to_station_code>
            <price_types>
                <price_types>
                    <price_type_rule>1.1.2-1.5米(不含1.5米)之间的儿童可至港口购买儿童票,超过1.5米请购买全价票;14周岁以上请购成人票。</price_type_rule>
                    <price_type>3</price_type>
                    <price>40</price>
                    <support_age_min>2</support_age_min>
                    <support_age_max>14</support_age_max>
                    <stock>10</stock>
                    <origin_price>40</origin_price>
                    <price_type_id>10001</price_type_id>
                </price_types>
            </price_types>
            <stock>100</stock>
        </ship_seat>
    </ship_seat_list>
    <ret_code>0</ret_code>
    <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

    返回
    顶部