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

Get point acquisition rules

You can return all of your point acquisition rules.

Results are paginated: follow next to get the next page (see Response pagination).

Request​

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

Response examples​

{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"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.

countinteger
Number of results across all pages. It can lag behind recent changes; see Response pagination.
nextstring (URL)nullable
URL of the next page of results. null on the last page.
previousstring (URL)nullable
URL of the previous page of results. null on the first page.
resultsarray of objects
Results on this page.
results[].idinteger
ID of the point acquisition rule.
results[].namestring
Name of the point acquisition rule.
results[].points_expiration_relative_timeintegernullable
Number of hours after which points earned through this rule expire; null if they don't.
results[].points_expiration_timestring (date-time)nullable
When all points earned through this rule expire, ISO 8601; null if there's no such date.
results[].earning_typeinteger
How points are counted: 0 static (earning_value points per use) or 1 dynamic (earning_value times the price or order value).
results[].earning_valuestring
Points per use (static) or per unit of price (dynamic), as a decimal string.
results[].count_points_fromintegernullable
Lowest price or order value that earns points with dynamic earning; null for no minimum.
results[].count_points_tointegernullable
Highest price or order value that earns points with dynamic earning; null for no maximum.
results[].max_points_dailyintegernullable
Most points a contact can earn from this rule per day; null for no limit.
results[].max_points_per_transactionintegernullable
Most points a contact can earn from this rule in one transaction with dynamic earning; null for no limit.
results[].max_trigger_count_intervalintegernullable
Number of days that max_trigger_count_value counts over; null means over the rule's whole life.
results[].max_trigger_count_valueintegernullable
Most times a contact can use this rule, within max_trigger_count_interval days if set; null for no limit.
results[].end_datestring (date-time)nullable
When the rule stops working, ISO 8601; null if it doesn't.
results[].product_eventintegernullable
Product event type that earns points, for example 2 (purchase); null if the rule uses an event.
results[].productsobjectnullable
A list of products' ids.
results[].point_campaigninteger
ID of the loyalty campaign the rule belongs to.
results[].user_attributestringnullable
name_std of the contact attribute that stores the earned points.
results[].eventintegernullable
ID of the event that earns points; null if the rule uses a product event.
results[].event_attributeintegernullable
ID of the event attribute that holds the order value for dynamic earning; null if not used.
results[].product_attributeintegernullable
ID of the product attribute that holds the price for dynamic earning; null if not used.
results[].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.