文档中心 > API类目 > 本地生活API

alibaba.alsc.crm.voucher.send (发送券给指定用户)

发送券给指定用户

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
param_voucher_send_open_req VoucherSendOpenReq 可选 请求参数
  • └ out_brand_id
  • String
  • 可选
  • 24
  • 外部品牌ID
  • └ request_id
  • String
  • 可选
  • 43242
  • 请求id
  • └ brand_id
  • String
  • 可选
  • 5445
  • 品牌id
  • └ out_shop_id
  • String
  • 可选
  • 6556
  • 外部门店id
  • └ customer_id
  • String
  • 必须
  • 5757
  • 用户id
  • └ shop_id
  • String
  • 可选
  • 424
  • 门店id
  • └ operator_id
  • String
  • 可选
  • 4535
  • 操作人id
  • └ voucher_id
  • String
  • 必须
  • 3243421
  • 券模板id
  • └ voucher_num
  • Number
  • 必须
  • 1
  • 发券数量

响应参数

名称 类型 示例值 描述
result CommonResult 接口结果
  • └ result
  • Boolean
  • true
  • 结果
  • └ result_code
  • String
  • 结果码
  • └ result_view
  • String
  • 结果详情
  • └ biz_success
  • Boolean
  • true
  • 业务成功
  • └ result_desc
  • String
  • 结果详情

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAlscCrmVoucherSendRequest req = new AlibabaAlscCrmVoucherSendRequest();
AlibabaAlscCrmVoucherSendRequest.VoucherSendOpenReq obj1 = new AlibabaAlscCrmVoucherSendRequest.VoucherSendOpenReq();
obj1.setOutBrandId("24");
obj1.setRequestId("43242");
obj1.setBrandId("5445");
obj1.setOutShopId("6556");
obj1.setCustomerId("5757");
obj1.setShopId("424");
obj1.setOperatorId("4535");
obj1.setVoucherId("3243421");
obj1.setVoucherNum(1L);
req.setParamVoucherSendOpenReq(obj1);
AlibabaAlscCrmVoucherSendResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_alsc_crm_voucher_send_response>
    <result>
        <result>true</result>
        <result_code></result_code>
        <result_view></result_view>
        <biz_success>true</biz_success>
        <result_desc></result_desc>
    </result>
</alibaba_alsc_crm_voucher_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

返回
顶部