文档中心 > API类目 > 天猫新零售

tmall.nrt.certificate.send (有价礼包发放电子凭证)

支持有价礼包发放电子凭证

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
nrt_certificate_send_d_t_o NrtCertificateSendDto 可选 发电子凭证DTO
  • └ channel
  • Number
  • 必须
  • 7
  • 投放渠道
  • └ open_id
  • String
  • 必须
  • AXBZ
  • 淘系加密ID
  • └ out_id
  • Number
  • 必须
  • 123
  • 电子凭证模版id
  • └ biz_code
  • String
  • 必须
  • 23
  • 业务编码

响应参数

名称 类型 示例值 描述
result Result 21 接口返回model
  • model
  • NrtCertificateInstanceResponseDto
  • 134523^4351232
  • model
  • └ status
  • String
  • 0
  • 状态
  • └ modified_time
  • Date
  • 12
  • 修改时间
  • └ create_time
  • Date
  • 12
  • 创建时间
  • └ start_time
  • Date
  • 12
  • 开始时间
  • └ end_time
  • Date
  • 12
  • 结束时间
  • └ certificate_code
  • String
  • 3839772921
  • 电子凭证码值
  • └ out_id
  • Number
  • 282399
  • 电子凭证模版id
  • └ channel
  • Number
  • 7
  • 投放渠道
  • └ open_id
  • String
  • AXA
  • 淘系加密ID
  • └ message
  • String
  • xxx
  • message
  • └ code
  • String
  • 0
  • code

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TmallNrtCertificateSendRequest req = new TmallNrtCertificateSendRequest();
TmallNrtCertificateSendRequest.NrtCertificateSendDto obj1 = new TmallNrtCertificateSendRequest.NrtCertificateSendDto();
obj1.setChannel(7L);
obj1.setOpenId("AXBZ");
obj1.setOutId(123L);
obj1.setBizCode("23");
req.setNrtCertificateSendDTO(obj1);
TmallNrtCertificateSendResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<tmall_nrt_certificate_send_response>
    <result>
        <model>
            <status>0</status>
            <modified_time>12</modified_time>
            <create_time>12</create_time>
            <start_time>12</start_time>
            <end_time>12</end_time>
            <certificate_code>3839772921</certificate_code>
            <out_id>282399</out_id>
            <channel>7</channel>
            <open_id>AXA</open_id>
        </model>
        <message>xxx</message>
        <code>0</code>
    </result>
</tmall_nrt_certificate_send_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

返回
顶部