Skip to main content
PATCH/point-customer-level/:id/

Update customer level

You can update a specific customer level.

Attributes

Optional unless marked required

namestring
A customer level name.
min_thresholdinteger
A minimum number of points to be in a specific customer level.
max_thresholdinteger
A maximum number of points to be in a specific customer level.
rewardsarray of objects
Rewards a contact gets on reaching the level, as a list of objects. Each has type (0 amount discount, 1 percentage off, 2 free shipping, 3 free product, 4 coupon code, 5 create event or 6 API) and, where the type needs it, value.
point_campaigninteger
A unique identifier for the point campaign which is given by User
user_attributestring
A standardized name for the user attribute (e.g. "My attribute" is standardized to "my_attribute"). Attribute has to be an integer type.

Request​

curl -X PATCH "https://<your_app_subdomain>.user.com/api/public/point-customer-level/:id/" \
-H "Authorization: Token <your_64_char_api_key>" \
-H "Accept: */*; version=2" \
-H "Content-Type: application/json" \
-d '{
"name": "Platinum",
"min_threshold": 9500000,
"max_threshold": 9999999,
"rewards": [
{
"type": 2
}
],
"point_campaign": 13
}'

Response examples​

{
"id": 1,
"name": "Platinum",
"point_campaign": 13,
"user_attribute": null,
"min_threshold": 9500000,
"max_threshold": 9999999,
"rewards": [
{
"type": 2
}
]
}

Response fields​

Fields returned in the 200 OK response body.

idinteger
ID of the customer level.
namestring
Name of the customer level.
point_campaigninteger
ID of the point campaign the level belongs to.
user_attributestringnullable
A standardized name for the user attribute (e.g. "My attribute" is standardized to "my_attribute"). Attribute has to be an integer type.
min_thresholdinteger
Lowest number of points a contact needs to be in this level.
max_thresholdinteger
Highest number of points a contact can have and still be in this level.
rewardsarray of objects
Rewards a contact gets on reaching the level.
rewards[].typeinteger
Type of the reward: 0 amount discount, 1 percentage off, 2 free shipping, 3 free product, 4 coupon code, 5 create event or 6 API.
note

Errors that can come from any endpoint (401, 429, 500, 502, 504) are described in HTTP response codes.