GET
/point-acquire-rule/:idGet specific point acquisition rule
You can return a specific point acquisition rule details.
| Attributes | Type | Required | Description |
|---|---|---|---|
| id | integer | yes | A unique identifier for the point acquire rule which is given by User.com |
Request
- CURL
- JavaScript
- PHP
- Python
curl --location --request GET 'https://<your_app_subdomain>.user.com/api/public/point-acquire-rule/1/' \
--header 'accept: application/json' \
--header 'Authorization: Token <your_64_char_api_key>' \
--header 'Accept: */*; version=2'
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function() {
if (this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open(
"GET",
"https://<your_app_subdomain>.user.com/api/public/point-acquire-rule/1/"
);
xhr.setRequestHeader("accept", "application/json");
xhr.setRequestHeader("Authorization", "Token <your_64_char_api_key>");
xhr.setRequestHeader("Accept", "*/*; version=2");
xhr.send();
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://<your_app_subdomain>.user.com/api/public/point-acquire-rule/1/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'accept: application/json',
'Authorization: Token <your_64_char_api_key>',
'Accept: */*; version=2'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
url = "https://<your_app_subdomain>.user.com/api/public/point-acquire-rule/1/"
payload={}
headers = {
'accept': 'application/json',
'Authorization': 'Token <your_64_char_api_key>',
'Accept': '*/*; version=2'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
Response
{
"id": 1,
"name": "string",
"product_event": 1,
"product_order": true,
"end_date": "2022-03-09T11:12:04.814000Z",
"earning_type": 0,
"earning_value": 0,
"max_points_daily": 0,
"max_points_per_transaction": 0,
"max_trigger_count_interval": 0,
"max_trigger_count_value": 0,
"products": {},
"points_expiration_time": "2022-03-09T11:12:04.814000Z",
"event": 1,
"point_campaign": 1,
"user_attribute": 1,
"level_threshold": 1
}