---
title: "Get the audience in the back office"
---

> 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 the audience in the back office

Path: Nicer API › backoffice

`GET /backoffice/audience`

URL: `https://api.nicer.travel/backoffice/audience`

Returns who is on the platform according to the product analytics tool's people profiles, which a nightly import writes from Identity for every account with a name: how many profiles there are, how many belong to deleted or test accounts, and the live ones (neither) by agency, country, platform role and month the account was created. The figures may be up to 15 minutes old: the analytics tool allows few reads an hour, so the answer is cached. The agency is named by the x-nicer-company header and nothing else: with one named, only the profiles of that agency; with none, every profile. Nicer staff only. Errors: 403 ERROR_DO_NOT_HAVE_PERMISSION for a caller who is not Nicer staff; 502 ERROR_ANALYTICS_UNAVAILABLE when the analytics tool does not answer.

## Authentication

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

## Header parameters

- `x-nicer-company` (`backoffice.audience.list.header.x-nicer-company`; string, optional) — Company context for an agency admin who belongs to several companies. Optional when the caller belongs to one.

## Code samples

### JavaScript SDK

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

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

await nicer.backoffice.audience.list();
```

### Nicer CLI

```bash
nicer backoffice audience list
```

### cURL

```bash
curl --request GET \
  --url https://api.nicer.travel/backoffice/audience \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.nicer.travel/backoffice/audience';
const options = {method: 'GET', headers: {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/backoffice/audience"

headers = {"Authorization": "Bearer <token>"}

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

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "byCompany": {
    "property1": 9007199254740991,
    "property2": 9007199254740991
  },
  "byCountry": {
    "property1": 9007199254740991,
    "property2": 9007199254740991
  },
  "byRole": {
    "property1": 9007199254740991,
    "property2": 9007199254740991
  },
  "createdByMonth": {
    "property1": 9007199254740991,
    "property2": 9007199254740991
  },
  "deleted": 9007199254740991,
  "testUsers": 9007199254740991,
  "total": 9007199254740991
}
```

- `byCompany` (`backoffice.audience.list.response.200.byCompany`; map of integer, required) — Live profiles by agency name; nicer for the accounts that signed up with no agency, unknown for the profiles with none recorded.
- `byCountry` (`backoffice.audience.list.response.200.byCountry`; map of integer, required) — Live profiles by the two-letter country code the analytics tool placed them in; unknown for the profiles it could not place.
- `byRole` (`backoffice.audience.list.response.200.byRole`; map of integer, required) — Live profiles by platform role (traveler, advisor, admin or superadmin); unknown for the profiles with none recorded.
- `createdByMonth` (`backoffice.audience.list.response.200.createdByMonth`; map of integer, required) — Live profiles by the UTC month (YYYY-MM) the account was created in; unknown when the profile has no creation date.
- `deleted` (`backoffice.audience.list.response.200.deleted`; integer, required) — How many profiles belong to deleted accounts. A deleted test account counts here and in testUsers.
  - maximum: `9007199254740991` · minimum: `0`
- `testUsers` (`backoffice.audience.list.response.200.testUsers`; integer, required) — How many profiles are test accounts, as their agency membership marks them.
  - maximum: `9007199254740991` · minimum: `0`
- `total` (`backoffice.audience.list.response.200.total`; integer, required) — How many profiles there are, deleted and test accounts included.
  - maximum: `9007199254740991` · minimum: `0`

### 400

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

#### Example

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

- `errorCode` (`backoffice.audience.list.response.400.errorCode`; string, required)
- `errorMessage` (`backoffice.audience.list.response.400.errorMessage`; string, required)

### 401

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

#### Example

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

- `errorCode` (`backoffice.audience.list.response.401.errorCode`; string, required)
- `errorMessage` (`backoffice.audience.list.response.401.errorMessage`; string, required)

### 403

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

#### Example

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

- `errorCode` (`backoffice.audience.list.response.403.errorCode`; string, required)
- `errorMessage` (`backoffice.audience.list.response.403.errorMessage`; string, required)


Source: https://docs.nicer.travel/api/backoffice/backoffice.audience.list/index.md
