Query Audit Logs
curl --request GET \
--url https://api.loyalty.dog/v2/giftcards/audit-logs \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.loyalty.dog/v2/giftcards/audit-logs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.loyalty.dog/v2/giftcards/audit-logs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"items": [
{
"id": "<string>",
"action": "<string>",
"resourceType": "<string>",
"actorType": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"resourceId": "<string>",
"actorId": "<string>",
"subjectId": "<string>",
"merchantId": "<string>",
"ipAddress": "<string>",
"userAgent": "<string>",
"requestId": "<string>",
"details": {},
"actorName": "<string>",
"subjectName": "<string>",
"merchantName": "<string>",
"resourceName": "<string>"
}
],
"total": 123,
"page": 123,
"pages": 123,
"limit": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Audit Logs
Query Audit Logs
Query Audit Logs
Paginated query of audit log entries. Scoped by the authenticated user’s merchant context. Supports filtering by:
merchantId— merchant identifiersubjectId— customer/subject identifier (exact)actorId— the user who performed the action (exact)subjectName— customer/subject name or email (partial, case-insensitive)actorName— actor’s name, email, or username (partial, case-insensitive)merchantName— merchant program name (partial, case-insensitive)action— one or moreAuditActionvalues (e.g.pii_access,login_failed)resourceType— one or moreAuditResourceTypevaluesfrom/to— ISO 8601 datetime rangepage/limit— pagination (max 200 per page)
MERCHANT_ADMIN and MERCHANT_STAFF can query. If merchantId is omitted,
defaults to the program ID from the authenticated session.
GET
/
v2
/
giftcards
/
audit-logs
Query Audit Logs
curl --request GET \
--url https://api.loyalty.dog/v2/giftcards/audit-logs \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.loyalty.dog/v2/giftcards/audit-logs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.loyalty.dog/v2/giftcards/audit-logs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"items": [
{
"id": "<string>",
"action": "<string>",
"resourceType": "<string>",
"actorType": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"resourceId": "<string>",
"actorId": "<string>",
"subjectId": "<string>",
"merchantId": "<string>",
"ipAddress": "<string>",
"userAgent": "<string>",
"requestId": "<string>",
"details": {},
"actorName": "<string>",
"subjectName": "<string>",
"merchantName": "<string>",
"resourceName": "<string>"
}
],
"total": 123,
"page": 123,
"pages": 123,
"limit": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
JWT access token obtained from POST /v2/token.
Headers
Query Parameters
Required range:
x >= 1Required range:
1 <= x <= 200