{"id":2532,"date":"2022-11-09T07:45:16","date_gmt":"2022-11-09T07:45:16","guid":{"rendered":"https:\/\/serviceobjects.wpaladdin.com\/?post_type=serviceobjects&#038;p=2532"},"modified":"2022-12-14T22:08:22","modified_gmt":"2022-12-14T22:08:22","slug":"avca2-rest","status":"publish","type":"page","link":"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-canada-2\/avca2-code-snippets-and-sample-code\/avca2-rest\/","title":{"rendered":"AVCA2 &#8211; REST"},"content":{"rendered":"\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\">C#<\/li><li class=\"tab-label\" role=\"tab\">Java<\/li><li class=\"tab-label\" role=\"tab\">PHP<\/li><li class=\"tab-label\" role=\"tab\">Ruby on Rails<\/li><li class=\"tab-label\" role=\"tab\">Python<\/li><li class=\"tab-label\" role=\"tab\">ColdFusion<\/li><li class=\"tab-label\" role=\"tab\">VB<\/li><li class=\"tab-label\" role=\"tab\">TSQL<\/li><li class=\"tab-label\" role=\"tab\">NodeJS<\/li><\/ul><div class=\"tab-content\">\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\">\n<p><strong><strong>Address Validation Canada 2 C# Rest Code Snippet<\/strong><\/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=\"\">string primaryurl = \"https:\/\/trial.serviceobjects.com\/avca2\/api.svc\/ValidateCanadianAddressV2?Address=\" + address + \"&amp;Address2=\" + address2 + \"&amp;Municipality=\" + municiaplity + \"&amp;Province=\" + province + \"&amp;PostalCode=\" + postalcode + \"&amp;Language=\" + language + \"&amp;LicenseKey=\" + licensekey;\nstring backupurl = \"https:\/\/trial.serviceobjects.com\/avca2\/api.svc\/ValidateCanadianAddressV2?Address=\" + address + \"&amp;Address2=\" + address2 + \"&amp;Municipality=\" + municiaplity + \"&amp;Province=\" + province + \"&amp;PostalCode=\" + postalcode + \"&amp;Language=\" + language + \"&amp;LicenseKey=\" + licensekey;\n \nCanadianAddressResponseV2 wsresponse = httpGet(primaryurl);\n \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 == null || (wsresponse.Error != null &amp;&amp; wsresponse.Error.TypeCode == \"3\")) ;\n{\n    wsresponse = httpGet(backupurl);\n}\n \nif (wsresponse.Error != null)\n{\n    ProcessErrorResponse(wsresponse.Error);\n}\nelse\n{\n    ProcessSuccessfulResponse(wsresponse.CanadianAddressInfoV2);\n}<\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\">\n<p>Address Validation Canada 2 Java Rest Code Snippet<\/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=\"\">String mainurl = \"https:\/\/trial.serviceobjects.com\/avca2\/api.svc\/ValidateCanadianAddressV2?Address=\"+ address + \"&amp;Address2=\" + address2 + \"&amp;Municipality=\" + municipality + \"&amp;Province=\" + province + \"&amp;PostalCode=\" + postalcode + \"&amp;Language=\" + language + \"&amp;LicenseKey=\" + licensekey;\nString backupurl = \"https:\/\/trial.serviceobjects.com\/avca2\/api.svc\/ValidateCanadianAddressV2?Address=\"+ address + \"&amp;Address2=\" + address2 + \"&amp;Municipality=\" + municipality + \"&amp;Province=\" + province + \"&amp;PostalCode=\" + postalcode + \"&amp;Language=\" + language + \"&amp;LicenseKey=\" + licensekey;\n \n\/\/System.out.println(mainurl);\n     \nAVCA2RestClient avca2rest = new AVCA2RestClient(); \nJSONObject results = new JSONObject();\nresults = avca2rest.AddressResponse(mainurl, backupurl);<\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\">\n<p><strong><strong><strong>Address Validation Canada 2 PHP Rest Code Snippets<\/strong><\/strong><\/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\/avca2\/api.svc\/ValidateCanadianAddressV2?Address=\".urlencode($Address).\"&amp;Address2=\".urlencode($Address2).\"&amp;Municipality=\".urlencode($Municipality).\"&amp;Province=\".urldecode($Province).\"&amp;PostalCode=\".urldecode($PostalCode).\"&amp;Language=\".urldecode($Language).\"&amp;LicenseKey=\".urlencode($LicenseKey);\n\/\/use backup url once given purchased license key\n$backupURL = \"https:\/\/trial.serviceobjects.com\/avca2\/api.svc\/ValidateCanadianAddressV2?Address=\".urlencode($Address).\"&amp;Address2=\".urlencode($Address2).\"&amp;Municipality=\".urlencode($Municipality).\"&amp;Province=\".urldecode($Province).\"&amp;PostalCode=\".urldecode($PostalCode).\"&amp;Language=\".urldecode($Language).\"&amp;LicenseKey=\".urlencode($LicenseKey);\ntry{\n    \/\/ Get cURL resource\n    $curl = curl_init();\n    curl_setopt_array($curl, array(CURLOPT_RETURNTRANSFER =&gt; 1, CURLOPT_URL =&gt; $URL, CURLOPT_USERAGENT =&gt; 'Service Objects Address Validation Canada'));\n    curl_setopt($curl, CURLOPT_TIMEOUT, 50); \/\/timeout in seconds\n    \/\/ Send the request &amp; save response to $resp\n    $resp = curl_exec($curl);\n     \n    \/\/ Close request to clear up some resources\n    if($resp == false)\n    {\n        echo \"IN back up block\";\n        curl_setopt_array($curl, array(CURLOPT_RETURNTRANSFER =&gt; 1, CURLOPT_URL =&gt; $backupURL, CURLOPT_USERAGENT =&gt; 'Service Objects Address Validation Canada'));\n        curl_setopt($curl, CURLOPT_TIMEOUT, 50); \/\/timeout in seconds\n        \/\/ Send the request &amp; save response to $resp\n        $resp = curl_exec($curl);\n        if($resp == false)\n        {\n            echo \"&lt;b&gt; Both rest calls failed &lt;\/b&gt;\";\n            curl_close($curl);\n            return;\n        }\n     \n     \n    }<\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\">\n<p><strong><strong>Address Validation Canada 2 RoR Code Snippets<\/strong><\/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=\"\">class RequestsController &lt; ApplicationController\n     \n    def show\n      @request = Request.find(params[:id])\n \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       \n      address = @request.address1\n      address2 = @request.address2\n      municipality = @request.municipality\n      province = @request.province\n      postalcode = @request.postalcode\n      language = @request.language\n      licensekey = @request.licensekey\n             \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\/AVCA2\/api.svc\/ValidateCanadianAddressV2?PostalCode=\" + postalcode + \"&amp;Province=\" + province + \"&amp;Municipality=\" + municipality + \"&amp;Address2=\" + address2 + \"&amp;Address=\" + address + \"&amp;Language=\"+ language + \"&amp;LicenseKey=\" + licensekey)\n      backupURL = URI.encode(\"https:\/\/trial.serviceobjects.com\/AVCA2\/api.svc\/ValidateCanadianAddressV2?PostalCode=\" + postalcode + \"&amp;Province=\" + province + \"&amp;Municipality=\" + municipality + \"&amp;Address2=\" + address2 + \"&amp;Address=\" + address + \"&amp;Language=\"+ language + \"&amp;LicenseKey=\" + licensekey)\n       \n      #These are set to access the hash that is returned\n      @avca2result =\"CanadianAddressResponseV2\"\n      @avca2info = \"CanadianAddressInfoV2\"\n      @avca2error = \"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 =&gt; 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      end\n  end\n    private\n      #processes HTTParty response and uses hash names to display\n      #relevant info returned from the ServiceObjects web serivce\n    def processresults(response)   \n            #Processes Error Response from the web service     \n            #Processes a valid response from the web service\n    end\nend<\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\">\n<p><strong><strong><strong>Address Validation Canada 2 Python Code Snippet<\/strong><\/strong><\/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 = \" \"\nmMunicipality = Municipality.get()\nif mMunicipality is None or mMunicipality == \"\":\n    mMunicipality = \" \"\nmProvince = Province.get()\nif mProvince is None or mProvince == \"\":\n    mProvince = \" \"\nmPostalCode = PostalCode.get()\nif mPostalCode is None or mPostalCode == \"\":\n    mPostalCode = \" \"\nmLanguage = Language.get()\nif mLanguage is None or mLanguage == \"\":\n    mLanguage = \" \"\nmLicenseKey = LicenseKey.get()\nif mLicenseKey is None or mLicenseKey == \"\":\n    mLicenseKey = \" \"\n \n#Set the Primary and backup URLs as necessary\nprimaryURL = 'https:\/\/trial.serviceobjects.com\/gcc\/GeoCoderCanada.asmx\/GetGeoLocation?'\nbackupURL = 'https:\/\/trial.serviceobjects.com\/gcc\/GeoCoderCanada.asmx\/GetGeoLocation?'\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 = {\"PostalCode\": mPostalCode, 'Province': mProvince, 'Municipality': mMunicipality, 'Address2':mAddress2, 'Address': mAddress, 'Language': mLanguage, '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    #Handel response and check for errors\n#Attempts to make a call to the service if 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        #Handel response and check for errors\n    #Prints an error if the primary and backup URLs failed\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\">\n<p><strong><strong>Address Validation Canada 2 ColdFusion Snippet<\/strong><\/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 ---&gt;\n&lt;cfIf isDefined(\"form.Action\") AND Action neq \"\" &gt;\n    &lt;cftry&gt;\n        &lt;cfset primaryURL = \"https:\/\/trial.serviceobjects.com\/AVCA2\/api.svc\/ValidateCanadianAddressV2?PostalCode=#PostalCode#&amp;Province=#Province#&amp;Municipality=#Municipality#&amp;Address2=#Address2#&amp;Address=#Address#&amp;Language=#Language#&amp;LicenseKey=#LicenseKey#\"&gt;\n        &lt;cfhttp url=\"#primaryURL#\" method=\"get\" result=\"response\"&gt;\n        &lt;cfset outputs = XmlParse(response.FileContent)&gt;\n        &lt;cfcatch&gt;\n            &lt;cftry&gt;\n                &lt;cfset backupURL = \"https:\/\/trial.serviceobjects.com\/AVCA2\/api.svc\/ValidateCanadianAddressV2?PostalCode=#PostalCode#&amp;Province=#Province#&amp;Municipality=#Municipality#&amp;Address2=#Address2#&amp;Address=#Address#&amp;Language=#Language#&amp;LicenseKey=#LicenseKey#\"&gt;\n                &lt;cfhttp url=\"#backupURL#\" method=\"get\" result=\"response\"&gt;\n                &lt;cfset outputs = XmlParse(response.FileContent)&gt;             \n                &lt;cfcatch &gt;\n                    &lt;cfoutput &gt;\n                        The Following Error Occured: #response.StatusCode#\n                    &lt;\/cfoutput&gt;\n                &lt;\/cfcatch&gt;\n            &lt;\/cftry&gt;\n        &lt;\/cfcatch&gt;\n    &lt;\/cftry&gt;\n&lt;\/cfif&gt;\n \n        <\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\">\n<p><strong><strong>Address Validation 2 Canada Code Snippet<\/strong><\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"vhdl\" 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\/AVCA2\/api.svc\/ValidateCanadianAddressV2?PostalCode=\" + postalcode + \"&amp;Province=\" + province + \"&amp;Municipality=\" + municipality + \"&amp;Address2=\" + address2 + \"&amp;Address=\" + address + \"&amp;Language=\" + language + \"&amp;LicenseKey=\" + licensekey\nDim backupurl As String = \"https:\/\/trial.serviceobjects.com\/AVCA2\/api.svc\/ValidateCanadianAddressV2?PostalCode=\" + postalcode + \"&amp;Province=\" + province + \"&amp;Municipality=\" + municipality + \"&amp;Address2=\" + address2 + \"&amp;Address=\" + address + \"&amp;Language=\" + language + \"&amp;LicenseKey=\" + licensekey\nDim wsresponse As AVCA2Response.CanadianAddressResponseV2 = 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].TypeCode = \"3\") Then\n    wsresponse = httpGet(backupurl)\nEnd If\nIf wsresponse.[Error] IsNot Nothing Then\n    ProcessErrorResponse(wsresponse.[Error])\nElse\n    ProcessSuccessfulResponse(wsresponse)\n \nEnd If<\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\">\n<p><strong><strong>Address Validation Canada 2 TSQL Rest Code Snippet<\/strong><\/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\/avca2\/api.svc\/ValidateCanadianAddressV2?Address=' + @address + '&amp;Address2=' + @address2 + '&amp;Municipality=' + @municipality + '&amp;Province=' + @province + '&amp;PostalCode=' + @postalcode + '&amp;Language=' + @language + '&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\/avca2\/api.svc\/ValidateCanadianAddressV2?Address=' + @address + '&amp;Address2=' + @address2 + '&amp;Municipality=' + @municipality + '&amp;Province=' + @province + '&amp;PostalCode=' + @postalcode + '&amp;Language=' + @language + '&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\">\n<p><strong><strong>Address Validation Canada 2 REST Code Snippet<\/strong><\/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 primaryUrl = 'https:\/\/trial.serviceobjects.com\/avca2\/api.svc\/ValidateCanadianAddressV2?Address=' + Address +'&amp;Address2='+ Address2 + '&amp;Municipality=' + Municipality +'&amp;Province=' + Province +'&amp;PostalCode=' + PostalCode + '&amp;Language=' + Language +'&amp;LicenseKey=' + LicenseKey;\nvar backupUrl = 'https:\/\/trial.serviceobjects.com\/avca2\/api.svc\/ValidateCanadianAddressV2?Address=' + Address +'&amp;Address2='+ Address2 + '&amp;Municipality=' + Municipality +'&amp;Province=' + Province +'&amp;PostalCode=' + PostalCode + '&amp;Language=' + Language +'&amp;LicenseKey=' + LicenseKey;\n \n \nvar req = http.get(primaryUrl, function(res) {\n    res.setEncoding('utf8');\n    res.on('data', function (results) {\n \n        \/\/Sets up the XML to JSON parser.  JSON makes the response easier to handle.\n        var parser = require('xml2js').Parser({explicitArray: false,ignoreAttrs: true});\n        parser.parseString(results, function (err, outputs) {\n            if (outputs.CanadianAddressResponseV2.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.CanadianAddressResponseV2.Error.TypeCode == \"3\")\n                {\n                    var backupReq = http.get(backupUrl, function(backupRes) {\n                        backupRes.setEncoding('utf8');\n                        backupRes.on('data', function (results) {\n \n                                var parser = require('xml2js').Parser({explicitArray: false,ignoreAttrs: true});\n                                parser.parseString(results, function (err, outputs) {\n \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","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":2495,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-2532","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>AVCA2 - REST<\/title>\n<meta name=\"description\" content=\"C#JavaPHPRuby on RailsPythonColdFusionVBTSQLNodeJS Address Validation Canada 2 C# Rest Code Snippet string primaryurl =\" \/>\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=\"AVCA2 - REST\" \/>\n<meta property=\"og:description\" content=\"C#JavaPHPRuby on RailsPythonColdFusionVBTSQLNodeJS Address Validation Canada 2 C# Rest Code Snippet string primaryurl =\" \/>\n<meta property=\"og:url\" content=\"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-canada-2\/avca2-code-snippets-and-sample-code\/avca2-rest\/\" \/>\n<meta property=\"og:site_name\" content=\"Service Objects | Contact, Phone, Email Verification | Data Quality Services\" \/>\n<meta property=\"article:modified_time\" content=\"2022-12-14T22:08:22+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=\"8 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-canada-2\/avca2-code-snippets-and-sample-code\/avca2-rest\/\",\"url\":\"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-canada-2\/avca2-code-snippets-and-sample-code\/avca2-rest\/\",\"name\":\"AVCA2 - REST\",\"isPartOf\":{\"@id\":\"https:\/\/test.serviceobjects.com\/docs\/#website\"},\"datePublished\":\"2022-11-09T07:45:16+00:00\",\"dateModified\":\"2022-12-14T22:08:22+00:00\",\"description\":\"C#JavaPHPRuby on RailsPythonColdFusionVBTSQLNodeJS Address Validation Canada 2 C# Rest Code Snippet string primaryurl =\",\"breadcrumb\":{\"@id\":\"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-canada-2\/avca2-code-snippets-and-sample-code\/avca2-rest\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-canada-2\/avca2-code-snippets-and-sample-code\/avca2-rest\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-canada-2\/avca2-code-snippets-and-sample-code\/avca2-rest\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/test.serviceobjects.com\/docs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"DOTS Address Validation &#8211; Canada 2\",\"item\":\"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-canada-2\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"AVCA2 &#8211; Code Snippets and Sample Code\",\"item\":\"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-canada-2\/avca2-code-snippets-and-sample-code\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"AVCA2 &#8211; REST\"}]},{\"@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":"AVCA2 - REST","description":"C#JavaPHPRuby on RailsPythonColdFusionVBTSQLNodeJS Address Validation Canada 2 C# Rest Code Snippet string primaryurl =","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":"AVCA2 - REST","og_description":"C#JavaPHPRuby on RailsPythonColdFusionVBTSQLNodeJS Address Validation Canada 2 C# Rest Code Snippet string primaryurl =","og_url":"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-canada-2\/avca2-code-snippets-and-sample-code\/avca2-rest\/","og_site_name":"Service Objects | Contact, Phone, Email Verification | Data Quality Services","article_modified_time":"2022-12-14T22:08:22+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-canada-2\/avca2-code-snippets-and-sample-code\/avca2-rest\/","url":"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-canada-2\/avca2-code-snippets-and-sample-code\/avca2-rest\/","name":"AVCA2 - REST","isPartOf":{"@id":"https:\/\/test.serviceobjects.com\/docs\/#website"},"datePublished":"2022-11-09T07:45:16+00:00","dateModified":"2022-12-14T22:08:22+00:00","description":"C#JavaPHPRuby on RailsPythonColdFusionVBTSQLNodeJS Address Validation Canada 2 C# Rest Code Snippet string primaryurl =","breadcrumb":{"@id":"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-canada-2\/avca2-code-snippets-and-sample-code\/avca2-rest\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-canada-2\/avca2-code-snippets-and-sample-code\/avca2-rest\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-canada-2\/avca2-code-snippets-and-sample-code\/avca2-rest\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/test.serviceobjects.com\/docs\/"},{"@type":"ListItem","position":2,"name":"DOTS Address Validation &#8211; Canada 2","item":"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-canada-2\/"},{"@type":"ListItem","position":3,"name":"AVCA2 &#8211; Code Snippets and Sample Code","item":"https:\/\/test.serviceobjects.com\/docs\/dots-address-validation-canada-2\/avca2-code-snippets-and-sample-code\/"},{"@type":"ListItem","position":4,"name":"AVCA2 &#8211; REST"}]},{"@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\/2532","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=2532"}],"version-history":[{"count":7,"href":"https:\/\/test.serviceobjects.com\/docs\/wp-json\/wp\/v2\/pages\/2532\/revisions"}],"predecessor-version":[{"id":9206,"href":"https:\/\/test.serviceobjects.com\/docs\/wp-json\/wp\/v2\/pages\/2532\/revisions\/9206"}],"up":[{"embeddable":true,"href":"https:\/\/test.serviceobjects.com\/docs\/wp-json\/wp\/v2\/pages\/2495"}],"wp:attachment":[{"href":"https:\/\/test.serviceobjects.com\/docs\/wp-json\/wp\/v2\/media?parent=2532"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}