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

alibaba.einvoice.prod.redinvoice.create (发票极速冲红)

通过传递蓝票流水号或者蓝票的发票代码号码进行快速的冲红

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
red_invoice_create_dto RedInvoiceCreateDto 可选 发票冲红请求
  • └ platform_user_id
  • String
  • 必须
  • 123456
  • 业务平台商户ID/用户ID
  • └ outer_id
  • String
  • 必须
  • abc111
  • 请求的唯一标志,请求幂等ID,由调用平台生成
  • └ invoice_no
  • String
  • 可选
  • 31241421412
  • 原发票号码
  • └ invoice_code
  • String
  • 可选
  • 3123123
  • 原发票代码
  • └ blue_serial_no
  • String
  • 可选
  • ANTabc000
  • 通过中台开蓝票时,中台返回的开票流水号/序列号;可与invoiceCode+invoiceNo选择传一个,如果都传优先级高于invoiceCode+invoiceNo
  • └ platform_code
  • String
  • 必须
  • ANT
  • 业务平台code,由中台生成
  • └ payee_register_no
  • String
  • 必须
  • 913300007047239447
  • 销方税号
  • └ erp_tid
  • String
  • 可选
  • 123456
  • ERP系统中的单据号。如果没有erp的唯一单据号。建议使用platform_code+”_”+ platform_tid的组合方式
  • └ platform_tid
  • String
  • 可选
  • 123456
  • 业务平台对应的订单号

响应参数

名称 类型 示例值 描述
red_invoice_create_result_dto RedInvoiceCreateResultDto 发票冲红结果
  • └ serial_no
  • String
  • ANTabc111
  • 开票流水号/序列号,唯一标志一笔开票请求。发票中台生成,用于查询开票结果。

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaEinvoiceProdRedinvoiceCreateRequest req = new AlibabaEinvoiceProdRedinvoiceCreateRequest();
AlibabaEinvoiceProdRedinvoiceCreateRequest.RedInvoiceCreateDto obj1 = new AlibabaEinvoiceProdRedinvoiceCreateRequest.RedInvoiceCreateDto();
obj1.setPlatformUserId("123456");
obj1.setOuterId("abc111");
obj1.setInvoiceNo("31241421412");
obj1.setInvoiceCode("3123123");
obj1.setBlueSerialNo("ANTabc000");
obj1.setPlatformCode("ANT");
obj1.setPayeeRegisterNo("913300007047239447");
obj1.setErpTid("123456");
obj1.setPlatformTid("123456");
req.setRedInvoiceCreateDto(obj1);
AlibabaEinvoiceProdRedinvoiceCreateResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_einvoice_prod_redinvoice_create_response>
    <red_invoice_create_result_dto>
        <serial_no>ANTabc111</serial_no>
    </red_invoice_create_result_dto>
</alibaba_einvoice_prod_redinvoice_create_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

返回
顶部