GET/ point-campaign/ ?page={page_number}
Get point campaigns
You can return all of your point campaigns.
Attributes
Optional unless marked required
- page
- Page number
Request
- cURL
- JavaScript
- PHP
- Python
curl -X GET "https://<your_app_subdomain>.user.com/api/public/point-campaign/?page={page_number}" \
-H "Authorization: Token <your_64_char_api_key>" \
-H "Accept: */*; version=2"
const response = await fetch(
"https://<your_app_subdomain>.user.com/api/public/point-campaign/?page={page_number}",
{
method: "GET",
headers: {
Authorization: "Token <your_64_char_api_key>",
Accept: "*/*; version=2",
},
},
);
const data = await response.json();
console.log(data);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://<your_app_subdomain>.user.com/api/public/point-campaign/?page={page_number}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Token <your_64_char_api_key>",
"Accept: */*; version=2",
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
response = requests.get(
"https://<your_app_subdomain>.user.com/api/public/point-campaign/?page={page_number}",
headers={
"Authorization": "Token <your_64_char_api_key>",
"Accept": "*/*; version=2",
},
)
print(response.json())
Response examples
- 200 OK
{"count": 1,"next": null,"previous": null,"results": [{"id": 15,"name": "Spring loyalty campaign","start_date": "2026-11-17T16:01:19+01:00","end_date": "2026-12-17T16:01:19+01:00","created_at": "2026-11-17T15:01:19.426098Z","status": 1,"assigned_events": [],"assigned_product_events": [],"revenue_goal": 1000,"query_map": {}}]}Response fields
Fields returned in the 200 OK response body.
- count
- Number of results across all pages. It can lag behind recent changes; see Response pagination.
- next
- URL of the next page of results. null on the last page.
- previous
- URL of the previous page of results. null on the first page.
- results
- Results on this page.
- results[].
id - ID of the loyalty campaign.
- results[].
name - Name of the loyalty campaign.
- results[].
start_date - When the campaign starts, ISO 8601 in the timezone of the API key's agent;
nullif no start date is set. - results[].
end_date - When the campaign ends, ISO 8601 in the timezone of the API key's agent;
nullif no end date is set. - results[].
created_at - When the campaign was created, ISO 8601.
- results[].
status - Status of the campaign:
1draft,2pending,3active or4finished. - results[].
assigned_events - IDs of the events the campaign's rules react to.
- results[].
assigned_product_events - Product event types the campaign's rules react to, for example
2(purchase). - results[].
revenue_goal - Revenue the campaign aims to bring in, or
nullif not set. - results[].
query_map - Audience filters of the campaign: contacts must match
includeand not matchexclude.- results[].
query_map. exclude - Filters for contacts left out of the campaign.
- results[].
query_map. exclude. lists - A list of lists assigned to the user.
- results[].
query_map. exclude. segments - Segments to leave out, each as an object with the segment's
id. - results[].
query_map. exclude. attributes - Attribute filters to leave out, each with the attribute
idand itsfilters.
- results[].
- results[].
query_map. include - Filters a contact must match to take part in the campaign.
- results[].
query_map. include. lists - A list of lists assigned to the user.
- results[].
query_map. include. segments - Segments a contact must be in, each as an object with the segment's
id. - results[].
query_map. include. attributes - Attribute filters a contact must match, each with the attribute
idand itsfilters.
- results[].
- results[].
- results[].
note
Errors that can come from any endpoint (401, 429, 500, 502, 504) are described in HTTP response codes.