Sidebar Menu

VerifyAddressAdvanced

VerifyAddressAdvanced is an advanced version of the VerifyAddress method. It provides additional information or multiple matches if available.

Endpoint

POST (HTTP): https://pav3.cdyne.com/PavService.svc/VerifyAddressAdvanced

POST (HTTPS): https://pav3.cdyne.com/PavService.svc/rest_s/VerifyAddressAdvanced

Syntax

VerifyAddressAdvanced(Request)

Request Parameters

Parameter Name Description Data Type Required Sample Value
Request

Request object.

PavRequest True
LicenseKey

Your license key.

String True F01d89fd-5155-5455-5585-e84ab8de8591

Response

Returns: PavResponse object

Code Samples

// http://pav3.cdyne.com/PavService.svc?wsdl was added as Service Reference and given the name WSDL

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VerifyAddressAdvanced.WSDL;

namespace VerifyAddressAdvanced
{
    class Program
    {
        static void Main(string[] args)
        {
            WSDL.PavServiceClient PSC = new WSDL.PavServiceClient("pavsoap");
            WSDL.PavRequest PR = new WSDL.PavRequest();

            PR.LicenseKey = "YOUR LICENSE KEY";
            PR.FirmOrRecipient = "CDYNE Corporation";
            PR.PrimaryAddressLine = "505 Independence Parkway";
            PR.SecondaryAddressLine = "Suite 300";
            PR.CityName = "Chesapeake";
            PR.State = "VA";
            PR.ZipCode = "23320";
            PR.Urbanization = "";
            PR.ReturnCaseSensitive = true;
            PR.ReturnCensusInfo = true;
            PR.ReturnCityAbbreviation = true;
            PR.ReturnGeoLocation = true;
            PR.ReturnLegislativeInfo = true;
            PR.ReturnMailingIndustryInfo = true;
            PR.ReturnResidentialIndicator = true;
            PR.ReturnStreetAbbreviated = true;

            WSDL.PavResponse PavRes = new WSDL.PavResponse();
            PavRes = PSC.VerifyAddressAdvanced(PR);

            // The return section below will output the return code with the return code text along with the address information.
            if (PavRes.ReturnCode == 100)
            {
                Console.WriteLine(
                    "Return Code: " + PavRes.ReturnCode + " - Input address is DPV-confirmed for all components." + "\n" +
                    PavRes.FirmOrRecipient + "\n" +
                    PavRes.PrimaryDeliveryLine + "\n" +
                    PavRes.CityName + ", " +
                    PavRes.StateAbbreviation + "  " +
                    PavRes.ZipCode + "\n" +
                    PavRes.Country
                );
            }
            else
            {
                Console.WriteLine(
                    "Return Code: " + PavRes.ReturnCode + "\n" +
                    PavRes.FirmOrRecipient + "\n" +
                    PavRes.PrimaryDeliveryLine + "\n" +
                    PavRes.CityName + ", " +
                    PavRes.StateAbbreviation + "  " +
                    PavRes.ZipCode + "\n" +
                    PavRes.Country
                );
            }

            Console.ReadLine();
        }
    }
}

/*
Additional Return Fields:

PavRes.CensusInfo
PavRes.GeoLocationInfo
PavRes.LegislativeInfo
PavRes.MailingIndustryInfo
PavRes.MultipleMatches
PavRes.ResidentialDeliveryIndicator
PavRes.County
PavRes.CountyNum
PavRes.FinanceNumber
PavRes.IntelligentMailBarcodeKey
PavRes.PMBDesignator
PavRes.PMBNumber
PavRes.PostDirectional
PavRes.PostnetBarcode
PavRes.PreDirectional
PavRes.PreferredCityName
PavRes.Primary
PavRes.PrimaryEO
PavRes.PrimaryHigh
PavRes.PrimaryLow
PavRes.ReturnCodeSpecified
PavRes.Secondary
PavRes.SecondaryAbbreviation
PavRes.SecondaryEO
PavRes.SecondaryHigh
PavRes.SecondaryLow
PavRes.StreetName
PavRes.Suffix
PavRes.Urbanization
*/
<cfsavecontent variable="soapBody">
  <cfoutput>
    <?xml version="1.0" encoding="utf-8"?>
    <PavRequest xmlns="pav3.cdyne.com">
    <CityName>Chesapeake</CityName>
    <FirmOrRecipient>CDYNE Corporation</FirmOrRecipient>
    <LicenseKey>YOUR LICENSE KEY</LicenseKey>
    <PrimaryAddressLine>505 Independence Parkway</PrimaryAddressLine>
    <ReturnCaseSensitive>true</ReturnCaseSensitive>
    <ReturnCensusInfo>true</ReturnCensusInfo>
    <ReturnCityAbbreviation>true</ReturnCityAbbreviation>
    <ReturnGeoLocation>true</ReturnGeoLocation>
    <ReturnLegislativeInfo>true</ReturnLegislativeInfo>
    <ReturnMailingIndustryInfo>true</ReturnMailingIndustryInfo>
    <ReturnResidentialIndicator>true</ReturnResidentialIndicator>
    <ReturnStreetAbbreviated>true</ReturnStreetAbbreviated>
    <SecondaryAddressLine>Suite 300</SecondaryAddressLine>
    <State>VA</State>
    <Urbanization></Urbanization>
    <ZipCode>23320</ZipCode>
    </PavRequest>
  </cfoutput>
</cfsavecontent>

<cfhttp
  url="http://pav3.cdyne.com/PavService.svc/VerifyAddressAdvanced"
  method="POST"
  result="httpResponse"
>
  <cfhttpparam
    type="header"
    name="SOAPAction"
    value="http://pav3.cdyne.com/PavService.svc/VerifyAddressAdvanced"
    />
  <cfhttpparam
    type="xml"
    value="#trim( soapBody )#"
    />
</cfhttp>

<cfoutput>
  #xmlParse(httpResponse.fileContent)#
</cfoutput>
' http://pav3.cdyne.com/PavService.svc?wsdl was added as Service Reference and given the name WSDL

Imports VerifyAddressAdvanced.WSDL
Module Module1

    Sub Main()

        Dim PS As New PavServiceClient("pavsoap")
        Dim PR As New PavRequest

        PR.LicenseKey = "YOUR LICENSE KEY"
        PR.FirmOrRecipient = "CDYNE Corporation"
        PR.PrimaryAddressLine = "505 Independence Parkway"
        PR.SecondaryAddressLine = "Suite 300"
        PR.CityName = "Chesapeake"
        PR.State = "VA"
        PR.ZipCode = "23320"
        PR.ReturnCaseSensitive = True
        PR.ReturnCensusInfo = True
        PR.ReturnCityAbbreviation = True
        PR.ReturnGeoLocation = True
        PR.ReturnLegislativeInfo = True
        PR.ReturnMailingIndustryInfo = True
        PR.ReturnResidentialIndicator = True
        PR.ReturnStreetAbbreviated = True

        Dim PavRes As New PavResponse
        PavRes = PS.VerifyAddressAdvanced(PR)

        ' The return section below will output the return code with the return code text along with the address information.
        ' To view a list of all possible return codes: https://wiki.cdyne.com/index.php/PAVv3_Return_Codes

        Console.WriteLine(
            "Return Code: " & PavRes.ReturnCode & vbLf &
            PavRes.FirmOrRecipient & vbLf &
            PavRes.PrimaryDeliveryLine & vbLf &
            PavRes.CityName & ", " &
            PavRes.StateAbbreviation & "  " &
            PavRes.ZipCode & vbLf &
            PavRes.Country)

        Console.ReadLine()

    End Sub

End Module

' Additional Return Fields:

' PavRes.CensusInfo
' PavRes.GeoLocationInfo
' PavRes.LegislativeInfo
' PavRes.MailingIndustryInfo
' PavRes.MultipleMatches
' PavRes.ResidentialDeliveryIndicator
' PavRes.County
' PavRes.CountyNum
' PavRes.FinanceNumber
' PavRes.IntelligentMailBarcodeKey
' PavRes.PMBDesignator
' PavRes.PMBNumber
' PavRes.PostDirectional
' PavRes.PostnetBarcode
' PavRes.PreDirectional
' PavRes.PreferredCityName
' PavRes.Primary
' PavRes.PrimaryEO
' PavRes.PrimaryHigh
' PavRes.PrimaryLow
' PavRes.ReturnCodeSpecified
' PavRes.Secondary
' PavRes.SecondaryAbbreviation
' PavRes.SecondaryEO
' PavRes.SecondaryHigh
' PavRes.SecondaryLow
' PavRes.StreetName
' PavRes.Suffix
' PavRes.Urbanization
<?php
// Call VerifyAddressAdvancedRequestData using SOAP Client.
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

// Request parameters in JSON format
$json = '{
  "CityName":"Chesapeake"
  ,"FirmOrRecipient":""
  ,"LicenseKey":"(Your Key)"
  ,"PrimaryAddressLine":"2125 Smith Ave"
  ,"SecondaryAddressLine":""
  ,"State":"VA"
  ,"Urbanization":""
  ,"ZipCode":"23320"
}';

// Method
$url = 'http://pav3.cdyne.com/PavService.svc/VerifyAddressAdvanced';

$cURL = curl_init();

curl_setopt($cURL, CURLOPT_URL, $url);
curl_setopt($cURL, CURLOPT_POST, true);
curl_setopt($cURL, CURLOPT_POSTFIELDS, $json);
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);

curl_setopt($cURL, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'Accept: application/json'));
// If you want your results in XML format, use the following line for your HTTP headers and comment out the HTTP headers code line above.
// curl_setopt($cURL, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));

$result = curl_exec($cURL);

curl_close($cURL);

print_r($result);
?>
{
  "CityName": "String content",
  "FirmOrRecipient": "String content",
  "LicenseKey": "String content",
  "PrimaryAddressLine": "String content",
  "ReturnCaseSensitive": true,
  "ReturnCensusInfo": true,
  "ReturnCityAbbreviation": true,
  "ReturnGeoLocation": true,
  "ReturnLegislativeInfo": true,
  "ReturnMailingIndustryInfo": true,
  "ReturnResidentialIndicator": true,
  "ReturnStreetAbbreviated": true,
  "SecondaryAddressLine": "String content",
  "State": "String content",
  "Urbanization": "String content",
  "ZipCode": "String content"
}
{
  "CensusInfo": {
    "CMSA": "545",
    "CensusBlockNumber": "1029",
    "CensusTractNumber": "0209.06",
    "FIPS": "51550",
    "MA": "572",
    "MSA": "47260",
    "PMSA": ""
  },
  "CityName": "Chesapeake",
  "Country": "USA",
  "County": "CHESAPEAKE CITY",
  "CountyNum": "550",
  "FinanceNumber": "511750",
  "FirmOrRecipient": "CDYNE CORPORATION",
  "GeoLocationInfo": {
    "AreaCode": "757",
    "AvgLatitude": "36.761033",
    "AvgLongitude": "-76.256341",
    "FromLatitude": "36.716751",
    "FromLongitude": "-76.300819",
    "HasDaylightSavings": "true",
    "TimeZone": "EST",
    "ToLatitude": "36.810799",
    "ToLongitude": "-76.098457"
  },
  "IntelligentMailBarcodeKey": "qYrQyEIHfPxDYUBTTnxyiQ==",
  "LegislativeInfo": {
    "CongressionalDistrictNumber": "03",
    "StateLegislativeLower": "078",
    "StateLegislativeUpper": "005"
  },
  "MailingIndustryInfo": {
    "CSKey": "X26324",
    "CarrierRoute": "C064",
    "CheckDigit": "7",
    "DefaultFlag": "false",
    "DeliveryPoint": "75",
    "DpvConfirmationIndicator": "Y",
    "DpvCrmaIndicator": "N",
    "DpvFootnote1": "AA",
    "DpvFootnote2": "BB",
    "DpvFootnote3": "",
    "DpvNoStatIndicator": "N",
    "DpvVacantIndicator": "N",
    "ELOTAscDesc": "A",
    "ELOTSequenceNumber": "0182",
    "EwsFlag": "false",
    "LACSFlag": "",
    "LACSIndicator": "",
    "LACSReturnCode": "",
    "RecordTypeCode": "H",
    "SuiteLinkReturnCode": ""
  },
  "MultipleMatches": [],
  "PMBDesignator": "",
  "PMBNumber": "",
  "PostDirectional": "",
  "PostnetBarcode": "f233205178757f",
  "PreDirectional": "",
  "PreferredCityName": "Chesapeake",
  "Primary": "505",
  "PrimaryDeliveryLine": "505 Independence Pkwy Ste 300",
  "PrimaryEO": "O",
  "PrimaryHigh": "505",
  "PrimaryLow": "505",
  "ResidentialDeliveryIndicator": "N",
  "ReturnCode": "100",
  "Secondary": "300",
  "SecondaryAbbreviation": "STE",
  "SecondaryDeliveryLine": "",
  "SecondaryEO": "E",
  "SecondaryHigh": "300",
  "SecondaryLow": "300",
  "StateAbbreviation": "VA",
  "StreetName": "INDEPENDENCE",
  "Suffix": "PKWY",
  "Urbanization": "",
  "ZipCode": "23320-5178"
}
<PavRequest xmlns="pav3.cdyne.com">
  <CityName>String content</CityName>
  <FirmOrRecipient>String content</FirmOrRecipient>
  <LicenseKey>String content</LicenseKey>
  <PrimaryAddressLine>String content</PrimaryAddressLine>
  <ReturnCaseSensitive>true</ReturnCaseSensitive>
  <ReturnCensusInfo>true</ReturnCensusInfo>
  <ReturnCityAbbreviation>true</ReturnCityAbbreviation>
  <ReturnGeoLocation>true</ReturnGeoLocation>
  <ReturnLegislativeInfo>true</ReturnLegislativeInfo>
  <ReturnMailingIndustryInfo>true</ReturnMailingIndustryInfo>
  <ReturnResidentialIndicator>true</ReturnResidentialIndicator>
  <ReturnStreetAbbreviated>true</ReturnStreetAbbreviated>
  <SecondaryAddressLine>String content</SecondaryAddressLine>
  <State>String content</State>
  <Urbanization>String content</Urbanization>
  <ZipCode>String content</ZipCode>
</PavRequest>
<PavResponse xmlns="pav3.cdyne.com" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <CensusInfo>
    <CMSA>545</CMSA>
    <CensusBlockNumber>1029</CensusBlockNumber>
    <CensusTractNumber>0209.06</CensusTractNumber>
    <FIPS>51550</FIPS>
    <MA>572</MA>
    <MSA>47260</MSA>
    <PMSA/>
  </CensusInfo>
  <CityName>Chesapeake</CityName>
  <Country>USA</Country>
  <County>CHESAPEAKE CITY</County>
  <CountyNum>550</CountyNum>
  <FinanceNumber>511750</FinanceNumber>
  <FirmOrRecipient>CDYNE CORPORATION</FirmOrRecipient>
  <GeoLocationInfo>
    <AreaCode>757</AreaCode>
    <AvgLatitude>36.761033</AvgLatitude>
    <AvgLongitude>-76.256341</AvgLongitude>
    <FromLatitude>36.716751</FromLatitude>
    <FromLongitude>-76.300819</FromLongitude>
    <HasDaylightSavings>true</HasDaylightSavings>
    <TimeZone>EST </TimeZone>
    <ToLatitude>36.810799</ToLatitude>
    <ToLongitude>-76.098457</ToLongitude>
  </GeoLocationInfo>
  <IntelligentMailBarcodeKey>qYrQyEIHfPxDYUBTTnxyiQ==</IntelligentMailBarcodeKey>
  <LegislativeInfo>
    <CongressionalDistrictNumber>03</CongressionalDistrictNumber>
    <StateLegislativeLower>078</StateLegislativeLower>
    <StateLegislativeUpper>005</StateLegislativeUpper>
  </LegislativeInfo>
  <MailingIndustryInfo>
    <CSKey>X26324</CSKey>
    <CarrierRoute>C064</CarrierRoute>
    <CheckDigit>7</CheckDigit>
    <DefaultFlag>false</DefaultFlag>
    <DeliveryPoint>75</DeliveryPoint>
    <DpvConfirmationIndicator>Y</DpvConfirmationIndicator>
    <DpvCrmaIndicator>N</DpvCrmaIndicator>
    <DpvFootnote1>AA</DpvFootnote1>
    <DpvFootnote2>BB</DpvFootnote2>
    <DpvFootnote3/>
    <DpvNoStatIndicator>N</DpvNoStatIndicator>
    <DpvVacantIndicator>N</DpvVacantIndicator>
    <ELOTAscDesc>A</ELOTAscDesc>
    <ELOTSequenceNumber>0182</ELOTSequenceNumber>
    <EwsFlag>false</EwsFlag>
    <LACSFlag/>
    <LACSIndicator/>
    <LACSReturnCode/>
    <RecordTypeCode>H</RecordTypeCode>
    <SuiteLinkReturnCode/>
  </MailingIndustryInfo>
  <MultipleMatches i:nil="true"/>
  <PMBDesignator/>
  <PMBNumber/>
  <PostDirectional/>
  <PostnetBarcode>f233205178757f</PostnetBarcode>
  <PreDirectional/>
  <PreferredCityName>Chesapeake</PreferredCityName>
  <Primary>505</Primary>
  <PrimaryDeliveryLine>505 Independence Pkwy Ste 300</PrimaryDeliveryLine>
  <PrimaryEO>O</PrimaryEO>
  <PrimaryHigh>505</PrimaryHigh>
  <PrimaryLow>505</PrimaryLow>
  <ResidentialDeliveryIndicator>N</ResidentialDeliveryIndicator>
  <ReturnCode>100</ReturnCode>
  <Secondary>300</Secondary>
  <SecondaryAbbreviation>STE</SecondaryAbbreviation>
  <SecondaryDeliveryLine/>
  <SecondaryEO>E</SecondaryEO>
  <SecondaryHigh>300</SecondaryHigh>
  <SecondaryLow>300</SecondaryLow>
  <StateAbbreviation>VA</StateAbbreviation>
  <StreetName>INDEPENDENCE</StreetName>
  <Suffix>PKWY</Suffix>
  <Urbanization/>
  <ZipCode>23320-5178</ZipCode>
</PavResponse>