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

Below are the most frequently used parameters for this API. Please go here for a full list of request parameters.

Parameters

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. These are the most commonly used parameters for this API. Please go here for a full list of request parameters.

API KEY

Request

GET

Response

Geocode Response

Data ElementDescriptionData TypeValue/Example
AddressEncapsulates the details about the location
complex
CoordsEncapsulates the details about the longitude/latitude
complex
RegionIndicates the region of the location
Enum
0 - Unknown
1 - AF
2 - AS
3 - EU
4 - NA(default)
5 - OC
6 - SA
7 - ME
LabelThe label to be displayed on maps and reports in association with a stop
string
PlaceNameThe place name which corresponds to custom place.
string
TimeZoneTime zone that the geocoded result is situated within.
string
ErrorsEncapsulated the details about the errors associated with the geocode locationList of Complex Objects
ConfidenceLevelThe confidence level of the match. See detailed definition in Glossary.
string
Exact, Good, Uncertain, Failed
DistanceFromRoadThe distance from coordinate to nearest road.
double
SpeedLimitInfoSpeed limit of the geocoded coordinates.
Complex
SpeedLimitHeadingHeading used for reverse geocoding to properly snap to the right link.
double

Address

Data ElementDescriptionData TypeValue/Example
StreetAddressThe house number and street name
string
1 Independence Way
CityThe name of the city
string
Princeton
StateThe two letter state abbreviation
string
NJ
ZipThe postal code or zip
string
08540
CountyThe county or jurisdiction.
string
Mercer
CountryThe name of the country
string
SPLCThe Standard Point Location code to use in place of street/city/state/zip
string
183444301
CountryPostalFilterThe postal code filter; use this to filter zip codes by country
Enum
0 - US
1- Mexico
2 - Both
AbbreviationFormatThe abbreviation format for the country code. This is not applicable for NA dataset. See country code table in Appendix.
Enum
0 - FIPS
1 - ISO2
2 - ISO3
3 - GENC2
4 - GENC3
CountryAbbreviationAbbreviated country code corresponding to requested format.
string

Coordinates

Data ElementDescriptionData TypeValue/Example
LatLatitude
string
LonLongitude
string

Errors

Data ElementDescriptionData TypeValue/Example
TypeIndicates whether the error is an exception or warning
Enum
Warning
Exception
CodeError code
Enum
Please refer to Appendix for complete list
LegacyErrorCodeThe legacy error code with is an integer valued code that would have been returned in PC*MILER Web Services v25 and earlier.
Int
DescriptionThe detailed error description.
string
Last updated June 16, 2020.