GetCandidateAddressesLoqate

GetCandidateAddressesLoqate returns a list of addresses that are considered matches for a given input address. GetCandidateAddressesLoqate returns candidate addresses only if the input address matches multiple addresses in the postal database. If the input address matches only one address in the postal database, then no address data is returned. The Country input field is required; if this field is blank, no output will be returned.

Note: By default, GetCandidateAddressesLoqate does not match to individual house numbers. Rather, it uses house number ranges for each street. After GetCandidateAddressesLoqate has determined the street name, city name, state/province name, and postal code, it checks to make sure the input house number falls within one of the ranges of house numbers given for the matched street name. The same type of logic applies to unit numbers.

GetCandidateAddressesLoqate is part of Spectrum Universal Address.

Resource URL

JSON endpoint:

http://server:port/rest/GetCandidateAddressesLoqate/results.json

XML endpoint:

http://server:port/rest/GetCandidateAddressesLoqate/results.xml

Example with JSON Response

The following example requests a JSON response:

http://myserver:8080/rest/GetCandidateAddressesLoqate/results.json?​Data.AddressLine1=PO+Box+1&Data.City=New+York&​Data.StateProvince=NY

The JSON returned by this request would be:

Note: Empty response elements have been removed from this example. Only the first two candidate address are shown.
{"output_port": [
      {
      "ProcessedBy": "LOQATE",
      "AddressLine1": "PO Box 101",
      "City": "New York Mls",
      "StateProvince": "NY",
      "PostalCode": "13417-0101",
      "Country": "USA",
      "PostalCode.AddOn": "0101",
      "user_fields": []
   },
      {
      "ProcessedBy": "LOQATE",
      "AddressLine1": "PO Box 102",
      "City": "New York Mls",
      "StateProvince": "NY",
      "PostalCode": "13417-0102",
      "Country": "USA",
      "PostalCode.AddOn": "0102",
      "user_fields": []
   }
]}

Example with XML Response

The following example requests an XML response:

http://myserver:8080/rest/GetCandidateAddressesLoqate/results.xml?​Data.AddressLine1=PO+Box+1&Data.City=New+York&​Data.StateProvince=NY

The XML returned by this request would be:

Note: Empty response elements have been removed from this example. Only the first two candidate address are shown.
<ns2:xml.GetCandidateAddressesLoqateResponse
xmlns:ns2="http://www.precisely.com/spectrum/services/GetCandidateAddressesLoqate">
   <ns2:output_port>
      <ns2:Address>
         <ns2:ProcessedBy>LOQATE</ns2:ProcessedBy>
         <ns2:AddressLine1>PO Box 101</ns2:AddressLine1>
         <ns2:City>New York Mls</ns2:City>
         <ns2:StateProvince>NY</ns2:StateProvince>
         <ns2:PostalCode>13417-0101</ns2:PostalCode>
         <ns2:PostalCode.AddOn>0101</ns2:PostalCode.AddOn>
         <ns2:Country>USA</ns2:Country>
      </ns2:Address>
      <ns2:Address>
         <ns2:ProcessedBy>LOQATE</ns2:ProcessedBy>
         <ns2:AddressLine1>PO Box 102</ns2:AddressLine1>
         <ns2:City>New York Mls</ns2:City>
         <ns2:StateProvince>NY</ns2:StateProvince>
         <ns2:PostalCode>13417-0102</ns2:PostalCode>
         <ns2:PostalCode.AddOn>0102</ns2:PostalCode.AddOn>
         <ns2:Country>USA</ns2:Country>
      </ns2:Address>
   </ns2:output_port>
</ns2:xml.GetCandidateAddressesLoqateResponse>