GET/ point-campaign/ :id/
Get specific point campaign
You can return a specific point campaign details.
Attributes
Optional unless marked required
- id
- A unique identifier for the point campaign which is given by User
Request
- cURL
- JavaScript
- PHP
- Python
curl -X GET "https://<your_app_subdomain>.user.com/api/public/point-campaign/:id/" \
-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/:id/",
{
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/:id/",
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/:id/",
headers={
"Authorization": "Token <your_64_char_api_key>",
"Accept": "*/*; version=2",
},
)
print(response.json())
Response examples
- 200 OK
- 404 Not Found
{"id": 12,"name": "Spring loyalty campaign","start_date": "2026-11-10T09:38:40+01:00","end_date": "2026-12-10T09:38:40+01:00","created_at": "2026-11-10T08:38:40.641230Z","status": 1,"assigned_events": [],"assigned_product_events": [],"revenue_goal": 1000,"query_map": {}}{
"detail": "No PointCampaign matches the given query."
}
Response fields
Fields returned in the 200 OK response body.
- id
- A unique identifier for the point campaign which is given by User
- name
- Name of the loyalty campaign.
- start_date
- When the campaign starts, ISO 8601 in the timezone of the API key's agent;
nullif no start date is set. - end_date
- When the campaign ends, ISO 8601 in the timezone of the API key's agent;
nullif no end date is set. - created_at
- When the campaign was created, ISO 8601.
- status
- Status of the campaign:
1draft,2pending,3active or4finished. - assigned_events
- IDs of the events the campaign's rules react to.
- assigned_product_events
- Product event types the campaign's rules react to, for example
2(purchase). - revenue_goal
- Revenue the campaign aims to bring in, or
nullif not set. - query_map
- Audience filters of the campaign: contacts must match
includeand not matchexclude.
note
Errors that can come from any endpoint (401, 429, 500, 502, 504) are described in HTTP response codes.