GetCandidateAddresses
GetCandidateAddresses returns a list of addresses that are considered matches for a given input address. GetCandidateAddresses 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.
For addresses outside the U.S. and Canada, you may notice inconsistent results between the multiple matches returned by ValidateAddress and the results for that same address returned by GetCandidateAddresses. If you experience inconsistent results, it is likely because you set the performance tuning setting in ValidateAddress to a value other than 100. To obtain consistent results between GetCandidateAddresses and ValidateAddress, set the performance tuning option to 100.
The Canadian coder contains a reverse lookup routine that takes as input a specific postal code and returns the street information stored in the database for that postal code. To use this function enter nothing but a Canadian postal code in the PostalCode field. See the second example to view the return from a sample postal code.
GetCandidateAddresses is part of Spectrum Universal Address.
Resource URL
http://server:port/soap/GetCandidateAddresses
Example
The following shows a SOAP request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:get="http://www.precisely.com/spectrum/services/GetCandidateAddresses" xmlns:spec="http://spectrum.precisely.com/">
<soapenv:Header/>
<soapenv:Body>
<get:GetCandidateAddressesRequest>
<get:input_port>
<get:Address>
<get:AddressLine1>P.O. Box 1</get:AddressLine1>
<get:City>New York</get:City>
<get:StateProvince>NY</get:StateProvince>
</get:Address>
</get:input_port>
</get:GetCandidateAddressesRequest>
</soapenv:Body>
</soapenv:Envelope>
This would be the response:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns3:GetCandidateAddressesResponse xmlns:ns2="http://spectrum.precisely.com/" xmlns:ns3="http://www.precisely.com/spectrum/services/GetCandidateAddresses">
<ns3:output_port>
<ns3:Address>
<ns3:ProcessedBy>USA</ns3:ProcessedBy>
<ns3:RecordType>PostOfficeBox</ns3:RecordType>
<ns3:MatchLevel>A</ns3:MatchLevel>
<ns3:AddressLine1>PO Box 1</ns3:AddressLine1>
<ns3:HouseNumberLow>1</ns3:HouseNumberLow>
<ns3:HouseNumberHigh>60</ns3:HouseNumberHigh>
<ns3:HouseNumberParity>B</ns3:HouseNumberParity>
<ns3:City>New York</ns3:City>
<ns3:StateProvince>NY</ns3:StateProvince>
<ns3:PostalCode>10002</ns3:PostalCode>
<ns3:PostalCode.AddOn>0001</ns3:PostalCode.AddOn>
<ns3:Country>USA</ns3:Country>
</ns3:Address>
<ns3:Address>
<ns3:ProcessedBy>USA</ns3:ProcessedBy>
<ns3:RecordType>PostOfficeBox</ns3:RecordType>
<ns3:MatchLevel>A</ns3:MatchLevel>
<ns3:AddressLine1>PO Box 1</ns3:AddressLine1>
<ns3:HouseNumberLow>1</ns3:HouseNumberLow>
<ns3:HouseNumberHigh>9</ns3:HouseNumberHigh>
<ns3:HouseNumberParity>B</ns3:HouseNumberParity>
<ns3:City>New York</ns3:City>
<ns3:StateProvince>NY</ns3:StateProvince>
<ns3:PostalCode>10008</ns3:PostalCode>
<ns3:PostalCode.AddOn>0001</ns3:PostalCode.AddOn>
<ns3:Country>USA</ns3:Country>
</ns3:Address>
</ns3:output_port>
</ns3:GetCandidateAddressesResponse>
</soap:Body>
</soap:Envelope>