Using as a Service Reference(.NET Framework 3.5+)
http://pav3.cdyne.com/PavService.svc?wsdl
<?php
$client = new SoapClient('http://pav3.cdyne.com/PavService.svc?wsdl');
$param = array(
'ZipCode'=> '23320'
,'LicenseKey' => 'YOUR LICENSE KEY'
);
$result = $client->GetCongressionalDistrictByZip($param);
echo "<pre>";
print_r($result);
echo "</pre>";
?>
<?php
$client = new SoapClient('http://pav3.cdyne.com/PavService.svc?wsdl');
$param = array(
'ZipCode'=> '23320'
,'LicenseKey'=> 'YOUR LICENSE KEY'
);
$result = $client->GetCityNamesForZipCode($param);
echo "<pre>";
print_r($result);
echo "</pre>";
?>
<?php
$client = new SoapClient('http://pav3.cdyne.com/PavService.svc?wsdl');
$param = array(
'City'=> 'Chesapeake'
,'State'=> 'VA'
,'LicenseKey' => 'YOUR LICENSE KEY'
);
$result = $client->GetZipCodesForCityAndState($param);
echo "<pre>";
print_r($result);
echo "</pre>";
?>
<?php
$client = new SoapClient('http://pav3.cdyne.com/PavService.svc?wsdl');
$param = array(
'ZipCode'=> '23320'
,'LicenseKey' => 'YOUR LICENSE KEY'
);
$result = $client->GetUrbanizationListForZipCode($param);
echo "<pre>";
print_r($result);
echo "</pre>";
?>
<?php
$client = new SoapClient('http://pav3.cdyne.com/PavService.svc?wsdl');
$param = array(
'FirmOrRecipient' => 'CDYNE'
,'PrimaryAddressLine' => '505 Independence Parkway'
,'SecondaryAddressLine' => 'Suite 300'
,'Urbanization' => ''
,'CityName' => 'Chesapeake'
,'State' => 'VA'
,'ZipCode' => '23320'
,'LicenseKey' => 'YOUR LICENSE KEY'
);
$result = $client->VerifyAddress($param);
echo "<pre>";
print_r($result);
echo "</pre>";
?>
Calling Verify Address Advanced using SOAP Client.
<?php
class VerifyAddressAdvancedRequestData
{
public $Request;
function VerifyAddressAdvancedRequestData($CityName, $FirmOrRecipient, $LicenseKey, $PrimaryAddressLine, $SecondaryAddressLine, $State, $Urbanization, $ZipCode)
{
$this->Request = array();
$this->Request['CityName'] = $CityName;
$this->Request['FirmOrRecipient'] = $FirmOrRecipient;
$this->Request['LicenseKey'] = $LicenseKey;
$this->Request['PrimaryAddressLine'] = $PrimaryAddressLine;
$this->Request['SecondaryAddressLine'] = $SecondaryAddressLine;
$this->Request['State'] = $State;
$this->Request['Urbanization'] = $Urbanization;
$this->Request['ZipCode'] = $ZipCode;
}
}
$client = new SoapClient('http://pav3.cdyne.com/PavService.svc?wsdl');
$request = new VerifyAddressAdvancedRequestData('Chesapeake','CDYNE','YOUR LICENSE KEY','505 Independence Parkway','Suite 300','VA','','23320');
$result = $client->VerifyAddressAdvanced($request);
echo "<pre>";
print_r($result);
echo "</pre>";
?>
<?php
$client = new SoapClient('http://pav3.cdyne.com/PavService.svc?wsdl');
$param = array(
'BarcodeIdentifier'=> '12'
,'ServiceTypeIdentifier'=> '123'
,'MailerIdentifier'=> '123456'
,'SerialNumber'=> '123456789'
,'IntelligentMailBarcodeKey'=> 'dw/cKC9h9Au0zJy+WGvQkQ=='
,'LicenseKey' => 'YOUR LICENSE KEY'
);
$result = $client->GetIntelligentMailBarcode($param);
echo "<pre>";
print_r($result);
echo "</pre>";
?>
<?php
$client = new SoapClient('http://pav3.cdyne.com/PavService.svc?wsdl');
$param = array(
'Fips'=> '51550'
,'LicenseKey' => 'YOUR LICENSE KEY'
);
$result = $client->GetZipCodesForFips($param);
echo "<pre>";
print_r($result);
echo "</pre>";
?>
<?php
$client = new SoapClient('http://pav3.cdyne.com/PavService.svc?wsdl');
$param = array(
'Latitude'=> '36.761560'
,'Longitude'=> '-76.259964'
,'Radius'=>'5'
,'LicenseKey' => 'YOUR LICENSE KEY'
);
$result = $client->GetZipCodesWithinDistance($param);
echo "<pre>";
print_r($result);
echo "</pre>";
?>
Back to
Postal_Address_Verification_V3