---
title: "Compact itinerary with lock reasons"
---

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

# Compact itinerary with lock reasons

Path: Nicer API › Trip itinerary

`GET /trip-itinerary/{tripItineraryId}/agent-view`

URL: `https://api.nicer.travel/trip-itinerary/{tripItineraryId}/agent-view`

A compact view of one trip: its dates, destinations and travellers, plus one line per segment with the reason it is frozen when it is. A frozen segment has been paid for, held or booked — plan around it, never change or remove it. Carries no prices, commissions or provider payloads.

## Authentication

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

## Path parameters

- `tripItineraryId` (`tripItinerary.agentView.list.path.tripItineraryId`; string, required)

## 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.tripItinerary.agentView.list({
  "tripItineraryId": "string"
});
```

### Nicer CLI

```bash
nicer trip-itinerary agent-view list --trip-itinerary-id 'string'
```

### cURL

```bash
curl --request GET \
  --url 'https://api.nicer.travel/trip-itinerary/<tripItineraryId>/agent-view' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.nicer.travel/trip-itinerary/<tripItineraryId>/agent-view';
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/trip-itinerary/<tripItineraryId>/agent-view"

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

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

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "lockedSegmentIds": [
    "string"
  ],
  "segments": [
    {
      "attachmentCount": 9007199254740991,
      "endDateTime": "string",
      "id": "string",
      "imageCount": 9007199254740991,
      "lockedReason": "string",
      "sourceDocumentKey": "string",
      "startDateTime": "string",
      "title": "string",
      "type": "string"
    }
  ],
  "trip": {
    "destinations": [
      "string"
    ],
    "endDate": "string",
    "startDate": "string",
    "title": "string",
    "travelers": {
      "adults": -9007199254740991,
      "children": -9007199254740991
    }
  }
}
```

- `lockedSegmentIds` (`tripItinerary.agentView.list.response.200.lockedSegmentIds`; array of string, required)
- `segments` (`tripItinerary.agentView.list.response.200.segments`; array of object, required)
  - `attachmentCount` (`tripItinerary.agentView.list.response.200.segments.attachmentCount`; integer, required)
    - maximum: `9007199254740991` · minimum: `0`
  - `endDateTime` (`tripItinerary.agentView.list.response.200.segments.endDateTime`; any of, required)
    - any of the following: `string`, `null`
  - `id` (`tripItinerary.agentView.list.response.200.segments.id`; string, required)
  - `imageCount` (`tripItinerary.agentView.list.response.200.segments.imageCount`; integer, required)
    - maximum: `9007199254740991` · minimum: `0`
  - `lockedReason` (`tripItinerary.agentView.list.response.200.segments.lockedReason`; any of, required)
    - any of the following: `string`, `null`
  - `sourceDocumentKey` (`tripItinerary.agentView.list.response.200.segments.sourceDocumentKey`; any of, required)
    - any of the following: `string`, `null`
  - `startDateTime` (`tripItinerary.agentView.list.response.200.segments.startDateTime`; any of, required)
    - any of the following: `string`, `null`
  - `title` (`tripItinerary.agentView.list.response.200.segments.title`; any of, required)
    - any of the following: `string`, `null`
  - `type` (`tripItinerary.agentView.list.response.200.segments.type`; string, required)
- `trip` (`tripItinerary.agentView.list.response.200.trip`; object, required)
  - `destinations` (`tripItinerary.agentView.list.response.200.trip.destinations`; array of string, required)
  - `endDate` (`tripItinerary.agentView.list.response.200.trip.endDate`; any of, required)
    - any of the following: `string`, `null`
  - `startDate` (`tripItinerary.agentView.list.response.200.trip.startDate`; any of, required)
    - any of the following: `string`, `null`
  - `title` (`tripItinerary.agentView.list.response.200.trip.title`; any of, required)
    - any of the following: `string`, `null`
  - `travelers` (`tripItinerary.agentView.list.response.200.trip.travelers`; object, required)
    - `adults` (`tripItinerary.agentView.list.response.200.trip.travelers.adults`; any of, required)
      - any of the following: `integer`, `null`
    - `children` (`tripItinerary.agentView.list.response.200.trip.travelers.children`; any of, required)
      - any of the following: `integer`, `null`

### 400

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

#### Example

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

- `errorCode` (`tripItinerary.agentView.list.response.400.errorCode`; string, required)
- `errorMessage` (`tripItinerary.agentView.list.response.400.errorMessage`; string, required)

### 401

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

#### Example

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

- `errorCode` (`tripItinerary.agentView.list.response.401.errorCode`; string, required)
- `errorMessage` (`tripItinerary.agentView.list.response.401.errorMessage`; string, required)

### 403

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

#### Example

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

- `errorCode` (`tripItinerary.agentView.list.response.403.errorCode`; string, required)
- `errorMessage` (`tripItinerary.agentView.list.response.403.errorMessage`; string, required)


Source: https://docs.nicer.travel/api/Trip-itinerary/tripItinerary.agentView.list/index.md
