---
title: "List advisor earnings"
---

> 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 advisor earnings

Path: Nicer API › Commerce

`GET /commerce/finance/earnings`

URL: `https://api.nicer.travel/commerce/finance/earnings`

Lists the company's earning entries, the last changed first, optionally filtered by beneficiary and status: a page of `limit` (50 by default, 200 at most), with `nextCursor` to send back as `cursor` while more remain. Advisors and travelers see their own; admins anyone's of the company, and Nicer staff anyone's of the company they name in `x-nicer-company` (each staff read is audited).

## Authentication

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

## Query parameters

- `beneficiaryId` (`commerce.finance.earnings.list.query.beneficiaryId`; string, optional)
  - minLength: `1`
- `cursor` (`commerce.finance.earnings.list.query.cursor`; string, optional)
  - maxLength: `2048` · minLength: `1`
- `limit` (`commerce.finance.earnings.list.query.limit`; integer, optional)
  - maximum: `200` · minimum: `1` · default: `50`
- `status` (`commerce.finance.earnings.list.query.status`; string, optional)
  - one of `"PENDING"`, `"AVAILABLE"`, `"REVERSED"`

## Header parameters

- `x-nicer-company` (`commerce.finance.earnings.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.finance.earnings.list();
```

### Nicer CLI

```bash
nicer commerce finance earnings list --company "$NICER_COMPANY"
```

### cURL

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

### TypeScript

```typescript
const url = 'https://api.nicer.travel/commerce/finance/earnings';
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/finance/earnings"

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

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

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "items": [
    {
      "amount": {
        "amountMinor": 9007199254740991,
        "currency": "string"
      },
      "beneficiaryId": "string",
      "beneficiaryKind": "ADVISOR",
      "commissionItemId": "string",
      "earningId": "string",
      "earningKind": "ADJUSTMENT",
      "entryType": "EARNING",
      "orderId": "string",
      "status": "PENDING",
      "updatedAt": "2019-08-24T14:15:22Z"
    }
  ],
  "nextCursor": "string"
}
```

- `items` (`commerce.finance.earnings.list.response.200.items`; array of object, required)
  - `amount` (`commerce.finance.earnings.list.response.200.items.amount`; object, required)
    - `amountMinor` (`commerce.finance.earnings.list.response.200.items.amount.amountMinor`; integer, required)
      - maximum: `9007199254740991` · minimum: `0`
    - `currency` (`commerce.finance.earnings.list.response.200.items.amount.currency`; string, required)
      - pattern: `^[A-Z]{3}$`
  - `beneficiaryId` (`commerce.finance.earnings.list.response.200.items.beneficiaryId`; string, required)
    - minLength: `1`
  - `beneficiaryKind` (`commerce.finance.earnings.list.response.200.items.beneficiaryKind`; string, required)
    - one of `"ADVISOR"`, `"COMPANY"`, `"TRAVELER"`
  - `commissionItemId` (`commerce.finance.earnings.list.response.200.items.commissionItemId`; any of, required)
    - any of the following: `string`, `null`
  - `earningId` (`commerce.finance.earnings.list.response.200.items.earningId`; string, required)
    - minLength: `1`
  - `earningKind` (`commerce.finance.earnings.list.response.200.items.earningKind`; string, required)
    - one of `"ADJUSTMENT"`, `"ADVISOR_COMMISSION"`, `"AGENCY_COMMISSION"`, `"HOST_SHARE"`, `"PLANNING_FEE"`, `"REFERRAL_COMMISSION"`, `"TRAVELER_REWARD"`
  - `entryType` (`commerce.finance.earnings.list.response.200.items.entryType`; string, required)
    - one of `"EARNING"`, `"REVERSAL"`, `"CLAWBACK"`
  - `orderId` (`commerce.finance.earnings.list.response.200.items.orderId`; any of, required)
    - any of the following: `string`, `null`
  - `status` (`commerce.finance.earnings.list.response.200.items.status`; string, required)
    - one of `"PENDING"`, `"AVAILABLE"`, `"REVERSED"`
  - `updatedAt` (`commerce.finance.earnings.list.response.200.items.updatedAt`; 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))$`
- `nextCursor` (`commerce.finance.earnings.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.finance.earnings.list.response.400.errorCode`; string, required)
- `errorMessage` (`commerce.finance.earnings.list.response.400.errorMessage`; string, required)

### 401

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

#### Example

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

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

### 403

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

#### Example

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

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


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