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

qimen.alitrip.rail.ir.offers.get (国际火车票票种)

国际火车票票种查询接口,用于查询商家票种信息保存至DB

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述

响应参数

名称 类型 示例值 描述
result RailOfferRS 票种信息
  • └ success
  • Boolean
  • true
  • 是否成功
  • └ err_code
  • String
  • 001
  • 错误码
  • └ err_msg
  • String
  • 系统错误
  • 错误描述
  • moduleList
  • RailOfferDO []
  • 票种列表
  • └ image
  • String
  • www.alibaba.com/image/example.jpg
  • 图片url,多个;号分隔
  • └ detail
  • String
  • 请使用A4纸打印车票
  • 票种详细(票种说明,多行;号分隔)
  • └ offer_name
  • String
  • 全价票
  • 票种名称
  • └ conditions
  • String
  • 可退票;不可改签
  • 退改规则说明
  • └ offer_code
  • String
  • 1001
  • 票种编码
  • └ ticket_type
  • String
  • 0
  • 0电子票;1纸质票;2:电子码取票
  • └ seat_type
  • String
  • 1
  • 0自由座;1指定座
  • └ refund_type
  • String
  • 1
  • 0不可退;1可退
  • └ change_type
  • String
  • 1
  • 0不可改;1可改
  • └ has_mobile_ticket
  • Number
  • 1
  • 是否有手机票(0:无;1:有)
  • └ confirm_again
  • String
  • 1
  • 行程是否需要二次确认(0不需要;1需要)
  • └ obtain_ticket_detail
  • String
  • 无需取票,保存二维码至您手机,乘车前出示,扫码乘车
  • 取票详细说明

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
QimenCloudClient client = new DefaultQimenCloudClient(url, appkey, secret);
AlitripRailIrOffersGetRequest req = new AlitripRailIrOffersGetRequest();
AlitripRailIrOffersGetResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<result>
    <success>true</success>
    <err_code>001</err_code>
    <err_msg>系统错误</err_msg>
    <moduleList>
        <rail_offer_d_o>
            <image>www.alibaba.com/image/example.jpg</image>
            <detail>请使用A4纸打印车票</detail>
            <offer_name>全价票</offer_name>
            <conditions>可退票;不可改签</conditions>
            <offer_code>1001</offer_code>
            <ticket_type>0</ticket_type>
            <seat_type>1</seat_type>
            <refund_type>1</refund_type>
            <change_type>1</change_type>
            <has_mobile_ticket>1</has_mobile_ticket>
            <confirm_again>1</confirm_again>
            <obtain_ticket_detail>无需取票,保存二维码至您手机,乘车前出示,扫码乘车</obtain_ticket_detail>
        </rail_offer_d_o>
    </moduleList>
</result>

异常示例

  • 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

返回
顶部