注意:以下文档只适用于TOP接口,请谨慎使用!

文档中心 > API类目 > 电子凭证平台

taobao.eticket.merchant.img.upload (码商上传二维码图片)

电子凭证的码商可以通过这个接口,上传二维码图片

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
img_bytes byte[] 必须 image.getBytes 二维码图片

响应参数

名称 类型 示例值 描述
resp_body UploadImgCallbackResp {} 回复对象
  • └ attribute_map
  • String
  • {}
  • 扩展属性
  • └ file_name
  • String
  • 111.png
  • 图片在淘宝的文件名
ret_code String isv.success-all 子结果码
ret_msg String 操作成功 子结果信息

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
EticketMerchantImgUploadRequest req = new EticketMerchantImgUploadRequest();
req.setImgBytes(new FileItem("/tmp/file.txt"));
EticketMerchantImgUploadResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<eticket_merchant_img_upload_response>
    <resp_body>
        <attribute_map>{}</attribute_map>
        <file_name>111.png</file_name>
    </resp_body>
    <ret_code>isv.success-all</ret_code>
    <ret_msg>操作成功</ret_msg>
</eticket_merchant_img_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

返回
顶部