{"id":2342,"date":"2022-11-09T00:41:19","date_gmt":"2022-11-09T00:41:19","guid":{"rendered":"https:\/\/serviceobjects.wpaladdin.com\/?post_type=serviceobjects&#038;p=2342"},"modified":"2024-03-29T13:53:36","modified_gmt":"2024-03-29T20:53:36","slug":"dots-address-validation-plus-us","status":"publish","type":"page","link":"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-plus-us\/","title":{"rendered":"DOTS Address Validation Plus &#8211; US"},"content":{"rendered":"\n<ul class=\"is-style-bullets-list wp-block-list\">\n<li><a href=\"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-plus-us\/#DOTSAddressValidationPlus-US-Introduction\">Introduction<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-plus-us\/#DOTSAddressValidationPlus-US-Integration\">Integration<\/a>\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-plus-us\/#DOTSAddressValidationPlus-US-CodeSnippets\">Code Snippets<\/a><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><a href=\"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-plus-us\/#DOTSAddressValidationPlus-US-ListofOperations\">List of Operations<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-plus-us\/#DOTSAddressValidationPlus-US-OperationDefinitions\">Operation Definitions<\/a>\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-plus-us\/#DOTSAddressValidationPlus-US-GetAddressPlusWithDPV(RecommendedOperation)\">GetAddressPlusWithDPV (Recommended Operation)<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-plus-us\/#DOTSAddressValidationPlus-US-GetAddressPlus\">GetAddressPlus<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-plus-us\/#DOTSAddressValidationPlus-US-GetAddressPlusNoCensus\">GetAddressPlusNoCensus<\/a><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><a href=\"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-plus-us\/#DOTSAddressValidationPlus-US-ErrorCodes\">Error Codes<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-plus-us\/#DOTSAddressValidationPlus-US-FrequentlyAskedQuestions\">Frequently Asked Questions<\/a><\/li>\n<\/ul>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"DOTSAddressValidationPlus-US-Introduction\"><strong>Introduction<\/strong><\/h1>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>DOTS Address Plus US (AV-Plus) is a publicly available XML web service that provides comprehensive address validation, latitude\/longitude and demographic metadata information about a physical US address. The service provides validated and parsed address information, geocoding information, and demographic information, such as the census tract, block or other statistical codes. AV-Plus can provide instant address validation\/geocoding data to websites or enhancement to contact lists. The extensive demographic statistics help you identify and enhance your service to your best customers.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-group is-style-card-note is-layout-constrained wp-block-group-is-layout-constrained\">\n<p><strong>This is a deprecated service. New clients and existing clients that would be interested in switching should look here:<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/test.serviceobjects.com\/docs\/dots-address-insight-us\/\">DOTS Address Insight &#8211; US<\/a><\/p>\n\n\n\n<p>This Developers Guide exists for informational purposes for active clients that use the older service.<\/p>\n<\/div>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"DOTSAddressValidationPlus-US-Integration\"><strong>Integration<\/strong><\/h1>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Integrating AV-Plus into your application should be easy and straightforward. If you are using a common platform, Service Objects may already have sample code built that you can use:<br><a href=\"https:\/\/www.serviceobjects.com\/developers\/sample-code\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.serviceobjects.com\/developers\/sample-code\/<\/a><\/p>\n\n\n\n<p>However, if you are using a common platform that does not already have sample code, you can ask Service Objects to build you an example. Email&nbsp;<a rel=\"noreferrer noopener\" href=\"mailto:support@serviceobjects.com\" target=\"_blank\">support@serviceobjects.com<\/a>&nbsp;for more details.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Web Service Structure:<\/strong><\/h4>\n\n\n\n<p>Web services are methods that integrate with other applications via the web, and encapsulate tricky business logic. Web services are too large of a topic to cover in this document, but Service Objects has developed its web services to be as easy to integrate and as accessible as possible. AV-Plus is a public XML web service that supports SOAP, POST and GET operations.<\/p>\n\n\n\n<p><strong>The host path, or physical location of the web service is here:<\/strong><br><a rel=\"noreferrer noopener\" href=\"https:\/\/trial.serviceobjects.com\/ap\/AddressPlus.asmx\" target=\"_blank\">https:\/\/trial.serviceobjects.com\/ap\/AddressPlus.asmx<\/a><\/p>\n\n\n\n<p><strong>The location of the WSDL, or Web Service Definition Language document, is here<\/strong>&nbsp;(This is also accessible via the &#8220;Service Definition&#8221; link.):<br><a rel=\"noreferrer noopener\" href=\"https:\/\/trial.serviceobjects.com\/ap\/AddressPlus.asmx?WSDL\" target=\"_blank\">https:\/\/trial.serviceobjects.com\/ap\/AddressPlus.asmx?WSDL<\/a><\/p>\n\n\n\n<div class=\"wp-block-group is-style-card-note is-layout-constrained wp-block-group-is-layout-constrained\">\n<p><strong>Important Note!<\/strong><\/p>\n\n\n\n<p>Note that SOAP is done via POST, only with special XML markup in the post-body.<\/p>\n<\/div>\n\n\n\n<p>This XML is the definition of the web service, meaning its inputs, outputs, operations, and the like. Most likely, you will have another tool read this WSDL and make the operations available to you in your application. Whenever your utilities or IDE asks for a WSDL path to AV-Plus, you can provide this one.&nbsp;<br>Every web service has&nbsp;<em>operations<\/em>&nbsp;that it offers to subscribers \u2013 methods that do different work and return different output. Examining the link above, you will notice only one operation available, which is described in detail later on.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"DOTSAddressValidationPlus-US-CodeSnippets\">Code Snippets<\/h2>\n\n\n\n<div class=\"wp-block-create-block-tabs\"><ul class=\"tab-labels\" role=\"tablist\" aria-label=\"tabbed content\"><li class=\"tab-label active\" role=\"tab\" aria-selected=\"true\" aria-controls=\"Code Snippets\" tabindex=\"0\">Code Snippets<\/li><li class=\"tab-label\" role=\"tab\" aria-selected=\"false\" aria-controls=\"Full Sample Code Demonstrating Failover\" tabindex=\"0\">Full Sample Code Demonstrating Failover<\/li><li class=\"tab-label\" role=\"tab\" aria-selected=\"false\" aria-controls=\"URL Formats\/Request and Response\" tabindex=\"0\">URL Formats\/Request and Response<\/li><\/ul><div class=\"tab-content\">\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<div class=\"wp-block-create-block-tabs\"><ul class=\"tab-labels\" role=\"tablist\" aria-label=\"tabbed content\"><li class=\"tab-label active\" role=\"tab\" aria-selected=\"true\" aria-controls=\"SOAP\" tabindex=\"0\">SOAP<\/li><li class=\"tab-label\" role=\"tab\" aria-selected=\"false\" aria-controls=\"REST\" tabindex=\"0\">REST<\/li><\/ul><div class=\"tab-content\">\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<div class=\"wp-block-create-block-tabs side-tab-layout\"><ul class=\"tab-labels\" role=\"tablist\" aria-label=\"tabbed content\"><li class=\"tab-label active\" role=\"tab\" aria-selected=\"true\" aria-controls=\"C#\" tabindex=\"0\">C#<\/li><li class=\"tab-label\" role=\"tab\" aria-selected=\"false\" aria-controls=\"Java\" tabindex=\"0\">Java<\/li><li class=\"tab-label\" role=\"tab\" aria-selected=\"false\" aria-controls=\"PHP\" tabindex=\"0\">PHP<\/li><li class=\"tab-label\" role=\"tab\" aria-selected=\"false\" aria-controls=\"RoR\" tabindex=\"0\">RoR<\/li><li class=\"tab-label\" role=\"tab\" aria-selected=\"false\" aria-controls=\"Python\" tabindex=\"0\">Python<\/li><li class=\"tab-label\" role=\"tab\" aria-selected=\"false\" aria-controls=\"ColdFusion\" tabindex=\"0\">ColdFusion<\/li><li class=\"tab-label\" role=\"tab\" aria-selected=\"false\" aria-controls=\"VB\" tabindex=\"0\">VB<\/li><li class=\"tab-label\" role=\"tab\" aria-selected=\"false\" aria-controls=\"Apex\" tabindex=\"0\">Apex<\/li><li class=\"tab-label\" role=\"tab\" aria-selected=\"false\" aria-controls=\"TSQL \" tabindex=\"0\">TSQL <\/li><li class=\"tab-label\" role=\"tab\" aria-selected=\"false\" aria-controls=\"NodeJS \" tabindex=\"0\">NodeJS <\/li><\/ul><div class=\"tab-content\">\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<p><strong>Address Validation Plus C# Code Snippet<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"csharp\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/Add a service to your application https:\/\/trial.serviceobjects.com\/ap\/AddressPlus.asmx\nAPClient_Primary = new APLibraryClient(\"DOTSAP\");\nresponse = APClient_Primary.GetAddressPlus(Address, Address2, City, State, PostalCode, licenseKey);\n         \nif (response.Error != null)\n{\n    \/\/Process Error\n}\nelse\n{\n    \/\/Process Response     \n}<\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<p><strong>Address Validation Plus Java Code Snippet<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">AddressPlusResponse resp = null;\nAddressPlusInfo result = null;\nError error = null;\n\/\/ Create soap request\nAPLibraryLocator locator = new APLibraryLocator();\n\/\/ use ssl\nlocator.setDOTSDOTSAddressPlusEndpointAddress(\"https:\/\/trial.serviceobjects.com\/rest\/ap\/api.svc\/soap\");\nIAPLibrary ap = locator.getDOTSAddressPlus();\nDOTSAddressPlusStub soap = (DOTSAddressPlusStub)ap;\nsoap.setTimeout(5000);\/\/ set timeout\nresp = soap.getAddressPlus(Address, Address2, City, State, PostalCode, licenseKey);\nresult = resp.getAddressPlusInfo();\nerror = resp.getError();\nif(resp == null || (error != null &amp;&amp; error.getTypeCode() == \"3\"))\n{\n    throw new Exception();\n}\n  \n\/\/Process Results\nif(error == null){\n    \/\/DOTS Address Validation Plus Results \n}\n\/\/Process Errors\nelse{\n    \/\/DOTS Address Validation Plus Error\n}<\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<p><strong>Address Validation Plus PHP Code Snippets<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;?php\n\/\/ Set these values per web service &lt;as needed>\n$wsdlUrl = \"https:\/\/trial.serviceobjects.com\/ap\/AddressPlus.asmx?WSDL\";\n \n$params['Address'] = $Address;\n$params['Address2'] = $Address2;\n$params['City'] = $City;\n$params['State'] = $State;\n$params['PostalCode'] = $PostalCode;\n$params['LicenseKey'] = $LicenseKey;\n \n$soapClient = new SoapClient($wsdlUrl, array( \"trace\" => 1 ));\n$result = $soapClient->GetAddressPlus($params);\nif (!isset($result->GetAddressPlusResult ->Error)) {\n    foreach($result->GetAddressPlusResult ->AddressPlusInfo as $k=>$v) {\n        echo $k . \", \" . $v;\n    }\n} else {\n    foreach($result->GetAddressPlusResult ->Error as $k=>$v) {\n        echo $k . \", \" . $v;\n    }\n}\n?><\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<p><code><strong>Address Validation Plus RoR Code Snippets<\/strong><\/code><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"r\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">class RequestsController &lt; ApplicationController\n    def show\n        @request = Request.find(params[:id])\n        #Formats inputs into a hash to pass to Soap Client\n        #Hash Keys must be named as they are shown here.\n        message =   {\n                    \"Address\" => @request.address,\n                    \"Address2\" => @request.address2,\n                    \"City\" => @request.city,\n                    \"State\" => @request.state,\n                    \"PostalCode\" => @request.postalcode,\n                    \"LicenseKey\" => @request.licensekey,\n                    }\n         \n        #Implemented to make the code more readable when accessing the hash        \n        @avpresponse = :get_address_plus_response\n        @avpresult = :get_address_plus_result\n        @avperror = :error\n \n        #Set Primary and Backup URLs here as needed\n        dotsAVPPrimary = \"https:\/\/trial.serviceobjects.com\/ap\/AddressPlus.asmx?WSDL\"\n        dotsAVPBackup = \"https:\/\/trial.serviceobjects.com\/ap\/AddressPlus.asmx?WSDL\"\n \n        begin\n            #initializes the soap client. The convert request keys global is necessary to receive a response from the service.\n            client = Savon.client(  wsdl: dotsAVPPrimary)\n            #Calls the operation with given inptus and converts response to a hash.\n            response = client.call(:get_address_plus, message: message).to_hash\n \n            #Checks to see what results came back from the service\n            processresults(response)           \n             \n        #If an error occurs set the response to the backupclient call to the operation and converts response to a hash.\n            response = backupclient.call(:get_address_plus, message: message).to_hash\n            processresults(response)\n \n            #If the backup url failed, this will display the error received from the server\n            end\n        end\n    end\n    private\n    def processresults(response)   \n            #Processes Error Response from soap Client     \n            #Processes Valid response from soap client \n    end\nend<\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<p><strong>Address Validation Plus US Python Code Snippet<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">mAddress = Address.get()\nif mAddress is None or mAddress == \"\":\n    mAddress = \" \"\nmAddress2 = Address2.get()\nif mAddress2 is None or mAddress2 == \"\":\n    mAddress2 = \" \"\nmCity = City.get()\nif mCity is None or mCity == \"\":\n    mCity = \" \"\nmState = State.get()\nif mState is None or mState == \"\":\n    mState = \" \"\nmPostalCode = PostalCode.get()\nif mPostalCode is None or mPostalCode == \"\":\n    mPostalCode = \" \"\nmLicenseKey = LicenseKey.get()\nif mLicenseKey is None or mLicenseKey == \"\":\n    mLicenseKey = \" \"\n \n#Set the primary and backup URLs as needed\nprimaryURL = 'https:\/\/trial.serviceobjects.com\/ap\/AddressPlus.asmx?WSDL'\nbackupURL = 'https:\/\/trial.serviceobjects.com\/ap\/AddressPlus.asmx?WSDL'\n \n#This block of code calls the web service and prints the resulting values to the screen\ntry:\n    client = Client(primaryURL)\n    result = client.service.GetAddressPlus(Address=mAddress, Address2=mAddress2, City=mCity, State=mState, PostalCode=mPostalCode, LicenseKey=mLicenseKey)\n    #Handel response and check for errors\n#Tries the backup URL if the primary URL failed\nexcept:\n    try:\n        client = Client(backupURL)\n        result = client.service.GetAddressPlus(Address=mAddress, Address2=mAddress2, City=mCity, State=mState, PostalCode=mPostalCode, LicenseKey=mLicenseKey)\n        #Handel response and check for errors\n \n    #If the backup call failed then this will display an error to the screen\n    except:\n        Label(swin.window, text='Error').pack()\n        print (result)<\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<p><strong>Address Validation Plus US ColdFusion<\/strong> <strong>Code Snippet<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"xml\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;!--Makes Request to web service --->\n&lt;cfscript>\n        try\n        {\n            if (isDefined(\"form.Action\") AND Action neq \"\")\n            {\n                wsresponse = CreateObject(\"webservice\", \"https:\/\/trial.serviceobjects.com\/ap\/AddressPlus.asmx?WSDL\");                            \n                outputs = wsresponse.getAddressPlusWithDPV(\"#Address#\", \"#Address2#\", \"#City#\", \"#State#\", \"#PostalCode#\" ,\"#LicenseKey#\");\n            }\n        }\n    catch(any Exception){\n        try\n            {\n                if (isDefined(\"form.Action\") AND Action neq \"\")\n                {\n                    wsresponse = CreateObject(\"webservice\", \"https:\/\/trial.serviceobjects.com\/ap\/AddressPlus.asmx?WSDL\");                            \n                    outputs = wsresponse.getAddressPlusWithDPV(\"#Address#\", \"#Address2#\", \"#City#\", \"#State#\", \"#PostalCode#\" ,\"#LicenseKey#\");\n                }\n            }\n            catch(any Exception)   \n                {\n                 writeoutput(\"An Error Has Occured. Please Reload and try again #Exception.message#\");              \n                }\n        }\n&lt;\/cfscript><\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<p><strong>Address Validation Plus US VB<\/strong> <strong>Code Snippet<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"visualbasic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Try\n    Dim ws As New AVP.DOTSAddressPlusSoapClient\n    Dim response As AVP.AddressPlus\n    response = ws.GetAddressPlus(Address.Text, Address2.Text, City.Text, State.Text, PostalCode.Text, LicenseKey.Text)\n    If (response.Error Is Nothing) Then\n        ProcessValidResponse(response)\n    Else\n        ProcessErrorResponse(response.Error(0))\n    End If\n \nCatch er As Exception\n    ''Set the Primary and Backup Service References as necessary\n    Try\n        Dim wsbackup As New AVP.DOTSAddressPlusSoapClient\n        Dim response As AVP.AddressPlus\n        response = wsbackup.GetAddressPlus(Address.Text, Address2.Text, City.Text, State.Text, PostalCode.Text, LicenseKey.Text)\n        If (response.Error Is Nothing) Then\n            ProcessValidResponse(response)\n        Else\n            ProcessErrorResponse(response.Error(0))\n        End If\n    Catch ex As Exception\n        resultsLabel.Visible = True\n        resultsLabel.Text = ex.Message\n    End Try\nEnd Try<\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<p><strong>Address Validation Plus US <strong>Apex&nbsp;<\/strong>Code Snippet<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">wwwServiceobjectsCom.AddressPlus result;\ntry{\nwwwServiceobjectsCom.DOTSAddressPlusSoap client = new wwwServiceobjectsCom.DOTSAddressPlusSoap();\nresult = client.GetAddressPlus([Address], [Address2], [City], [State], [PostalCode], [LicenseKey]);\n}\ncatch(Exception ex){\n \/\/If the first request failed try the failover endpoint\nwwwServiceobjectsCom.DOTSAddressPlusSoap backupClient = new wwwServiceobjectsCom.DOTSAddressPlusSoap();\n\/\/The backup environment will be provided to you upon purchasing a production license key\nbackupClient.endpoint_x = 'https:\/\/trial.serviceobjects.com\/AVP\/api.svc\/soap';\nresult = backupClient.GetAddressPlus([Address], [Address2], [City], [State], [PostalCode], [LicenseKey]);\n}<\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<p><strong>Address Validation Plus US <strong>TSQL&nbsp;<\/strong>Code Snippet<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">SET @requestBody ='&lt;s:Envelope xmlns:s=\"http:\/\/schemas.xmlsoap.org\/soap\/envelope\/\">'+\n                   '&lt;s:Body xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\" xmlns:xsd=\"http:\/\/www.w3.org\/2001\/XMLSchema\">'+\n                   '&lt;GetAddressPlus xmlns=\"https:\/\/www.serviceobjects.com\/\">'+\n                   '&lt;Address>' + @address + '&lt;\/Address>'+\n                   '&lt;Address2>' + @address2 + '&lt;\/Address2>'+\n                   '&lt;City>' + @city + '&lt;\/City>'+\n                   '&lt;State>' + @state + '&lt;\/State>'+\n                   '&lt;PostalCode>' + @postalcode + '&lt;\/PostalCode>'+\n                   '&lt;LicenseKey>' + @key + '&lt;\/LicenseKey>'+\n                   '&lt;\/GetAddressPlus>'+\n                   '&lt;\/s:Body>'+\n                   '&lt;\/s:Envelope>'\nSET @requestLength = LEN(@requestBody)\n    --If a production key is purchased, this will execute the failover\nIF @isLiveKey = 1\nBEGIN\n    EXEC sp_OACreate 'MSXML2.ServerXMLHttp', @obj OUT\n    EXEC sp_OAMethod @obj, 'Open', NULL, 'POST', 'https:\/\/trial.serviceobjects.com\/ap\/AddressPlus.asmx', false\n    EXEC sp_OAMethod @obj, 'setRequestHeader', NULL, 'HOST', 'trial.serviceobjects.com'\n    EXEC sp_OAMethod @obj, 'setRequestHeader', NULL, 'Content-Type', 'text\/xml; charset=UTF-8'\n    EXEC sp_OAMethod @obj, 'setRequestHeader', NULL, 'SOAPAction', '\"https:\/\/www.serviceobjects.com\/GetAddressPlus\"'\n    EXEC sp_OAMethod @obj, 'setRequestHeader', NULL, 'Content-Length', @requestLength\n    EXEC sp_OAMethod @obj, 'send', NULL, @requestBody\n    EXEC sp_OAGetProperty @obj, 'Status', @responseCode OUTPUT\n    EXEC sp_OAGetProperty @obj, 'StatusText', @statusText OUTPUT\n    EXEC sp_OAGetProperty @obj, 'responseText', @response OUTPUT\n    SET @XMLOutput = CONVERT(XML, @response, 2)\n     \n    --Checks the Response for a fatal error or if null.\n    --;WITH XMLNAMESPACES(DEFAULT 'https:\/\/www.serviceobjects.com\/', 'http:\/\/schemas.xmlsoap.org\/soap\/envelope\/' as soap, 'http:\/\/www.w3.org\/2001\/XMLSchema-instance' as xsi, 'http:\/\/www.w3.org\/2001\/XMLSchema' as xsd )\n    IF @response IS NULL\n    BEGIN\n        EXEC sp_OACreate 'MSXML2.ServerXMLHttp', @obj OUT\n        EXEC sp_OAMethod @obj, 'Open', NULL, 'POST', 'https:\/\/trial.serviceobjects.com\/ap\/AddressPlus.asmx', false\n        EXEC sp_OAMethod @obj, 'setRequestHeader', NULL, 'HOST', 'trial.serviceobjects.com'\n        EXEC sp_OAMethod @obj, 'setRequestHeader', NULL, 'Content-Type', 'text\/xml; charset=UTF-8'\n        EXEC sp_OAMethod @obj, 'setRequestHeader', NULL, 'SOAPAction', '\"https:\/\/www.serviceobjects.com\/GetAddressPlus\"'\n        EXEC sp_OAMethod @obj, 'setRequestHeader', NULL, 'Content-Length', @requestLength\n        EXEC sp_OAMethod @obj, 'send', NULL, @requestBody\n        EXEC sp_OAGetProperty @obj, 'Status', @responseCode OUTPUT\n        EXEC sp_OAGetProperty @obj, 'StatusText', @statusText OUTPUT\n        EXEC sp_OAGetProperty @obj, 'responseText', @response OUTPUT\n        SET @XMLOutput = CONVERT(XML, @response, 2)\n        SELECT 'BACK UP CALL WAS USED' as OutputMessage\n    END\nEND<\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<p><strong>Address Validation Plus US <strong>NodeJS&nbsp;<\/strong>Code Snippet<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"js\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">var args = {Address: 'Address',\n            Address2: 'Address2',\n            City: 'City',\n            State: 'State',\n            PostalCode: 'PostalCode',\n            LicenseKey: 'Your-License-Key'};\nsoap.createClient(primaryUrl, function(err, client) {\n     \n    client.GetAddressPlusWithDPV(args, function(err, result) {\n        \/\/This is where you will handle the service results. Your business logic will determine\n        \/\/how the validated information is used.\n        \/\/The exact output can be found in our documentation:\n        \/\/https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-plus-us\/\n        if(err != null || result == null)\n        {\n            \/\/There was an error that occurred that wasn't part of the normal service response\n            return;\n        }\n        else{\n            \/\/Check for an error object\n            if(result.GetAddressPlusWithDPVResult.Error != null)\n            {\n                \/\/An error object was returned by the service and you will want to use\n                \/\/the following failover logic.\n                \/\/If it was a Service Objects Fatal exception we recommend trying\n                \/\/a backup server.\n                if(result.GetAddressPlusWithDPVResult.Error.Number == \"4\")\n                {\n                    \/\/The actual backup url will be provided when you purchase a license key\n                    var backupUrl = 'https:\/\/trial.serviceobjects.com\/ap\/AddressPlus.asmx?WSDL';\n                    soap.createClient(backupUrl, function(failoverErr, backupClient) {\n     \n                        backupClient.GetAddressPlusWithDPV(args, function(failoverErr, failoverResult) {\n                            \/\/Handle the failoverErr or failoverResult objects.\n                            return;\n                        });\n                    });\n                }\n                else{\n                    \/\/The Error object isn't of the type \"Service Objects Fatal\" so\n                    \/\/there is no need to use the failover logic. There was some Error of\n                    \/\/type Authorization, User Input, or Domain Specific.\n                    response.writeHead(200, \"OK\", {'Content-Type': 'text\/html'});\n                    response.end(JSON.stringify(result));\n                    return;\n                }\n            }\n            else{\n                \/\/You have a non Error response.\n                \/\/All of the data will reside within result.GetBestMatchesResult\n                \/\/As an easy to see what the service returns I am returning a JSON\n                \/\/serialized version as the response.\n                response.writeHead(200, \"OK\", {'Content-Type': 'text\/html'});\n                response.end(JSON.stringify(result));\n                return;\n            }\n        }\n    });\n});<\/pre>\n<\/div>\n<\/div><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<div class=\"wp-block-create-block-tabs side-tab-layout\"><ul class=\"tab-labels\" role=\"tablist\" aria-label=\"tabbed content\"><li class=\"tab-label active\" role=\"tab\" aria-selected=\"true\" aria-controls=\"C# Rest\" tabindex=\"0\">C# Rest<\/li><li class=\"tab-label\" role=\"tab\" aria-selected=\"false\" aria-controls=\"Java Rest\" tabindex=\"0\">Java Rest<\/li><li class=\"tab-label\" role=\"tab\" aria-selected=\"false\" aria-controls=\"PHP Rest\" tabindex=\"0\">PHP Rest<\/li><li class=\"tab-label\" role=\"tab\" aria-selected=\"false\" aria-controls=\"RoR Rest\" tabindex=\"0\">RoR Rest<\/li><li class=\"tab-label\" role=\"tab\" aria-selected=\"false\" aria-controls=\"Python Rest\" tabindex=\"0\">Python Rest<\/li><li class=\"tab-label\" role=\"tab\" aria-selected=\"false\" aria-controls=\"ColdFusion Rest\" tabindex=\"0\">ColdFusion Rest<\/li><li class=\"tab-label\" role=\"tab\" aria-selected=\"false\" aria-controls=\"VB Rest\" tabindex=\"0\">VB Rest<\/li><li class=\"tab-label\" role=\"tab\" aria-selected=\"false\" aria-controls=\"TSQL Rest\" tabindex=\"0\">TSQL Rest<\/li><li class=\"tab-label\" role=\"tab\" aria-selected=\"false\" aria-controls=\"NodeJS Rest\" tabindex=\"0\">NodeJS Rest<\/li><\/ul><div class=\"tab-content\">\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<p><strong>Address Validation Plus C# Rest Code Snippet<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"csharp\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">AddressPlusResponse result = null;\n            string mainURL = WEB_SERVICE_PRIMARY_URL + address1 + \"\/\" + address2 + \"\/\" + city + \"\/\" + state + \"\/\" + postalCode + \"\/\" + licenseKey + \"?format=json\";\n            string backupURL = WEB_SERVICE_BACKUP_URL + address1 + \"\/\" + address2 + \"\/\" + city + \"\/\" + state + \"\/\" + postalCode + \"\/\" + licenseKey + \"?format=json\";\n            try\n            {\n                result = HttpGet(mainURL);\n                \/\/NULL ERROR || FATAL ERROR RETURNED -- TRY BACKUP\n                if (result == null || (result.Errors != null &amp;&amp; (result.Errors.Where(er => (er.Number == \"3\")).Count()>0)))\n                {\n                    return HttpGet(backupURL);\n                }\n                else\n                {\n                    return result;\n                }\n            }\n            catch (Exception e)\n            {   \/\/ERROR IN MAIN URL - USING BACKUP\n                return HttpGet(backupURL);\n            }\n        }<\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<p><strong>Address Validation Plus Java Code Snippet<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">JSONObject results = RestClient(mainURL);  \ntry {\n    if (ErrorMessages != null || (results.getJSONObject(\"AddressPlus\").has(\"Error\") &amp;&amp; results.getJSONObject(\"AddressPlus\").getJSONObject(\"Error\").get(\"Number\") == \"3\")) {\n        \/\/ BACKUP\n        results = RestClient(backupURL);\n    }\n} catch (JSONException e) {\n    \/\/ TODO Auto-generated catch block\n    e.printStackTrace();\n}\n \nreturn results;<\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<p><strong>Address Validation Plus PHP Rest Code Snippets<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$URL = \"https:\/\/trial.serviceobjects.com\/rest\/AP\/api.svc\/AddressPlusInfo\/DPV\/\".rawurlencode($Address).\"\/\".rawurlencode($Address2).\"\/\".rawurlencode($City).\"\/\".rawurlencode($State).\"\/\".rawurlencode($PostalCode).\"\/\".rawurlencode($LicenseKey).\"?format=json\";\n\/\/ The actual backup url will be provided to you once you purchase a license key\n$backupURL = \"https:\/\/trial.serviceobjects.com\/rest\/AP\/api.svc\/AddressPlusInfo\/DPV\/\".rawurlencode($Address).\"\/\".rawurlencode($Address2).\"\/\".rawurlencode($City).\"\/\".rawurlencode($State).\"\/\".rawurlencode($PostalCode).\"\/\".rawurlencode($LicenseKey).\"?format=json\";\n\/\/ Get cURL resource\n$curl = curl_init();\ncurl_setopt_array($curl, array(CURLOPT_RETURNTRANSFER => 1, CURLOPT_URL => $URL, CURLOPT_USERAGENT => 'Service Objects Address Validation Plus'));\n\/\/Https peer certification validation turned off\ncurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\ncurl_setopt($curl, CURLOPT_CONNECTTIMEOUT_MS, $TIMEOUT); \/\/timeout in milliseconds\n\/\/ Send the request &amp; save response to $resp\n$resp = curl_exec($curl);\n$status = curl_getinfo($curl);\n$decoded = json_decode($resp, TRUE);\nif($resp == FALSE || (isset ($decoded['Error']) != NULL &amp;&amp; $decoded['Error']['TypeCode'] == 3) || (isset($status) &amp;&amp; $status['http_code'] != 200))\n{\n    \/\/ the first service has failed over\n    \/\/ create a new request to the backURL\n    $curl2 = curl_init();\n    curl_setopt_array($curl2, array(CURLOPT_RETURNTRANSFER => 1, CURLOPT_URL => $backupURL, CURLOPT_USERAGENT => 'Service Objects Address Validation Plus'));\n    \/\/Https peer certification validation turned off\n    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n    curl_setopt($curl2, CURLOPT_CONNECTTIMEOUT_MS, $TIMEOUT); \/\/timeout in milliseconds\n    \/\/ Send the request &amp; save response to $resp\n    $resp = curl_exec($curl2);\n    $decoded = json_decode($resp, TRUE);\n    if($resp == false)\n    {\n        echo \"&lt;b> Both rest calls failed &lt;\/b>\";\n        curl_close($curl2);\n        return;\n    }\n}<\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<p><strong>Address Validation Plus <strong>RoR <strong>Rest&nbsp;<\/strong><\/strong>Code Snippets<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"r\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">@request = Request.find(params[:id])\n      #This sets the default timeout for HTTParty get operation. This must be set in order to use the gem\n      default_timeout = 10\n      address = @request.address\n      address2 = @request.address2\n      city = @request.city\n      state = @request.state\n      postalcode = @request.postalcode\n      licensekey = @request.licensekey\n      #Set Primary and Backup URLs as needed. This method encodes and standardizes the URI to pass to the REST service.\n      primaryURL = URI.encode(\"https:\/\/trial.serviceobjects.com\/ap\/AddressPlus.asmx\/GetAddressPlus?Address=\" + address + \"&amp;Address2=\" + address2 + \"&amp;City=\" + city + \"&amp;State=\" + state + \"&amp;PostalCode=\" + postalcode + \"&amp;LicenseKey=\" + licensekey)\n      backupURL = URI.encode(\"https:\/\/trial.serviceobjects.com\/ap\/AddressPlus.asmx\/GetAddressPlus?Address=\" + address + \"&amp;Address2=\" + address2 + \"&amp;City=\" + city + \"&amp;State=\" + state + \"&amp;PostalCode=\" + postalcode + \"&amp;LicenseKey=\" + licensekey)\n       \n      #These are set to access the hash that is returned\n      @avpresult =\"AddressPlus\"\n      @avperror = \"Error\"\n       \n        #Begins the call the RESTful web service\n      begin\n        response = HTTParty.get(primaryURL, timeout: default_timeout)\n        #processes the response to display to the screen\n         \n        #Passes the response returned from HTTParty and processes them depending on the results\n        processresults(response)\n         \n       rescue StandardError => e\n            begin\n            #uses the backupURl in the event that the service encountered an error\n            response = HTTParty.get(backupURL, timeout: default_timeout)\n           \n          #processes the response returned from using the backupURL\n            processresults(response)\n          #If the backup url railed this will raise an error and display the\n          #error message returned from the HTTParty gem.\n            rescue StandardError => error\n                @status = error.message\n                @displaydata = {\"Error\" => \"A Big Error Occured\"}\n            end\n      end<\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<p><strong>Address Validation Plus <strong>Python&nbsp;<\/strong>Rest Code Snippets<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">primaryURL = 'https:\/\/trial.serviceobjects.com\/ap\/AddressPlus.asmx\/GetAddressPlus?'\nbackupURL = 'https:\/\/trial.serviceobjects.com\/ap\/AddressPlus.asmx\/GetAddressPlus?'\n#The Requests package allows the user to format the path parameters like so instead of having to manually insert them into the URL\ninputs = {'Address': mAddress, 'Address2': mAddress2, 'City': mCity, 'State': mState, 'PostalCode': mPostalCode, 'LicenseKey': mLicenseKey}\ntry:\n    result = requests.get(primaryURL, params=inputs)\n    #Parses the XML response from the service into a python dictionary type\n    outputs = xmltodict.parse(result.content)\n    #checks the output for Errors and displays the info accordingly\n    if 'Error' in outputs['AddressPlus']:\n        #loops through the response from the service and prints the values to the screen.\n        for key, value in outputs['AddressPlus']['Error'].iteritems():\n            Label(swin.window, text=str(key) + \" : \" + str(value)).pack()\n    else:\n        #Removes unnecessary entries that were parsed into the python dictionary from XML response of service\n        outputs['AddressPlus'].pop(\"@xmlns:xsi\", None)\n        outputs['AddressPlus'].pop(\"@xmlns:xsd\", None)\n        outputs['AddressPlus'].pop(\"@xmlns\", None)\n        for key, value in outputs['AddressPlus'].iteritems():\n            Label(swin.window, text=str(key) + \" : \" + str(value)).pack()\n#Attempts to use the backupURL if the call to the primary URL failed\nexcept:\n    try:\n        result = requests.get(backupURL, params=inputs)\n        #Parses the XML response from the service into a python dictionary type\n        outputs = xmltodict.parse(result.content)\n        #checks the output for Errors and displays the info accordingly\n        if 'Error' in outputs['AddressPlus']:\n            #loops through the response from the service and prints the values to the screen.\n            for key, value in outputs['AddressPlus']['Error'].iteritems():\n                Label(swin.window, text=str(key) + \" : \" + str(value)).pack()\n        else:\n            #Removes unnecessary entries that were parsed into the python dictionary from XML response of service\n            outputs['AddressPlus'].pop(\"@xmlns:xsi\", None)\n            outputs['AddressPlus'].pop(\"@xmlns:xsd\", None)\n            outputs['AddressPlus'].pop(\"@xmlns\", None)\n            for key, value in outputs['AddressPlus'].iteritems():\n                Label(swin.window, text=str(key) + \" : \" + str(value)).pack()<\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<p><strong>Address Validation Plus <strong>ColdFusion&nbsp;<\/strong>Rest Code Snippets<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"xml\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;cfIf isDefined(\"form.Action\") AND Action neq \"\" >\n    &lt;cftry>\n        &lt;cfset primaryURL = \"https:\/\/trial.serviceobjects.com\/ap\/AddressPlus.asmx\/GetAddressPlus?Address=#Address#&amp;Address2=#Address2#&amp;City=#City#&amp;State=#State#&amp;PostalCode=##&amp;LicenseKey=#LicenseKey#\">\n        &lt;cfhttp url=\"#primaryURL#\"\n        method=\"get\"\n        result=\"response\">\n        &lt;cfset outputs = XmlParse(response.FileContent)>\n        &lt;cfcatch>\n            &lt;cftry>\n                &lt;cfset backupURL = \"https:\/\/trial.serviceobjects.com\/ap\/AddressPlus.asmx\/GetAddressPlus?Address=#Address#&amp;Address2=#Address2#&amp;City=#City#&amp;State=#State#&amp;PostalCode=##&amp;LicenseKey=#LicenseKey#\">\n                &lt;cfhttp url=\"#backupURL#\"\n                method=\"get\"\n                result=\"response\">\n                &lt;cfset outputs = XmlParse(response.FileContent)>             \n                &lt;cfcatch >\n                    &lt;cfoutput >\n                        The Following Error Occured: #response.StatusCode#\n                    &lt;\/cfoutput>\n                &lt;\/cfcatch>\n            &lt;\/cftry>\n        &lt;\/cfcatch>\n    &lt;\/cftry>\n&lt;\/cfif><\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<p><strong>Address Validation Plus <strong>VB&nbsp;<\/strong>Rest Code Snippets<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"visualbasic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">'encodes the URLs for the get Call. Set the primary and back urls as necessary\nDim primaryurl As String = \"https:\/\/trial.serviceobjects.com\/ap\/AddressPlus.asmx\/GetAddressPlus?Address=\" + address + \"&amp;Address2=\" + address2 + \"&amp;City=\" + city + \"&amp;State=\" + state + \"&amp;PostalCode=\" + postalcode + \"&amp;LicenseKey=\" + licensekey\nDim backupurl As String = \"https:\/\/trial.serviceobjects.com\/ap\/AddressPlus.asmx\/GetAddressPlus?Address=\" + address + \"&amp;Address2=\" + address2 + \"&amp;City=\" + city + \"&amp;State=\" + state + \"&amp;PostalCode=\" + postalcode + \"&amp;LicenseKey=\" + licensekey\nDim wsresponse As AVPResponse.AddressPlus = httpGet(primaryurl)\n \n'checks if a response was returned from the service, uses the backup url if response is null or a fatal error occured.\nIf wsresponse Is Nothing OrElse (wsresponse.[Error] IsNot Nothing AndAlso wsresponse.[Error].Number = \"3\") Then\n    wsresponse = httpGet(backupurl)\nEnd If\nIf wsresponse.[Error] IsNot Nothing Then\n    ProcessErrorResponse(wsresponse.[Error])\nElse\n    ProcessSuccessfulResponse(wsresponse)\nEnd If<\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<p><strong>Address Validation Plus <strong>TSQL&nbsp;<\/strong>Rest Code Snippets<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">BEGIN\n    SET @sUrl = 'https:\/\/trial.serviceobjects.com\/ap\/AddressPlus.asmx\/GetAddressPlus?Address=' + @address + '&amp;Address2=' + @address2 + '&amp;City=' + @city + '&amp;State=' + @state + '&amp;PostalCode=' + @postalcode + '&amp;LicenseKey=' + @key\n    EXEC sp_OACreate 'MSXML2.ServerXMLHttp', @obj OUT\n    EXEC sp_OAMethod @obj, 'Open', NULL, 'Get', @sUrl, false\n    EXEC sp_OAMethod @obj, 'send'\n    EXEC sp_OAGetProperty @obj, 'responseText', @response OUT\n             \n    --Checks the Response for a fatal error or if null.\n    IF @response IS NULL\n    BEGIN\n        SET @sBackupUrl = 'https:\/\/trial.serviceobjects.com\/ap\/AddressPlus.asmx\/GetAddressPlus?Address=' + @address + '&amp;Address2=' + @address2 + '&amp;City=' + @city + '&amp;State=' + @state + '&amp;PostalCode=' + @postalcode + '&amp;LicenseKey=' + @key\n        EXEC sp_OACreate 'MSXML2.ServerXMLHttp', @obj OUT\n        EXEC sp_OAMethod @obj, 'Open', NULL, 'Get', @sBackupUrl, false\n        EXEC sp_OAMethod @obj, 'send'\n        EXEC sp_OAGetProperty @obj, 'responseText', @response OUT\n    END\nEND<\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<p><strong>Address Validation Plus <strong>NodeJS&nbsp;<\/strong>Rest Code Snippets<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"c\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">var Address = 'Address';\nvar Address2 ='Address2';\nvar City ='City';\nvar State ='State';\nvar PostalCode ='PostalCode';\nvar LicenseKey ='LicenseKey';\n\/\/Set backup and primary URL as necessary\nvar primaryUrl = 'https:\/\/trial.serviceobjects.com\/ap\/AddressPlus.asmx\/GetAddressPlusWithDPV?Address='+Address+'&amp;Address2='+ Address2 + '&amp;City=' + City +'&amp;State=' + State +'&amp;PostalCode=' + PostalCode +'&amp;LicenseKey=' + LicenseKey;\nvar backupUrl = 'https:\/\/trial.serviceobjects.com\/ap\/AddressPlus.asmx\/GetAddressPlusWithDPV?Address='+Address+'&amp;Address2='+ Address2 + '&amp;City=' + City +'&amp;State=' + State +'&amp;PostalCode=' + PostalCode +'&amp;LicenseKey=' + LicenseKey;\n \nvar req = http.get(primaryUrl, function(res) {\n    res.setEncoding('utf8');\n    res.on('data', function (results) {\n        var parser = require('xml2js').Parser({explicitArray: false,ignoreAttrs: true});\n        parser.parseString(results, function (err, outputs) {\n            if (outputs.AddressPlus.Error !=  null)\n            {\n                \/\/Indicates a Fatal error has occured. If this happens, the logic will then failover to the backup url\n                if (outputs.AddressPlus.Error.Number == \"4\")\n                {\n                    var backupReq = http.get(backupUrl, function(backupRes) {\n                        backupRes.setEncoding('utf8');\n                        backupRes.on('data', function (results) {\n                                var parser = require('xml2js').Parser({explicitArray: false,ignoreAttrs: true});\n                                parser.parseString(results, function (err, outputs) {\n                                    console.log(\"Backup Call Was Used.\");\n                                    response.end(JSON.stringify(outputs , null, 3));\n                                });\n                            });\n                        });\n                }\n                else\n                {\n                    \/\/Will Display the JSON Formatted Error Response here\n                    response.end(JSON.stringify(outputs, null, 3));\n                    return;\n                }\n            }\n            else\n            {\n                \/\/Will Display the JSON Formatted Valid Response here\n                response.end(JSON.stringify(outputs, null, 3));\n                return;\n            }\n        });\n    });\n});<\/pre>\n<\/div>\n<\/div><\/div>\n<\/div>\n<\/div><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<p>You can find and download full sample code to our services in various languages (PHP, JAVA and C#) by clicking&nbsp;<strong><a rel=\"noreferrer noopener\" href=\"https:\/\/www.serviceobjects.com\/developers\/sample-code\/\" target=\"_blank\">here<\/a><\/strong>. Below is a C# version.<\/p>\n\n\n\n<p>If you are looking for a particular integration not listed in our documentation please contact us at&nbsp;<a rel=\"noreferrer noopener\" href=\"mailto:support@serviceobjects.com.\" target=\"_blank\">support@serviceobjects.com<\/a>.<\/p>\n\n\n\n<p>C#<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"csharp\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Web;\nusing System.Web.UI;\nusing System.Web.UI.WebControls;\nusing System.Configuration;\nusing System.Net;\nusing DOTSAddressPlus.ServiceReference1;\nusing System.Runtime.Serialization.Json;\nusing System.Data;\nnamespace DOTSAddressPlus\n{\n    public partial class AP_rest : System.Web.UI.Page\n    {\n        #region STATICS\n        static string WEB_SERVICE_PRIMARY_URL; \/\/Included in email from Service Objects\n        static string WEB_SERVICE_BACKUP_URL; \/\/Included in email from Service Objects (LIVE customers only)\n        static int WEB_SERVICE_REQUEST_TIMEOUT; \/\/In milliseconds\n        #endregion\n        protected void Page_Load(object sender, EventArgs e)\n        {\n            try\n            {\n                ErrorLabel.Visible = false;\n                ErrorGrid.Visible = false;\n                ResultGrid.Visible = false;\n                WEB_SERVICE_REQUEST_TIMEOUT = Convert.ToInt32(ConfigurationManager.AppSettings[\"WebServiceRequestTimeout\"]);\n                WEB_SERVICE_PRIMARY_URL = ConfigurationManager.AppSettings[\"AP_PRIMARY.AP\"];\n                if (string.IsNullOrWhiteSpace(WEB_SERVICE_PRIMARY_URL))\n                    throw new System.Exception(\"Primary URL not set. Check your Web.config file.\");\n                WEB_SERVICE_BACKUP_URL = ConfigurationManager.AppSettings[\"AP_BACKUP.AP\"];\n                if (string.IsNullOrWhiteSpace(WEB_SERVICE_BACKUP_URL))\n                    throw new System.Exception(\"Backup URL not set. Check your Web.config file.\");\n            }\n            catch (Exception ex)\n            {\n                ErrorLabel.Visible = true;\n                ErrorLabel.Text = \"Page load Error: \" + ex.Message;\n            }\n        }\n        protected void btn_GO_Click(object sender, EventArgs e)\n        {\n            string address1, address2, city, state, postalCode, licenseKey;\n            address1 = inputAddress1.Text;\n            address2 = inputAddress2.Text;\n            city = inputCity.Text;\n            state = inputState.Text;\n            postalCode = inputPostalCode.Text;\n            licenseKey = inputLicenseKey.Text;\n            try\n            {\n                \/\/NOTE: A missing parameter is not allowed\n                if (String.IsNullOrWhiteSpace(address1))\n                    address1 = \" \";\n                if (String.IsNullOrWhiteSpace(address2))\n                    address2 = \" \";\n                if (String.IsNullOrWhiteSpace(city))\n                    city = \" \";\n                if (String.IsNullOrWhiteSpace(state))\n                    state = \" \";\n                if (String.IsNullOrWhiteSpace(postalCode))\n                    postalCode = \" \";\n                if (String.IsNullOrWhiteSpace(licenseKey))\n                    licenseKey = \"yourDevKey\";\n                AddressPlusResponse response = MakeRequest(address1, address2, city, state, postalCode, licenseKey);\n                ProcessResponse(response);\n            }\n            catch (Exception ex)\n            {\n                ErrorLabel.Text = ex.Message;\n                ErrorLabel.Visible = true;\n            }\n        }\n        \/\/Creates URL and requests response from service\n        private static AddressPlusResponse MakeRequest(string address1, string address2, string city, string state, string postalCode, string licenseKey)\n        {\n            \/*\n            * Due to RFC compliance, the use of URL Paths has character limitations. \n            * Certain characters are invalid and cause HTTP Errors; these characters \n            * include #, \/, ?, as well as some high bit characters. \n            *\n            * If you suspect that this may be an issue for you then it is recommended to change your\n            * request from the URL path parameter format to the query string parameter format. \n            * Example: \n            *     FROM {data}\/{data2}\/{key}?format=json \n            *     TO parameter1={data1}&amp;parameter2={data2}&amp;licensekey={key}\n            * Another alternative is to use HTTP Post instead of HTTP Get.\n            *\/\n            AddressPlusResponse result = null;\n            string mainURL = WEB_SERVICE_PRIMARY_URL + address1 + \"\/\" + address2 + \"\/\" + city + \"\/\" + state + \"\/\" + postalCode + \"\/\" + licenseKey + \"?format=json\";\n            string backupURL = WEB_SERVICE_BACKUP_URL + address1 + \"\/\" + address2 + \"\/\" + city + \"\/\" + state + \"\/\" + postalCode + \"\/\" + licenseKey + \"?format=json\";\n            try\n            {\n                result = HttpGet(mainURL);\n                \/\/NULL ERROR || FATAL ERROR RETURNED -- TRY BACKUP\n                if (result == null || (result.Errors != null &amp;&amp; (result.Errors.Where(er => (er.Number == \"3\")).Count()>0)))\n                {\n                    return HttpGet(backupURL);\n                }\n                else\n                {\n                    return result;\n                }\n            }\n            catch (Exception e)\n            {   \/\/ERROR IN MAIN URL - USING BACKUP\n                return HttpGet(backupURL);\n            }\n        }\n        \/\/HTTP Get Method and parse into user-defined object\n        private static AddressPlusResponse HttpGet(string requestUrl)\n        {\n            try\n            {\n                \/\/NOTE: URL encoding occurs automatically when creating the web request\n                HttpWebRequest request = WebRequest.Create(requestUrl) as HttpWebRequest;\n                request.Timeout = WEB_SERVICE_REQUEST_TIMEOUT;\/\/timeout for get operation\n                using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)\n                {\n                    if (response.StatusCode != HttpStatusCode.OK)\n                        throw new Exception(String.Format(\n                        \"Server error (HTTP {0}: {1}).\",\n                        response.StatusCode,\n                        response.StatusDescription));\n                    \/\/parse response\n                    DataContractJsonSerializer jsonSerializer = new DataContractJsonSerializer(typeof(AddressPlusResponse));\n                    object objResponse = jsonSerializer.ReadObject(response.GetResponseStream());\n                    AddressPlusResponse jsonResponse = objResponse as AddressPlusResponse;\n                    return jsonResponse;\n                }\n            }\n            catch (Exception e)\n            {\n                throw e;\n            }\n        }\n        \/\/Process the returned user-defined object\n        private void ProcessResponse(AddressPlusResponse response)\n        {\n            try\n            {\n                \/\/processing result\n                if (response.Errors == null)\n                {\n                    ProcessResult(response);\n                }\n                \/\/processing error\n                else\n                {\n                    ProcessError(response.Errors);\n                }\n            }\n            catch (Exception e)\n            {\n                throw e;\n            }\n        }\n        \/\/Process and display the result values\n        private void ProcessResult(AddressPlusResponse result)\n        {\n            try\n            {\n                DataTable dtProvider = new DataTable();\n                dtProvider.Columns.Add(new DataColumn(\"Output\", typeof(string)));\n                dtProvider.Columns.Add(new DataColumn(\"Values\", typeof(string)));\n                dtProvider.Rows.Add(\"Address\", result.AddressPlusInfo.Address);\n                dtProvider.Rows.Add(\"City\", result.AddressPlusInfo.City);\n                dtProvider.Rows.Add(\"State\", result.AddressPlusInfo.State);\n                dtProvider.Rows.Add(\"Zip\", result.AddressPlusInfo.Zip);\n                dtProvider.Rows.Add(\"Address2\", result.AddressPlusInfo.Address2);\n                dtProvider.Rows.Add(\"BarcodeDigits\", result.AddressPlusInfo.BarcodeDigits);\n                dtProvider.Rows.Add(\"CarrierRoute\", result.AddressPlusInfo.CarrierRoute);\n                dtProvider.Rows.Add(\"CongressCode\", result.AddressPlusInfo.CongressCode);\n                dtProvider.Rows.Add(\"CountyCode\", result.AddressPlusInfo.CountyCode);\n                dtProvider.Rows.Add(\"CountyName\", result.AddressPlusInfo.CountyName);\n                dtProvider.Rows.Add(\"Fragment\", result.AddressPlusInfo.Fragment);\n                dtProvider.Rows.Add(\"FragmentHouse\", result.AddressPlusInfo.FragmentHouse);\n                dtProvider.Rows.Add(\"FragmentPMBNumber\", result.AddressPlusInfo.FragmentPMBNumber);\n                dtProvider.Rows.Add(\"FragmentPMBPrefix\", result.AddressPlusInfo.FragmentPMBPrefix);\n                dtProvider.Rows.Add(\"FragmentPostDir\", result.AddressPlusInfo.FragmentPostDir);\n                dtProvider.Rows.Add(\"FragmentPreDir\", result.AddressPlusInfo.FragmentPreDir);\n                dtProvider.Rows.Add(\"FragmentStreet\", result.AddressPlusInfo.FragmentStreet);\n                dtProvider.Rows.Add(\"FragmentSuffix\", result.AddressPlusInfo.FragmentSuffix);\n                dtProvider.Rows.Add(\"FragmentUnit\", result.AddressPlusInfo.FragmentUnit);\n                dtProvider.Rows.Add(\"DPV\", result.AddressPlusInfo.DPV);\n                dtProvider.Rows.Add(\"DPVDesc\", result.AddressPlusInfo.DPVDesc);\n                dtProvider.Rows.Add(\"DPVNotes\", result.AddressPlusInfo.DPVNotes);\n                dtProvider.Rows.Add(\"DPVNotesDesc\", result.AddressPlusInfo.DPCNotesDesc);\n                dtProvider.Rows.Add(\"Corrections\", result.AddressPlusInfo.Corrections);\n                dtProvider.Rows.Add(\"CorrectionDesc\", result.AddressPlusInfo.CorrectionDesc);\n                dtProvider.Rows.Add(\"Latitude\", result.AddressPlusInfo.Latitude);\n                dtProvider.Rows.Add(\"Longitude\", result.AddressPlusInfo.Longitude);\n                dtProvider.Rows.Add(\"Tract\", result.AddressPlusInfo.Tract);\n                dtProvider.Rows.Add(\"Block\", result.AddressPlusInfo.Block);\n                dtProvider.Rows.Add(\"AreaCode\", result.AddressPlusInfo.AreaCode);\n                dtProvider.Rows.Add(\"CityAbbreviation\", result.AddressPlusInfo.CityAbbreviation);\n                dtProvider.Rows.Add(\"CityType\", result.AddressPlusInfo.CityType);\n                dtProvider.Rows.Add(\"CountyFIPS\", result.AddressPlusInfo.CountyFIPS);\n                dtProvider.Rows.Add(\"StateFIPS\", result.AddressPlusInfo.StateFIPS);\n                dtProvider.Rows.Add(\"TimeZone\", result.AddressPlusInfo.TimeZone);\n                dtProvider.Rows.Add(\"DayLightSavings\", result.AddressPlusInfo.DayLightSavings);\n                dtProvider.Rows.Add(\"MSA\", result.AddressPlusInfo.MSA);\n                dtProvider.Rows.Add(\"MD\", result.AddressPlusInfo.MD);\n                dtProvider.Rows.Add(\"CBSA\", result.AddressPlusInfo.CBSA);\n                dtProvider.Rows.Add(\"PMSA\", result.AddressPlusInfo.PMSA);\n                dtProvider.Rows.Add(\"DMA\", result.AddressPlusInfo.DMA);\n                dtProvider.Rows.Add(\"ZipLatitude\", result.AddressPlusInfo.ZipLatitude);\n                dtProvider.Rows.Add(\"ZipLongitude\", result.AddressPlusInfo.ZipLongitude);\n                dtProvider.Rows.Add(\"MedianIncome2000\", result.AddressPlusInfo.MedianIncome2000);\n                dtProvider.Rows.Add(\"MedianIncome2005\", result.AddressPlusInfo.MedianIncome2005);\n                dtProvider.Rows.Add(\"AreaHouseholdIncome\", result.AddressPlusInfo.AreaHouseholdIncome);\n                dtProvider.Rows.Add(\"CountyHouseholdIncome\", result.AddressPlusInfo.CountyHouseholdIncome);\n                dtProvider.Rows.Add(\"StateHouseholdIncome\", result.AddressPlusInfo.StatehouseholdIncome);\n                dtProvider.Rows.Add(\"GeocodeLevel\", result.AddressPlusInfo.GeocodeLevel);\n                dtProvider.Rows.Add(\"GeocodeLevelDescription\", result.AddressPlusInfo.GeocodeLevelDescription);\n                ResultGrid.Visible = true;\n                ErrorGrid.Visible = false;\n                ResultGrid.DataSource = new DataView(dtProvider);\n                ResultGrid.DataBind();\n            }\n            catch (Exception e)\n            {\n                throw e;\n            }\n        }\n        \/\/Process and display the error values\n        private void ProcessError(Error[] errors)\n        {\n            try\n            {\n                DataTable dtError = new DataTable();\n                \/\/A case statement is used here because it is often useful to do different\n                \/\/things depeneding on which general type of error occurs.\n                \/\/Handle the errors according to your production needs.\n                \/\/This service has the potential to return 2 error objects\n                switch (System.Convert.ToInt32(errors[0].Number))\n                {\n                    case 1:\n                        \/\/Authorization Error\n                        break;\n                    case 2:\n                        \/\/User Input Error\n                        break;\n                    case 4:\n                        \/\/Domain Specific Error\n                        break;\n                    default:\n                        \/\/default (error code 3) Service Objects Fatal Error Error\n                        break;\n                }\n                dtError.Columns.Add(new DataColumn(\"Output\", typeof(string)));\n                dtError.Columns.Add(new DataColumn(\"Values\", typeof(string)));\n                foreach (Error err in errors)\n                {\n                    dtError.Rows.Add(\"Desc\", err.Desc);\n                    dtError.Rows.Add(\"Number\", err.Number);\n                    dtError.Rows.Add(\"Location\", err.Location);\n                }\n                ResultGrid.Visible = false;\n                ErrorGrid.Visible = true;\n                ErrorGrid.DataSource = new DataView(dtError);\n                ErrorGrid.DataBind();\n            }\n            catch (Exception e)\n            {\n                throw e;\n            }\n        }\n    }\n}<\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<div class=\"wp-block-create-block-tabs side-tab-layout\"><ul class=\"tab-labels\" role=\"tablist\" aria-label=\"tabbed content\"><li class=\"tab-label active\" role=\"tab\" aria-selected=\"true\" aria-controls=\"GetAddrPlusNoCensus\" tabindex=\"0\">GetAddrPlusNoCensus<\/li><li class=\"tab-label\" role=\"tab\" aria-selected=\"false\" aria-controls=\"GetAddrPlusWithDPV\" tabindex=\"0\">GetAddrPlusWithDPV<\/li><li class=\"tab-label\" role=\"tab\" aria-selected=\"false\" aria-controls=\"GetAddressPlus\" tabindex=\"0\">GetAddressPlus<\/li><\/ul><div class=\"tab-content\">\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<p><strong>GetAddressPlusNoCensus Example Request and Response<\/strong><\/p>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>URL Request:&nbsp;<br>https:\/\/trial.serviceobjects.com\/ap\/AddressPlus.asmx\/GetAddressPlusNoCensus?Address=27+E+Cota&amp;Address2=&amp;City=Santa+Barbara&amp;State=CA&amp;PostalCode=93101&amp;LicenseKey=yourDevKey<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>XML Response<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"xml\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"false\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;AddressPlusResponse xmlns=\"https:\/\/serviceobjects.com\" xmlns:i=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\">\n &lt;AddressPlusInfo>\n    &lt;Address>27 E Cota St&lt;\/Address>\n    &lt;City>Santa Barbara&lt;\/City>\n    &lt;State>CA&lt;\/State>\n    &lt;Zip>93101-7603&lt;\/Zip>\n    &lt;Address2\/>\n    &lt;BarcodeDigits>931017603992&lt;\/BarcodeDigits>\n    &lt;CarrierRoute>C006&lt;\/CarrierRoute>\n    &lt;CongressCode>24&lt;\/CongressCode>\n    &lt;CountyCode>083&lt;\/CountyCode>\n    &lt;CountyName>Santa Barbara&lt;\/CountyName>\n    &lt;Fragment\/>\n    &lt;FragmentHouse>27&lt;\/FragmentHouse>\n    &lt;FragmentPMBNumber\/>\n    &lt;FragmentPMBPrefix\/>\n    &lt;FragmentPostDir\/>\n    &lt;FragmentPreDir>E&lt;\/FragmentPreDir>\n    &lt;FragmentStreet>Cota&lt;\/FragmentStreet>\n    &lt;FragmentSuffix>St&lt;\/FragmentSuffix>\n    &lt;FragmentUnit\/>\n    &lt;Latitude>34.418014&lt;\/Latitude>\n    &lt;Longitude>-119.696477&lt;\/Longitude>\n    &lt;Tract>0009.00&lt;\/Tract>\n    &lt;Block>2039&lt;\/Block>\n    &lt;GeocodeLevel>S&lt;\/GeocodeLevel>\n    &lt;GeocodeLevelDescription>\n        The address matched exactly at the street location.\n    &lt;\/GeocodeLevelDescription>\n &lt;\/AddressPlusInfo>\n&lt;\/AddressPlusResponse><\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<p><strong>GetAddressPlusWithDPV Example Request and Response<\/strong><\/p>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>URL Request:<br>https:\/\/trial.serviceobjects.com\/ap\/AddressPlus.asmx\/GetAddressPlusWithDPV?Address=27+E+Cota&amp;Address2=&amp;City=Santa+Barbara&amp;State=CA&amp;PostalCode=93101&amp;LicenseKey=yourDevKey<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>XML Response<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"xml\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"false\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;AddressPlusResponse xmlns=\"https:\/\/serviceobjects.com\" xmlns:i=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\">\n &lt;AddressPlusInfo>\n    &lt;Address>27 E Cota St&lt;\/Address>\n    &lt;City>Santa Barbara&lt;\/City>\n    &lt;State>CA&lt;\/State>\n    &lt;Zip>93101-7603&lt;\/Zip>\n    &lt;Address2\/>\n    &lt;BarcodeDigits>931017603992&lt;\/BarcodeDigits>\n    &lt;CarrierRoute>C006&lt;\/CarrierRoute>\n    &lt;CongressCode>24&lt;\/CongressCode>\n    &lt;CountyCode>083&lt;\/CountyCode>\n    &lt;CountyName>Santa Barbara&lt;\/CountyName>\n    &lt;Fragment\/>\n    &lt;FragmentHouse>27&lt;\/FragmentHouse>\n    &lt;FragmentPMBNumber\/>\n    &lt;FragmentPMBPrefix\/>\n    &lt;FragmentPostDir\/>\n    &lt;FragmentPreDir>E&lt;\/FragmentPreDir>\n    &lt;FragmentStreet>Cota&lt;\/FragmentStreet>\n    &lt;FragmentSuffix>St&lt;\/FragmentSuffix>\n    &lt;FragmentUnit\/>\n    &lt;DPV>4&lt;\/DPV>\n    &lt;DPVDesc>\n        The input record is a valid mailing address, but is missing the apartment or rural route box number\n    &lt;\/DPVDesc>\n    &lt;DPVNotes>1, 8&lt;\/DPVNotes>\n    &lt;DPVNotesDesc>\n        The input address matched the ZIP+4 record, The input address matched a DPV highrise but a secondary was not input\n    &lt;\/DPVNotesDesc>\n    &lt;Corrections>39&lt;\/Corrections>\n    &lt;CorrectionsDesc>ZIP changed&lt;\/CorrectionsDesc>\n    &lt;Latitude>34.418014&lt;\/Latitude>\n    &lt;Longitude>-119.696477&lt;\/Longitude>\n    &lt;Tract>0009.00&lt;\/Tract>\n    &lt;Block>2039&lt;\/Block>\n    &lt;AreaCode>805&lt;\/AreaCode>\n    &lt;CityAbbreviation>SANTA BARBARA&lt;\/CityAbbreviation>\n    &lt;CityType>P&lt;\/CityType>\n    &lt;CountyFIPS>083&lt;\/CountyFIPS>\n    &lt;StateFIPS>06&lt;\/StateFIPS>\n    &lt;TimeZone>8&lt;\/TimeZone>\n    &lt;DayLightSavings>Y&lt;\/DayLightSavings>\n    &lt;MSA>7480&lt;\/MSA>\n    &lt;Md\/>\n    &lt;CBSA>42200&lt;\/CBSA>\n    &lt;PMSA\/>\n    &lt;DMA>Santa Barbara - Santa Maria - San Luis Obispo&lt;\/DMA>\n    &lt;ZipLatitude>34.419120&lt;\/ZipLatitude>\n    &lt;ZipLongitude>-119.703421&lt;\/ZipLongitude>\n    &lt;MedianIncome2000>54042&lt;\/MedianIncome2000>\n    &lt;MedianIncome2005>63700&lt;\/MedianIncome2005>\n    &lt;AreaHouseholdIncome>51021&lt;\/AreaHouseholdIncome>\n    &lt;CountyHouseholdIncome>72310.0&lt;\/CountyHouseholdIncome>\n    &lt;StateHouseholdIncome>69758.0&lt;\/StateHouseholdIncome>\n    &lt;GeocodeLevel>S&lt;\/GeocodeLevel>\n    &lt;GeocodeLevelDescription>\n        The address matched exactly at the street location.\n    &lt;\/GeocodeLevelDescription>\n &lt;\/AddressPlusInfo>\n&lt;\/AddressPlusResponse><\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<p><strong>GetAddressPlus Example Request and Response<\/strong>:<\/p>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>URL Request:<br>https:\/\/trial.serviceobjects.com\/ap\/AddressPlus.asmx\/GetAddressPlus?Address=27+E+Cota&amp;Address2=&amp;City=Santa+Barbara&amp;State=CA&amp;PostalCode=93101&amp;LicenseKey=yourDevKey<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>XML Response<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"xml\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"false\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;AddressPlusResponse xmlns=\"https:\/\/serviceobjects.com\" xmlns:i=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\">\n &lt;AddressPlusInfo>\n    &lt;Address>27 E Cota St&lt;\/Address>\n    &lt;City>Santa Barbara&lt;\/City>\n    &lt;State>CA&lt;\/State>\n    &lt;Zip>93101-7603&lt;\/Zip>\n    &lt;Address2\/>\n    &lt;BarcodeDigits>931017603992&lt;\/BarcodeDigits>\n    &lt;CarrierRoute>C006&lt;\/CarrierRoute>\n    &lt;CongressCode>24&lt;\/CongressCode>\n    &lt;CountyCode>083&lt;\/CountyCode>\n    &lt;CountyName>Santa Barbara&lt;\/CountyName>\n    &lt;Fragment\/>\n    &lt;FragmentHouse>27&lt;\/FragmentHouse>\n    &lt;FragmentPMBNumber\/>\n    &lt;FragmentPMBPrefix\/>\n    &lt;FragmentPostDir\/>\n    &lt;FragmentPreDir>E&lt;\/FragmentPreDir>\n    &lt;FragmentStreet>Cota&lt;\/FragmentStreet>\n    &lt;FragmentSuffix>St&lt;\/FragmentSuffix>\n    &lt;FragmentUnit\/>\n    &lt;DPV>4&lt;\/DPV>\n    &lt;DPVDesc>\n        The input record is a valid mailing address, but is missing the apartment or rural route box number\n    &lt;\/DPVDesc>\n    &lt;DPVNotes>1, 8&lt;\/DPVNotes>\n    &lt;DPVNotesDesc>\n        The input address matched the ZIP+4 record, The input address matched a DPV highrise but a secondary was not input\n    &lt;\/DPVNotesDesc>\n    &lt;Corrections>39&lt;\/Corrections>\n    &lt;CorrectionsDesc>ZIP changed&lt;\/CorrectionsDesc>\n    &lt;Latitude>34.418014&lt;\/Latitude>\n    &lt;Longitude>-119.696477&lt;\/Longitude>\n    &lt;Tract>0009.00&lt;\/Tract>\n    &lt;Block>2039&lt;\/Block>\n    &lt;AreaCode>805&lt;\/AreaCode>\n    &lt;CityAbbreviation>SANTA BARBARA&lt;\/CityAbbreviation>\n    &lt;CityType>P&lt;\/CityType>\n    &lt;CountyFIPS>083&lt;\/CountyFIPS>\n    &lt;StateFIPS>06&lt;\/StateFIPS>\n    &lt;TimeZone>8&lt;\/TimeZone>\n    &lt;DayLightSavings>Y&lt;\/DayLightSavings>\n    &lt;MSA>7480&lt;\/MSA>\n    &lt;Md\/>\n    &lt;CBSA>42200&lt;\/CBSA>\n    &lt;PMSA\/>\n    &lt;DMA>Santa Barbara - Santa Maria - San Luis Obispo&lt;\/DMA>\n    &lt;ZipLatitude>34.419120&lt;\/ZipLatitude>\n    &lt;ZipLongitude>-119.703421&lt;\/ZipLongitude>\n    &lt;MedianIncome2000>54042&lt;\/MedianIncome2000>\n    &lt;MedianIncome2005>63700&lt;\/MedianIncome2005>\n    &lt;AreaHouseholdIncome>51021&lt;\/AreaHouseholdIncome>\n    &lt;CountyHouseholdIncome>72310.0&lt;\/CountyHouseholdIncome>\n    &lt;StateHouseholdIncome>69758.0&lt;\/StateHouseholdIncome>\n    &lt;GeocodeLevel>S&lt;\/GeocodeLevel>\n    &lt;GeocodeLevelDescription>\n        The address matched exactly at the street location.\n    &lt;\/GeocodeLevelDescription>\n &lt;\/AddressPlusInfo>\n&lt;\/AddressPlusResponse><\/pre>\n<\/div>\n<\/div><\/div>\n<\/div>\n<\/div><\/div>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"DOTSAddressValidationPlus-US-ListofOperations\"><strong>List of Operations<\/strong><\/h1>\n\n\n\n<ul class=\"is-style-no-bullets-indented-list wp-block-list\">\n<li><strong><mark style=\"color:#008000\" class=\"has-inline-color\"><strong>GetAddressPlusWithDPV (Recommended Operation)<\/strong><\/mark><\/strong> &#8212; Same as GetAddressPlus with additional DPV data.<\/li>\n\n\n\n<li><strong><strong>GetAddressPlus<\/strong><\/strong> &#8211; Provides extensive address, geocoding, and demographic data about a given US address.<\/li>\n\n\n\n<li><strong><strong><strong>GetAddressPlusNoCensus&nbsp;<\/strong><\/strong><\/strong>&#8212; Same as GetAddressPlus except it does not return the census data.<\/li>\n<\/ul>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"DOTSAddressValidationPlus-US-OperationDefinitions\"><strong>Operation Definitions<\/strong><\/h1>\n\n\n\n<p>This document defines the input, output and behavior of the web service operations in AVP.&nbsp; Each operation has its own unique behavior and output, although some of the operations are very similar.<\/p>\n\n\n\n<div class=\"wp-block-group is-style-card-note is-layout-constrained wp-block-group-is-layout-constrained\">\n<p><strong>Important Note!<\/strong><br>Every geocoding system is different, and some even use different standards for gathering and calculating coordinates. Because of this, using coordinates from one system may not look to be at the exact location on a different system.<\/p>\n\n\n\n<p>For example, Google Maps is a great tool for plotting geocoding coordinates on a viewable map. However, the data used for generating these maps is different than the data that Service Objects uses for generating geocoding coordinates. Thus, some points plotted on Google Maps may not look to be in the precise location; they may look exactly right or look to be several hundred feet away.<\/p>\n<\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"has-medium-font-size\" id=\"DOTSAddressValidationPlus-US-GetAddressPlusWithDPV(RecommendedOperation)\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#008000\" class=\"has-inline-color\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#008000\" class=\"has-inline-color\">GetAddressPlusWithDPV(Recommended Operation)<\/mark><\/mark><\/p>\n\n\n\n<p>This operation is the same as GetAddressPlus with addition 6 fields of DPV data.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>GetAddressPlusWithDPV Inputs<\/strong><\/h4>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th><strong>Name<\/strong><\/th><th><strong>Type<\/strong><\/th><th><strong>Description<\/strong><\/th><\/tr><tr><td>Address<\/td><td>String<\/td><td>Address line of the address to validate.<br>For example, &#8220;123 Main Street&#8221;.<\/td><\/tr><tr><td>Address2<\/td><td>String<\/td><td>Second address line of the address to validate. Usually ignored.<\/td><\/tr><tr><td>City<\/td><td>String<\/td><td>The city of the address to validate.<br>For example, &#8220;New York&#8221;. The city isn&#8217;t required, but if one is not provided, the Zip code is required.<\/td><\/tr><tr><td>State<\/td><td>String<\/td><td>The state of the address to validate. For example, &#8220;NY&#8221;. This does not need to be contracted, full state names will work as well. The state isn&#8217;t required, but if one is not provided, the Zip code is required.<\/td><\/tr><tr><td>Zip<\/td><td>String<\/td><td>The zip code of the address to validate. A zip code isn&#8217;t required, but if one is not provided, the City and State are required.<\/td><\/tr><tr><td>LicenseKey<\/td><td>String<\/td><td>Your license key to use the service. Sign up for a free trial key at:<br><a href=\"https:\/\/www.serviceobjects.com\/address-insight\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.serviceobjects.com\/address-insight\/<\/a><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>GetAddressPlusWithDPV Outputs<\/strong><\/h4>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th><strong>Name<\/strong><\/th><th><strong>Type<\/strong><\/th><th><strong>Values<\/strong><\/th><th><strong>Description<\/strong><\/th><\/tr><\/thead><tbody><tr><td>Address<\/td><td>String<\/td><td>Varies<\/td><td>The corrected Address line 1.<\/td><\/tr><tr><td>City<\/td><td>String<\/td><td>Varies<\/td><td>The corrected city name.<\/td><\/tr><tr><td>State<\/td><td>String<\/td><td>Varies<\/td><td>The corrected state name.<\/td><\/tr><tr><td>Zip<\/td><td>String<\/td><td>Varies<\/td><td>The corrected zip code + 4.<\/td><\/tr><tr><td>Address2<\/td><td>String<\/td><td>Varies<\/td><td>The corrected Address line 2.<\/td><\/tr><tr><td>BarcodeDigits<\/td><td>String<\/td><td>Varies<\/td><td>The post office delivery barcode digits.<\/td><\/tr><tr><td>CarrierRoute<\/td><td>String<\/td><td>Empty<\/td><td>No longer supported.<\/td><\/tr><tr><td>CongressCode<\/td><td>String<\/td><td>Varies<\/td><td>The congress code of the given address.<\/td><\/tr><tr><td>CountyCode<\/td><td>String<\/td><td>Varies<\/td><td>The county code of the given address. Same as the CountyFIPS. This code is used to uniquely identify counties on a national level.&nbsp;<\/td><\/tr><tr><td>CountyName<\/td><td>String<\/td><td>Varies<\/td><td>The name of the county in which the given address lies.<\/td><\/tr><tr><td>Fragment<\/td><td>String<\/td><td>Varies<\/td><td>The parsed &#8220;Fragment&#8221; box, apartment or unit number. Same as FragmentPMBNumber.<\/td><\/tr><tr><td>FragmentHouse<\/td><td>String<\/td><td>Varies<\/td><td>The parsed house number of the given address.<\/td><\/tr><tr><td>FragmentPMBNumber<\/td><td>String<\/td><td>Varies<\/td><td>The parsed apartment, box, unit, etc. number of the given address.<\/td><\/tr><tr><td>FragmentPMBPrefix<\/td><td>String<\/td><td>Varies<\/td><td>The parsed type of the apartment, box, unit, etc. For example, &#8220;APT&#8221; or &#8220;BOX&#8221;.<\/td><\/tr><tr><td>FragmentPostDir<\/td><td>String<\/td><td>Varies<\/td><td>The parsed post-directional of the address&#8217;s street. &#8220;West&#8221; in &#8220;North Main St West&#8221;.<\/td><\/tr><tr><td>FragmentPreDir<\/td><td>String<\/td><td>Varies<\/td><td>The parsed pre-directional of the address&#8217;s street. &#8220;North&#8221; in &#8220;North Main St West&#8221;.<\/td><\/tr><tr><td>FragmentStreet<\/td><td>String<\/td><td>Varies<\/td><td>The parsed name of the street in the given address. &#8220;Main&#8221; in &#8220;North Main St West&#8221;.<\/td><\/tr><tr><td>FragmentSuffix<\/td><td>String<\/td><td>Varies<\/td><td>The parsed suffix of the street in the given address. &#8220;St&#8221; in &#8220;North Main St West&#8221;.<\/td><\/tr><tr><td>Latitude<\/td><td>String<\/td><td>Number<\/td><td>The closest geocoding latitude match of the given address. See &#8220;GeocodeLevel&#8221; below for different levels of matching.<\/td><\/tr><tr><td>DPV*<\/td><td>String<\/td><td>1-8<\/td><td>Number that correlates to a DPV(Delivery Point Validation)<br>result.&nbsp;An indicator displaying whether or not the address<br>is recognized as deliverable by the USPS.<\/td><\/tr><tr><td>DPVDesc*<\/td><td>String<\/td><td>Varies<\/td><td>Explains DPV result.<\/td><\/tr><tr><td>DPVNotes*<\/td><td>String<\/td><td>1-14<\/td><td>Number that correlates to DPV notes description.<\/td><\/tr><tr><td>DPVNotesDesc*<\/td><td>String<\/td><td>Varies<\/td><td>Details about the DPV result.<\/td><\/tr><tr><td>Corrections*<\/td><td>String<\/td><td>1-41<\/td><td>Number that correlates to a Corrections Description.<\/td><\/tr><tr><td>CorrectionsDesc*<\/td><td>String<\/td><td>Varies<\/td><td>Details about the Correction.<\/td><\/tr><tr><td>Longitude<\/td><td>String<\/td><td>Number<\/td><td>The closest geocoding longitude match of the given address. See &#8220;GeocodeLevel&#8221; below for different levels of matching.<\/td><\/tr><tr><td>Tract<\/td><td>String<\/td><td>Number<\/td><td>The Census Tract of the given address.<\/td><\/tr><tr><td>Block<\/td><td>String<\/td><td>Number<\/td><td>The Census Block of the given address.<\/td><\/tr><tr><td>AreaCode<\/td><td>String<\/td><td>Varies<\/td><td>The phone Area Code of the given address.<\/td><\/tr><tr><td>CityAbbreviation<\/td><td>String<\/td><td>Varies<\/td><td>A common alternate contraction of the city&#8217;s name.<\/td><\/tr><tr><td>CityType<\/td><td>String<\/td><td>N, P, U, B,<br>A, C, S, K<\/td><td>The city type of the given zip code. The code refers to the type of postal station in a given zip code. See table below for descriptions for each of the codes.<\/td><\/tr><tr><td>CountyFIPS<\/td><td>String<\/td><td>Varies<\/td><td>The county code of the address&#8217;s county.<\/td><\/tr><tr><td>StateFIPS<\/td><td>String<\/td><td>Varies<\/td><td>The state code of the address&#8217;s state.<\/td><\/tr><tr><td>TimeZone<\/td><td>String<\/td><td>Number<\/td><td>The number of hours offset from GMT. 5 = Eastern time zone, 8 = Pacific time zone, etc.<\/td><\/tr><tr><td>DayLightSavings<\/td><td>String<\/td><td>Y or N<\/td><td>Whether the given zip code observes DayLight Savings time.<\/td><\/tr><tr><td>MSA<\/td><td>String<\/td><td>Varies<\/td><td>The Metropolitan Statistical Area Code.&nbsp;Used to uniquely identify a geographic area&nbsp;with a relatively high population density at&nbsp;its core.<\/td><\/tr><tr><td>MD<\/td><td>String<\/td><td>Varies<\/td><td>The Metropolitan district code.<\/td><\/tr><tr><td>CBSA<\/td><td>String<\/td><td>Varies<\/td><td>The Core Based Statistical Area Code. A code used to identify an urban center of at least 10,000 people and adjacent areas that are socioeconomically tied to&nbsp;<br>the urban center.&nbsp;<\/td><\/tr><tr><td>PMSA<\/td><td>String<\/td><td>Varies<\/td><td>The Primary Metropolitan Statistical Area&nbsp;code. Used to uniquely identify areas that are part of a larger urban center.&nbsp;<\/td><\/tr><tr><td>DMA<\/td><td>String<\/td><td>Varies<\/td><td>The Designated Market Area code. Used to uniquely identify a geographic region that receive the same(or similar) TV and radio show programs.&nbsp;<\/td><\/tr><tr><td>ZipLatitude<\/td><td>String<\/td><td>Number<\/td><td>The Zip centroid&#8217;s latitude.<\/td><\/tr><tr><td>ZipLongitude<\/td><td>String<\/td><td>Number<\/td><td>The Zip centroid&#8217;s longitude.<\/td><\/tr><tr><td>MedianIncome2000<\/td><td>String<\/td><td>Number<\/td><td>The median income for the zip code in 2000.<\/td><\/tr><tr><td>MedianIncome2005<\/td><td>String<\/td><td>Number<\/td><td>The median income for the zip code in 2005.<\/td><\/tr><tr><td>AreaHouseholdIncome<\/td><td>String<\/td><td>Number<\/td><td>The average income for the immediate area in 2000.<\/td><\/tr><tr><td>CountyHouseholdIncome<\/td><td>String<\/td><td>Number<\/td><td>The average income for the county in 2000.<\/td><\/tr><tr><td>StateHouseholdIncome<\/td><td>String<\/td><td>Number<\/td><td>The average income for the state in 2000.<\/td><\/tr><tr><td>GeocodeLevel<\/td><td>String<\/td><td>S, P, T,<br>Z, C<\/td><td>The closest level of geocoding that matched.<br>S = Street<br>P = Zip + 4<br>T = Zip + 2<br>Z = Zip<br>C = City &amp; State<\/td><\/tr><tr><td>GeocodeLevelDescription<\/td><td>String<\/td><td>Varies<\/td><td>A verbose description of GeocodeLevel.<\/td><\/tr><tr><td>Error \u2013 Desc<\/td><td>String<\/td><td>Varies<\/td><td>If there was an internal web service error, the description will be displayed here.<\/td><\/tr><tr><td>Error \u2013 Number<\/td><td>String<\/td><td>&#8220;1&#8221;, &#8220;2&#8221;, &#8220;4&#8221;<\/td><td>See &#8220;Error Codes&#8221; below.<\/td><\/tr><tr><td>Error \u2013 Location<\/td><td>String<\/td><td>Always null<\/td><td>Deprecated, no longer used.<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\"><br>*See tables below for possible values.<\/figcaption><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>DPV Codes<\/strong><\/h4>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>DPV<\/th><th>DPV Desc<\/th><\/tr><\/thead><tbody><tr><td>1<\/td><td>Yes, the input record is a valid mailing address<\/td><\/tr><tr><td>2<\/td><td>No, the input record is not in the DPV database of valid mailing addresses<\/td><\/tr><tr><td>3<\/td><td>The apartment or rural route box number is not valid, although the house number or rural route is valid<\/td><\/tr><tr><td>4<\/td><td>The input record is a valid mailing address, but is missing the apartment or rural route box number<\/td><\/tr><tr><td>5<\/td><td>Internal error. Please contact customer service<\/td><\/tr><tr><td>6<\/td><td>Internal error. Please contact customer service<\/td><\/tr><tr><td>7<\/td><td>Internal error. Please contact customer service<\/td><\/tr><tr><td>8<\/td><td>Internal error. Please contact customer service<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>DPVNotes<\/th><th>DPVNotesDesc:<\/th><\/tr><\/thead><tbody><tr><td>1<\/td><td>The input address matched the ZIP+4 record<\/td><\/tr><tr><td>2<\/td><td>The input address did not match the ZIP+4 record<\/td><\/tr><tr><td>3<\/td><td>The input address matched the DPV record<\/td><\/tr><tr><td>4<\/td><td>The input address primary matched DPV but the secondary did not<\/td><\/tr><tr><td>5<\/td><td>The input address is a military APO\/FPO address<\/td><\/tr><tr><td>6<\/td><td>The input address is a general delivery address<\/td><\/tr><tr><td>7<\/td><td>The input address is a building name, and the primary is missing<\/td><\/tr><tr><td>8<\/td><td>The input address matched a DPV high-rise but a secondary was not input<\/td><\/tr><tr><td>9<\/td><td>The input address primary is invalid<\/td><\/tr><tr><td>10<\/td><td>The input address is missing a PO box, rural route, or highway contract box number<\/td><\/tr><tr><td>11<\/td><td>The input address (PO box, rural route, or highway contract) primary is invalid<\/td><\/tr><tr><td>12<\/td><td>The input address specified a PMB and matched a CMRA<\/td><\/tr><tr><td>13<\/td><td>The input address did not include a PMB and matched a CMRA<\/td><\/tr><tr><td>14<\/td><td>The input address matched and retained a unique ZIP code<\/td><\/tr><tr><td>15<\/td><td>SuiteLink did not find Suite or Unit data to append to the address<\/td><\/tr><tr><td>19<\/td><td>Household or residence indicated by RDI<\/td><\/tr><tr><td>23<\/td><td>Highrise apartment\/office building address<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Corrections<\/th><th>CorrectionDesc<\/th><\/tr><\/thead><tbody><tr><td>1<\/td><td>State not found<\/td><\/tr><tr><td>2<\/td><td>City not found<\/td><\/tr><tr><td>3<\/td><td>Street not found<\/td><\/tr><tr><td>4<\/td><td>Address not found<\/td><\/tr><tr><td>5<\/td><td>Uncomputable +4 range<\/td><\/tr><tr><td>6<\/td><td>+4 unavailable<\/td><\/tr><tr><td>7<\/td><td>Multiple streets match<\/td><\/tr><tr><td>8<\/td><td>Multiple addresses match<\/td><\/tr><tr><td>9<\/td><td>Time ran out<\/td><\/tr><tr><td>10<\/td><td>Output too long<\/td><\/tr><tr><td>11<\/td><td>Unused and reserved<\/td><\/tr><tr><td>12<\/td><td>Company phonetic match used<\/td><\/tr><tr><td>13<\/td><td>First company match used<\/td><\/tr><tr><td>14<\/td><td>State determined from city<\/td><\/tr><tr><td>15<\/td><td>State determined from ZIP<\/td><\/tr><tr><td>16<\/td><td>City phonetic match used<\/td><\/tr><tr><td>17<\/td><td>City determined from ZIP<\/td><\/tr><tr><td>18<\/td><td>Acceptable city name used<\/td><\/tr><tr><td>19<\/td><td>Street phonetic match used<\/td><\/tr><tr><td>20<\/td><td>Predirection dropped<\/td><\/tr><tr><td>21<\/td><td>Predirection added<\/td><\/tr><tr><td>22<\/td><td>Suffix dropped<\/td><\/tr><tr><td>23<\/td><td>Suffix added<\/td><\/tr><tr><td>24<\/td><td>Postdirection dropped<\/td><\/tr><tr><td>25<\/td><td>Postdirection added<\/td><\/tr><tr><td>26<\/td><td>Predirection standardized<\/td><\/tr><tr><td>27<\/td><td>Street standardized<\/td><\/tr><tr><td>28<\/td><td>Suffix standardized<\/td><\/tr><tr><td>29<\/td><td>Postdirection standardized<\/td><\/tr><tr><td>30<\/td><td>Street missing<\/td><\/tr><tr><td>31<\/td><td>Alternate address used<\/td><\/tr><tr><td>32<\/td><td>Unit standardized<\/td><\/tr><tr><td>33<\/td><td>Unit missing<\/td><\/tr><tr><td>34<\/td><td>Unit not found<\/td><\/tr><tr><td>35<\/td><td>Unit unverified<\/td><\/tr><tr><td>36<\/td><td>Rural box not found<\/td><\/tr><tr><td>37<\/td><td>Leftovers found<\/td><\/tr><tr><td>38<\/td><td>ZIP not found<\/td><\/tr><tr><td>39<\/td><td>ZIP changed<\/td><\/tr><tr><td>40<\/td><td>+4 changed<\/td><\/tr><tr><td>41<\/td><td>Route changed<\/td><\/tr><tr><td>42<\/td><td>Suite or Unit data appended using SuiteLink<\/td><\/tr><tr><td>43<\/td><td>Directional or Suffix is either missing or unused<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"DOTSAddressValidationPlus-US-GetAddressPlus\">GetAddressPlus<\/h2>\n\n\n\n<p><\/p>\n\n\n\n<p>This operation takes a standard US address (Address, Address2, City, State, Zip) and will try to find the all of the information that it can about the given address. It cannot always find all information, especially when it comes to empty lots or new construction areas.<\/p>\n\n\n\n<p>Some of the return values may seem cryptic, but they&#8217;re merely US census demographics and city planning codes.<\/p>\n\n\n\n<p>This operation requires the Address value, and either City and State, or the Zip code. Address2 is entirely optional, and will most likely not play into any of the information generated.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">GetAddressPlus Inputs<\/h4>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table><thead><tr><th>Name<\/th><th>Type<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>Address<\/td><td>String<\/td><td>Address line of the address to validate.<br>For example, &#8220;123 Main Street&#8221;.<\/td><\/tr><tr><td>Address2<\/td><td>String<\/td><td>Second address line of the address to validate. Usually ignored.<\/td><\/tr><tr><td>City<\/td><td>String<\/td><td>The city of the address to validate.<br>For example, &#8220;New York&#8221;. The city isn&#8217;t required, but if one is not provided, the Zip code is required.<\/td><\/tr><tr><td>State<\/td><td>String<\/td><td>The state of the address to validate. For example, &#8220;NY&#8221;. This does not need to be contracted, full state names will work as well. The state isn&#8217;t required, but if one is not provided, the Zip code is required.<\/td><\/tr><tr><td>Zip<\/td><td>String<\/td><td>The zip code of the address to validate. A zip code isn&#8217;t required, but if one is not provided, the City and State are required.<\/td><\/tr><tr><td>LicenseKey<\/td><td>String<\/td><td>Your license key to use the service. Sign up for a free trial key at:<a href=\"https:\/\/www.serviceobjects.com\/address-insight\/\"> https:\/\/www.serviceobjects.com\/address-insight\/<\/a><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">GetAddressPlus Outputs<\/h4>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table><thead><tr><th>Name<\/th><th>Type<\/th><th>Value<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>Address<\/td><td>String<\/td><td>Varies<\/td><td>The corrected Address line 1.<\/td><\/tr><tr><td>City<\/td><td>String<\/td><td>Varies<\/td><td>The corrected city name.<\/td><\/tr><tr><td>State<\/td><td>String<\/td><td>Varies<\/td><td>The corrected state name.<\/td><\/tr><tr><td>Zip<\/td><td>String<\/td><td>Varies<\/td><td>The corrected zip code + 4.<\/td><\/tr><tr><td>Address2<\/td><td>String<\/td><td>Varies<\/td><td>The corrected Address line 2.<\/td><\/tr><tr><td>BarcodeDigits<\/td><td>String<\/td><td>Varies<\/td><td>The post office delivery barcode digits.<\/td><\/tr><tr><td>CarrierRoute<\/td><td>String<\/td><td>Empty<\/td><td>No longer supported.<\/td><\/tr><tr><td>CongressCode<\/td><td>String<\/td><td>Varies<\/td><td>The congress code of the given address.<\/td><\/tr><tr><td>CountyCode<\/td><td>String<\/td><td>Varies<\/td><td>The county code of the given address. Same as the CountyFIPS. This code is used to uniquely identify counties on a national level.&nbsp;<\/td><\/tr><tr><td>CountyName<\/td><td>String<\/td><td>Varies<\/td><td>The name of the county in which the given address lies.<\/td><\/tr><tr><td>Fragment<\/td><td>String<\/td><td>Varies<\/td><td>The parsed &#8220;Fragment&#8221; box, apartment or unit number. Same as FragmentPMBNumber.<\/td><\/tr><tr><td>FragmentHouse<\/td><td>String<\/td><td>Varies<\/td><td>The parsed house number of the given address.<\/td><\/tr><tr><td>FragmentPMBNumber<\/td><td>String<\/td><td>Varies<\/td><td>The parsed apartment, box, unit, etc. number of the given address.<\/td><\/tr><tr><td>FragmentPMBPrefix<\/td><td>String<\/td><td>Varies<\/td><td>The parsed type of the apartment, box, unit, etc. For example, &#8220;APT&#8221; or &#8220;BOX&#8221;.<\/td><\/tr><tr><td>FragmentPostDir<\/td><td>String<\/td><td>Varies<\/td><td>The parsed post-directional of the address&#8217;s street. &#8220;West&#8221; in &#8220;North Main St West&#8221;.<\/td><\/tr><tr><td>FragmentPreDir<\/td><td>String<\/td><td>Varies<\/td><td>The parsed pre-directional of the address&#8217;s street. &#8220;North&#8221; in &#8220;North Main St West&#8221;.<\/td><\/tr><tr><td>FragmentStreet<\/td><td>String<\/td><td>Varies<\/td><td>The parsed name of the street in the given address. &#8220;Main&#8221; in &#8220;North Main St West&#8221;.<\/td><\/tr><tr><td>FragmentSuffix<\/td><td>String<\/td><td>Varies<\/td><td>The parsed suffix of the street in the given address. &#8220;St&#8221; in &#8220;North Main St West&#8221;.<\/td><\/tr><tr><td>Latitude<\/td><td>String<\/td><td>Number<\/td><td>The closest geocoding latitude match of the given address. See &#8220;GeocodeLevel&#8221; below for different levels of matching.<\/td><\/tr><tr><td>DPV*<\/td><td>String<\/td><td>1-8<\/td><td>Number that correlates to a DPV(Delivery Point Validation) result.&nbsp;An indicator displaying whether or not the address is recognized as deliverable by the USPS.<\/td><\/tr><tr><td>DPVDesc*<\/td><td>String<\/td><td>Varies<\/td><td>Explains DPV result.<\/td><\/tr><tr><td>DPVNotes*<\/td><td>String<\/td><td>1-14<\/td><td>Number that correlates to DPV notes description.<\/td><\/tr><tr><td>DPVNotesDesc*<\/td><td>String<\/td><td>Varies<\/td><td>Details about the DPV result.<\/td><\/tr><tr><td>Corrections*<\/td><td>String<\/td><td>1-41<\/td><td>Number that correlates to a Corrections Description.<\/td><\/tr><tr><td>CorrectionsDesc*<\/td><td>String<\/td><td>Varies<\/td><td>Details about the Correction.<\/td><\/tr><tr><td>Longitude<\/td><td>String<\/td><td>Number<\/td><td>The closest geocoding longitude match of the given address. See &#8220;GeocodeLevel&#8221; below for different levels of matching.<\/td><\/tr><tr><td>Tract<\/td><td>String<\/td><td>Number<\/td><td>The Census Tract of the given address.<\/td><\/tr><tr><td>Block<\/td><td>String<\/td><td>Number<\/td><td>The Census Block of the given address.<\/td><\/tr><tr><td>AreaCode<\/td><td>String<\/td><td>Varies<\/td><td>The phone Area Code of the given address.<\/td><\/tr><tr><td>CityAbbreviation<\/td><td>String<\/td><td>Varies<\/td><td>A common alternate contraction of the city&#8217;s name.<\/td><\/tr><tr><td>CityType<\/td><td>String<\/td><td>N, P, U, B, A, C, S, K<\/td><td>The city type of the given zip code. The code refers to the type of postal station in a given zip code. See table below for descriptions for each of the codes.<\/td><\/tr><tr><td>CountyFIPS<\/td><td>String<\/td><td>Varies<\/td><td>The county code of the address&#8217;s county.<\/td><\/tr><tr><td>StateFIPS<\/td><td>String<\/td><td>Varies<\/td><td>The state code of the address&#8217;s state.<\/td><\/tr><tr><td>TimeZone<\/td><td>String<\/td><td>Number<\/td><td>The number of hours offset from GMT. 5 = Eastern time zone, 8 = Pacific time zone, etc.<\/td><\/tr><tr><td>DayLightSavings<\/td><td>String<\/td><td>Y or N<\/td><td>Whether the given zip code observes DayLight Savings time.<\/td><\/tr><tr><td>MSA<\/td><td>String<\/td><td>Varies<\/td><td>The Metropolitan Statistical Area Code.&nbsp;Used to uniquely identify a geographic area&nbsp;with a relatively high population density at&nbsp;its core.<\/td><\/tr><tr><td>MD<\/td><td>String<\/td><td>Varies<\/td><td>The Metropolitan district code.<\/td><\/tr><tr><td>CBSA<\/td><td>String<\/td><td>Varies<\/td><td>The Core Based Statistical Area Code. A code used to identify an urban center of at least 10,000 people and adjacent areas that are socioeconomically tied to&nbsp;<br>the urban center.&nbsp;<\/td><\/tr><tr><td>PMSA<\/td><td>String<\/td><td>Varies<\/td><td>The Primary Metropolitan Statistical Area&nbsp;code. Used to uniquely identify areas that are part of a larger urban center.&nbsp;<\/td><\/tr><tr><td>DMA<\/td><td>String<\/td><td>Varies<\/td><td>The Designated Market Area code. Used to uniquely identify a geographic region that receive the same(or similar) TV and radio show programs.&nbsp;<\/td><\/tr><tr><td>ZipLatitude<\/td><td>String<\/td><td>Number<\/td><td>The Zip centroid&#8217;s latitude.<\/td><\/tr><tr><td>ZipLongitude<\/td><td>String<\/td><td>Number<\/td><td>The Zip centroid&#8217;s longitude.<\/td><\/tr><tr><td>MedianIncome2000<\/td><td>String<\/td><td>Number<\/td><td>The median income for the zip code in 2000.<\/td><\/tr><tr><td>MedianIncome2005<\/td><td>String<\/td><td>Number<\/td><td>The median income for the zip code in 2005.<\/td><\/tr><tr><td>AreaHouseholdIncome<\/td><td>String<\/td><td>Number<\/td><td>The average income for the immediate area in 2000.<\/td><\/tr><tr><td>CountyHouseholdIncome<\/td><td>String<\/td><td>Number<\/td><td>The average income for the county in 2000.<\/td><\/tr><tr><td>StateHouseholdIncome<\/td><td>String<\/td><td>Number<\/td><td>The average income for the state in 2000.<\/td><\/tr><tr><td>GeocodeLevel<\/td><td>String<\/td><td>S, P, T, Z, C<\/td><td>The closest level of geocoding that matched.<br>S = Street<br>P = Zip + 4<br>T = Zip + 2<br>Z = Zip<br>C = City &amp; State<\/td><\/tr><tr><td>GeocodeLevelDescription<\/td><td>String<\/td><td>Varies<\/td><td>A verbose description of GeocodeLevel.<\/td><\/tr><tr><td>Error \u2013 Desc<\/td><td>String<\/td><td>Varies<\/td><td>If there was an internal web service error, the description will be displayed here.<\/td><\/tr><tr><td>Error \u2013 Number<\/td><td>String<\/td><td>&#8220;1&#8221;, &#8220;2&#8221;, &#8220;4&#8221;<\/td><td>See &#8220;Error Codes&#8221; below.<\/td><\/tr><tr><td>Error \u2013 Location<\/td><td>String<\/td><td>Always null<\/td><td>Deprecated, no longer used.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">CityType Code Definitions<\/h4>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table><thead><tr><th>Code<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>N<\/td><td>Non Postal Community Name: Former Postal Facility&nbsp;<\/td><\/tr><tr><td>P<\/td><td>Post Office: Official post office branch.<\/td><\/tr><tr><td>U<\/td><td>Urbanization: Specific to Puerto Rico.<\/td><\/tr><tr><td>B<\/td><td>Branch: A postal facility that is not the main post office and is outside the corporate limits of a city.<\/td><\/tr><tr><td>A<\/td><td>Airport Mail Facility: Facilities through which US mail is flown in and out of the city.<\/td><\/tr><tr><td>C<\/td><td>Community Post Office: a contract postal unit providing mail services to small communities.<\/td><\/tr><tr><td>S<\/td><td>Station: A post office that is not the main office for a city but is in corporate city limits.<\/td><\/tr><tr><td>K<\/td><td>Bulk Mail Center: Centers that handle bulk mail. Typically commercial, business and advertising mail.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"DOTSAddressValidationPlus-US-GetAddressPlusNoCensus\">GetAddressPlusNoCensus<\/h2>\n\n\n\n<p><\/p>\n\n\n\n<p>This operation is the same as GetAddressPlus without returning census data.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">GetAddressPlusNoCensus Inputs<\/h4>\n\n\n\n<p>Same as GetAddressPlus<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">GetAddressPlusNoCensus Outputs<\/h4>\n\n\n\n<p>Same as GetAddressPlus except does not return the following:<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table><tbody><tr><td>AreaCode<br>CityAbbreviation<br>CityType<br>CountyFIPS<br>StateFIPS<br>TimeZone<br>DayLightSavings<\/td><td>MSA<br>MD<br>CBSA<br>PMSA<br>DMA<br>ZipLatitude<br>ZipLongitude<\/td><td>MedianIncome2000<br>MedianIncome2005<br>AreaHouseholdIncome<br>CountyHouseholdIncome<br>StateHouseholdIncome<br><br><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"DOTSAddressValidationPlus-US-ErrorCodes\"><strong>Error Codes<\/strong><\/h1>\n\n\n\n<p>Error codes in AV-Plus are very simple. They are as follows:<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Error Code 1 \u2013 &#8220;Input cannot be less than zero length&#8221;<\/strong><\/p>\n\n\n\n<p>This error means the web service did not get any input. The connection to the service was made, and data was transferred, but no parameters were passed that the service could understand. This error often happens when input is passed to the service with namespaces that the service does not understand. Applying a namespace to any of the parameters will cause this error. Additionally, requests made in the &#8220;rpc\/encoded&#8221; format will cause this error. The only namespace that should appear in any element is the &#8220;<a rel=\"noreferrer noopener\" href=\"https:\/\/www.serviceobjects.com\/\" target=\"_blank\">https:\/\/www.serviceobjects.com<\/a>&#8221; namespace on the root GetAddressPlus element as so:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><code>&lt;GetAddressPlus<\/code>&nbsp;<code>xmlns=\"<a href=\"https:\/\/www.serviceobjects.com\/\">https:\/\/www.serviceobjects.com\/<\/a>\"&gt;<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-group is-style-card-note is-layout-constrained wp-block-group-is-layout-constrained\">\n<p><strong>Important Note!<\/strong><\/p>\n\n\n\n<p>The namespace is not applied to the GetAddressPlus element, it is only present.<\/p>\n<\/div>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Error Code 2 \u2013 Various descriptions<\/strong><\/p>\n\n\n\n<p>This error code appears when various errors occur, but are of the expected nature. Oftentimes, maligned or incomplete input will cause an error 2. Since the Address Validation Plus service is comprised of our standalone Geocoding service that provides the latitude and longitude values for an address and our stand alone Address Validation service that validates and standardizes the input address for mailing purposes, it can return multiple errors from both of those services. These two stand alone services have different data sources, and on occasion one of the services can return an error and the other service can return a valid response. &nbsp;To help identify the different error responses the table below has the various errors that will be returned by the AVP service, their origin and description of what the errors mean.<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table><thead><tr><th>Number<\/th><th>Desc<\/th><th>Service Error Origin<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>2<\/td><td>Address not found<\/td><td>Address Validation<\/td><td>Major issue with address that doesn&#8217;t fit known USPS special case scenarios.<\/td><\/tr><tr><td>2<\/td><td>Street not found<\/td><td>Address Validation<\/td><td>Street name not found for general area (city\/state or zip)<\/td><\/tr><tr><td>2<\/td><td>Please input a valid address.&nbsp;<\/td><td>Address Validation<\/td><td>The basic address information was not present(i.e. Address and Zip or Address and City\/State<\/td><\/tr><tr><td>2<\/td><td>Street number or box number out of range<\/td><td>Address Validation<\/td><td>Street name found in area, but the given primary number is not valid for that street<\/td><\/tr><tr><td>2<\/td><td>Zip code does not exist.&nbsp;<\/td><td>Geo Coder<\/td><td>The entered zip code does exist in the Geocode data.<\/td><\/tr><tr><td>2<\/td><td>Please input a valid US Zip Code.&nbsp;<\/td><td>Geo Coder<\/td><td>The entered zip code was not a valid zip code format or the zip code did not exist<\/td><\/tr><tr><td>2<\/td><td>Location not found.&nbsp;<\/td><td>Geo Coder<\/td><td>No city\/state or zip code location could be found for this data<\/td><\/tr><tr><td>2<\/td><td>State not found&nbsp;<\/td><td>Geo Coder<\/td><td>The entered state was not found the Geocoder data.<\/td><\/tr><tr><td>2<\/td><td>Address was not found.<\/td><td>Geo Coder<\/td><td>The entered address was not found in the Geocoder data<\/td><\/tr><tr><td>2<\/td><td>Address and Address2 fields were too long. Together, they must be 100 characters or less.&nbsp;<\/td><td>Address Validation<\/td><td>The entered Address1 and Address2 fields were too long and deemed not to be valid<\/td><\/tr><tr><td>2<\/td><td>Address field was too long, must be 100 characters or less.<\/td><td>Address Validation<\/td><td>The entered Address1 field was too long and deemed not to be valid.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Error Code 4 \u2013 Various descriptions<\/h4>\n\n\n\n<p>An error code 4 is a fatal error and it means something has seriously gone wrong. You will never see an error code 4 in a live production environment.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"DOTSAddressValidationPlus-US-FrequentlyAskedQuestions\"><strong>Frequently Asked Questions<\/strong><\/h1>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">Which is better: 2 calls to Address Validation and GeoCoder, or 1 call to AV-Plus?<\/h4>\n\n\n\n<p>Picking the right service is a simple matter of your needs. If you need any type of demographic data along with address validation\/geocoding, then AV-Plus makes the most sense. One call to the web service will yield all the data you need. Most people don&#8217;t want to do 2 calls to do both address validation and geocoding, and they find AV-Plus to be very convenient for simplifying the process. However, other people find some of the demographic data not as important, and don&#8217;t want to sort through it. In this case, they usually make a call to address validation first, then a call to geocoder. In terms of speed, the fastest option is to do address validation and geocoder in a multi-threaded environment, as doing these simultaneously is faster than one call to AV-Plus. However, getting involved in a multithreaded program and the overhead that comes with it may be more than you want to deal with. The next fastest option is one call to AV-Plus.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">The Sample Code is Giving Strange Errors or is Crashing!<\/h4>\n\n\n\n<p>Most likely, the sample code cannot connect to Service Objects. Many environments will not allow you to connect out on port 80, or will clip out XML data from these requests\/responses.<\/p>\n\n\n\n<p>The easiest way to check for this is to open a browser on the machine running the sample code. In your browser, navigate to:&nbsp;<br><a href=\"http:\/\/trial.serviceobjects.com\/ap\/AddressPlus.asmx\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/trial.serviceobjects.com\/ap\/AddressPlus.asmx<\/a><br>Then try to run one of the operations with your trial key. If you get a browser error, or get no data back, then the sample code isn&#8217;t able to connect, either. Contact your systems administrator to resolve why you are not able to connect to Service Objects.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>I\u2019m receiving a Error about an address input as well as geocode coordinates that seem to indicate good inputs. These seem to be contradictory results, what is going on here?<\/strong><\/p>\n\n\n\n<p>Roughly speaking, our Address Validation Plus service provides data that comes from two separate sources: a source that verifies the mailing address and a source that provides the geocode coordinates for the given input.&nbsp; Each of these parts of the AVP service draws data from separate sources to make its own conclusions about a given input. &nbsp;The address validation part of the service tends to be more strict in how it analyzes addresses than the geocode part. This can sometimes result in an input address being recognized as invalid by the address verification part of the service, while the geocode part provides a street level match(the most specific coordinates available) for the same input.&nbsp; The takeaway from this circumstance is that the USPS may not recognize the given input as a valid mailing address but the geocode coordinates provided are accurate.&nbsp;<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">AV-Plus&#8217;s geocoding is giving coordinates that aren&#8217;t anywhere near my address!<\/h4>\n\n\n\n<p>Most likely the service is matching at Zip+4, Zip+2, or Zip level, which return an averaged centroid. The service isn&#8217;t saying your address is at that location, it is saying the centroid of the zip\/+4\/+2 is at that location. If GeoCoder is giving what it says is a street-level match that doesn&#8217;t look like it&#8217;s at the right location plotted on a map, the issue is most often a stylistic difference between your mapping solution and our data. Because geocoding information is gathered in very different ways, your mapping solution is probably using a very different method than Service Objects does.<\/p>\n\n\n\n<p>If the location given is a street-level match, and it&#8217;s very far away from the target location, please let us know at&nbsp;<a rel=\"noreferrer noopener\" href=\"mailto:support@serviceobjects.com\" target=\"_blank\">support@serviceobjects.com<\/a>.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">What do all these acronyms mean?<\/h4>\n\n\n\n<p>If you don&#8217;t know what they mean, they&#8217;re probably not very useful to you. Most of the cryptic return values are federal or state area numbers that are used for statistical and demographic tracking of different areas&#8217; populations.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">I&#8217;m not a programmer. How do I use DOTS AddressPlus?<\/h4>\n\n\n\n<p>Service Objects runs batches for you! A free batch trial is available at<br><a rel=\"noreferrer noopener\" href=\"https:\/\/www.serviceobjects.com\/upload-center\/\" target=\"_blank\">https:\/\/www.serviceobjects.com\/upload-center\/<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction DOTS Address Plus US (AV-Plus) is a publicly available XML web service that provides comprehensive address validation, latitude\/longitude and demographic metadata information about a physical US address. The service provides validated and parsed address information, geocoding information, and demographic information, such as the census tract, block or other statistical codes. AV-Plus can provide instant [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":13,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-2342","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>DOTS Address Validation Plus - US<\/title>\n<meta name=\"description\" content=\"Introduction Integration Code Snippets List of Operations Operation Definitions GetAddressPlusWithDPV (Recommended Operation) GetAddressPlus\" \/>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"DOTS Address Validation Plus - US\" \/>\n<meta property=\"og:description\" content=\"Introduction Integration Code Snippets List of Operations Operation Definitions GetAddressPlusWithDPV (Recommended Operation) GetAddressPlus\" \/>\n<meta property=\"og:url\" content=\"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-plus-us\/\" \/>\n<meta property=\"og:site_name\" content=\"Service Objects | Contact, Phone, Email Verification | Data Quality Services\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-29T20:53:36+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"20 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-plus-us\/\",\"url\":\"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-plus-us\/\",\"name\":\"DOTS Address Validation Plus - US\",\"isPartOf\":{\"@id\":\"https:\/\/test.serviceobjects.com\/docs\/#website\"},\"datePublished\":\"2022-11-09T00:41:19+00:00\",\"dateModified\":\"2024-03-29T20:53:36+00:00\",\"description\":\"Introduction Integration Code Snippets List of Operations Operation Definitions GetAddressPlusWithDPV (Recommended Operation) GetAddressPlus\",\"breadcrumb\":{\"@id\":\"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-plus-us\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-plus-us\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-plus-us\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/test.serviceobjects.com\/docs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"DOTS Address Validation Plus &#8211; US\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/test.serviceobjects.com\/docs\/#website\",\"url\":\"https:\/\/test.serviceobjects.com\/docs\/\",\"name\":\"Service Objects | Contact, Phone, Email Verification | Data Quality Services\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/test.serviceobjects.com\/docs\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/test.serviceobjects.com\/docs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/test.serviceobjects.com\/docs\/#organization\",\"name\":\"Service Objects | Contact, Phone, Email Verification | Data Quality Services\",\"url\":\"https:\/\/test.serviceobjects.com\/docs\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/test.serviceobjects.com\/docs\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/test.serviceobjects.com\/docs\/wp-content\/uploads\/2022\/08\/SO-logo-2560px-transparent.png\",\"contentUrl\":\"https:\/\/test.serviceobjects.com\/docs\/wp-content\/uploads\/2022\/08\/SO-logo-2560px-transparent.png\",\"width\":2560,\"height\":1440,\"caption\":\"Service Objects | Contact, Phone, Email Verification | Data Quality Services\"},\"image\":{\"@id\":\"https:\/\/test.serviceobjects.com\/docs\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"DOTS Address Validation Plus - US","description":"Introduction Integration Code Snippets List of Operations Operation Definitions GetAddressPlusWithDPV (Recommended Operation) GetAddressPlus","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_US","og_type":"article","og_title":"DOTS Address Validation Plus - US","og_description":"Introduction Integration Code Snippets List of Operations Operation Definitions GetAddressPlusWithDPV (Recommended Operation) GetAddressPlus","og_url":"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-plus-us\/","og_site_name":"Service Objects | Contact, Phone, Email Verification | Data Quality Services","article_modified_time":"2024-03-29T20:53:36+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"20 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-plus-us\/","url":"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-plus-us\/","name":"DOTS Address Validation Plus - US","isPartOf":{"@id":"https:\/\/test.serviceobjects.com\/docs\/#website"},"datePublished":"2022-11-09T00:41:19+00:00","dateModified":"2024-03-29T20:53:36+00:00","description":"Introduction Integration Code Snippets List of Operations Operation Definitions GetAddressPlusWithDPV (Recommended Operation) GetAddressPlus","breadcrumb":{"@id":"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-plus-us\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-plus-us\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-plus-us\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/test.serviceobjects.com\/docs\/"},{"@type":"ListItem","position":2,"name":"DOTS Address Validation Plus &#8211; US"}]},{"@type":"WebSite","@id":"https:\/\/test.serviceobjects.com\/docs\/#website","url":"https:\/\/test.serviceobjects.com\/docs\/","name":"Service Objects | Contact, Phone, Email Verification | Data Quality Services","description":"","publisher":{"@id":"https:\/\/test.serviceobjects.com\/docs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/test.serviceobjects.com\/docs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/test.serviceobjects.com\/docs\/#organization","name":"Service Objects | Contact, Phone, Email Verification | Data Quality Services","url":"https:\/\/test.serviceobjects.com\/docs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/test.serviceobjects.com\/docs\/#\/schema\/logo\/image\/","url":"https:\/\/test.serviceobjects.com\/docs\/wp-content\/uploads\/2022\/08\/SO-logo-2560px-transparent.png","contentUrl":"https:\/\/test.serviceobjects.com\/docs\/wp-content\/uploads\/2022\/08\/SO-logo-2560px-transparent.png","width":2560,"height":1440,"caption":"Service Objects | Contact, Phone, Email Verification | Data Quality Services"},"image":{"@id":"https:\/\/test.serviceobjects.com\/docs\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/test.serviceobjects.com\/docs\/wp-json\/wp\/v2\/pages\/2342","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/test.serviceobjects.com\/docs\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/test.serviceobjects.com\/docs\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/test.serviceobjects.com\/docs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/test.serviceobjects.com\/docs\/wp-json\/wp\/v2\/comments?post=2342"}],"version-history":[{"count":128,"href":"https:\/\/test.serviceobjects.com\/docs\/wp-json\/wp\/v2\/pages\/2342\/revisions"}],"predecessor-version":[{"id":10058,"href":"https:\/\/test.serviceobjects.com\/docs\/wp-json\/wp\/v2\/pages\/2342\/revisions\/10058"}],"wp:attachment":[{"href":"https:\/\/test.serviceobjects.com\/docs\/wp-json\/wp\/v2\/media?parent=2342"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}