Activate Points
cURL
curl --request POST \
--url https://vanilla-dev02-loyalty.fabric.zone/api/v1/members/points-activate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"profileId": "f90a1da5-c072-48b7-a9ea-eb35c5dd506b",
"startDate": "2020-02-08 00:00:00",
"endDate": "2020-02-08 00:00:00"
}
'```
### Python
```python
import requests
url = "https://vanilla-dev02-loyalty.fabric.zone/api/v1/members/points-activate"
payload = {
"profileId": "f90a1da5-c072-48b7-a9ea-eb35c5dd506b",
"startDate": "2020-02-08 00:00:00",
"endDate": "2020-02-08 00:00:00"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
JavaScript (Fetch)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
profileId: 'f90a1da5-c072-48b7-a9ea-eb35c5dd506b',
startDate: '2020-02-08 00:00:00',
endDate: '2020-02-08 00:00:00'
})
};
fetch('https://vanilla-dev02-loyalty.fabric.zone/api/v1/members/points-activate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://vanilla-dev02-loyalty.fabric.zone/api/v1/members/points-activate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'profileId' => 'f90a1da5-c072-48b7-a9ea-eb35c5dd506b',
'startDate' => '2020-02-08 00:00:00',
'endDate' => '2020-02-08 00:00:00'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
Go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://vanilla-dev02-loyalty.fabric.zone/api/v1/members/points-activate"
payload := strings.NewReader("{\n \"profileId\": \"f90a1da5-c072-48b7-a9ea-eb35c5dd506b\",
\"startDate\": \"2020-02-08 00:00:00\",
\"endDate\": \"2020-02-08 00:00:00\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
Response Codes
200 OK
{
"message": "Member points activated",
"errors": {},
"data": null,
"status": 200
}
400 Bad Request
{
"message": "Error message string",
"errors": {
"ExceptionString": [
"Invalid Field"
]
},
"data": null,
"status": 400
}
401 Unauthorized
{
"detail": "Authentication Failed"
}
Authorizations
- Authorization:
Bearer <token> (required)
Body
- profileId: (string, required) - Profile ID of the member.
- startDate: (string | null) - Beginning of the date range, in UTC format.
- endDate: (string | null) - Ending of the date range, in UTC format.
Response
- message: (string) - Response message from the server.
- errors: (object) - Errors, if any, returned in JSON format.
- data: (object | null) - Additional data related to the response, if applicable.
- status: (integer) - HTTP status code of the response.