GET api/Locations/Suggest?search={search}&clientId={clientId}&includeRegistered={includeRegistered}&includeLocations={includeLocations}&includeStops={includeStops}&includeAddresses={includeAddresses}&maxRecent={maxRecent}&maxRegistered={maxRegistered}&maxLocations={maxLocations}&maxStops={maxStops}&groupLocationsByCategory={groupLocationsByCategory}&excludeNonGeocoded={excludeNonGeocoded}

Suggests locations, including both standard locations and client-specific locations.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
search

The string to search with.

string

Required

clientId

If set, also include registered locations for this client

integer

Required

includeRegistered

Whether to include registered locations in the result

boolean

Default value is True

includeLocations

Whether to include common locations in the results

boolean

Default value is True

includeStops

Whether to include stops in the results

boolean

Default value is True

includeAddresses

Whether to include street addresses

boolean

Default value is True

maxRecent

The maximum number of recent/frequent locations that can be returned

integer

Default value is 5

maxRegistered

The maximum number of registered locations that can be returned

integer

Default value is 5

maxLocations

The maximum number of PASS/NOVUS locations that can be returned

integer

Default value is 5

maxStops

The maximum number of bus stops that can be returned

integer

Default value is 5

groupLocationsByCategory

Whether the order of returned locations should be in order of search priority, or grouped by category first, and then search priority within the category

boolean

Default value is True

excludeNonGeocoded

Whether to exclude non geocoded addresses

boolean

Default value is False

Body Parameters

None.

Response Information

Resource Description

A list of matching locations.

Collection of Location
NameDescriptionTypeAdditional information
ID

Gets or sets an optional ID that may be used by the server to help identify the address or location.

integer

None.

Description

A description of the location

string

None.

Category

A category that can be used to group the location

string

None.

Name

The name of the location

string

None.

Latitude

The latitude of the location

decimal number

None.

Longitude

the longitude of the location

decimal number

None.

StreetNumber

The street number for the location

string

None.

OnStreet

The name of the street that the location is on

string

None.

AtStreet

An intersecting street

string

None.

City

The city the location is in.

string

None.

State

State/Province

string

None.

PostalCode

postal/zip code

string

None.

ItemType

The type of location

LocationItemType

None.

InternalType

Gets or sets the internal location type, which is used to help distinguish recent locations that are based on predefined locations vs addresses.

LocationItemType

None.

Unit

Unit number (eg apartment number)

string

None.

Comments

Any comments/instructions associated with this location

string

None.

IsGeocoded

Whether the latitude and longitude are available for this location. This property was introduced during 1.8.0 and will default to "true" if not specified in order to maintain backwards compatibility.

boolean

None.

Contact

A contact associated with the location (may be null)

Contact

None.

Country

Gets or sets the location's country As of Oct 2019, this field isn't used when booking a trip, and is primarily used to capture more information from google addresses in order to display them properly.

string

None.

StopCode

The stop code of this location (if any)

string

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "id": 432897,
    "description": "",
    "category": null,
    "name": "TripSpark Technologies",
    "latitude": 50.0713114,
    "longitude": -113.9944227,
    "streetNumber": "2175",
    "onStreet": "29 Street Northeast",
    "atStreet": null,
    "city": "Calgary",
    "state": "AB",
    "postalCode": "T1Y 7H8",
    "itemType": 0,
    "internalType": 0,
    "unit": null,
    "comments": "Address Comment",
    "isGeocoded": true,
    "contact": {
      "id": 1,
      "referenceId": "1",
      "contactType": "Main",
      "firstName": "Jane",
      "lastName": "Doe",
      "comments": null,
      "details": [
        {
          "id": 2,
          "contactString": "555-555-3760",
          "type": {
            "code": "Home",
            "name": "Home Phone",
            "type": 0
          },
          "isPreferred": false
        }
      ]
    },
    "country": null,
    "stopCode": null
  },
  {
    "id": 432897,
    "description": "",
    "category": null,
    "name": "TripSpark Technologies",
    "latitude": 50.0713114,
    "longitude": -113.9944227,
    "streetNumber": "2175",
    "onStreet": "29 Street Northeast",
    "atStreet": null,
    "city": "Calgary",
    "state": "AB",
    "postalCode": "T1Y 7H8",
    "itemType": 0,
    "internalType": 0,
    "unit": null,
    "comments": "Address Comment",
    "isGeocoded": true,
    "contact": {
      "id": 1,
      "referenceId": "1",
      "contactType": "Main",
      "firstName": "Jane",
      "lastName": "Doe",
      "comments": null,
      "details": [
        {
          "id": 2,
          "contactString": "555-555-3760",
          "type": {
            "code": "Home",
            "name": "Home Phone",
            "type": 0
          },
          "isPreferred": false
        }
      ]
    },
    "country": null,
    "stopCode": null
  }
]

application/xml, text/xml

Sample:
<ArrayOfLocation xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TS.DR.Resources">
  <Location>
    <AtStreet i:nil="true" />
    <Category i:nil="true" />
    <City>Calgary</City>
    <Comments>Address Comment</Comments>
    <Contact>
      <Comments i:nil="true" />
      <ContactType>Main</ContactType>
      <Details>
        <ContactDetail>
          <ContactString>555-555-3760</ContactString>
          <ID>2</ID>
          <Type>
            <Code>Home</Code>
            <Name>Home Phone</Name>
            <Type>Phone</Type>
          </Type>
        </ContactDetail>
      </Details>
      <FirstName>Jane</FirstName>
      <ID>1</ID>
      <LastName>Doe</LastName>
      <ReferenceId>1</ReferenceId>
    </Contact>
    <Country i:nil="true" />
    <Description></Description>
    <ID>432897</ID>
    <InternalType>Location</InternalType>
    <IsGeocoded>true</IsGeocoded>
    <ItemType>Location</ItemType>
    <Latitude>50.0713114</Latitude>
    <Longitude>-113.9944227</Longitude>
    <Name>TripSpark Technologies</Name>
    <OnStreet>29 Street Northeast</OnStreet>
    <PostalCode>T1Y 7H8</PostalCode>
    <State>AB</State>
    <StopCode i:nil="true" />
    <StreetNumber>2175</StreetNumber>
    <Unit i:nil="true" />
  </Location>
  <Location>
    <AtStreet i:nil="true" />
    <Category i:nil="true" />
    <City>Calgary</City>
    <Comments>Address Comment</Comments>
    <Contact>
      <Comments i:nil="true" />
      <ContactType>Main</ContactType>
      <Details>
        <ContactDetail>
          <ContactString>555-555-3760</ContactString>
          <ID>2</ID>
          <Type>
            <Code>Home</Code>
            <Name>Home Phone</Name>
            <Type>Phone</Type>
          </Type>
        </ContactDetail>
      </Details>
      <FirstName>Jane</FirstName>
      <ID>1</ID>
      <LastName>Doe</LastName>
      <ReferenceId>1</ReferenceId>
    </Contact>
    <Country i:nil="true" />
    <Description></Description>
    <ID>432897</ID>
    <InternalType>Location</InternalType>
    <IsGeocoded>true</IsGeocoded>
    <ItemType>Location</ItemType>
    <Latitude>50.0713114</Latitude>
    <Longitude>-113.9944227</Longitude>
    <Name>TripSpark Technologies</Name>
    <OnStreet>29 Street Northeast</OnStreet>
    <PostalCode>T1Y 7H8</PostalCode>
    <State>AB</State>
    <StopCode i:nil="true" />
    <StreetNumber>2175</StreetNumber>
    <Unit i:nil="true" />
  </Location>
</ArrayOfLocation>