post https://{host}/v2/customers/lookup/negativePointsAdjustment
This API allows you to deduct points from a user. It is also referred to as the Manual Points Adjustment API
. Additionally, you can raise a request to enable configuration ALLOW_NEGATIVE_BALANCE_ON_RETURN
that support negative points. For example, if the negative points configuration is enabled and the currently available points for a customer are 0, you can still deduct 100 points from a customer.
Note
For detailed information about our APIs and for hands-on testing, refer documentation in API overview and step-by-step guide on making your first API call in Make your first API call .
Prerequisites
- Authentication: Basic or OAuth authentication
- Make sure you have the access to Points access group resource. For more information, see access group documentation.
Resource information
URI | v2/customers/lookup/negativePointsAdjustment |
HTTP method | POST |
Pagination | NA |
Rate limit | NA |
Batch support | NA |
API endpoint example
https://{host}/v2/customers/lookup/negativePointsAdjustment?identifierName=id&identifierValue={userid}&source=INSTORE
Request query parameters
Field name | Data type | Description |
---|---|---|
identifierName* | Enum | Identifier of the user. Supported values: userId, externalId, mobile |
identifierValue* | String | Value of the identifier. |
source* | Enum | Source in which the identifier is available. Supported values: INSTORE, MARTJACK, WECHAT, FACEBOOK , WEB_ENGAGE, INSTORE, TMALL, TAOBAO, JD, ECOMMERCE, WEBSITE, LINE, ALL. |
Request body parameters
Field name | Data type | Description |
---|---|---|
pointsToBeAdjusted* | Integer | Points which need to be deducted for the user. (value should be >0) |
programId | Integer | Unique ID of the loyalty program to associate with the promotion. |
reasonOfReturn* | String | Enter the reason for the return of the points. |
pointsAwardedId | Integer | Unique ID of the awarded points. |
promotionId | Integer | Unique identifier for the promotion NOTE: If promotionId and promotionIdentifier both are set, it is an invalid input combination. Either of 1 needs to be passed and not both. |
promotionIdentifier | string | Identifier for the promotion. NOTE : If promotionIdentifier is passed, programId can not be empty/null. |
pointsAwardedRefType | string | Reference type for points awarded. Supported values: bill_regular, bill_promotions, line_item_regular, line_item_promotions, customer_promotions |
{
"pointsToBeAdjusted": "100.00",
"programId": 469,
"reasonOfReturn": "testing"
}
Response parameters
Field name | Data type | Description |
---|---|---|
Status | String | Status of the API call |
pointsAvailable | Integer | Points available for the customer after the points deduction |
message | String | Note for the point deduction |
warnings | Array | Warnings (if any) |
{
"status": "success",
"pointsAvailable": "670.000",
"message": "points deducted successfully for the user ",
"warnings": []
}