---
title: "Export Audit Logs"
method: POST
path: "/v2/giftcards/audit-logs/export"
tags: ["Audit Logs"]
---

# Export Audit Logs

`POST /v2/giftcards/audit-logs/export`

### 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.

## Headers

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

## Request body

- ExportRequest
  - `format` string
  - `merchantId` string, nullable
  - `subjectId` string, nullable
  - `actorId` string, nullable
  - `subjectName` string, nullable
  - `actorName` string, nullable
  - `merchantName` string, nullable
  - `actions` string[], nullable
  - `resourceTypes` string[], nullable
  - `fromDate` string, date-time, nullable
  - `toDate` string, date-time, nullable

## Response `202`

Successful Response

- ExportStatusResponse
  - `taskId` string, required
  - `status` string, required
  - `downloadUrl` string, nullable
  - `error` string, nullable

## 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)
