Skip to main content
PATCH/point-exchange-rule/:id/

Update point exchange rule

You can update a specific point exchange rule.

AttributesTypeRequiredDescription
namestringyesA point exchange rule name.
amountintegeryesAn amount
end_datestringnoA DateTime when point campaign ends
max_daily_use_countintegernoA daily maximum number of an exchange rule usage.
max_trigger_count_intervalintegernoA maximum number of interval days in between triggering this rule for a user.
max_trigger_count_valueintegernoA maximum number of times that rule triggers for this specific user
perkobjectyesAn object with additional user benefits, e.g. coupon or a discount.
point_campaignintegeryesA unique identifier for the point campaign which is given by User.com
user_attributestringnoA standardized name for the user attribute (e.g. "My attribute" is standardized to "my_attribute"). An attribute has to be an integer type.
level_thresholdintegernoA unique identifier for the customer level which is given by User.com

Request​

curl --location --request PATCH 'https://<your_app_subdomain>.user.com/api/public/point-exchange-rule/1/' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token <your_64_char_api_key>' \
--header 'Accept: */*; version=2' \
--data-raw '{ "name": "string", "amount": 0, "end_date": "2022-03-09T13:51:30.418Z", "max_daily_use_count": 0, "max_trigger_count_interval": 0, "max_trigger_count_value": 0, "perk": {}, "point_campaign": 0, "user_attribute": 0, "level_threshold": 0}'

Response​

{
"id": 1,
"name": "string",
"amount": 0,
"end_date": "2022-03-09T13:51:30.418000Z",
"max_daily_use_count": 0,
"max_trigger_count_interval": 0,
"max_trigger_count_value": 0,
"perk": {},
"point_campaign": 1,
"user_attribute": 1,
"level_threshold": 1
}