文档中心 > API类目 > 欢行开发平台API

alibaba.happytrip.account.billing.train (欢行账单拉取开放接口-火车账单)

欢行账单拉取开放接口-火车账单

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
open_bill_request OpenBillRequest 必须 账单拉取请求对象
  • └ app_key
  • String
  • 必须
  • 23286122923
  • TOP AppKey
  • └ corp_id
  • Number
  • 可选
  • 1
  • 租户Id
  • └ size
  • Number
  • 可选
  • 100
  • 分页查询-每页条数(默认10,最大不超过100)
  • └ page
  • Number
  • 可选
  • 1
  • 分页查询-页码(默认1)
  • └ account_no
  • String
  • 可选
  • 100000
  • 结算账户
  • └ period
  • String
  • 必须
  • 2026-03-31 19:50:44
  • 账期

响应参数

名称 类型 示例值 描述
status_code String 200 状态码
is_success Boolean true 是否成功 成功-true / 失败-false
message String success 状态信息,主要是异常时的信息
content Content [] 数据主体
  • └ cost_center_code
  • String
  • huanxing
  • 成本中心编码
  • └ submitter_employee_no
  • String
  • 9527
  • 实际申请人工号
  • └ submitter_department_key
  • String
  • 105xxxx13
  • 实际申请人部门编号
  • └ ht_order_id
  • String
  • 0400001001xxxxxxxxxxx211399751
  • 欢行订单号
  • └ arrive_date_time
  • String
  • 2026-03-31 19:50:44
  • 到达时间
  • └ ou_code
  • String
  • XX
  • 企业OU编码
  • └ train_no
  • String
  • G3059
  • 车次
  • └ depart_date_time
  • String
  • 2026-03-31 19:50:44
  • 出发时间
  • └ arrive_city_name
  • String
  • 绍兴
  • 到达城市
  • └ travel_type
  • String
  • 其他
  • 差旅性质
  • └ service_amount
  • String
  • 7.22
  • 服务费
  • └ run_time
  • String
  • 1时20分
  • 运行时长
  • └ apply_time
  • String
  • 2026-03-31 19:50:44
  • 预订日期
  • └ ta_approved_time
  • String
  • 2026-03-31 19:50:44
  • 差旅单审批通过日期
  • └ submitter_department_desc
  • String
  • xx-欢行-产品&技术
  • 实际申请人部门
  • └ refund_cost
  • String
  • 0.00
  • 退票手续费
  • └ diff_refund_cost
  • String
  • 0.00
  • 差额退票手续费
  • └ supplier_name
  • String
  • 阿里商旅
  • 供应商名称
  • └ arrive_station_name
  • String
  • 绍兴北
  • 到达站点
  • └ depart_city_name
  • String
  • 上海
  • 出发城市
  • └ cost
  • String
  • 531.00
  • 支付金额
  • └ ticket_price
  • String
  • 111.00
  • 票价
  • └ bill_type
  • String
  • reserve
  • 账单类型
  • └ corp_name
  • String
  • 欢行
  • 企业名称
  • └ employee_id
  • String
  • 9527
  • 出行人工号
  • └ travel_purpose
  • String
  • 拜访客户
  • 差旅目的
  • └ buyer_name
  • String
  • 张三
  • 预订人姓名
  • └ buyer_employee_no
  • String
  • 9527
  • 预订人工号
  • └ ta_head_id
  • String
  • 302xxxxxxx70
  • 差旅申请单号
  • └ out_order_id
  • String
  • 1007xxxxxxxxxx106
  • 外部订单号
  • └ change_cost
  • String
  • 0.00
  • 改签手续费
  • └ name
  • String
  • 张三
  • 出行人姓名
  • └ diff_price
  • String
  • 0.00
  • 改签差价
  • └ seat_name
  • String
  • 二等座
  • 坐席
  • └ submitter_name
  • String
  • 张三
  • 实际申请人姓名
  • └ settlement_amount
  • String
  • 119.5
  • 结算总金额
  • └ currency_code
  • String
  • CNY
  • 币种类型
  • └ depart_station_name
  • String
  • 上海虹桥
  • 出发站点
  • └ bill_period
  • String
  • 2026.03
  • 账期

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaHappytripAccountBillingTrainRequest req = new AlibabaHappytripAccountBillingTrainRequest();
AlibabaHappytripAccountBillingTrainRequest.OpenBillRequest obj1 = new AlibabaHappytripAccountBillingTrainRequest.OpenBillRequest();
obj1.setAppKey("23286122923");
obj1.setCorpId(1L);
obj1.setSize(100L);
obj1.setPage(1L);
obj1.setAccountNo("100000");
obj1.setPeriod("2026-03-31 19:50:44");
req.setOpenBillRequest(obj1);
AlibabaHappytripAccountBillingTrainResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_happytrip_account_billing_train_response>
    <status_code>200</status_code>
    <is_success>true</is_success>
    <message>success</message>
    <content>
        <content>
            <cost_center_code>huanxing</cost_center_code>
            <submitter_employee_no>9527</submitter_employee_no>
            <submitter_department_key>105xxxx13</submitter_department_key>
            <ht_order_id>0400001001xxxxxxxxxxx211399751</ht_order_id>
            <arrive_date_time>2026-03-31 19:50:44</arrive_date_time>
            <ou_code>XX</ou_code>
            <train_no>G3059</train_no>
            <depart_date_time>2026-03-31 19:50:44</depart_date_time>
            <arrive_city_name>绍兴</arrive_city_name>
            <travel_type>其他</travel_type>
            <service_amount>7.22</service_amount>
            <run_time>1时20分</run_time>
            <apply_time>2026-03-31 19:50:44</apply_time>
            <ta_approved_time>2026-03-31 19:50:44</ta_approved_time>
            <submitter_department_desc>xx-欢行-产品&amp;技术</submitter_department_desc>
            <refund_cost>0.00</refund_cost>
            <diff_refund_cost>0.00</diff_refund_cost>
            <supplier_name>阿里商旅</supplier_name>
            <arrive_station_name>绍兴北</arrive_station_name>
            <depart_city_name>上海</depart_city_name>
            <cost>531.00</cost>
            <ticket_price>111.00</ticket_price>
            <bill_type>reserve</bill_type>
            <corp_name>欢行</corp_name>
            <employee_id>9527</employee_id>
            <travel_purpose>拜访客户</travel_purpose>
            <buyer_name>张三</buyer_name>
            <buyer_employee_no>9527</buyer_employee_no>
            <ta_head_id>302xxxxxxx70</ta_head_id>
            <out_order_id>1007xxxxxxxxxx106</out_order_id>
            <change_cost>0.00</change_cost>
            <name>张三</name>
            <diff_price>0.00</diff_price>
            <seat_name>二等座</seat_name>
            <submitter_name>张三</submitter_name>
            <settlement_amount>119.5</settlement_amount>
            <currency_code>CNY</currency_code>
            <depart_station_name>上海虹桥</depart_station_name>
            <bill_period>2026.03</bill_period>
        </content>
    </content>
</alibaba_happytrip_account_billing_train_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

返回
顶部