GeocodeAddressCAN

GeocodeAddressCAN takes an address and returns correct postal information. During address validation and correction, address lines are extracted from the input record, separated into components (parsed), and compared to the contents of the Canadian Postal Database. If a match is found, the input address is corrected according to the contents of the database. If no database match is determined, GeocodeAddressCAN provides the option to normalize input addresses. The normalization process attempts to format the address lines according to conventions outlined in the Canada Post publication, Delivery Needs Accuracy: Canadian Addressing Standards. When the normalization option is invoked and no database match is found for a particular address, GeocodeAddressCAN attempts to recognize the individual elements and formats them according to Canada Post conventions.

Resource URL

JSON endpoint:

https://OnDemandServer/rest/GeocodeAddressCAN/results.json

XML endpoint:

https://OnDemandServer/rest/GeocodeAddressCAN/results.xml

For a list of Spectrum OnDemand servers, see Connecting to Spectrum OnDemand Servers.

Example with JSON Response

This example requests a JSON response:

https://spectrum.precisely.com/rest/GeocodeAddressCAN/results.json?Data.AddressLine1=10-103 1/2 Main st nw&Data.City=Montreal&Data.StateProvince=QC&Data.PostalCode=H32 2YZ

The JSON returned by this request would be:

{"Output": [{
   "AddressLine1": "",
   "City": "MONTRÉAL",
   "LocationPrecision": "10",
   "Country": "CAN",
   "LastLine": "MONTRÉAL QC",
   "Latitude": "45.50906",
   "Longitude": "-73.55336",
   "Geocoder.MatchCode": "G3",
   "StateProvince": "QC",
   "StreetDataType": "1",
   "NumberOfCandidateRanges": "0",
   "CoordinateSystem": "epsg:4326",
   "IsCloseMatch": "Y",
   "user_fields": []
}]}

Example with XML Response

This example requests an XML response:

https://spectrum.precisely.com/rest/GeocodeAddressCAN/results.xml? Data.AddressLine1=10-103 1/2 Main st nw&Data.City=Montreal&Data.StateProvince=QC&Data.PostalCode=H32 2YZ
The XML returned by this request would be:
<xml.GeocodeAddressCANResponse xmlns="http://www.pb.com/spectrum/services/GeocodeAddressCAN">
   <Output>
      <Row>
         <AddressLine1/>
         <City>MONTRÉAL</City>
         <LocationPrecision>10</LocationPrecision>
         <Country>CAN</Country>
         <LastLine>MONTRÉAL QC</LastLine>
         <Latitude>45.50906</Latitude>
         <Longitude>-73.55336</Longitude>
         <Geocoder.MatchCode>G3</Geocoder.MatchCode>
         <StateProvince>QC</StateProvince>
         <StreetDataType>1</StreetDataType>
         <NumberOfCandidateRanges>0</NumberOfCandidateRanges>
         <CoordinateSystem>epsg:4326</CoordinateSystem>
         <IsCloseMatch>Y</IsCloseMatch>
         <user_fields/>
      </Row>
   </Output>
</xml.GeocodeAddressCANResponse>