文档中心 > API类目 > 电子发票

alibaba.einvoice.merchant.result.get (商家自研ERP开票结果获取)

商家自研ERP开票结果获取

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
payee_register_no String 必须 123123123123 收款方税务登记证号
platform_code String 可选 tmall 电商平台代码。淘宝:taobao,天猫:tmall
platform_tid String 可选 12132 电商平台对应的订单号
serial_no String 可选 3123123123 流水号 (serial_no)和(platform_code,platform_tid)必须填写其中一组,serial_no优先级更高

响应参数

名称 类型 示例值 描述
invoice_result_list InvoiceResult [] 开票返回结果数据列表
  • └ anti_fake_code
  • String
  • CF6B2F6168420008
  • 防伪码
  • └ ciphertext
  • String
  • demosdffsd-32432
  • 发票密文,密码区的字符串
  • └ device_no
  • String
  • sw1231
  • 税控设备编号(新版电子发票有)
  • └ erp_tid
  • String
  • 123123
  • erp自定义单据号
  • └ file_data_type
  • String
  • jpg
  • 文件类型(pdf,jpg,png)
  • └ file_path
  • String
  • demo
  • 发票PDF的下载地址(仅在单个查询接口上显示,批量查询不显示)
  • └ invoice_amount
  • String
  • 1232.00
  • 开票金额
  • └ invoice_code
  • String
  • 1231231234
  • 发票代码
  • └ invoice_date
  • String
  • 2014-4-21
  • 开票日期
  • └ invoice_no
  • String
  • 123123
  • 发票号码
  • └ payee_register_no
  • String
  • 20150201321123
  • 收款方税务登记证号
  • └ platform_code
  • String
  • tmall
  • 电商平台代码。淘宝:taobao,天猫:tmall
  • └ platform_tid
  • String
  • 123123
  • 电商平台订单号
  • └ serial_no
  • String
  • 123123
  • 开票流水号,唯一标志开票请求。如果两次请求流水号相同,则表示重复请求。
  • └ status
  • String
  • waiting
  • 开票状态 (waiting = 开票中) 、(create_success = 开票成功)、(create_failed = 开票失败)
  • └ biz_error_code
  • String
  • demo
  • 错误编码
  • └ biz_error_msg
  • String
  • demo
  • 错误信息

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaEinvoiceMerchantResultGetRequest req = new AlibabaEinvoiceMerchantResultGetRequest();
req.setPayeeRegisterNo("123123123123");
req.setPlatformCode("tmall");
req.setPlatformTid("12132");
req.setSerialNo("3123123123");
AlibabaEinvoiceMerchantResultGetResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_einvoice_merchant_result_get_response>
    <invoice_result_list>
        <invoice_result>
            <anti_fake_code>CF6B2F6168420008</anti_fake_code>
            <ciphertext>demosdffsd-32432</ciphertext>
            <device_no>sw1231</device_no>
            <erp_tid>123123</erp_tid>
            <file_data_type>jpg</file_data_type>
            <file_path>demo</file_path>
            <invoice_amount>1232.00</invoice_amount>
            <invoice_code>1231231234</invoice_code>
            <invoice_date>2014-4-21</invoice_date>
            <invoice_no>123123</invoice_no>
            <payee_register_no>20150201321123</payee_register_no>
            <platform_code>tmall</platform_code>
            <platform_tid>123123</platform_tid>
            <serial_no>123123</serial_no>
            <status>waiting</status>
            <biz_error_code>demo</biz_error_code>
            <biz_error_msg>demo</biz_error_msg>
        </invoice_result>
    </invoice_result_list>
</alibaba_einvoice_merchant_result_get_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>

错误码解释

错误码 错误描述 解决方案
isp.isp-system.error 系统错误 联系小二排查
isp.system-error 系统错误 联系小二排查

API工具

如何获得此API

FAQ

返回
顶部