Skip to content
Navigation

Suggest places for a chat message

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

Authorization

  • bearerAuth
    HTTP Bearer (JWT)
    required

    Authorization: Bearer <token>

Path parameters

  • chatId
    string
    required

Query parameters

  • 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
    optional
    string

    What the advisor wants suggested, in their own words, such as rooftop bars. Steers the place search.

    maxLength: 500

Returns

200

OK

JSON

Any of the following:

  • object
    • chatId
      string
      required

      The chat the suggestions are for.

    • travelersTripId
      string
      required

      The chat's trip.

    • 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
      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.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

401

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

403

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

Type to search…

↑↓ navigate↵ selectEsc close