alibaba.tax.invoice.sync.ledger (同步底账数据)

接收第三方服务(如:票易通)同步过来的底账发票数据

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
param_sync_ledger_invoice_request SyncLedgerInvoiceRequest 可选 参数
  • └ amount
  • String
  • 必须
  • 1
  • 金额
  • └ certify_date
  • Date
  • 可选
  • 2019-07-23 10:00:00
  • 认证时间
  • └ certify_flag
  • String
  • 可选
  • 1
  • 认证标识
  • └ check_sum
  • String
  • 可选
  • 222222
  • 校验码
  • └ check_certify_time
  • Date
  • 可选
  • 2019-09-01 00:00:00
  • 勾选时间
  • └ cipher_text
  • String
  • 可选
  • cdgdfsd
  • 密码区
  • └ excluding_tax_amount
  • String
  • 必须
  • 1
  • 不含税金额
  • input_invoice_line_d_t_o_list
  • InputInvoiceLineLedgerDto []
  • 可选
  • 发票行
  • └ amount
  • String
  • 可选
  • 1
  • 总金额
  • └ excluding_tax_amount
  • String
  • 可选
  • 1
  • 不含税金额
  • └ goods_desc
  • String
  • 可选
  • 货物名称
  • 货物名称
  • └ model
  • String
  • 可选
  • 规格型号
  • 规格型号
  • └ quantity
  • String
  • 可选
  • 1
  • 数量
  • └ quantity_unit
  • String
  • 可选
  • 单位
  • └ tax_amount
  • String
  • 可选
  • 1
  • 不含税金额
  • └ unit_price
  • String
  • 可选
  • 1
  • 单价
  • └ tax_rate
  • String
  • 可选
  • 6
  • 税率
  • └ invoice_code
  • String
  • 必须
  • 2132232322
  • 发票代码
  • └ invoice_date
  • Date
  • 必须
  • 2019-07-23 10:00:00
  • 开票日期
  • └ invoice_no
  • String
  • 必须
  • 20190723
  • 发票号码
  • └ invoice_status
  • String
  • 可选
  • 1
  • 发票状态
  • └ invoice_type
  • String
  • 必须
  • s
  • 发票类型
  • └ check_certify_status
  • String
  • 可选
  • B1
  • 勾选状态
  • └ machine_code
  • String
  • 可选
  • 机器编码
  • 机器编码
  • └ purchaser_bank_info
  • String
  • 可选
  • 购方银行信息
  • 购方银行信息
  • └ purchaser_contact_info
  • String
  • 可选
  • 购方联系方式
  • 购方联系方式
  • └ purchaser_name
  • String
  • 可选
  • 购方名称
  • 购方名称
  • └ purchaser_tax_no
  • String
  • 必须
  • 购方税号
  • 购方税号
  • └ remark
  • String
  • 可选
  • 备注
  • 备注
  • └ seller_bank_info
  • String
  • 可选
  • 销方银行信息
  • 销方银行信息
  • └ seller_contact_info
  • String
  • 可选
  • 销方联系人信息
  • 销方联系人信息
  • └ seller_name
  • String
  • 必须
  • 销方名称
  • 销方名称
  • └ seller_tax_no
  • String
  • 必须
  • 销方税号
  • 销方税号
  • └ tax_amount
  • String
  • 必须
  • 10
  • 税额
  • └ tax_period
  • String
  • 可选
  • 201907
  • 所属期
  • └ effective_tax_amount
  • String
  • 可选
  • 10.0
  • 有效税额
  • └ tax_deduct_fag
  • String
  • 可选
  • 1
  • 认证方式标识

响应参数

名称 类型 示例值 描述
response_code String 0000 响应编码
response_msg String 异常消息 异常消息
succeeded Boolean true true/false

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaTaxInvoiceSyncLedgerRequest req = new AlibabaTaxInvoiceSyncLedgerRequest();
AlibabaTaxInvoiceSyncLedgerRequest.SyncLedgerInvoiceRequest obj1 = new AlibabaTaxInvoiceSyncLedgerRequest.SyncLedgerInvoiceRequest();
obj1.setAmount("1");
obj1.setCertifyDate(StringUtils.parseDateTime("2019-07-23 10:00:00"));
obj1.setCertifyFlag("1");
obj1.setCheckSum("222222");
obj1.setCheckCertifyTime(StringUtils.parseDateTime("2019-09-01 00:00:00"));
obj1.setCipherText("cdgdfsd");
obj1.setExcludingTaxAmount("1");
List<AlibabaTaxInvoiceSyncLedgerRequest.InputInvoiceLineLedgerDto> list3 = new ArrayList<AlibabaTaxInvoiceSyncLedgerRequest.InputInvoiceLineLedgerDto>();
AlibabaTaxInvoiceSyncLedgerRequest.InputInvoiceLineLedgerDto obj4 = new AlibabaTaxInvoiceSyncLedgerRequest.InputInvoiceLineLedgerDto();
list3.add(obj4);
obj4.setAmount("1");
obj4.setExcludingTaxAmount("1");
obj4.setGoodsDesc("货物名称");
obj4.setModel("规格型号");
obj4.setQuantity("1");
obj4.setQuantityUnit("个");
obj4.setTaxAmount("1");
obj4.setUnitPrice("1");
obj4.setTaxRate("6");
obj1.setInputInvoiceLineDTOList(list3);
obj1.setInvoiceCode("2132232322");
obj1.setInvoiceDate(StringUtils.parseDateTime("2019-07-23 10:00:00"));
obj1.setInvoiceNo("20190723");
obj1.setInvoiceStatus("1");
obj1.setInvoiceType("s");
obj1.setCheckCertifyStatus("B1");
obj1.setMachineCode("机器编码");
obj1.setPurchaserBankInfo("购方银行信息");
obj1.setPurchaserContactInfo("购方联系方式");
obj1.setPurchaserName("购方名称");
obj1.setPurchaserTaxNo("购方税号");
obj1.setRemark("备注");
obj1.setSellerBankInfo("销方银行信息");
obj1.setSellerContactInfo("销方联系人信息");
obj1.setSellerName("销方名称");
obj1.setSellerTaxNo("销方税号");
obj1.setTaxAmount("10");
obj1.setTaxPeriod("201907");
obj1.setEffectiveTaxAmount("10.0");
obj1.setTaxDeductFag("1");
req.setParamSyncLedgerInvoiceRequest(obj1);
AlibabaTaxInvoiceSyncLedgerResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_tax_invoice_sync_ledger_response>
    <response_code>0000</response_code>
    <response_msg>异常消息</response_msg>
    <succeeded>true</succeeded>
</alibaba_tax_invoice_sync_ledger_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

返回
顶部