文档中心 > API类目 > 天猫国际API

tmall.tkof.contract.file.upload (上传合同文件)

上传合同文件

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
file_name String 必须 合同.pdf 文件名
file_url String 必须 https://test-tof-oss.voyageone.com/company/file/300363/system_300224_20240311062951/bf90a0e95a8a4c8dab025f655669fc37.pdf?Expires=1717059737&OSSAccessKeyId=LTAI4GEomu3G4Q5wmg2dXgtZ&Signature=yKqJG4KZH44DErJ33xPbe0J19zc= 文件下载链接

响应参数

名称 类型 示例值 描述
result Result 结果
  • └ data
  • Number
  • 1094324
  • 文件id
  • └ success
  • Boolean
  • true
  • 是否成功
  • └ error_message
  • String
  • 上传文件失败
  • 错误内容
  • └ error_code
  • String
  • upload.error
  • 错误码

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TmallTkofContractFileUploadRequest req = new TmallTkofContractFileUploadRequest();
req.setFileName("合同.pdf");
req.setFileUrl("https://test-tof-oss.voyageone.com/company/file/300363/system_300224_20240311062951/bf90a0e95a8a4c8dab025f655669fc37.pdf?Expires=1717059737&OSSAccessKeyId=LTAI4GEomu3G4Q5wmg2dXgtZ&Signature=yKqJG4KZH44DErJ33xPbe0J19zc=");
TmallTkofContractFileUploadResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<tmall_tkof_contract_file_upload_response>
    <result>
        <data>1094324</data>
        <success>true</success>
        <error_message>上传文件失败</error_message>
        <error_code>upload.error</error_code>
    </result>
</tmall_tkof_contract_file_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

返回
顶部