---
title: "Query Audit Logs"
method: GET
path: "/v2/giftcards/audit-logs"
tags: ["Audit Logs"]
---

# Query Audit Logs

`GET /v2/giftcards/audit-logs`

### Query Audit Logs

Paginated query of audit log entries. Scoped by the authenticated user's
merchant context. Supports filtering by:

- `merchantId` — merchant identifier
- `subjectId` — 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 more `AuditAction` values (e.g. `pii_access`, `login_failed`)
- `resourceType` — one or more `AuditResourceType` values
- `from` / `to` — ISO 8601 datetime range
- `page` / `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.

## Query parameters

- `merchantId` string, nullable
- `subjectId` string, nullable
- `actorId` string, nullable
- `subjectName` string, nullable
- `actorName` string, nullable
- `merchantName` string, nullable
- `action` string[], nullable
- `resourceType` string[], nullable
- `from` string, date-time, nullable
- `to` string, date-time, nullable
- `page` integer
- `limit` integer

## Headers

- `X-Eposn-Merchant-Token` string, nullable

## Response `200`

Successful Response

- AuditLogPage
  - `items` AuditLogResponse[], required
    - `id` string, required
    - `action` string, required
    - `resourceType` string, required
    - `resourceId` string, nullable
    - `actorId` string, nullable
    - `actorType` string, required
    - `subjectId` string, nullable
    - `merchantId` string, nullable
    - `ipAddress` string, nullable
    - `userAgent` string, nullable
    - `requestId` string, nullable
    - `details` object, nullable
    - `timestamp` string, date-time, required
    - `actorName` string, nullable
    - `subjectName` string, nullable
    - `merchantName` string, nullable
    - `resourceName` string, nullable
  - `total` integer, required
  - `page` integer, required
  - `pages` integer, required
  - `limit` integer, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/loyalty/apis/loyaltydog.md) · [All operations](https://skmtc.net/loyalty/apis/loyaltydog/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/loyalty/loyaltydog/versions/42b7b22af2b6/schema)
