文档中心 > API类目 > 天猫服务平台

tmall.service.settlement.invoice.upload (服务商上传发票)

服务商上传发票,电子票。上传后关联对应账单并进行验票。

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
amount String 必须 103.00 含税金额 单位元
bill_id Number 必须 1122 账单id
invoice_file_key String 必须 invoice/xxxx.pdf 发票文件key,使用上传接口 tmall.service.settlement.file.upload 生成
invoice_no String 必须 XXX 发票号码
tax_amount String 必须 3.00 税额 单位元
excluding_tax_amount String 必须 100.0 不含税金额 单位元

响应参数

名称 类型 示例值 描述
display_msg String 系统错误 错误提示
is_success Boolean true 上传是否成功
sys_error_code String SUCCESS 错误码
sys_error_msg String SUCCESS 错误信息

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TmallServiceSettlementInvoiceUploadRequest req = new TmallServiceSettlementInvoiceUploadRequest();
req.setAmount("103.00");
req.setBillId(1122L);
req.setInvoiceFileKey("invoice/xxxx.pdf");
req.setInvoiceNo("XXX");
req.setTaxAmount("3.00");
req.setExcludingTaxAmount("100.0");
TmallServiceSettlementInvoiceUploadResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<tmall_service_settlement_invoice_upload_response>
    <display_msg>系统错误</display_msg>
    <is_success>true</is_success>
    <sys_error_code>SUCCESS</sys_error_code>
    <sys_error_msg>SUCCESS</sys_error_msg>
</tmall_service_settlement_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

返回
顶部