---
title: "Suggest places for a chat message"
---

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

# Suggest places for a chat message

Path: Nicer API › Assistant

`GET /agent/chat/{chatId}/suggestions`

URL: `https://api.nicer.travel/agent/chat/{chatId}/suggestions`

Suggests places to add to a trip's itinerary from one message of its chat (conversationId): the assistant reads that message and the ones before it, the trip's destinations and its itinerary, steered by ask when it is sent, runs one place search and answers up to three places the itinerary does not have yet, as activity segments, or null when none came back. Computed on every call and never stored. Only a participant of the chat may call it, for a chat of a trip that has an itinerary. Errors: 403 ERROR_UNAUTHORIZED for a caller who is not a participant or a chat without a trip; 409 ERROR_INVALID_REQUEST for a trip without an itinerary.

## Authentication

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

## Path parameters

- `chatId` (`agent.chat.suggestions.list.path.chatId`; string, required)

## Query parameters

- `conversationId` (`agent.chat.suggestions.list.query.conversationId`; string, required) — The message to suggest places for: its conversationId in this chat. The suggestions read it with the messages before it.
  - minLength: `1`
- `ask` (`agent.chat.suggestions.list.query.ask`; string, optional) — What the advisor wants suggested, in their own words, such as rooftop bars. Steers the place search.
  - maxLength: `500`

## 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.agent.chat.suggestions.list({
  "chatId": "string",
  "conversationId": "string"
});
```

### Nicer CLI

```bash
nicer agent chat suggestions list --chat-id 'string' --conversation-id 'string'
```

### cURL

```bash
curl --request GET \
  --url 'https://api.nicer.travel/agent/chat/<chatId>/suggestions?conversationId=string' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.nicer.travel/agent/chat/<chatId>/suggestions?conversationId=string';
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/agent/chat/<chatId>/suggestions?conversationId=string"

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

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

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "chatId": "string",
  "travelersTripId": "string",
  "segments": [
    {
      "advisorInsights": "string",
      "amenities": [
        "string"
      ],
      "approvedAt": "string",
      "approvedBy": "string",
      "attachments": [
        {
          "key": "string",
          "name": "string",
          "source": "string",
          "url": "string"
        }
      ],
      "countTravelers": 0,
      "createdAt": "string",
      "createdBy": "string",
      "currency": "string",
      "details": "string",
      "endDateTime": "string",
      "groupId": "string",
      "hash": "string",
      "id": "string",
      "images": [
        {
          "key": "string",
          "name": "string",
          "source": "string",
          "url": "string"
        }
      ],
      "isOnSitePayment": true,
      "lastModifiedBy": "string",
      "location": {
        "address": "string",
        "amenities": [
          "string"
        ],
        "city": "string",
        "country": "string",
        "countryCode": "string",
        "description": "string",
        "distanceFromSearch": {
          "unit": "km",
          "value": 0
        },
        "features": [
          "string"
        ],
        "fullAddress": "string",
        "gate": "string",
        "iataCode": "string",
        "internovaId": "string",
        "latitude": 0,
        "longitude": 0,
        "name": "string",
        "photos": [
          {
            "key": "string",
            "name": "string",
            "url": "string"
          }
        ],
        "placeId": "string",
        "region": "string",
        "source": "string",
        "state": "string",
        "terminal": "string",
        "timeZone": "string",
        "zipCode": "string"
      },
      "metadata": {
        "property1": null,
        "property2": null
      },
      "price": 0,
      "priceInUSD": 0,
      "rate": 0,
      "startDateTime": "string",
      "title": "string",
      "updatedAt": "string",
      "type": "flight",
      "baggageCharges": [
        {
          "description": "string",
          "firstPiece": 9007199254740991,
          "lastPiece": 9007199254740991,
          "passengerReference": "string",
          "price": {
            "amountMinor": 9007199254740991,
            "currency": "string"
          },
          "segmentReferences": [
            "string"
          ],
          "size": {
            "dimensions": null,
            "linear": 158,
            "unit": "CM"
          },
          "type": "CARRY_ON",
          "weight": {
            "unit": "KG",
            "value": 23
          }
        }
      ],
      "brandFeatures": [
        {
          "availability": "CHARGEABLE",
          "name": "string"
        }
      ],
      "cabin": "BUSINESS",
      "commercialSnapshot": {
        "calculationInputs": {
          "property1": true,
          "property2": true
        },
        "expectedAdvisorEarning": {
          "amountMinor": 9007199254740991,
          "currency": "string",
          "basis": "string",
          "rateBps": 10000
        },
        "expectedSupplierCommission": {
          "amountMinor": 9007199254740991,
          "currency": "string",
          "basis": "string",
          "rateBps": 10000
        },
        "expectedTravelerReward": {
          "amountMinor": 9007199254740991,
          "currency": "string",
          "basis": "string",
          "rateBps": 10000
        },
        "policyVersion": "string"
      },
      "fareRules": [
        {
          "category": "ADVANCE_PURCHASE",
          "exactCopy": "string",
          "passengerReferences": [
            "string"
          ]
        }
      ],
      "flightIndex": "string",
      "flightType": "one-way",
      "inbound": [
        {
          "aircraft": "string",
          "arrivingAt": null,
          "baggage": [
            {
              "description": "string",
              "passengerReference": "string",
              "pieces": 9007199254740991,
              "serviceId": "string",
              "size": {
                "dimensions": null,
                "linear": 158,
                "unit": "CM"
              },
              "status": "AVAILABLE",
              "type": "CARRY_ON",
              "weight": {
                "unit": "KG",
                "value": 23
              }
            }
          ],
          "bookingClass": "string",
          "brand": {
            "code": "string",
            "name": "string"
          },
          "cabin": "BUSINESS",
          "departingAt": "string",
          "destination": {
            "address": "string",
            "amenities": [
              "string"
            ],
            "city": "string",
            "country": "string",
            "countryCode": "string",
            "description": "string",
            "distanceFromSearch": {
              "unit": "km",
              "value": 0
            },
            "features": [
              "string"
            ],
            "fullAddress": "string",
            "gate": "string",
            "iataCode": "string",
            "internovaId": "string",
            "latitude": 0,
            "longitude": 0,
            "name": "string",
            "photos": [
              {}
            ],
            "placeId": "string",
            "region": "string",
            "source": "string",
            "state": "string",
            "terminal": "string",
            "timeZone": "string",
            "zipCode": "string"
          },
          "distance": "string",
          "duration": "string",
          "explicitNoFlightNumber": true,
          "fareBasisCode": "string",
          "hiddenStops": [
            {
              "airport": {},
              "arrivalAt": "2019-08-24T14:15:22Z",
              "departureAt": "2019-08-24T14:15:22Z",
              "durationMinutes": 9007199254740991
            }
          ],
          "legId": "string",
          "marketingCarrier": {
            "conditionsOfCarriageUrl": "string",
            "iataCode": null,
            "logoLockupUrl": "string",
            "logoSymbolUrl": "string",
            "name": null
          },
          "marketingCarrierFlightNumber": "string",
          "operatingCarrier": {
            "conditionsOfCarriageUrl": "string",
            "iataCode": null,
            "logoLockupUrl": "string",
            "logoSymbolUrl": "string",
            "name": null
          },
          "operatingCarrierFlightNumber": "string",
          "origin": {
            "address": "string",
            "amenities": [
              "string"
            ],
            "city": "string",
            "country": "string",
            "countryCode": "string",
            "description": "string",
            "distanceFromSearch": {
              "unit": "km",
              "value": 0
            },
            "features": [
              "string"
            ],
            "fullAddress": "string",
            "gate": "string",
            "iataCode": "string",
            "internovaId": "string",
            "latitude": 0,
            "longitude": 0,
            "name": "string",
            "photos": [
              {}
            ],
            "placeId": "string",
            "region": "string",
            "source": "string",
            "state": "string",
            "terminal": "string",
            "timeZone": "string",
            "zipCode": "string"
          },
          "providerSegmentReference": "string",
          "seats": [
            {
              "passengerReference": "string",
              "price": {},
              "seatId": "string",
              "seatNumber": "string"
            }
          ],
          "services": [
            {
              "name": "string",
              "passengerReferences": [
                null
              ],
              "price": {},
              "serviceId": "string",
              "status": "CONFIRMED"
            }
          ]
        }
      ],
      "outbound": [
        {
          "aircraft": "string",
          "arrivingAt": null,
          "baggage": [
            {
              "description": "string",
              "passengerReference": "string",
              "pieces": 9007199254740991,
              "serviceId": "string",
              "size": {
                "dimensions": null,
                "linear": 158,
                "unit": "CM"
              },
              "status": "AVAILABLE",
              "type": "CARRY_ON",
              "weight": {
                "unit": "KG",
                "value": 23
              }
            }
          ],
          "bookingClass": "string",
          "brand": {
            "code": "string",
            "name": "string"
          },
          "cabin": "BUSINESS",
          "departingAt": "string",
          "destination": {
            "address": "string",
            "amenities": [
              "string"
            ],
            "city": "string",
            "country": "string",
            "countryCode": "string",
            "description": "string",
            "distanceFromSearch": {
              "unit": "km",
              "value": 0
            },
            "features": [
              "string"
            ],
            "fullAddress": "string",
            "gate": "string",
            "iataCode": "string",
            "internovaId": "string",
            "latitude": 0,
            "longitude": 0,
            "name": "string",
            "photos": [
              {}
            ],
            "placeId": "string",
            "region": "string",
            "source": "string",
            "state": "string",
            "terminal": "string",
            "timeZone": "string",
            "zipCode": "string"
          },
          "distance": "string",
          "duration": "string",
          "explicitNoFlightNumber": true,
          "fareBasisCode": "string",
          "hiddenStops": [
            {
              "airport": {},
              "arrivalAt": "2019-08-24T14:15:22Z",
              "departureAt": "2019-08-24T14:15:22Z",
              "durationMinutes": 9007199254740991
            }
          ],
          "legId": "string",
          "marketingCarrier": {
            "conditionsOfCarriageUrl": "string",
            "iataCode": null,
            "logoLockupUrl": "string",
            "logoSymbolUrl": "string",
            "name": null
          },
          "marketingCarrierFlightNumber": "string",
          "operatingCarrier": {
            "conditionsOfCarriageUrl": "string",
            "iataCode": null,
            "logoLockupUrl": "string",
            "logoSymbolUrl": "string",
            "name": null
          },
          "operatingCarrierFlightNumber": "string",
          "origin": {
            "address": "string",
            "amenities": [
              "string"
            ],
            "city": "string",
            "country": "string",
            "countryCode": "string",
            "description": "string",
            "distanceFromSearch": {
              "unit": "km",
              "value": 0
            },
            "features": [
              "string"
            ],
            "fullAddress": "string",
            "gate": "string",
            "iataCode": "string",
            "internovaId": "string",
            "latitude": 0,
            "longitude": 0,
            "name": "string",
            "photos": [
              {}
            ],
            "placeId": "string",
            "region": "string",
            "source": "string",
            "state": "string",
            "terminal": "string",
            "timeZone": "string",
            "zipCode": "string"
          },
          "providerSegmentReference": "string",
          "seats": [
            {
              "passengerReference": "string",
              "price": {},
              "seatId": "string",
              "seatNumber": "string"
            }
          ],
          "services": [
            {
              "name": "string",
              "passengerReferences": [
                null
              ],
              "price": {},
              "serviceId": "string",
              "status": "CONFIRMED"
            }
          ]
        }
      ],
      "owner": {
        "code": "string",
        "logoAssetReference": "string",
        "name": "string"
      },
      "passengers": [
        {
          "count": 9007199254740991,
          "totalMinor": 9007199254740991,
          "type": "ADULT"
        }
      ],
      "policies": [
        {
          "allowed": true,
          "deadline": "2019-08-24T14:15:22Z",
          "exactCopy": "string",
          "kind": "CANCELLATION",
          "penalties": [
            {
              "amount": {},
              "from": "2019-08-24T14:15:22Z",
              "summary": "string"
            }
          ]
        }
      ],
      "priceSnapshot": {
        "baseMinor": 9007199254740991,
        "collector": "MULTIPLE",
        "currency": "string",
        "depositMinor": 9007199254740991,
        "discounts": [
          {
            "amountMinor": 9007199254740991,
            "code": "string",
            "label": "string"
          }
        ],
        "dueAtPropertyMinor": 9007199254740991,
        "dueLaterMinor": 9007199254740991,
        "dueNowMinor": 9007199254740991,
        "fees": [
          {
            "amountMinor": 9007199254740991,
            "code": "string",
            "label": "string"
          }
        ],
        "lineItems": [
          {
            "amountMinor": 9007199254740991,
            "code": "string",
            "label": "string"
          }
        ],
        "taxes": [
          {
            "amountMinor": 9007199254740991,
            "code": "string",
            "label": "string"
          }
        ],
        "totalMinor": 9007199254740991
      },
      "rules": {
        "afterDeparture": {
          "cancellation": {
            "allowed": true,
            "deadline": "2019-08-24T14:15:22Z",
            "penalty": {
              "amountMinor": 9007199254740991,
              "currency": "string"
            },
            "penaltyRange": {
              "currency": "string",
              "maximumAmountMinor": 9007199254740991,
              "minimumAmountMinor": 9007199254740991
            },
            "summary": "string"
          },
          "change": {
            "allowed": true,
            "deadline": "2019-08-24T14:15:22Z",
            "penalty": {
              "amountMinor": 9007199254740991,
              "currency": "string"
            },
            "penaltyRange": {
              "currency": "string",
              "maximumAmountMinor": 9007199254740991,
              "minimumAmountMinor": 9007199254740991
            },
            "summary": "string"
          }
        },
        "cancellation": {
          "allowed": true,
          "deadline": "2019-08-24T14:15:22Z",
          "penalty": {
            "amountMinor": 9007199254740991,
            "currency": "string"
          },
          "penaltyRange": {
            "currency": "string",
            "maximumAmountMinor": 9007199254740991,
            "minimumAmountMinor": 9007199254740991
          },
          "summary": "string"
        },
        "change": {
          "allowed": true,
          "deadline": "2019-08-24T14:15:22Z",
          "penalty": {
            "amountMinor": 9007199254740991,
            "currency": "string"
          },
          "penaltyRange": {
            "currency": "string",
            "maximumAmountMinor": 9007199254740991,
            "minimumAmountMinor": 9007199254740991
          },
          "summary": "string"
        }
      },
      "ticketingDeadline": "string"
    }
  ],
  "generatedAt": "2019-08-24T14:15:22Z"
}
```

Any of the following:

- `object`
  - `chatId` (`agent.chat.suggestions.list.response.200.1.chatId`; string, required) — The chat the suggestions are for.
  - `travelersTripId` (`agent.chat.suggestions.list.response.200.1.travelersTripId`; string, required) — The chat's trip.
  - `segments` (`agent.chat.suggestions.list.response.200.1.segments`; array of ItinerarySegment, required) — Up to three places found for the message and not yet on the itinerary, as activity segments ready to add to it.
    - one of the following: `ItineraryFlightSegment`, `ItineraryLodgingSegment`, `ItineraryCarRentalSegment`, `ItineraryTransportationSegment`, `ItineraryCruiseSegment`, `ItineraryActivitySegment`, `ItineraryRestaurantSegment`, `ItineraryCustomSegment`
  - `generatedAt` (`agent.chat.suggestions.list.response.200.1.generatedAt`; string, required) — When the suggestions were computed.
    - 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))$`
- `null`

### 400

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

#### Example

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

- `errorCode` (`agent.chat.suggestions.list.response.400.errorCode`; string, required)
- `errorMessage` (`agent.chat.suggestions.list.response.400.errorMessage`; string, required)

### 401

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

#### Example

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

- `errorCode` (`agent.chat.suggestions.list.response.401.errorCode`; string, required)
- `errorMessage` (`agent.chat.suggestions.list.response.401.errorMessage`; string, required)

### 403

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

#### Example

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

- `errorCode` (`agent.chat.suggestions.list.response.403.errorCode`; string, required)
- `errorMessage` (`agent.chat.suggestions.list.response.403.errorMessage`; string, required)


Source: https://docs.nicer.travel/api/Assistant/agent.chat.suggestions.list/index.md
