curl --request DELETE \
--url https://admin.snagsolutions.io/api/loyalty/currencies/{id} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://admin.snagsolutions.io/api/loyalty/currencies/{id}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://admin.snagsolutions.io/api/loyalty/currencies/{id}', 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/currencies/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://admin.snagsolutions.io/api/loyalty/currencies/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://admin.snagsolutions.io/api/loyalty/currencies/{id}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://admin.snagsolutions.io/api/loyalty/currencies/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "123e4567-e89b-12d3-a456-426614174005",
"organizationId": "123e4567-e89b-12d3-a456-426614174001",
"websiteId": "123e4567-e89b-12d3-a456-426614174002",
"imageUrl": "https://d1ked0nzx7in3u.cloudfront.net/images/loyalty.png",
"name": "Loyalty Points",
"symbol": "LP",
"decimals": 2,
"createdById": "123e4567-e89b-12d3-a456-426614174010",
"createdAt": "2023-10-01T12:34:56.000Z",
"updatedAt": "2023-10-05T15:30:00.000Z",
"apiGetUrl": "https://api.example.com/get-loyalty",
"apiGetTransactionEntryUrl": "https://api.example.com/get-loyalty",
"apiPostUrl": "https://api.example.com/post-loyalty",
"apiAuthType": "basic",
"apiAuthKey": "apiKey123",
"apiAuthValue": "apiValue456",
"sortId": 1,
"deletedAt": null,
"isTokenRewardCurrency": false
}{
"error": "<string>"
}{
"error": "<string>"
}{
"success": false,
"message": "Internal server error",
"debugInfo": "Stack trace or additional error details"
}Delete a loyalty currency
Delete a loyalty currency
curl --request DELETE \
--url https://admin.snagsolutions.io/api/loyalty/currencies/{id} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://admin.snagsolutions.io/api/loyalty/currencies/{id}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://admin.snagsolutions.io/api/loyalty/currencies/{id}', 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/currencies/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://admin.snagsolutions.io/api/loyalty/currencies/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://admin.snagsolutions.io/api/loyalty/currencies/{id}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://admin.snagsolutions.io/api/loyalty/currencies/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "123e4567-e89b-12d3-a456-426614174005",
"organizationId": "123e4567-e89b-12d3-a456-426614174001",
"websiteId": "123e4567-e89b-12d3-a456-426614174002",
"imageUrl": "https://d1ked0nzx7in3u.cloudfront.net/images/loyalty.png",
"name": "Loyalty Points",
"symbol": "LP",
"decimals": 2,
"createdById": "123e4567-e89b-12d3-a456-426614174010",
"createdAt": "2023-10-01T12:34:56.000Z",
"updatedAt": "2023-10-05T15:30:00.000Z",
"apiGetUrl": "https://api.example.com/get-loyalty",
"apiGetTransactionEntryUrl": "https://api.example.com/get-loyalty",
"apiPostUrl": "https://api.example.com/post-loyalty",
"apiAuthType": "basic",
"apiAuthKey": "apiKey123",
"apiAuthValue": "apiValue456",
"sortId": 1,
"deletedAt": null,
"isTokenRewardCurrency": false
}{
"error": "<string>"
}{
"error": "<string>"
}{
"success": false,
"message": "Internal server error",
"debugInfo": "Stack trace or additional error details"
}Authorizations
Path Parameters
Response
200
Schema for a loyalty currency
Unique identifier for the loyalty currency
"123e4567-e89b-12d3-a456-426614174005"
Unique identifier for the organization
"123e4567-e89b-12d3-a456-426614174001"
Unique identifier for the website
"123e4567-e89b-12d3-a456-426614174002"
URL of the image
"https://d1ked0nzx7in3u.cloudfront.net/images/loyalty.png"
Name of the loyalty currency
"Loyalty Points"
Symbol representing the loyalty currency
"LP"
Number of decimal places for the currency
x >= 02
ID of the user who created the currency
"123e4567-e89b-12d3-a456-426614174010"
Timestamp when the currency was created
"2023-10-01T12:34:56.000Z"
Timestamp when the currency was last updated
"2023-10-05T15:30:00.000Z"
API GET URL for fetching data
"https://api.example.com/get-loyalty"
API GET URL for fetching transaction entry data
"https://api.example.com/get-loyalty"
API POST URL for sending data
"https://api.example.com/post-loyalty"
Type of authentication used for API
none, basic, bearer, apiKey "basic"
Authentication key for API
"apiKey123"
Authentication value for API
"apiValue456"
Sorting identifier
1
Timestamp when the currency was deleted, if applicable
null
True for LoyaltyCurrency rows auto-created by resolveTokenReward (Option 1 hidden currency backing a token-reward rule). Excluded from list responses by default; opt in via excludeTokenRewardCurrencies=false on the list endpoint.
false
Was this page helpful?