Reset Loyalty Currency
curl --request POST \
--url https://admin.snagsolutions.io/api/loyalty/reset \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"loyaltyCurrencyId": "123e4567-e89b-12d3-a456-426614174000",
"organizationId": "123e4567-e89b-12d3-a456-426614174222",
"websiteId": "123e4567-e89b-12d3-a456-426614174111"
}
'import requests
url = "https://admin.snagsolutions.io/api/loyalty/reset"
payload = {
"loyaltyCurrencyId": "123e4567-e89b-12d3-a456-426614174000",
"organizationId": "123e4567-e89b-12d3-a456-426614174222",
"websiteId": "123e4567-e89b-12d3-a456-426614174111"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
loyaltyCurrencyId: '123e4567-e89b-12d3-a456-426614174000',
organizationId: '123e4567-e89b-12d3-a456-426614174222',
websiteId: '123e4567-e89b-12d3-a456-426614174111'
})
};
fetch('https://admin.snagsolutions.io/api/loyalty/reset', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://admin.snagsolutions.io/api/loyalty/reset",
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([
'loyaltyCurrencyId' => '123e4567-e89b-12d3-a456-426614174000',
'organizationId' => '123e4567-e89b-12d3-a456-426614174222',
'websiteId' => '123e4567-e89b-12d3-a456-426614174111'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://admin.snagsolutions.io/api/loyalty/reset"
payload := strings.NewReader("{\n \"loyaltyCurrencyId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"organizationId\": \"123e4567-e89b-12d3-a456-426614174222\",\n \"websiteId\": \"123e4567-e89b-12d3-a456-426614174111\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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))
}HttpResponse<String> response = Unirest.post("https://admin.snagsolutions.io/api/loyalty/reset")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"loyaltyCurrencyId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"organizationId\": \"123e4567-e89b-12d3-a456-426614174222\",\n \"websiteId\": \"123e4567-e89b-12d3-a456-426614174111\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://admin.snagsolutions.io/api/loyalty/reset")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"loyaltyCurrencyId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"organizationId\": \"123e4567-e89b-12d3-a456-426614174222\",\n \"websiteId\": \"123e4567-e89b-12d3-a456-426614174111\"\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"error": "<string>"
}Loyalty
Reset Loyalty Currency
Reset Loyalty Currency of a website
POST
/
api
/
loyalty
/
reset
Reset Loyalty Currency
curl --request POST \
--url https://admin.snagsolutions.io/api/loyalty/reset \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"loyaltyCurrencyId": "123e4567-e89b-12d3-a456-426614174000",
"organizationId": "123e4567-e89b-12d3-a456-426614174222",
"websiteId": "123e4567-e89b-12d3-a456-426614174111"
}
'import requests
url = "https://admin.snagsolutions.io/api/loyalty/reset"
payload = {
"loyaltyCurrencyId": "123e4567-e89b-12d3-a456-426614174000",
"organizationId": "123e4567-e89b-12d3-a456-426614174222",
"websiteId": "123e4567-e89b-12d3-a456-426614174111"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
loyaltyCurrencyId: '123e4567-e89b-12d3-a456-426614174000',
organizationId: '123e4567-e89b-12d3-a456-426614174222',
websiteId: '123e4567-e89b-12d3-a456-426614174111'
})
};
fetch('https://admin.snagsolutions.io/api/loyalty/reset', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://admin.snagsolutions.io/api/loyalty/reset",
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([
'loyaltyCurrencyId' => '123e4567-e89b-12d3-a456-426614174000',
'organizationId' => '123e4567-e89b-12d3-a456-426614174222',
'websiteId' => '123e4567-e89b-12d3-a456-426614174111'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://admin.snagsolutions.io/api/loyalty/reset"
payload := strings.NewReader("{\n \"loyaltyCurrencyId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"organizationId\": \"123e4567-e89b-12d3-a456-426614174222\",\n \"websiteId\": \"123e4567-e89b-12d3-a456-426614174111\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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))
}HttpResponse<String> response = Unirest.post("https://admin.snagsolutions.io/api/loyalty/reset")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"loyaltyCurrencyId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"organizationId\": \"123e4567-e89b-12d3-a456-426614174222\",\n \"websiteId\": \"123e4567-e89b-12d3-a456-426614174111\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://admin.snagsolutions.io/api/loyalty/reset")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"loyaltyCurrencyId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"organizationId\": \"123e4567-e89b-12d3-a456-426614174222\",\n \"websiteId\": \"123e4567-e89b-12d3-a456-426614174111\"\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"error": "<string>"
}Authorizations
Body
application/json
Body
Available options:
loyalty_reset_balances, loyalty_reset_balances_data_and_rules, loyalty_reset_balances_data_not_rules UUID of the loyalty currency to reset
Example:
"123e4567-e89b-12d3-a456-426614174000"
UUID of the organization (optional, converted to lowercase)
Example:
"123e4567-e89b-12d3-a456-426614174222"
UUID of the website (optional, converted to lowercase)
Example:
"123e4567-e89b-12d3-a456-426614174111"
Response
200
Was this page helpful?
⌘I