„Get Candidate Addresses“ gibt eine Liste der Adressen zurück, die bei einer angegebenen Eingabeadresse als Übereinstimmungen gelten. „Get Candidate Addresses“ gibt Kandidatenadressen nur dann zurück, wenn die Eingabeadresse mit mehreren Adressen in der Postdatenbank übereinstimmt. Wenn die Eingabeadresse nur mit einer Adresse in der Postdatenbank übereinstimmt, werden keine Adressdaten zurückgegeben.
Bei Adressen außerhalb der USA und Kanada treten bei den Mehrfachübereinstimmungen, die von Validate Address zurückgegeben werden, und den Ergebnissen, die für dieselbe Adresse von Get Candidate Addresses zurückgegeben werden, möglicherweise inkonsistente Ergebnisse auf. Die Ursache für die inkonsistenten Ergebnisse ist wahrscheinlich, dass Sie die Einstellung für die Leistungsoptimierung in „Validate Address“ auf einen anderen Wert als 100 festgelegt haben. Legen Sie die Option für die Leistungsoptimierung auf 100 fest, um konsistente Ergebnisse bei „Get Candidate Addresses“ und „Validate Address“ zu erzielen.
Der kanadische Coder umfasst eine „Reverse Lookup“-Routine, die eine bestimmte Postleitzahl als Eingabe verwendet und die für diese Postleitzahl in der Datenbank gespeicherten Straßeninformationen zurückgibt. Geben Sie für die Verwendung dieser Funktion lediglich eine kanadische Postleitzahl in das Feld „PostalCode“ ein. Im zweiten Beispiel wird dargestellt, wie die Rückgabe über eine beispielhafte Postleitzahl erfolgt.
Get Candidate Addresses ist Teil von Spectrum Universal Address.
Beispiel für US-Adressen
AddressLine1:
PO Box 1 City: NY State: NY
Vorschauausgabe:
Feldname | Ausgabedatensatz 1 | Ausgabedatensatz 2 |
---|---|---|
Adresszeile 1 | PO Box 1 | PO Box 1 |
City | New York | New York |
Land | USA | USA |
HouseNumberHigh | 60 | 9 |
HouseNumberLow | 1 | 1 |
HouseNumberParity | B | B |
MatchLevel | A | A |
PostalCode | 10002 | 10008 |
PostalCode.AddOn | 0001 | 0001 |
ProcessedBy | USA | USA |
RecordType | PostOfficeBox | PostOfficeBox |
RecordType.Default | ||
StateProvince | NY | NY |
UnitNumberParity |
Kanadische Adressen: Beispiel
PostalCode:
A1A1A1
Vorschauausgabe:
Feldname | Ausgabedatensatz 1 | Ausgabedatensatz 2 |
---|---|---|
Adresszeile 1 | LOWER BATTERY RD | LOWER BATTERY RD |
City | ST. JOHN'S | ST. JOHN'S |
Land | CAN | CAN |
HouseNumberHigh | 000003 | 000004 A |
HouseNumberLow | 000001 | 000002 |
HouseNumberParity | O | E |
MatchLevel | A | A |
PostalCode | A1A1A1 | A1A1A1 |
ProcessedBy | CAN | CAN |
RecordType | Normal | Normal |
StateProvince | NL | NL |
Ressourcen-URL
JSON-Endpunkt:
http://server:port/rest/GetCandidateAddresses/results.json
https://OnDemandServer/rest/GetCandidateAddresses/results.json
XML-Endpunkt:
http://server:port/rest/GetCandidateAddresses/results.xml
https://OnDemandServer/rest/GetCandidateAddresses/results.xml
http://server:port/soap/GetCandidateAddresses
https://OnDemandServer/soap/GetCandidateAddresses
Eine Liste der Spectrum Technology Platform-Server finden Sie unter Herstellen einer Verbindung zu -Servern.
Beispiel mit JSON-Antwort
Im folgenden Beispiel wird eine JSON-Antwort angefordert:
http://myserver:8080/rest/GetCandidateAddresses/results.json?Data.AddressLine1=P.O.+Box+1&Data.City=New+York&Data.StateProvince=NY
https://spectrum.precisely.com/rest/GetCandidateAddresses/results.json?Data.AddressLine1=P.O.+Box+1&Data.City=New+York&Data.StateProvince=NY
Die von dieser Anforderung zurückgegebene JSON-Antwort würde wie folgt lauten:
{"output_port": [ { "ProcessedBy": "USA", "RecordType": "PostOfficeBox", "MatchLevel": "A", "AddressLine1": "PO Box 1", "HouseNumberLow": "1", "HouseNumberHigh": "60", "HouseNumberParity": "B", "UnitNumberLow": "", "UnitNumberHigh": "", "UnitNumberParity": " ", "FirmName": "", "City": "New York", "USUrbanName": "", "StateProvince": "NY", "PostalCode": "10002", "Country": "USA", "PostalCode.AddOn": "0001", "user_fields": [] }, { "ProcessedBy": "USA", "RecordType": "PostOfficeBox", "MatchLevel": "A", "AddressLine1": "PO Box 1", "HouseNumberLow": "1", "HouseNumberHigh": "9", "HouseNumberParity": "B", "UnitNumberLow": "", "UnitNumberHigh": "", "UnitNumberParity": " ", "FirmName": "", "City": "New York", "USUrbanName": "", "StateProvince": "NY", "PostalCode": "10008", "Country": "USA", "PostalCode.AddOn": "0001", "user_fields": [] }, { "ProcessedBy": "USA", "RecordType": "PostOfficeBox", "MatchLevel": "A", "AddressLine1": "PO Box 1", "HouseNumberLow": "1", "HouseNumberHigh": "60", "HouseNumberParity": "B", "UnitNumberLow": "", "UnitNumberHigh": "", "UnitNumberParity": " ", "FirmName": "", "City": "New York", "USUrbanName": "", "StateProvince": "NY", "PostalCode": "10009", "Country": "USA", "PostalCode.AddOn": "0001", "user_fields": [] } ]}
Beispiel mit XML-Antwort
Im folgenden Beispiel wird eine XML-Antwort angefordert:
http://myserver:8080/rest/GetCandidateAddresses/results.xml?Data.AddressLine1=P.O.+Box+1&Data.City=New+York&Data.StateProvince=NY
https://spectrum.precisely.com/rest/GetCandidateAddresses/results.xml?Data.AddressLine1=P.O.+Box+1&Data.City=New+York&Data.StateProvince=NY
Die von dieser Anforderung zurückgegebene XML-Antwort würde wie folgt lauten:
<ns2:xml.GetCandidateAddressesResponse xmlns:ns2="http://www.pb.com/spectrum/services/GetCandidateAddresses"> <ns2:output_port> <ns2:Address> <ns2:ProcessedBy>USA</ns2:ProcessedBy> <ns2:RecordType>PostOfficeBox</ns2:RecordType> <ns2:MatchLevel>A</ns2:MatchLevel> <ns2:AddressLine1>PO Box 1</ns2:AddressLine1> <ns2:HouseNumberLow>1</ns2:HouseNumberLow> <ns2:HouseNumberHigh>60</ns2:HouseNumberHigh> <ns2:HouseNumberParity>B</ns2:HouseNumberParity> <ns2:UnitNumberLow/> <ns2:UnitNumberHigh/> <ns2:UnitNumberParity></ns2:UnitNumberParity> <ns2:FirmName/> <ns2:City>New York</ns2:City> <ns2:USUrbanName/> <ns2:StateProvince>NY</ns2:StateProvince> <ns2:PostalCode>10002</ns2:PostalCode> <ns2:PostalCode.AddOn>0001</ns2:PostalCode.AddOn> <ns2:Country>USA</ns2:Country> <ns2:user_fields/> </ns2:Address> <ns2:Address> <ns2:ProcessedBy>USA</ns2:ProcessedBy> <ns2:RecordType>PostOfficeBox</ns2:RecordType> <ns2:MatchLevel>A</ns2:MatchLevel> <ns2:AddressLine1>PO Box 1</ns2:AddressLine1> <ns2:HouseNumberLow>1</ns2:HouseNumberLow> <ns2:HouseNumberHigh>9</ns2:HouseNumberHigh> <ns2:HouseNumberParity>B</ns2:HouseNumberParity> <ns2:UnitNumberLow/> <ns2:UnitNumberHigh/> <ns2:UnitNumberParity></ns2:UnitNumberParity> <ns2:FirmName/> <ns2:City>New York</ns2:City> <ns2:USUrbanName/> <ns2:StateProvince>NY</ns2:StateProvince> <ns2:PostalCode>10008</ns2:PostalCode> <ns2:PostalCode.AddOn>0001</ns2:PostalCode.AddOn> <ns2:Country>USA</ns2:Country> <ns2:user_fields/> </ns2:Address> </ns2:output_port> </ns2:xml.GetCandidateAddressesResponse>
Beispiel
Im Folgenden wird eine SOAP-Anforderung dargestellt:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:get="http://www.pb.com/spectrum/services/GetCandidateAddresses"> <soapenv:Header/> <soapenv:Body> <get:GetCandidateAddressesRequest> <get:input_port> <get:Address> <!--Optional:--> <get:AddressLine1>P.O. Box 1</get:AddressLine1> <!--Optional:--> <get:AddressLine2></get:AddressLine2> <!--Optional:--> <get:AddressLine3></get:AddressLine3> <!--Optional:--> <get:AddressLine4></get:AddressLine4> <!--Optional:--> <get:AddressLine5></get:AddressLine5> <!--Optional:--> <get:City>New York</get:City> <!--Optional:--> <get:StateProvince>NY</get:StateProvince> <!--Optional:--> <get:PostalCode></get:PostalCode> <!--Optional:--> <get:Country></get:Country> <!--Optional:--> <get:FirmName></get:FirmName> <!--Optional:--> <get:USUrbanName></get:USUrbanName> <!--Optional:--> <get:user_fields> <get:user_field> <get:name></get:name> <get:value></get:value> </get:user_field> </get:user_fields> </get:Address> </get:input_port> </get:GetCandidateAddressesRequest> </soapenv:Body> </soapenv:Envelope>
Dies wäre die Antwort:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns3:GetCandidateAddressesResponse xmlns:ns2="www.pb.com/" xmlns:ns3="http://www.pb.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>