alitrip.btrip.supplychain.train.search (【商旅】火车票订单查询)

【商旅】火车票订单查询

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
rq OpenApiSearchRq 必须 入参
  • └ all_apply
  • Boolean
  • 可选
  • true
  • false:仅搜索未报销的申请单
  • └ apply_id
  • Number
  • 可选
  • 12345
  • 商旅申请单id
  • └ corp_id
  • String
  • 必须
  • corp1
  • 第三方企业id
  • └ depart_id
  • String
  • 可选
  • dept1
  • 用户所在部门id
  • └ end_time
  • Date
  • 可选
  • 2017-05-01 00:00:00
  • 结束时间
  • └ page
  • Number
  • 可选
  • 1
  • 页数,从1开始
  • └ page_size
  • Number
  • 可选
  • 10
  • 每页数据量,默认10,最高50
  • └ start_time
  • Date
  • 可选
  • 2017-05-01 00:00:00
  • 开始时间
  • └ thirdpart_apply_id
  • String
  • 可选
  • 123
  • 第三方申请单ID
  • └ update_end_time
  • Date
  • 可选
  • 2017-05-01 00:00:00
  • 更新结束时间
  • └ update_start_time
  • Date
  • 可选
  • 2017-05-01 00:00:00
  • 更新开始时间
  • └ user_id
  • String
  • 可选
  • user1
  • 第三方用户id
  • └ version
  • Number
  • 可选
  • 2
  • 1、老版本2、isv对外版本

响应参数

名称 类型 示例值 描述
result HisvResult result 接口对外数据透出
  • module_list
  • OpenApiTrainOrderRs []
  • module
  • 火车票订单信息
  • └ id
  • Number
  • 1234
  • 火车票订单id
  • └ gmt_create
  • Date
  • 2017-05-01 00:00:00
  • 创建时间
  • └ gmt_modified
  • Date
  • 2017-05-01 00:00:00
  • 更新时间
  • └ corp_id
  • String
  • corp1
  • 商旅企业id
  • └ corp_name
  • String
  • 阿里巴巴
  • 企业名称
  • └ user_id
  • String
  • user1
  • 第三方用户id
  • └ user_name
  • String
  • 张三
  • 用户名称
  • └ depart_id
  • String
  • dept1
  • 用户所在部门id
  • └ depart_name
  • String
  • 淘宝
  • 部门名称
  • └ apply_id
  • Number
  • 12345
  • 商旅申请单id
  • └ contact_name
  • String
  • 张三
  • 联系人
  • └ dep_station
  • String
  • 北京站
  • 始发站
  • └ arr_station
  • String
  • 北京站
  • 抵达站
  • └ dep_time
  • Date
  • 2017-05-01 00:00:00
  • 出发日期
  • └ arr_time
  • Date
  • 2017-05-01 00:00:00
  • 到达日期
  • └ train_number
  • String
  • 1234
  • 车次号
  • └ train_type
  • String
  • 高铁
  • 火车类型
  • └ seat_type
  • String
  • 坐席
  • 坐席
  • └ run_time
  • String
  • 运行时长
  • 运行时长
  • └ ticket_no12306
  • String
  • 12306票号
  • 12306票号
  • └ dep_city
  • String
  • 始发城市
  • 始发城市
  • └ arr_city
  • String
  • 抵达城市
  • 抵达城市
  • └ rider_name
  • String
  • 乘车人
  • 乘车人
  • └ ticket_count
  • Number
  • 票数
  • 票数
  • └ status
  • Number
  • 状态
  • 订单状态:0待支付,1出票中,2已关闭,3,改签成功,4退票成功,5出票完成,6退票申请中,7改签申请中,8已出票,已发货,9出票失败,10改签失败,11退票失败,12有线下改签,13有线下退票,14有线下退改
  • price_info_list
  • OpenPriceInfo []
  • priceInfoList
  • 价目信息
  • └ price
  • String
  • 100.0
  • 价格
  • └ type
  • Number
  • 1
  • 资金流向:1:支出,2:收入
  • └ category
  • String
  • 预定成功
  • 消费类型(废弃)
  • └ pay_type
  • Number
  • 1
  • 结算方式:1:个人现付,2:企业现付,4:企业月结,8、企业预存
  • └ gmt_create
  • Date
  • 2017-05-01 00:00:00
  • 流水创建时间
  • └ passenger_name
  • String
  • 张三、李四
  • 乘车人名称,多个用‘,’分割
  • └ trade_id
  • String
  • 123123123001
  • 订单交易流水号
  • └ original_train_no
  • String
  • K1243
  • 改签前原车次号
  • └ train_no
  • String
  • Z1521
  • 改签车次号
  • └ seat_type
  • String
  • 软卧
  • 改签座席
  • └ start_city
  • String
  • 北京
  • 改签出发城市
  • └ end_city
  • String
  • 上海
  • 改签到达城市
  • └ start_time
  • Date
  • 2021-07-11
  • 改签出发时间
  • └ end_time
  • Date
  • 2021-07-11
  • 改签到达时间
  • └ category_type
  • Number
  • 1
  • 消费类目类型1-飞机,2-酒店,3-火车,4-用车
  • └ category_code
  • Number
  • 1
  • 消费类目编码
  • cost_center
  • OpenCostCenterDo
  • costCenter
  • 成本中心对象
  • └ id
  • Number
  • 1234
  • 商旅成本中心id
  • └ corp_id
  • String
  • corp1
  • 商旅企业id
  • └ number
  • String
  • abcdef
  • 成本中心编号
  • └ name
  • String
  • 测试成本中心
  • 成本中心名称
  • invoice
  • OpenInvoiceDo
  • invoice
  • 发票对象
  • └ id
  • Number
  • 123
  • 商旅发票id
  • └ title
  • String
  • 阿里巴巴
  • 发票抬头
  • └ thirdpart_itinerary_id
  • String
  • abcdef
  • 第三方行程id
  • user_affiliate_list
  • OpenUserAffiliateDO []
  • 张三、李四
  • 乘车人列表
  • └ user_id
  • String
  • 123
  • 乘车人ID
  • └ user_name
  • String
  • 张三
  • 乘车人名称
  • └ thirdpart_apply_id
  • String
  • abcdef
  • 第三方行程id
  • └ btrip_title
  • String
  • 出差
  • 申请单名称
  • └ project_id
  • Number
  • 1
  • 项目id
  • └ project_code
  • String
  • abc
  • 项目code
  • └ project_title
  • String
  • 测试项目
  • 项目名称
  • └ third_part_project_id
  • String
  • 1213
  • 第三方项目id
  • └ result_code
  • Number
  • 0
  • 错误码
  • └ result_msg
  • String
  • 成功
  • 错误信息
  • └ is_success
  • Boolean
  • true
  • 成功标识
  • page_info
  • PageInfoRs
  • module
  • 分页相关信息
  • └ page
  • Number
  • 1
  • 当前页
  • └ page_size
  • Number
  • 10
  • 每页大小
  • └ total_number
  • Number
  • 100
  • 总记录数

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripBtripSupplychainTrainSearchRequest req = new AlitripBtripSupplychainTrainSearchRequest();
AlitripBtripSupplychainTrainSearchRequest.OpenApiSearchRq obj1 = new AlitripBtripSupplychainTrainSearchRequest.OpenApiSearchRq();
obj1.setAllApply(true);
obj1.setApplyId(12345L);
obj1.setCorpId("corp1");
obj1.setDepartId("dept1");
obj1.setEndTime(StringUtils.parseDateTime("2017-05-01 00:00:00"));
obj1.setPage(1L);
obj1.setPageSize(10L);
obj1.setStartTime(StringUtils.parseDateTime("2017-05-01 00:00:00"));
obj1.setThirdpartApplyId("123");
obj1.setUpdateEndTime(StringUtils.parseDateTime("2017-05-01 00:00:00"));
obj1.setUpdateStartTime(StringUtils.parseDateTime("2017-05-01 00:00:00"));
obj1.setUserId("user1");
obj1.setVersion(2L);
req.setRq(obj1);
AlitripBtripSupplychainTrainSearchResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alitrip_btrip_supplychain_train_search_response>
    <result>
        <module_list>
            <open_api_train_order_rs>
                <id>1234</id>
                <gmt_create>2017-05-01 00:00:00</gmt_create>
                <gmt_modified>2017-05-01 00:00:00</gmt_modified>
                <corp_id>corp1</corp_id>
                <corp_name>阿里巴巴</corp_name>
                <user_id>user1</user_id>
                <user_name>张三</user_name>
                <depart_id>dept1</depart_id>
                <depart_name>淘宝</depart_name>
                <apply_id>12345</apply_id>
                <contact_name>张三</contact_name>
                <dep_station>北京站</dep_station>
                <arr_station>北京站</arr_station>
                <dep_time>2017-05-01 00:00:00</dep_time>
                <arr_time>2017-05-01 00:00:00</arr_time>
                <train_number>1234</train_number>
                <train_type>高铁</train_type>
                <seat_type>坐席</seat_type>
                <run_time>运行时长</run_time>
                <ticket_no12306>12306票号</ticket_no12306>
                <dep_city>始发城市</dep_city>
                <arr_city>抵达城市</arr_city>
                <rider_name>乘车人</rider_name>
                <ticket_count>票数</ticket_count>
                <status>状态</status>
                <price_info_list>
                    <open_price_info>
                        <price>100.0</price>
                        <type>1</type>
                        <category>预定成功</category>
                        <pay_type>1</pay_type>
                        <gmt_create>2017-05-01 00:00:00</gmt_create>
                        <passenger_name>张三、李四</passenger_name>
                        <trade_id>123123123001</trade_id>
                        <original_train_no>K1243</original_train_no>
                        <train_no>Z1521</train_no>
                        <seat_type>软卧</seat_type>
                        <start_city>北京</start_city>
                        <end_city>上海</end_city>
                        <start_time>2021-07-11</start_time>
                        <end_time>2021-07-11</end_time>
                        <category_type>1</category_type>
                        <category_code>1</category_code>
                    </open_price_info>
                </price_info_list>
                <cost_center>
                    <id>1234</id>
                    <corp_id>corp1</corp_id>
                    <number>abcdef</number>
                    <name>测试成本中心</name>
                </cost_center>
                <invoice>
                    <id>123</id>
                    <title>阿里巴巴</title>
                </invoice>
                <thirdpart_itinerary_id>abcdef</thirdpart_itinerary_id>
                <user_affiliate_list>
                    <open_user_affiliate_d_o>
                        <user_id>123</user_id>
                        <user_name>张三</user_name>
                    </open_user_affiliate_d_o>
                </user_affiliate_list>
                <thirdpart_apply_id>abcdef</thirdpart_apply_id>
                <btrip_title>出差</btrip_title>
                <project_id>1</project_id>
                <project_code>abc</project_code>
                <project_title>测试项目</project_title>
                <third_part_project_id>1213</third_part_project_id>
            </open_api_train_order_rs>
        </module_list>
        <result_code>0</result_code>
        <result_msg>成功</result_msg>
        <is_success>true</is_success>
        <page_info>
            <page>1</page>
            <page_size>10</page_size>
            <total_number>100</total_number>
        </page_info>
    </result>
</alitrip_btrip_supplychain_train_search_response>

异常示例

  • 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

返回
顶部