Create Loyalty Program
curl --request POST \
--url https://api.loyalty.dog/v2/programs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"passTypeIdentifier": "<string>",
"name": "<string>",
"schema": "tieredMembership",
"programType": "loyalty",
"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,
"scannerType": "None",
"customPointsChangeMessage": "<string>",
"disableCustomPointsChangeMessage": true,
"customPointName": "<string>",
"customPointsName": "<string>",
"customFields": [],
"requiredFields": [],
"retention_period_days": 30
}
'import requests
url = "https://api.loyalty.dog/v2/programs"
payload = {
"passTypeIdentifier": "<string>",
"name": "<string>",
"schema": "tieredMembership",
"programType": "loyalty",
"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,
"scannerType": "None",
"customPointsChangeMessage": "<string>",
"disableCustomPointsChangeMessage": True,
"customPointName": "<string>",
"customPointsName": "<string>",
"customFields": [],
"requiredFields": [],
"retention_period_days": 30
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
passTypeIdentifier: '<string>',
name: '<string>',
schema: 'tieredMembership',
programType: 'loyalty',
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,
scannerType: 'None',
customPointsChangeMessage: '<string>',
disableCustomPointsChangeMessage: true,
customPointName: '<string>',
customPointsName: '<string>',
customFields: [],
requiredFields: [],
retention_period_days: 30
})
};
fetch('https://api.loyalty.dog/v2/programs', 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/programs",
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([
'passTypeIdentifier' => '<string>',
'name' => '<string>',
'schema' => 'tieredMembership',
'programType' => 'loyalty',
'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,
'scannerType' => 'None',
'customPointsChangeMessage' => '<string>',
'disableCustomPointsChangeMessage' => true,
'customPointName' => '<string>',
'customPointsName' => '<string>',
'customFields' => [
],
'requiredFields' => [
],
'retention_period_days' => 30
]),
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/programs"
payload := strings.NewReader("{\n \"passTypeIdentifier\": \"<string>\",\n \"name\": \"<string>\",\n \"schema\": \"tieredMembership\",\n \"programType\": \"loyalty\",\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 \"scannerType\": \"None\",\n \"customPointsChangeMessage\": \"<string>\",\n \"disableCustomPointsChangeMessage\": true,\n \"customPointName\": \"<string>\",\n \"customPointsName\": \"<string>\",\n \"customFields\": [],\n \"requiredFields\": [],\n \"retention_period_days\": 30\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))
}HttpResponse<String> response = Unirest.post("https://api.loyalty.dog/v2/programs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"passTypeIdentifier\": \"<string>\",\n \"name\": \"<string>\",\n \"schema\": \"tieredMembership\",\n \"programType\": \"loyalty\",\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 \"scannerType\": \"None\",\n \"customPointsChangeMessage\": \"<string>\",\n \"disableCustomPointsChangeMessage\": true,\n \"customPointName\": \"<string>\",\n \"customPointsName\": \"<string>\",\n \"customFields\": [],\n \"requiredFields\": [],\n \"retention_period_days\": 30\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.loyalty.dog/v2/programs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"passTypeIdentifier\": \"<string>\",\n \"name\": \"<string>\",\n \"schema\": \"tieredMembership\",\n \"programType\": \"loyalty\",\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 \"scannerType\": \"None\",\n \"customPointsChangeMessage\": \"<string>\",\n \"disableCustomPointsChangeMessage\": true,\n \"customPointName\": \"<string>\",\n \"customPointsName\": \"<string>\",\n \"customFields\": [],\n \"requiredFields\": [],\n \"retention_period_days\": 30\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Loyalty
Create Loyalty Program
Create a new loyalty program.
Args:
data: Payload to create the program.user: The user creating the program, derived from the current session.
Returns:
- JSON response with the created program details or an error message.
POST
/
v2
/
programs
Create Loyalty Program
curl --request POST \
--url https://api.loyalty.dog/v2/programs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"passTypeIdentifier": "<string>",
"name": "<string>",
"schema": "tieredMembership",
"programType": "loyalty",
"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,
"scannerType": "None",
"customPointsChangeMessage": "<string>",
"disableCustomPointsChangeMessage": true,
"customPointName": "<string>",
"customPointsName": "<string>",
"customFields": [],
"requiredFields": [],
"retention_period_days": 30
}
'import requests
url = "https://api.loyalty.dog/v2/programs"
payload = {
"passTypeIdentifier": "<string>",
"name": "<string>",
"schema": "tieredMembership",
"programType": "loyalty",
"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,
"scannerType": "None",
"customPointsChangeMessage": "<string>",
"disableCustomPointsChangeMessage": True,
"customPointName": "<string>",
"customPointsName": "<string>",
"customFields": [],
"requiredFields": [],
"retention_period_days": 30
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
passTypeIdentifier: '<string>',
name: '<string>',
schema: 'tieredMembership',
programType: 'loyalty',
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,
scannerType: 'None',
customPointsChangeMessage: '<string>',
disableCustomPointsChangeMessage: true,
customPointName: '<string>',
customPointsName: '<string>',
customFields: [],
requiredFields: [],
retention_period_days: 30
})
};
fetch('https://api.loyalty.dog/v2/programs', 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/programs",
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([
'passTypeIdentifier' => '<string>',
'name' => '<string>',
'schema' => 'tieredMembership',
'programType' => 'loyalty',
'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,
'scannerType' => 'None',
'customPointsChangeMessage' => '<string>',
'disableCustomPointsChangeMessage' => true,
'customPointName' => '<string>',
'customPointsName' => '<string>',
'customFields' => [
],
'requiredFields' => [
],
'retention_period_days' => 30
]),
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/programs"
payload := strings.NewReader("{\n \"passTypeIdentifier\": \"<string>\",\n \"name\": \"<string>\",\n \"schema\": \"tieredMembership\",\n \"programType\": \"loyalty\",\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 \"scannerType\": \"None\",\n \"customPointsChangeMessage\": \"<string>\",\n \"disableCustomPointsChangeMessage\": true,\n \"customPointName\": \"<string>\",\n \"customPointsName\": \"<string>\",\n \"customFields\": [],\n \"requiredFields\": [],\n \"retention_period_days\": 30\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))
}HttpResponse<String> response = Unirest.post("https://api.loyalty.dog/v2/programs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"passTypeIdentifier\": \"<string>\",\n \"name\": \"<string>\",\n \"schema\": \"tieredMembership\",\n \"programType\": \"loyalty\",\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 \"scannerType\": \"None\",\n \"customPointsChangeMessage\": \"<string>\",\n \"disableCustomPointsChangeMessage\": true,\n \"customPointName\": \"<string>\",\n \"customPointsName\": \"<string>\",\n \"customFields\": [],\n \"requiredFields\": [],\n \"retention_period_days\": 30\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.loyalty.dog/v2/programs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"passTypeIdentifier\": \"<string>\",\n \"name\": \"<string>\",\n \"schema\": \"tieredMembership\",\n \"programType\": \"loyalty\",\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 \"scannerType\": \"None\",\n \"customPointsChangeMessage\": \"<string>\",\n \"disableCustomPointsChangeMessage\": true,\n \"customPointName\": \"<string>\",\n \"customPointsName\": \"<string>\",\n \"customFields\": [],\n \"requiredFields\": [],\n \"retention_period_days\": 30\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
Body
application/json
Pattern:
^pass\..*Available options:
stampCard, tieredMembership, specialOffers, custom Available options:
loyalty, giftcard 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
