---
title: "Get a person's analytics profile 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 a person's analytics profile in the back office

Path: Nicer API › backoffice

`GET /backoffice/audience/{userId}`

URL: `https://api.nicer.travel/backoffice/audience/{userId}`

Returns the people profile the product analytics tool keeps for one person, keyed by their user id and written by a nightly import from Identity: typed, the advisor a traveler plans with and when the profile was last synced; under properties, every other property with the analytics tool's own names and values, personal data included (name, email, phone, photo, location). The agency is named by the x-nicer-company header and nothing else: with one named, a profile of another agency is not found; with none, any profile. Nicer staff only. Errors: 404 ERROR_ITEM_NOT_FOUND when the analytics tool holds no profile for the person, or, with an agency named, the profile belongs to another agency; 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`

## Path parameters

- `userId` (`backoffice.audience.get.path.userId`; string, required)

## Header parameters

- `x-nicer-company` (`backoffice.audience.get.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.get({
  "userId": "string"
});
```

### Nicer CLI

```bash
nicer backoffice audience get --user-id 'string'
```

### cURL

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

### TypeScript

```typescript
const url = 'https://api.nicer.travel/backoffice/audience/<userId>';
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/<userId>"

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

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

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "advisorName": "string",
  "properties": {
    "property1": "string",
    "property2": "string"
  },
  "syncedAt": "2019-08-24T14:15:22Z"
}
```

- `advisorName` (`backoffice.audience.get.response.200.advisorName`; any of, required) — For a traveler, the name of the advisor the CRM assigned them at their agency, as of the latest import; null for anyone else or when none is assigned.
  - any of the following: `string`, `null`
- `properties` (`backoffice.audience.get.response.200.properties`; map of BackofficeAnalyticsValue, required) — Every other property of the profile, under the analytics tool's own names and as it holds them ($-prefixed ones are the tool's own). advisorName and syncedAt are not repeated here. Personal data: name, email, phone, photo and location properties.
- `syncedAt` (`backoffice.audience.get.response.200.syncedAt`; any of, required) — When the import last wrote the profile, UTC. It dates the sync, never the person's last visit; null when the tool holds no such date.
  - any of the following: `string`, `null`

### 400

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

#### Example

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

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

### 401

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

#### Example

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

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

### 403

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

#### Example

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

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


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