Skip to main content
GET/point-acquire-rule/:id/

Get specific point acquisition rule

You can return a specific point acquisition rule details.

Attributes

Optional unless marked required

idintegerrequired
A unique identifier for the point acquire rule which is given by User

Request​

curl -X GET "https://<your_app_subdomain>.user.com/api/public/point-acquire-rule/:id/" \
-H "Authorization: Token <your_64_char_api_key>" \
-H "Accept: */*; version=2"

Response examples​

{
"id": 3,
"name": "Points for a newsletter signup",
"points_expiration_relative_time": null,
"points_expiration_time": null,
"earning_type": 1,
"earning_value": "50.00",
"count_points_from": null,
"count_points_to": null,
"max_points_daily": null,
"max_points_per_transaction": null,
"max_trigger_count_interval": null,
"max_trigger_count_value": null,
"end_date": null,
"product_event": null,
"products": null,
"point_campaign": 12,
"user_attribute": null,
"event": null,
"event_attribute": null,
"product_attribute": null,
"level_thresholds": []
}

Response fields​

Fields returned in the 200 OK response body.

idinteger
A unique identifier for the point acquire rule which is given by User
namestring
Name of the point acquisition rule.
points_expiration_relative_timeintegernullable
Number of hours after which points earned through this rule expire; null if they don't.
points_expiration_timestring (date-time)nullable
When all points earned through this rule expire, ISO 8601; null if there's no such date.
earning_typeinteger
How points are counted: 0 static (earning_value points per use) or 1 dynamic (earning_value times the price or order value).
earning_valuestring
Points per use (static) or per unit of price (dynamic), as a decimal string.
count_points_fromintegernullable
Lowest price or order value that earns points with dynamic earning; null for no minimum.
count_points_tointegernullable
Highest price or order value that earns points with dynamic earning; null for no maximum.
max_points_dailyintegernullable
Most points a contact can earn from this rule per day; null for no limit.
max_points_per_transactionintegernullable
Most points a contact can earn from this rule in one transaction with dynamic earning; null for no limit.
max_trigger_count_intervalintegernullable
Number of days that max_trigger_count_value counts over; null means over the rule's whole life.
max_trigger_count_valueintegernullable
Most times a contact can use this rule, within max_trigger_count_interval days if set; null for no limit.
end_datestring (date-time)nullable
When the rule stops working, ISO 8601; null if it doesn't.
product_eventintegernullable
Product event type that earns points, for example 2 (purchase); null if the rule uses an event.
productsobjectnullable
A list of products' ids.
point_campaigninteger
ID of the loyalty campaign the rule belongs to.
user_attributestringnullable
name_std of the contact attribute that stores the earned points.
eventintegernullable
ID of the event that earns points; null if the rule uses a product event.
event_attributeintegernullable
ID of the event attribute that holds the order value for dynamic earning; null if not used.
product_attributeintegernullable
ID of the product attribute that holds the price for dynamic earning; null if not used.
level_thresholdsarray of integer
IDs of the customer levels a contact needs to earn points from this rule; empty for everyone.
note

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