Validatecustomersession
curl --request POST \
--url https://api.loyalty.dog/v2/giftcards/customers/session \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sessionToken": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({sessionToken: '<string>'})
};
fetch('https://api.loyalty.dog/v2/giftcards/customers/session', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.loyalty.dog/v2/giftcards/customers/session"
payload = { "sessionToken": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"valid": true,
"identity": {
"id": "5eb7cf5a86d9755df3a6c593",
"email": "<string>",
"phone": "<string>",
"name": "<string>",
"verified": true,
"verifiedAt": "<string>",
"trustLevel": "<string>"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Gift Card Customers
Validatecustomersession
Validate Customer Session
Check if a customer session token is still valid and return the customer identity. Used by the ambassador to verify customer authentication on protected routes.
Request Body:
sessionToken: The session token to validate
Returns:
valid: Whether the session is validcustomer: Customer identity if session is valid
Status Codes:
- 200: Session validation result returned
POST
/
v2
/
giftcards
/
customers
/
session
Validatecustomersession
curl --request POST \
--url https://api.loyalty.dog/v2/giftcards/customers/session \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sessionToken": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({sessionToken: '<string>'})
};
fetch('https://api.loyalty.dog/v2/giftcards/customers/session', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.loyalty.dog/v2/giftcards/customers/session"
payload = { "sessionToken": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"valid": true,
"identity": {
"id": "5eb7cf5a86d9755df3a6c593",
"email": "<string>",
"phone": "<string>",
"name": "<string>",
"verified": true,
"verifiedAt": "<string>",
"trustLevel": "<string>"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
JWT access token obtained from POST /v2/token.
Headers
Body
application/json
Request to validate a session token.
Session token to validate
Required string length:
1 - 128