Skip to main content

Geocoding

Contents

Geocoding retrieves longitude and latitude coordinates for a given address, as well as additional information about that address.

If the geocoding service finds multiple results that match the address, the best match is returned by default. To receive multiple results, set the optional list property to the desired amount.

GET /locations

Resource URL

https://pcmiler.alk.com/apis/rest/v1.0/service.svc/locations

Parameters

The table below includes the most frequently used parameters. Please see the Geocoding Overview page for a full list. If you would like to test out this API, enter values in the table and scroll down the page to submit your request. Required fields are city, state and country; or postcode; or splc. To geocode a location outside of North America, the region field is also required. Check the box next to any additional parameters you would like to set.

Request

API KEY
GET

Response

Geocode Response

Data Element Description Data Type Value/Example
Address Encapsulates the details about the location
complex
Coords Encapsulates the details about the longitude/latitude
complex
Region Indicates the region of the location
Enum
0 - Unknown
1 - AF
2 - AS
3 - EU
4 - NA(default)
5 - OC
6 - SA
7 - ME
Label The label to be displayed on maps and reports in association with a stop
string
PlaceName The place name which corresponds to custom place.
string
TimeZone Time zone that the geocoded result is situated within.
string
Errors Encapsulated the details about the errors associated with the geocode location List of Complex Objects
ConfidenceLevel The confidence level of the match. See detailed definition in Glossary.
string
Exact, Good, Uncertain, Failed
DistanceFromRoad The distance from coordinate to nearest road.
double
SpeedLimitInfo Speed limit of the geocoded coordinates. Read more about retrieving posted speed limits, if the account is licensed for them.
Complex
SpeedLimitHeading Heading used for reverse geocoding to properly snap to the right link.
double

Address

Data Element Description Data Type Value/Example
StreetAddress The house number and street name
string
1 Independence Way
City The name of the city
string
Princeton
State The two letter state abbreviation. This parameter has been deprecated. Use the results returned by StateName and StateAbbreviation instead.
string
NJ
Zip The postal code or zip
string
08540
County The county or jurisdiction.
string
Mercer
Country The name of the country
string
SPLC The Standard Point Location code to use in place of street/city/state/zip
string
183444301
CountryPostalFilter The postal code filter; use this to filter zip codes by country
Enum
0 - US
1- Mexico
2 - Both
AbbreviationFormat The abbreviation format for the country code. See country code table in Appendix. Also applies to states in Mexico.
Enum
0 - FIPS
1 - ISO2
2 - ISO3
3 - GENC2
4 - GENC3
StateName The full name of the state.
string
New Jersey, Queensland
StateAbbreviation The abbreviation for the state.
string
NJ, QLD
CountryAbbreviation Abbreviated country code corresponding to requested format.
string

Coordinates

Data Element Description Data Type Value/Example
Lat Latitude
string
Lon Longitude
string

Errors

Data Element Description Data Type Value/Example
Type Indicates whether the error is an exception or warning
Enum
Warning
Exception
Code Error code
Enum
Please refer to Appendix for complete list
LegacyErrorCode The legacy error code with is an integer valued code that would have been returned in PC*Miler Web Services v25 and earlier.
Int
Description The detailed error description.
string
Last updated June 7, 2024.
API Endpoint:

Contents