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

文档中心 > API类目 > 店铺会员管理API

taobao.crm.service.point.deductpoint (扣减积分)

扣减积分。

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
buyer_nick String 必须 demo 买家NICK
check_id String 必须 123 checkId,幂等性验证
point_batch String 必须 PG_POINT_BATCH 积分类型:PG_POINT_BATCH
point_code String 必须 PG_POINT 积分批次:PG_POINT
pre_quantity Number 必须 123 变更前的积分数量
quantity Number 必须 123 变更积分数量
transaction_remark String 必须 demo 变更原因描述
point_type String 必须 123 积分标识

响应参数

名称 类型 示例值 描述
module Boolean true 扣减积分是否成功状态。

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
1
2
3
4
5
6
7
8
9
10
11
12
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
CrmServicePointDeductpointRequest req = new CrmServicePointDeductpointRequest();
req.setBuyerNick("demo");
req.setCheckId("123");
req.setPointBatch("PG_POINT_BATCH");
req.setPointCode("PG_POINT");
req.setPreQuantity(123L);
req.setQuantity(123L);
req.setTransactionRemark("demo");
req.setPointType("123");
CrmServicePointDeductpointResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
1
2
3
<crm_service_point_deductpoint_response>
    <module>true</module>
</crm_service_point_deductpoint_response>

异常示例

  • XML示例
  • JSON示例
1
2
3
4
5
6
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案
isv.invalid-quantity-less-0 积分数量值错误 积分数量必须大于0
isv.invalid-transactiontype-error transactiontype值错误 transactiontype值必须为1或者2
isv.invalid-transactionremark-null transactionremark为null 指定transactionremark的值
isv.invalid-repeat-call 重复调用 checkId已经存在 保证幂等
isp.invalid-add-sellerpointrecord-fail 新增卖家积分记录失败 查看异常
isp.invalid-merger-buyerpoint-fail 更新买家积分失败 查看异常
isv.invalid-not-init 积分没有初始化 查看异常
isp.invalid-prequantity-error 上一次积分传入错误。 重新传入上一次积分。
isv.invalid-quantity-less-prequantity 积分减少的值不正确 重新获取买家积分

API工具

如何获得此API

FAQ

返回
顶部