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

alibaba.tae.expense.invoice.upload (电子发票上传解析)

上传并解析电子发票

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
invoice_uppload_open_request InvoiceUploadOpenRequestDto 可选 电子发票上传请求
  • └ file_name
  • String
  • 可选
  • invoice.pdf
  • 电子发票文件名(含扩展名)
  • └ file_size
  • Number
  • 可选
  • 3
  • 文件大小(字节)
  • └ is_skip_parse_error
  • Boolean
  • 可选
  • false
  • 是否跳过解析异常,默认false不跳过
  • └ file_mime_type
  • String
  • 可选
  • application/pdf
  • 文件MIME类型,如application/pdf、application/ofd
  • └ file_id
  • Number
  • 可选
  • 1320678117288
  • 文件中心的电子发票文件ID,服务端将据此下载PDF或OFD文件并解析
  • └ tenant_key
  • String
  • 必须
  • ant
  • 租户身份标识;开放API调用必填,Agent调用由上下文识别
  • └ app_key
  • String
  • 必须
  • ant_group
  • 调用方应用身份;开放API调用必填,Agent调用由上下文识别
  • └ employee_no
  • String
  • 必须
  • 553568
  • 企业员工工号;开放API调用必填,Agent调用由登录态注入
  • └ force_rededuction
  • Boolean
  • 可选
  • false
  • 是否强制重新推演费用类型, 设为true时已存在的发票会重新执行完整流程

响应参数

名称 类型 示例值 描述
platform_result_dto PlatformResultDto platformResultDTO
  • └ result_code
  • String
  • 0
  • 错误码
  • └ result_message
  • String
  • success
  • 错误信息
  • receipt_vo
  • ReceiptVo
  • 结果内容
  • └ origin_id
  • Number
  • 34580033
  • 发票来源ID
  • └ receipt_id
  • Number
  • 50934701
  • 票据主键ID
  • └ tae_receipt_type
  • String
  • all electronic common
  • 票据类型
  • └ date
  • String
  • Fri Jun 05 00:00:00 CST 2026
  • 开票日期,格式如Wed Nov 12 00:00:00 CST 2025
  • └ date_str
  • String
  • 2026-06-05 00:00:00
  • 开票日期,格式yyyy-MM-dd HH:mm:ss
  • └ create_time
  • Date
  • 2026-08-18 00:00:00
  • 开票日期
  • └ happen_time
  • Date
  • 2026-08-18 00:00:00
  • 费用发生日期
  • └ payee_name
  • String
  • 北京滴滴出行科技有限公司
  • 销方名称
  • └ payer_name
  • String
  • 柏荣诊断产品(上海)有限公司
  • 购方名称
  • └ origin
  • String
  • customer_upload
  • 票据来源
  • └ amount
  • String
  • 122.32
  • 发票金额
  • └ check_code
  • String
  • xxxxx
  • 发票校验码
  • └ state
  • String
  • can_reimburse
  • 票据状态
  • └ modifier
  • String
  • 17799338
  • 票据状态修改人的用户ID
  • └ payer_tax_no
  • String
  • 91310113063737130F
  • 购买方税号
  • └ payee_tax_no
  • String
  • 91110108MA01G0FB09
  • 销方税号
  • └ serve_type
  • String
  • 交通运输服务
  • 费用名称
  • └ serve_count
  • String
  • xxxxx
  • 商品或服务的数量
  • └ user_id
  • Number
  • 17799338
  • 票据拥有人的欢行用户ID
  • └ corp_id
  • Number
  • 1
  • 欢行企业ID
  • └ receipt_type_key
  • String
  • ALL_ELECTRONIC_COMMON
  • 发票类型编码
  • └ receipt_type_name
  • String
  • 电子发票(普通发票)
  • 发票类型名称
  • └ invoice_number
  • String
  • 26117000000813525244
  • 发票号码
  • └ invoice_code
  • String
  • xxxxx
  • 发票代码
  • └ verification_check_state
  • String
  • xxxxx
  • 发票验真状态
  • └ seat_class
  • String
  • xxxxx
  • 座次
  • └ seat_person
  • String
  • xxxxx
  • 乘坐人
  • └ destination
  • String
  • xxxxx
  • 目的站
  • └ departure
  • String
  • xxxxx
  • 出发站
  • └ travel_date
  • Number
  • 3
  • 乘车日期时间戳
  • └ carrier
  • String
  • xxxxx
  • 承运方
  • └ carrier_date
  • String
  • xxxxx
  • 乘机日期,发票原始值
  • └ carrier_time
  • String
  • xxxxx
  • 乘机时间,发票原始值
  • └ carrier_date_time
  • Date
  • null
  • 乘机日期时间
  • └ class_of_service
  • String
  • xxxxx
  • 飞机座舱等级
  • └ verification_serial_no
  • String
  • xxxxx
  • 发票验真号
  • └ is_can_reimburse
  • Boolean
  • true
  • 是否可报销
  • └ is_can_delete
  • Boolean
  • true
  • 是否可删除
  • └ can_reimburse_amount
  • String
  • 122.32
  • 可报销金额
  • └ duplicate_report_ids
  • Number []
  • 5,3
  • 重复报销的报销单ID列表
  • └ carbon_deliver_state
  • String
  • xxxxx
  • 电子发票是否发放过碳积分
  • └ apply_types
  • String []
  • Top,Pub
  • 关联单据类型列表
  • └ report_nos
  • String []
  • Top,Pub
  • 关联报销单号列表
  • └ expense_ids
  • Number []
  • 5,3
  • 关联费用ID列表
  • └ report_states
  • String []
  • Top,Pub
  • 关联报销单状态列表
  • └ owners
  • String []
  • Top,Pub
  • 关联报销单申请人列表
  • receipt_detail_dto
  • ReceiptDetailDto
  • 发票扩展信息,比如电子火车票坐席
  • └ travel_date
  • Date
  • 2026-08-18 00:00:00
  • 乘车日期
  • └ time
  • String
  • xxxxx
  • 出发时间
  • └ origin
  • String
  • xxxxx
  • 出发站
  • └ destination
  • String
  • xxxxx
  • 目的站
  • └ seat_class
  • String
  • xxxxx
  • 座席
  • └ railway_carriage
  • String
  • xxxxx
  • 车厢
  • └ certificate_no
  • String
  • xxxxx
  • 证件号
  • └ eticket_no
  • String
  • xxxxx
  • 电子客票号
  • └ seat_person
  • String
  • xxxxx
  • 乘客姓名
  • └ train_no
  • String
  • xxxxx
  • 车次
  • └ business_feature
  • String
  • xxxxx
  • 业务特征,枚举值:退、售
  • └ air_conditioning
  • String
  • xxxxx
  • 空调特征
  • └ invoice_status
  • String
  • xxxxx
  • 开票状态
  • └ caac_development_fund
  • String
  • xxxxx
  • 民航发展基金
  • └ other_tax
  • String
  • xxxxx
  • 其他税费
  • └ ionter_ide
  • String
  • xxxxx
  • 国内国际标识
  • └ prompt
  • String
  • xxxxx
  • 提示信息
  • └ agent_code
  • String
  • xxxxx
  • 销售单位代号
  • └ issued_by
  • String
  • xxxxx
  • 填开单位
  • └ flight_remark
  • String
  • xxxxx
  • 签注
  • special_type_lines
  • SpecialTypeLineDto []
  • 用车发票出行人明细列表
  • └ traveler
  • String
  • xxxxx
  • 出行人
  • └ travel_date
  • String
  • xxxxx
  • 出行日期
  • └ valid_i_d_number
  • String
  • xxxxx
  • 证件号
  • └ grade
  • String
  • xxxxx
  • 等级
  • └ destination
  • String
  • xxxxx
  • 目的地
  • └ departure
  • String
  • xxxxx
  • 出发地
  • └ vehicle_type
  • String
  • xxxxx
  • 车型
  • └ special_type_code
  • String
  • PASSENGER_TRANSPORT_SERVICE
  • 用车发票服务类型标题,例如旅客运输服务
  • └ is_parse_success
  • Boolean
  • true
  • 发票是否解析成功
  • └ is_duplicate
  • Boolean
  • false
  • 发票是否重复
  • └ duplicate_code
  • String
  • xxxxx
  • 发票重复异常编码
  • └ duplicate_state
  • String
  • xxxxx
  • 发票重复异常状态
  • └ duplicate_args
  • String []
  • Top,Pub
  • 发票重复异常参数列表
  • └ invoice_url
  • String
  • https://tae.alibaba-inc.com/file/open/preview.do?authKey=***
  • 发票附件URL
  • └ file_id
  • Number
  • 1320683130832
  • 发票附件文件ID
  • └ invoice_file_name
  • String
  • 电子发票-26117000000813525244.pdf
  • 发票附件名称
  • └ invoice_file_down_url
  • String
  • xxxxx
  • 发票下载URL
  • └ is_need_compensate
  • Boolean
  • false
  • 是否需要补偿
  • └ is_can_edit
  • String
  • NOT_SHOW_EDIT_BUTTON
  • 是否可编辑:1不展示编辑按钮,2展示置灰按钮,3展示正常编辑按钮
  • └ invoice_id
  • Number
  • 50934701
  • 发票ID
  • └ ionter_ide
  • String
  • xxxxx
  • 国内国际标识
  • └ airplane_status
  • String
  • xxxxx
  • 机票开票状态
  • └ fare_basis
  • String
  • xxxxx
  • 客票级别或客票类别
  • └ is_fin_check
  • Boolean
  • false
  • 是否允许财务查询验真
  • └ tax
  • BigDecimal
  • 3.56
  • 税额
  • └ invoice_tax_rate
  • BigDecimal
  • 3.0000
  • 税率
  • └ invoice_amount_before_tax
  • BigDecimal
  • 118.76
  • 不含税金额
  • └ is_success
  • Boolean
  • true
  • 是否成功

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaTaeExpenseInvoiceUploadRequest req = new AlibabaTaeExpenseInvoiceUploadRequest();
AlibabaTaeExpenseInvoiceUploadRequest.InvoiceUploadOpenRequestDto obj1 = new AlibabaTaeExpenseInvoiceUploadRequest.InvoiceUploadOpenRequestDto();
obj1.setFileName("invoice.pdf");
obj1.setFileSize(3L);
obj1.setIsSkipParseError(false);
obj1.setFileMimeType("application/pdf");
obj1.setFileId(1320678117288L);
obj1.setTenantKey("ant");
obj1.setAppKey("ant_group");
obj1.setEmployeeNo("553568");
obj1.setForceRededuction(false);
req.setInvoiceUpploadOpenRequest(obj1);
AlibabaTaeExpenseInvoiceUploadResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_tae_expense_invoice_upload_response>
    <platform_result_dto>
        <result_code>0</result_code>
        <result_message>success</result_message>
        <receipt_vo>
            <origin_id>34580033</origin_id>
            <receipt_id>50934701</receipt_id>
            <tae_receipt_type>all electronic common</tae_receipt_type>
            <date>Fri Jun 05 00:00:00 CST 2026</date>
            <date_str>2026-06-05 00:00:00</date_str>
            <create_time>2026-08-18 00:00:00</create_time>
            <happen_time>2026-08-18 00:00:00</happen_time>
            <payee_name>北京滴滴出行科技有限公司</payee_name>
            <payer_name>柏荣诊断产品(上海)有限公司</payer_name>
            <origin>customer_upload</origin>
            <amount>122.32</amount>
            <check_code>xxxxx</check_code>
            <state>can_reimburse</state>
            <modifier>17799338</modifier>
            <payer_tax_no>91310113063737130F</payer_tax_no>
            <payee_tax_no>91110108MA01G0FB09</payee_tax_no>
            <serve_type>交通运输服务</serve_type>
            <serve_count>xxxxx</serve_count>
            <user_id>17799338</user_id>
            <corp_id>1</corp_id>
            <receipt_type_key>ALL_ELECTRONIC_COMMON</receipt_type_key>
            <receipt_type_name>电子发票(普通发票)</receipt_type_name>
            <invoice_number>26117000000813525244</invoice_number>
            <invoice_code>xxxxx</invoice_code>
            <verification_check_state>xxxxx</verification_check_state>
            <seat_class>xxxxx</seat_class>
            <seat_person>xxxxx</seat_person>
            <destination>xxxxx</destination>
            <departure>xxxxx</departure>
            <travel_date>3</travel_date>
            <carrier>xxxxx</carrier>
            <carrier_date>xxxxx</carrier_date>
            <carrier_time>xxxxx</carrier_time>
            <carrier_date_time>null</carrier_date_time>
            <class_of_service>xxxxx</class_of_service>
            <verification_serial_no>xxxxx</verification_serial_no>
            <is_can_reimburse>true</is_can_reimburse>
            <is_can_delete>true</is_can_delete>
            <can_reimburse_amount>122.32</can_reimburse_amount>
            <duplicate_report_ids>
                <number>5</number>
                <number>3</number>
            </duplicate_report_ids>
            <carbon_deliver_state>xxxxx</carbon_deliver_state>
            <apply_types>
                <string>Top</string>
                <string>Pub</string>
            </apply_types>
            <report_nos>
                <string>Top</string>
                <string>Pub</string>
            </report_nos>
            <expense_ids>
                <number>5</number>
                <number>3</number>
            </expense_ids>
            <report_states>
                <string>Top</string>
                <string>Pub</string>
            </report_states>
            <owners>
                <string>Top</string>
                <string>Pub</string>
            </owners>
            <receipt_detail_dto>
                <travel_date>2026-08-18 00:00:00</travel_date>
                <time>xxxxx</time>
                <origin>xxxxx</origin>
                <destination>xxxxx</destination>
                <seat_class>xxxxx</seat_class>
                <railway_carriage>xxxxx</railway_carriage>
                <certificate_no>xxxxx</certificate_no>
                <eticket_no>xxxxx</eticket_no>
                <seat_person>xxxxx</seat_person>
                <train_no>xxxxx</train_no>
                <business_feature>xxxxx</business_feature>
                <air_conditioning>xxxxx</air_conditioning>
                <invoice_status>xxxxx</invoice_status>
                <caac_development_fund>xxxxx</caac_development_fund>
                <other_tax>xxxxx</other_tax>
                <ionter_ide>xxxxx</ionter_ide>
                <prompt>xxxxx</prompt>
                <agent_code>xxxxx</agent_code>
                <issued_by>xxxxx</issued_by>
                <flight_remark>xxxxx</flight_remark>
                <special_type_lines>
                    <special_type_line_dto>
                        <traveler>xxxxx</traveler>
                        <travel_date>xxxxx</travel_date>
                        <valid_i_d_number>xxxxx</valid_i_d_number>
                        <grade>xxxxx</grade>
                        <destination>xxxxx</destination>
                        <departure>xxxxx</departure>
                        <vehicle_type>xxxxx</vehicle_type>
                    </special_type_line_dto>
                </special_type_lines>
                <special_type_code>PASSENGER_TRANSPORT_SERVICE</special_type_code>
            </receipt_detail_dto>
            <is_parse_success>true</is_parse_success>
            <is_duplicate>false</is_duplicate>
            <duplicate_code>xxxxx</duplicate_code>
            <duplicate_state>xxxxx</duplicate_state>
            <duplicate_args>
                <string>Top</string>
                <string>Pub</string>
            </duplicate_args>
            <invoice_url>https://tae.alibaba-inc.com/file/open/preview.do?authKey=***</invoice_url>
            <file_id>1320683130832</file_id>
            <invoice_file_name>电子发票-26117000000813525244.pdf</invoice_file_name>
            <invoice_file_down_url>xxxxx</invoice_file_down_url>
            <is_need_compensate>false</is_need_compensate>
            <is_can_edit>NOT_SHOW_EDIT_BUTTON</is_can_edit>
            <invoice_id>50934701</invoice_id>
            <ionter_ide>xxxxx</ionter_ide>
            <airplane_status>xxxxx</airplane_status>
            <fare_basis>xxxxx</fare_basis>
            <is_fin_check>false</is_fin_check>
            <tax>3.56</tax>
            <invoice_tax_rate>3.0000</invoice_tax_rate>
            <invoice_amount_before_tax>118.76</invoice_amount_before_tax>
        </receipt_vo>
        <is_success>true</is_success>
    </platform_result_dto>
</alibaba_tae_expense_invoice_upload_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

返回
顶部