# View city suggestions

Returns valid city suggestions based on SuggestionInput and an optional criteria object. Returns a criteria object which specifies both the city and the state needed to identify that city.

Endpoint: POST /v1/suggestions/City
Version: 5.3.1.0
Security: api_key_bearer, x_radar_access_token

## Security:

  - `api_key_bearer` (unknown)
    http bearer

  - `x_radar_access_token` (unknown)
    apiKey in header X-Radar-Access-Token

## Query parameters:

  - `SuggestionInput` (string)
    Typically this is the first few keystrokes the user has entered.  Suggestions are filtered to match.

## Request fields (application/json):

  - `Criteria` (array)
    **Optional** Restricts the suggestions to the values compatible with the provided criteria. For instance, if the criteria contains State set to OR, only cities within Oregon will be returned. Example: `[{"name": "State","value": ["OR"]}]`
    Example: [{"name":"State","value":["OR"]},{"name":"ZipFive","value":["97202","97212"]},{"name":"Beds","value":[[6,null]]},{"name":"Pool","value":[1]},{"name":"PropertyType","value":[{"name":"PType","value":["S…

  - `Criteria.name` (string, required)

  - `Criteria.value` (any, required)

  - `Criteria.value.type` (string, required)

  - `Criteria.value.coordinates` (array, required)

  - `Criteria.value.radius` (number, required)

  - `Criteria.value.radius_units` (string | null)

  - `Criteria.value.type` (string, required)
    Enum: "Polygon", "MultiPolygon"

  - `Criteria.value.name` (string)

  - `Criteria.value.value` (array)

  - `Criteria.value.limit` (number, required)
    The number of properties to return.  Must be greater than 0.

  - `Criteria.value.sort_dir` (string, required)
    The direction to sort the properties.  `ASC` for ascending (lowest to highest or a-z) and `DESC` for descending (highest to lowest or z-a).
    Enum: "ASC", "DESC"

  - `Criteria.value.sort_field` (string, required)
    The field to sort the properties by.  Must be a valid property field.  For example, `SqFt` to sort by square footage.

  - `Criteria.value.type` (string)
    The type of location to search around.  With `address` you provide a full address, with `current_location` you provide a latitude and longitude, and `business_address` looks up your business address in Brand Center.
    Enum: "address", "business_address", "current_location"

  - `Criteria.value.limit` (any)

  - `Criteria.value.address` (string)
    The full address to search around.  Required when type is `address`.

  - `Criteria.value.label` (string)

  - `Criteria.value.latitude` (any)
    The latitude of the location to search around.  Required when type is `current_location`.

  - `Criteria.value.longitude` (any)
    The longitude of the location to search around.  Required when type is `current_location`.

  - `Criteria.menuLabels` (array | null)
    Human-readable labels for each selected value, when applicable.

  - `Criteria.chipLabel` (string | null)
    Human-readable summary label for display in filter chips.

## Response 200:

  - `200` (unknown)
    Success

## Response 200 fields (application/json):

  - `results` (array)

  - `results.Criteria` (array)
    Returns a criteria object containing the State and City needed to identify the city given in the SuggestionInput
    Example: {"Criteria":[{"name":"State","value":["OR"]},{"name":"City","value":["PORTLAND"]}]}

  - `results.Criteria.name` (string, required)

  - `results.Criteria.value` (any, required)

  - `results.Criteria.value.type` (string, required)

  - `results.Criteria.value.coordinates` (array, required)

  - `results.Criteria.value.radius` (number, required)

  - `results.Criteria.value.radius_units` (string | null)

  - `results.Criteria.value.type` (string, required)
    Enum: "Polygon", "MultiPolygon"

  - `results.Criteria.value.name` (string)

  - `results.Criteria.value.value` (array)

  - `results.Criteria.value.limit` (number, required)
    The number of properties to return.  Must be greater than 0.

  - `results.Criteria.value.sort_dir` (string, required)
    The direction to sort the properties.  `ASC` for ascending (lowest to highest or a-z) and `DESC` for descending (highest to lowest or z-a).
    Enum: "ASC", "DESC"

  - `results.Criteria.value.sort_field` (string, required)
    The field to sort the properties by.  Must be a valid property field.  For example, `SqFt` to sort by square footage.

  - `results.Criteria.value.type` (string)
    The type of location to search around.  With `address` you provide a full address, with `current_location` you provide a latitude and longitude, and `business_address` looks up your business address in Brand Center.
    Enum: "address", "business_address", "current_location"

  - `results.Criteria.value.limit` (any)

  - `results.Criteria.value.address` (string)
    The full address to search around.  Required when type is `address`.

  - `results.Criteria.value.label` (string)

  - `results.Criteria.value.latitude` (any)
    The latitude of the location to search around.  Required when type is `current_location`.

  - `results.Criteria.value.longitude` (any)
    The longitude of the location to search around.  Required when type is `current_location`.

  - `results.Criteria.menuLabels` (array | null)
    Human-readable labels for each selected value, when applicable.

  - `results.Criteria.chipLabel` (string | null)
    Human-readable summary label for display in filter chips.

  - `results.Label` (string)
    Example: Portland, OR

## Response 400:

  - `400` (unknown)
    Bad request

## Response 400 fields (application/json):

  - `error` (string)
    A simple explanation of the problem.  Not for display to end users.

  - `eventid` (string)
    A code in the form xxx-xxx-xxx that can be used for troubleshooting. Also present in headers as X-Radar-Request-Id
    Example: abc-123-def

  - `message` (string)
    If present, an explanation suitable for display to end users

  - `messageTitle` (string)
    If present, a title suitable for display to end users

## Response 403:

  - `403` (unknown)
    Forbidden. Returned when the access token is valid but the request is denied for authorization reasons. Common cases include an inactive subscription, a missing API or Integrations entitlement, insufficient OAuth scope, or lacking permission for the requested operation. Invalid or expired tokens return 401 instead.

## Response 403 fields (application/json):

  - `error` (string)
    A simple explanation of the problem. Not for display to end users. OAuth denials often use the form `{error_code} - {description}` (for example, `access_denied - ...`). Permission denials typically return `You are not authorized to use this service.`
    Example: You are not authorized to use this service.

  - `eventid` (string)
    A code in the form xxx-xxx-xxx that can be used for troubleshooting. Also present in headers as X-Radar-Request-Id
    Example: abc-123-def

  - `message` (string)
    If present, an explanation suitable for display to end users

  - `messageTitle` (string)
    If present, a title suitable for display to end users

## Response 404:

  - `404` (unknown)
    Not found. Returned when the requested path is unknown, authentication is missing (some routes return 404 rather than 401 to avoid revealing route existence), or a path parameter identifies a resource that does not exist or is not visible to the authenticated account (for example, an invalid RadarID or an ID belonging to another account). This replaces the previous behavior of returning 400 for resource-not-found errors.

## Response 404 fields (application/json):

  - `error` (string)
    A simple explanation of the problem. Not for display to end users. Resource-not-found errors typically return `Resource does not exist for given id`. Unknown paths or missing authentication may return a message indicating the path was not found or authentication is missing.
    Example: Resource does not exist for given id

  - `eventid` (string)
    A code in the form xxx-xxx-xxx that can be used for troubleshooting. Also present in headers as X-Radar-Request-Id
    Example: abc-123-def

  - `message` (string)
    If present, an explanation suitable for display to end users

  - `messageTitle` (string)
    If present, a title suitable for display to end users

