Update Loyalty Program Details
curl --request PUT \
--url https://api.loyalty.dog/v2/loyalty/programs/{programId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"language": "<string>",
"country": "<string>",
"company": "<string>",
"address": "<string>",
"website": "<string>",
"email": "[email protected]",
"phone": "<string>",
"terms": "<string>",
"pointsAddEmail": 123,
"pointsAddPhone": 123,
"pointsInstallPass": 123,
"pointsScanPass": 123,
"dynamicScanPoints": true,
"pointsReferral": 123,
"referralRequiredPoints": 123,
"customPointsChangeMessage": "<string>",
"disableCustomPointsChangeMessage": true,
"customPointName": "<string>",
"customPointsName": "<string>",
"customFields": [],
"requiredFields": [],
"retention_period_days": 182
}
'import requests
url = "https://api.loyalty.dog/v2/loyalty/programs/{programId}"
payload = {
"name": "<string>",
"description": "<string>",
"language": "<string>",
"country": "<string>",
"company": "<string>",
"address": "<string>",
"website": "<string>",
"email": "[email protected]",
"phone": "<string>",
"terms": "<string>",
"pointsAddEmail": 123,
"pointsAddPhone": 123,
"pointsInstallPass": 123,
"pointsScanPass": 123,
"dynamicScanPoints": True,
"pointsReferral": 123,
"referralRequiredPoints": 123,
"customPointsChangeMessage": "<string>",
"disableCustomPointsChangeMessage": True,
"customPointName": "<string>",
"customPointsName": "<string>",
"customFields": [],
"requiredFields": [],
"retention_period_days": 182
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
language: '<string>',
country: '<string>',
company: '<string>',
address: '<string>',
website: '<string>',
email: '[email protected]',
phone: '<string>',
terms: '<string>',
pointsAddEmail: 123,
pointsAddPhone: 123,
pointsInstallPass: 123,
pointsScanPass: 123,
dynamicScanPoints: true,
pointsReferral: 123,
referralRequiredPoints: 123,
customPointsChangeMessage: '<string>',
disableCustomPointsChangeMessage: true,
customPointName: '<string>',
customPointsName: '<string>',
customFields: [],
requiredFields: [],
retention_period_days: 182
})
};
fetch('https://api.loyalty.dog/v2/loyalty/programs/{programId}', 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://api.loyalty.dog/v2/loyalty/programs/{programId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'language' => '<string>',
'country' => '<string>',
'company' => '<string>',
'address' => '<string>',
'website' => '<string>',
'email' => '[email protected]',
'phone' => '<string>',
'terms' => '<string>',
'pointsAddEmail' => 123,
'pointsAddPhone' => 123,
'pointsInstallPass' => 123,
'pointsScanPass' => 123,
'dynamicScanPoints' => true,
'pointsReferral' => 123,
'referralRequiredPoints' => 123,
'customPointsChangeMessage' => '<string>',
'disableCustomPointsChangeMessage' => true,
'customPointName' => '<string>',
'customPointsName' => '<string>',
'customFields' => [
],
'requiredFields' => [
],
'retention_period_days' => 182
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.loyalty.dog/v2/loyalty/programs/{programId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"language\": \"<string>\",\n \"country\": \"<string>\",\n \"company\": \"<string>\",\n \"address\": \"<string>\",\n \"website\": \"<string>\",\n \"email\": \"[email protected]\",\n \"phone\": \"<string>\",\n \"terms\": \"<string>\",\n \"pointsAddEmail\": 123,\n \"pointsAddPhone\": 123,\n \"pointsInstallPass\": 123,\n \"pointsScanPass\": 123,\n \"dynamicScanPoints\": true,\n \"pointsReferral\": 123,\n \"referralRequiredPoints\": 123,\n \"customPointsChangeMessage\": \"<string>\",\n \"disableCustomPointsChangeMessage\": true,\n \"customPointName\": \"<string>\",\n \"customPointsName\": \"<string>\",\n \"customFields\": [],\n \"requiredFields\": [],\n \"retention_period_days\": 182\n}")
req, _ := http.NewRequest("PUT", 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))
}HttpResponse<String> response = Unirest.put("https://api.loyalty.dog/v2/loyalty/programs/{programId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"language\": \"<string>\",\n \"country\": \"<string>\",\n \"company\": \"<string>\",\n \"address\": \"<string>\",\n \"website\": \"<string>\",\n \"email\": \"[email protected]\",\n \"phone\": \"<string>\",\n \"terms\": \"<string>\",\n \"pointsAddEmail\": 123,\n \"pointsAddPhone\": 123,\n \"pointsInstallPass\": 123,\n \"pointsScanPass\": 123,\n \"dynamicScanPoints\": true,\n \"pointsReferral\": 123,\n \"referralRequiredPoints\": 123,\n \"customPointsChangeMessage\": \"<string>\",\n \"disableCustomPointsChangeMessage\": true,\n \"customPointName\": \"<string>\",\n \"customPointsName\": \"<string>\",\n \"customFields\": [],\n \"requiredFields\": [],\n \"retention_period_days\": 182\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.loyalty.dog/v2/loyalty/programs/{programId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"language\": \"<string>\",\n \"country\": \"<string>\",\n \"company\": \"<string>\",\n \"address\": \"<string>\",\n \"website\": \"<string>\",\n \"email\": \"[email protected]\",\n \"phone\": \"<string>\",\n \"terms\": \"<string>\",\n \"pointsAddEmail\": 123,\n \"pointsAddPhone\": 123,\n \"pointsInstallPass\": 123,\n \"pointsScanPass\": 123,\n \"dynamicScanPoints\": true,\n \"pointsReferral\": 123,\n \"referralRequiredPoints\": 123,\n \"customPointsChangeMessage\": \"<string>\",\n \"disableCustomPointsChangeMessage\": true,\n \"customPointName\": \"<string>\",\n \"customPointsName\": \"<string>\",\n \"customFields\": [],\n \"requiredFields\": [],\n \"retention_period_days\": 182\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Loyalty
Update Loyalty Program Details
Update Program
Update the details of a specific loyalty program based on provided data.
- programId: The unique identifier of the loyalty program.
- data: A dictionary containing the fields to update.
- Returns: The updated program details.
PUT
/
v2
/
loyalty
/
programs
/
{programId}
Update Loyalty Program Details
curl --request PUT \
--url https://api.loyalty.dog/v2/loyalty/programs/{programId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"language": "<string>",
"country": "<string>",
"company": "<string>",
"address": "<string>",
"website": "<string>",
"email": "[email protected]",
"phone": "<string>",
"terms": "<string>",
"pointsAddEmail": 123,
"pointsAddPhone": 123,
"pointsInstallPass": 123,
"pointsScanPass": 123,
"dynamicScanPoints": true,
"pointsReferral": 123,
"referralRequiredPoints": 123,
"customPointsChangeMessage": "<string>",
"disableCustomPointsChangeMessage": true,
"customPointName": "<string>",
"customPointsName": "<string>",
"customFields": [],
"requiredFields": [],
"retention_period_days": 182
}
'import requests
url = "https://api.loyalty.dog/v2/loyalty/programs/{programId}"
payload = {
"name": "<string>",
"description": "<string>",
"language": "<string>",
"country": "<string>",
"company": "<string>",
"address": "<string>",
"website": "<string>",
"email": "[email protected]",
"phone": "<string>",
"terms": "<string>",
"pointsAddEmail": 123,
"pointsAddPhone": 123,
"pointsInstallPass": 123,
"pointsScanPass": 123,
"dynamicScanPoints": True,
"pointsReferral": 123,
"referralRequiredPoints": 123,
"customPointsChangeMessage": "<string>",
"disableCustomPointsChangeMessage": True,
"customPointName": "<string>",
"customPointsName": "<string>",
"customFields": [],
"requiredFields": [],
"retention_period_days": 182
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
language: '<string>',
country: '<string>',
company: '<string>',
address: '<string>',
website: '<string>',
email: '[email protected]',
phone: '<string>',
terms: '<string>',
pointsAddEmail: 123,
pointsAddPhone: 123,
pointsInstallPass: 123,
pointsScanPass: 123,
dynamicScanPoints: true,
pointsReferral: 123,
referralRequiredPoints: 123,
customPointsChangeMessage: '<string>',
disableCustomPointsChangeMessage: true,
customPointName: '<string>',
customPointsName: '<string>',
customFields: [],
requiredFields: [],
retention_period_days: 182
})
};
fetch('https://api.loyalty.dog/v2/loyalty/programs/{programId}', 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://api.loyalty.dog/v2/loyalty/programs/{programId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'language' => '<string>',
'country' => '<string>',
'company' => '<string>',
'address' => '<string>',
'website' => '<string>',
'email' => '[email protected]',
'phone' => '<string>',
'terms' => '<string>',
'pointsAddEmail' => 123,
'pointsAddPhone' => 123,
'pointsInstallPass' => 123,
'pointsScanPass' => 123,
'dynamicScanPoints' => true,
'pointsReferral' => 123,
'referralRequiredPoints' => 123,
'customPointsChangeMessage' => '<string>',
'disableCustomPointsChangeMessage' => true,
'customPointName' => '<string>',
'customPointsName' => '<string>',
'customFields' => [
],
'requiredFields' => [
],
'retention_period_days' => 182
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.loyalty.dog/v2/loyalty/programs/{programId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"language\": \"<string>\",\n \"country\": \"<string>\",\n \"company\": \"<string>\",\n \"address\": \"<string>\",\n \"website\": \"<string>\",\n \"email\": \"[email protected]\",\n \"phone\": \"<string>\",\n \"terms\": \"<string>\",\n \"pointsAddEmail\": 123,\n \"pointsAddPhone\": 123,\n \"pointsInstallPass\": 123,\n \"pointsScanPass\": 123,\n \"dynamicScanPoints\": true,\n \"pointsReferral\": 123,\n \"referralRequiredPoints\": 123,\n \"customPointsChangeMessage\": \"<string>\",\n \"disableCustomPointsChangeMessage\": true,\n \"customPointName\": \"<string>\",\n \"customPointsName\": \"<string>\",\n \"customFields\": [],\n \"requiredFields\": [],\n \"retention_period_days\": 182\n}")
req, _ := http.NewRequest("PUT", 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))
}HttpResponse<String> response = Unirest.put("https://api.loyalty.dog/v2/loyalty/programs/{programId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"language\": \"<string>\",\n \"country\": \"<string>\",\n \"company\": \"<string>\",\n \"address\": \"<string>\",\n \"website\": \"<string>\",\n \"email\": \"[email protected]\",\n \"phone\": \"<string>\",\n \"terms\": \"<string>\",\n \"pointsAddEmail\": 123,\n \"pointsAddPhone\": 123,\n \"pointsInstallPass\": 123,\n \"pointsScanPass\": 123,\n \"dynamicScanPoints\": true,\n \"pointsReferral\": 123,\n \"referralRequiredPoints\": 123,\n \"customPointsChangeMessage\": \"<string>\",\n \"disableCustomPointsChangeMessage\": true,\n \"customPointName\": \"<string>\",\n \"customPointsName\": \"<string>\",\n \"customFields\": [],\n \"requiredFields\": [],\n \"retention_period_days\": 182\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.loyalty.dog/v2/loyalty/programs/{programId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"language\": \"<string>\",\n \"country\": \"<string>\",\n \"company\": \"<string>\",\n \"address\": \"<string>\",\n \"website\": \"<string>\",\n \"email\": \"[email protected]\",\n \"phone\": \"<string>\",\n \"terms\": \"<string>\",\n \"pointsAddEmail\": 123,\n \"pointsAddPhone\": 123,\n \"pointsInstallPass\": 123,\n \"pointsScanPass\": 123,\n \"dynamicScanPoints\": true,\n \"pointsReferral\": 123,\n \"referralRequiredPoints\": 123,\n \"customPointsChangeMessage\": \"<string>\",\n \"disableCustomPointsChangeMessage\": true,\n \"customPointName\": \"<string>\",\n \"customPointsName\": \"<string>\",\n \"customFields\": [],\n \"requiredFields\": [],\n \"retention_period_days\": 182\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
JWT access token obtained from POST /v2/token.
Headers
Path Parameters
Required string length:
24Pattern:
^[0-9a-f]{24}$Example:
"5eb7cf5a86d9755df3a6c593"
Body
application/json
Required string length:
1 - 2083Available options:
Browser, PassVerifier, CodeReadr, None Show child attributes
Show child attributes
Days to retain deleted data (0-365)
Required range:
0 <= x <= 365Response
Successful Response
⌘I
