Export Audit Logs
curl --request POST \
--url https://api.loyalty.dog/v2/giftcards/audit-logs/export \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"format": "csv",
"merchantId": "<string>",
"subjectId": "<string>",
"actorId": "<string>",
"subjectName": "<string>",
"actorName": "<string>",
"merchantName": "<string>",
"actions": [
"<string>"
],
"resourceTypes": [
"<string>"
],
"fromDate": "2023-11-07T05:31:56Z",
"toDate": "2023-11-07T05:31:56Z"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
format: 'csv',
merchantId: '<string>',
subjectId: '<string>',
actorId: '<string>',
subjectName: '<string>',
actorName: '<string>',
merchantName: '<string>',
actions: ['<string>'],
resourceTypes: ['<string>'],
fromDate: '2023-11-07T05:31:56Z',
toDate: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.loyalty.dog/v2/giftcards/audit-logs/export', 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/export"
payload = {
"format": "csv",
"merchantId": "<string>",
"subjectId": "<string>",
"actorId": "<string>",
"subjectName": "<string>",
"actorName": "<string>",
"merchantName": "<string>",
"actions": ["<string>"],
"resourceTypes": ["<string>"],
"fromDate": "2023-11-07T05:31:56Z",
"toDate": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"taskId": "<string>",
"status": "<string>",
"downloadUrl": "<string>",
"error": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Audit Logs
Export Audit Logs
Export Audit Logs (async bulk export)
Triggers a background task to export audit log entries matching the given filters as CSV or JSON. Only MERCHANT_ADMIN can trigger exports.
Returns immediately with a taskId. Poll
GET /giftcards/audit-logs/export/{taskId} to check status and get the download URL.
POST
/
v2
/
giftcards
/
audit-logs
/
export
Export Audit Logs
curl --request POST \
--url https://api.loyalty.dog/v2/giftcards/audit-logs/export \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"format": "csv",
"merchantId": "<string>",
"subjectId": "<string>",
"actorId": "<string>",
"subjectName": "<string>",
"actorName": "<string>",
"merchantName": "<string>",
"actions": [
"<string>"
],
"resourceTypes": [
"<string>"
],
"fromDate": "2023-11-07T05:31:56Z",
"toDate": "2023-11-07T05:31:56Z"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
format: 'csv',
merchantId: '<string>',
subjectId: '<string>',
actorId: '<string>',
subjectName: '<string>',
actorName: '<string>',
merchantName: '<string>',
actions: ['<string>'],
resourceTypes: ['<string>'],
fromDate: '2023-11-07T05:31:56Z',
toDate: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.loyalty.dog/v2/giftcards/audit-logs/export', 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/export"
payload = {
"format": "csv",
"merchantId": "<string>",
"subjectId": "<string>",
"actorId": "<string>",
"subjectName": "<string>",
"actorName": "<string>",
"merchantName": "<string>",
"actions": ["<string>"],
"resourceTypes": ["<string>"],
"fromDate": "2023-11-07T05:31:56Z",
"toDate": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"taskId": "<string>",
"status": "<string>",
"downloadUrl": "<string>",
"error": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
JWT access token obtained from POST /v2/token.
Headers
Body
application/json
