Loyalty
Show loyalty balance
GET
/
api
/
v1
/
loyalty
/
{id}
Get loyalty balance
curl --request GET \
--url https://api.passentry.com/api/v1/loyalty/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.passentry.com/api/v1/loyalty/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.passentry.com/api/v1/loyalty/{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://api.passentry.com/api/v1/loyalty/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.passentry.com/api/v1/loyalty/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.passentry.com/api/v1/loyalty/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.passentry.com/api/v1/loyalty/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "2258d9ed-05bc-47cd-be65-83b9bb5e0273",
"type": "pass",
"attributes": {
"downloadUrl": "https://www.example.com?pass=2258d9ed-05bc-47cd-be65-83b9bb5e0273",
"passType": "storeCard",
"deviceType": "android",
"createdAt": "2022-01-01T00:00:00Z",
"status": "active",
"extId": "4e9ab9e571bbc8ff64e7",
"passTemplateUuid": "b7f3372d08eddd76f28926ff",
"passTemplateName": "PassEntry Store",
"nfc": "941c35348d16187199a6b41047f0b7862b2dcb67",
"barcode": {},
"passContent": {
"description": "Template Description",
"centralTitle": "Template Central Title",
"fullName": "Robert Smith",
"labelOne": "1",
"labelTwo": "11",
"points": "7",
"terms": "Your use of the Google Wallet is subject to Google's terms and conditions of use, which PassEntry are not responsible for."
}
}
},
"meta": {
"loyalty": {
"balance": 7
}
}
}{
"errors": [
"Access denied"
]
}{
"errors": [
"Pass with provided id not found"
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Pass UUID or External ID
Query Parameters
If true, includes the pass design in the response
If true, includes the locations in the response if any are present
If true, includes the beacons in the response if any are present
Was this page helpful?
⌘I
Get loyalty balance
curl --request GET \
--url https://api.passentry.com/api/v1/loyalty/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.passentry.com/api/v1/loyalty/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.passentry.com/api/v1/loyalty/{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://api.passentry.com/api/v1/loyalty/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.passentry.com/api/v1/loyalty/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.passentry.com/api/v1/loyalty/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.passentry.com/api/v1/loyalty/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "2258d9ed-05bc-47cd-be65-83b9bb5e0273",
"type": "pass",
"attributes": {
"downloadUrl": "https://www.example.com?pass=2258d9ed-05bc-47cd-be65-83b9bb5e0273",
"passType": "storeCard",
"deviceType": "android",
"createdAt": "2022-01-01T00:00:00Z",
"status": "active",
"extId": "4e9ab9e571bbc8ff64e7",
"passTemplateUuid": "b7f3372d08eddd76f28926ff",
"passTemplateName": "PassEntry Store",
"nfc": "941c35348d16187199a6b41047f0b7862b2dcb67",
"barcode": {},
"passContent": {
"description": "Template Description",
"centralTitle": "Template Central Title",
"fullName": "Robert Smith",
"labelOne": "1",
"labelTwo": "11",
"points": "7",
"terms": "Your use of the Google Wallet is subject to Google's terms and conditions of use, which PassEntry are not responsible for."
}
}
},
"meta": {
"loyalty": {
"balance": 7
}
}
}{
"errors": [
"Access denied"
]
}{
"errors": [
"Pass with provided id not found"
]
}