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

alibaba.alsc.crm.voucher.status.change (优惠券状态更改)

核销优惠券

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
param_voucher_status_change_open_req VoucherStatusChangeOpenReq 可选 参数
  • └ brand_id
  • String
  • 可选
  • 123
  • 品牌ID
  • └ customer_id
  • String
  • 必须
  • 123
  • 顾客ID
  • └ operator_id
  • String
  • 必须
  • 123
  • 操作ID
  • └ operator_name
  • String
  • 可选
  • 操作人名字
  • 操作名字
  • └ out_brand_id
  • String
  • 可选
  • 123
  • 外部品牌ID
  • └ out_order_id
  • String
  • 可选
  • 123
  • 外部orderID
  • └ out_shop_id
  • String
  • 可选
  • 123
  • 外部门店ID
  • └ request_id
  • String
  • 必须
  • 123
  • 请求ID
  • └ shop_id
  • String
  • 可选
  • 123
  • 门店ID
  • └ source
  • String
  • 必须
  • POS
  • POS,移动门店
  • └ voucher_id_list
  • String []
  • 必须
  • ["123","345"]
  • 优惠券集合
  • └ voucher_status_action
  • String
  • 必须
  • NORMAL_ISUSED
  • /** * 核销,正常到核销 */ NORMAL_ISUSED, /** * 反核销,已使用到正常(补发一张新的优惠券) */ ISUSED_NORMAL,
  • └ voucher_point_list
  • String []
  • 可选
  • ["100","200"]
  • 待核销点数,数组下标和券id对齐

响应参数

名称 类型 示例值 描述
result CommonResult 1 接口结果
  • └ biz_success
  • Boolean
  • true
  • 成功状态
  • result
  • VoucherUsingOpenInfo
  • 1
  • 核销返回结果
  • voucher_status_list
  • VoucherStatus []
  • 1
  • 1
  • └ is_success
  • Boolean
  • false
  • 是否成功
  • └ voucher_id
  • String
  • 123
  • 优惠券实例ID/反核销回补ID
  • └ result_code
  • String
  • 0
  • 结果码
  • └ result_desc
  • String
  • 使用成功
  • 结果描述
  • └ result_view
  • String
  • 使用成功
  • 结果显示

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAlscCrmVoucherStatusChangeRequest req = new AlibabaAlscCrmVoucherStatusChangeRequest();
AlibabaAlscCrmVoucherStatusChangeRequest.VoucherStatusChangeOpenReq obj1 = new AlibabaAlscCrmVoucherStatusChangeRequest.VoucherStatusChangeOpenReq();
obj1.setBrandId("123");
obj1.setCustomerId("123");
obj1.setOperatorId("123");
obj1.setOperatorName("操作人名字");
obj1.setOutBrandId("123");
obj1.setOutOrderId("123");
obj1.setOutShopId("123");
obj1.setRequestId("123");
obj1.setShopId("123");
obj1.setSource("POS");
obj1.setVoucherIdList(""123","345"");
obj1.setVoucherStatusAction("NORMAL_ISUSED");
obj1.setVoucherPointList(""100","200"");
req.setParamVoucherStatusChangeOpenReq(obj1);
AlibabaAlscCrmVoucherStatusChangeResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_alsc_crm_voucher_status_change_response>
    <result>
        <biz_success>true</biz_success>
        <result>
            <voucher_status_list>
                <voucher_status>
                    <is_success>false</is_success>
                    <voucher_id>123</voucher_id>
                </voucher_status>
            </voucher_status_list>
        </result>
        <result_code>0</result_code>
        <result_desc>使用成功</result_desc>
        <result_view>使用成功</result_view>
    </result>
</alibaba_alsc_crm_voucher_status_change_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

返回
顶部