---
title: "Get a commission export"
---

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

# Get a commission export

Path: Nicer API › Commerce

`GET /commerce/commission-exports/{exportId}`

URL: `https://api.nicer.travel/commerce/commission-exports/{exportId}`

One export and its progress. While READY, each read signs a download link that works for 15 minutes and records the download in the audit log; after 7 days the export answers EXPIRED without a link. Advisors read the exports they requested; agency admins and finance staff any export of the company. Another company's export answers 404.

## Authentication

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

## Path parameters

- `exportId` (`commerce.commissionExports.get.path.exportId`; string, required)

## Header parameters

- `x-nicer-company` (`commerce.commissionExports.get.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.commissionExports.get({
  "exportId": "string"
});
```

### Nicer CLI

```bash
nicer commerce commission-exports get --export-id 'string' --company "$NICER_COMPANY"
```

### cURL

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

### TypeScript

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

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

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

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "columns": [
    "string"
  ],
  "companyName": "string",
  "createdAt": "2019-08-24T14:15:22Z",
  "downloadUrl": "http://example.com",
  "errorCode": "COMMISSION_EXPORT_TOO_LARGE",
  "expiresAt": "2019-08-24T14:15:22Z",
  "exportId": "string",
  "fileName": "string",
  "finishedAt": "2019-08-24T14:15:22Z",
  "filter": {
    "property1": null,
    "property2": null
  },
  "format": "CSV",
  "groupBy": "string",
  "presetId": "string",
  "requestedByUserId": "string",
  "rowCount": 9007199254740991,
  "sizeBytes": 9007199254740991,
  "startedAt": "2019-08-24T14:15:22Z",
  "status": "QUEUED",
  "subject": "COMMISSION_ITEMS",
  "totalsOnly": true
}
```

- `columns` (`commerce.commissionExports.get.response.200.columns`; array of string, required)
  - pattern: `^[A-Z][A-Z0-9_]{0,63}$`
- `companyName` (`commerce.commissionExports.get.response.200.companyName`; string, required)
  - minLength: `1`
- `createdAt` (`commerce.commissionExports.get.response.200.createdAt`; 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))$`
- `downloadUrl` (`commerce.commissionExports.get.response.200.downloadUrl`; any of, required)
  - any of the following: `string`, `null`
- `errorCode` (`commerce.commissionExports.get.response.200.errorCode`; any of, required)
  - any of the following:
    - `string`: one of `"COMMISSION_EXPORT_TOO_LARGE"`, `"COMMISSION_EXPORT_TIMED_OUT"`, `"COMMISSION_EXPORT_FAILED"`
    - `null`
- `expiresAt` (`commerce.commissionExports.get.response.200.expiresAt`; any of, required)
  - any of the following: `string`, `null`
- `exportId` (`commerce.commissionExports.get.response.200.exportId`; string, required)
  - minLength: `1`
- `fileName` (`commerce.commissionExports.get.response.200.fileName`; string, required)
  - minLength: `1`
- `finishedAt` (`commerce.commissionExports.get.response.200.finishedAt`; any of, required)
  - any of the following: `string`, `null`
- `filter` (`commerce.commissionExports.get.response.200.filter`; map of unknown, required)
- `format` (`commerce.commissionExports.get.response.200.format`; string, required)
  - one of `"CSV"`, `"XLSX"`, `"PDF"`
- `groupBy` (`commerce.commissionExports.get.response.200.groupBy`; any of, required)
  - any of the following: `ExportColumn`, `null`
- `presetId` (`commerce.commissionExports.get.response.200.presetId`; any of, required)
  - any of the following: `string`, `null`
- `requestedByUserId` (`commerce.commissionExports.get.response.200.requestedByUserId`; string, required)
  - minLength: `1`
- `rowCount` (`commerce.commissionExports.get.response.200.rowCount`; any of, required)
  - any of the following: `integer`, `null`
- `sizeBytes` (`commerce.commissionExports.get.response.200.sizeBytes`; any of, required)
  - any of the following: `integer`, `null`
- `startedAt` (`commerce.commissionExports.get.response.200.startedAt`; any of, required)
  - any of the following: `string`, `null`
- `status` (`commerce.commissionExports.get.response.200.status`; string, required)
  - one of `"QUEUED"`, `"RUNNING"`, `"READY"`, `"FAILED"`, `"EXPIRED"`
- `subject` (`commerce.commissionExports.get.response.200.subject`; string, required)
  - one of `"COMMISSION_ITEMS"`, `"PAYMENTS"`, `"REMITTANCES"`, `"STATEMENTS"`, `"SUPPLIERS"`, `"PAYEES"`, `"PAYOUTS"`, `"COMMISSION_INVOICES"`, `"EARNINGS"`, `"AGENCY"`
- `totalsOnly` (`commerce.commissionExports.get.response.200.totalsOnly`; boolean, required)

### 400

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

#### Example

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

- `errorCode` (`commerce.commissionExports.get.response.400.errorCode`; string, required)
- `errorMessage` (`commerce.commissionExports.get.response.400.errorMessage`; string, required)

### 401

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

#### Example

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

- `errorCode` (`commerce.commissionExports.get.response.401.errorCode`; string, required)
- `errorMessage` (`commerce.commissionExports.get.response.401.errorMessage`; string, required)

### 403

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

#### Example

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

- `errorCode` (`commerce.commissionExports.get.response.403.errorCode`; string, required)
- `errorMessage` (`commerce.commissionExports.get.response.403.errorMessage`; string, required)


Source: https://docs.nicer.travel/api/Commerce/commerce.commissionExports.get/index.md
