---
title: "List audit events"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.nicer.travel/llms.txt
> Use this file to discover all available pages before exploring further.

# List audit events

Path: Nicer API › Commerce

`GET /commerce/audit-events`

URL: `https://api.nicer.travel/commerce/audit-events`

The company's commission audit trail, newest first (25 by default, at most 100, keyset-paged by when each row was written): every write and every audited read, with who acted, from where, what changed (a personal field only as changed, never its value) and why. `subjectKind` and `subjectId` together answer one record's Activity tab; `actorUserId`, `action`, `from` and `to` narrow the staff audit search. Agency admins read their own company; finance staff read any, and each of their reads is audited.

## Authentication

- `bearerAuth`, http bearer, header `Authorization`, format `JWT`

## Query parameters

- `action` (`commerce.auditEvents.list.query.action`; string, optional)
  - maxLength: `120` · minLength: `3`
- `actorUserId` (`commerce.auditEvents.list.query.actorUserId`; string, optional)
  - maxLength: `255` · minLength: `1`
- `cursor` (`commerce.auditEvents.list.query.cursor`; string, optional)
  - maxLength: `2048` · minLength: `1`
- `from` (`commerce.auditEvents.list.query.from`; string, optional)
  - format: `date-time` · pattern: `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$`
- `limit` (`commerce.auditEvents.list.query.limit`; integer, optional)
  - maximum: `100` · minimum: `1`
- `subjectId` (`commerce.auditEvents.list.query.subjectId`; string, optional)
  - maxLength: `255` · minLength: `1`
- `subjectKind` (`commerce.auditEvents.list.query.subjectKind`; string, optional)
  - one of `"AGENCY_IDENTIFIER"`, `"ALLOCATION"`, `"AUDIT_TRAIL"`, `"COMMISSION_FILE"`, `"COMMISSION_INVOICE"`, `"COMMISSION_ITEM"`, `"COMMISSION_SETTINGS"`, `"COMPANY"`, `"EXPORT"`, `"EXTERNAL_BOOKING"`, `"HOST_RELATIONSHIP"`, `"ORDER"`, `"PAYEE"`, `"PAYOUT"`, `"PAYOUT_RUN"`, `"REMITTANCE"`, `"REMITTANCE_LINE"`, `"SPLIT_PLAN"`, `"STATEMENT"`, `"SUPPLIER"`
- `to` (`commerce.auditEvents.list.query.to`; string, optional)
  - format: `date-time` · pattern: `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$`

## Header parameters

- `x-nicer-company` (`commerce.auditEvents.list.header.x-nicer-company`; string, required) — Company context. Authentication and tenant membership are validated by the API.

## Code samples

### JavaScript SDK

```javascript
import { createClient } from "@nicertravel/sdk";

const nicer = createClient({
  baseUrl: "https://api.nicer.travel",
  token: process.env.NICER_TOKEN,
  headers: { "x-nicer-company": process.env.NICER_COMPANY },
});

await nicer.commerce.auditEvents.list();
```

### Nicer CLI

```bash
nicer commerce audit-events list --company "$NICER_COMPANY"
```

### cURL

```bash
curl --request GET \
  --url https://api.nicer.travel/commerce/audit-events \
  --header 'Authorization: Bearer <token>' \
  --header 'x-nicer-company: string'
```

### TypeScript

```typescript
const url = 'https://api.nicer.travel/commerce/audit-events';
const options = {
  method: 'GET',
  headers: {'x-nicer-company': 'string', Authorization: 'Bearer <token>'}
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.nicer.travel/commerce/audit-events"

headers = {
    "x-nicer-company": "string",
    "Authorization": "Bearer <token>"
}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "items": [
    {
      "action": "string",
      "actingCompanyName": "string",
      "actorKind": "USER",
      "actorRole": "string",
      "actorUserId": "string",
      "auditEventId": "string",
      "changes": {
        "property1": null,
        "property2": null
      },
      "companyName": "string",
      "context": {
        "property1": null,
        "property2": null
      },
      "correlationId": "string",
      "handlerName": "string",
      "occurredAt": "2019-08-24T14:15:22Z",
      "reason": "string",
      "requestId": "string",
      "source": "API",
      "subjectId": "string",
      "subjectKind": "AGENCY_IDENTIFIER"
    }
  ],
  "nextCursor": "string"
}
```

- `items` (`commerce.auditEvents.list.response.200.items`; array of object, required)
  - `action` (`commerce.auditEvents.list.response.200.items.action`; string, required)
    - maxLength: `120` · minLength: `1`
  - `actingCompanyName` (`commerce.auditEvents.list.response.200.items.actingCompanyName`; any of, required)
    - any of the following: `string`, `null`
  - `actorKind` (`commerce.auditEvents.list.response.200.items.actorKind`; string, required)
    - one of `"USER"`, `"STAFF"`, `"SYSTEM"`, `"MIGRATION"`
  - `actorRole` (`commerce.auditEvents.list.response.200.items.actorRole`; any of, required)
    - any of the following: `string`, `null`
  - `actorUserId` (`commerce.auditEvents.list.response.200.items.actorUserId`; any of, required)
    - any of the following: `string`, `null`
  - `auditEventId` (`commerce.auditEvents.list.response.200.items.auditEventId`; string, required)
    - minLength: `1`
  - `changes` (`commerce.auditEvents.list.response.200.items.changes`; any of, required)
    - any of the following: `map<unknown>`, `null`
  - `companyName` (`commerce.auditEvents.list.response.200.items.companyName`; string, required)
    - minLength: `1`
  - `context` (`commerce.auditEvents.list.response.200.items.context`; any of, required)
    - any of the following: `map<unknown>`, `null`
  - `correlationId` (`commerce.auditEvents.list.response.200.items.correlationId`; any of, required)
    - any of the following: `string`, `null`
  - `handlerName` (`commerce.auditEvents.list.response.200.items.handlerName`; string, required)
    - minLength: `1`
  - `occurredAt` (`commerce.auditEvents.list.response.200.items.occurredAt`; string, required)
    - format: `date-time` · pattern: `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$`
  - `reason` (`commerce.auditEvents.list.response.200.items.reason`; any of, required)
    - any of the following: `string`, `null`
  - `requestId` (`commerce.auditEvents.list.response.200.items.requestId`; any of, required)
    - any of the following: `string`, `null`
  - `source` (`commerce.auditEvents.list.response.200.items.source`; string, required)
    - one of `"API"`, `"CRON"`, `"QUEUE"`, `"EVENT"`, `"WORKFLOW"`, `"MIGRATION"`
  - `subjectId` (`commerce.auditEvents.list.response.200.items.subjectId`; string, required)
    - minLength: `1`
  - `subjectKind` (`commerce.auditEvents.list.response.200.items.subjectKind`; string, required)
    - one of `"AGENCY_IDENTIFIER"`, `"ALLOCATION"`, `"AUDIT_TRAIL"`, `"COMMISSION_FILE"`, `"COMMISSION_INVOICE"`, `"COMMISSION_ITEM"`, `"COMMISSION_SETTINGS"`, `"COMPANY"`, `"EXPORT"`, `"EXTERNAL_BOOKING"`, `"HOST_RELATIONSHIP"`, `"ORDER"`, `"PAYEE"`, `"PAYOUT"`, `"PAYOUT_RUN"`, `"REMITTANCE"`, `"REMITTANCE_LINE"`, `"SPLIT_PLAN"`, `"STATEMENT"`, `"SUPPLIER"`
- `nextCursor` (`commerce.auditEvents.list.response.200.nextCursor`; any of, required)
  - any of the following: `string`, `null`

### 400

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`commerce.auditEvents.list.response.400.errorCode`; string, required)
- `errorMessage` (`commerce.auditEvents.list.response.400.errorMessage`; string, required)

### 401

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`commerce.auditEvents.list.response.401.errorCode`; string, required)
- `errorMessage` (`commerce.auditEvents.list.response.401.errorMessage`; string, required)

### 403

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`commerce.auditEvents.list.response.403.errorCode`; string, required)
- `errorMessage` (`commerce.auditEvents.list.response.403.errorMessage`; string, required)


Source: https://docs.nicer.travel/api/Commerce/commerce.auditEvents.list/index.md
