{"id":5031,"date":"2022-11-13T16:37:06","date_gmt":"2022-11-13T16:37:06","guid":{"rendered":"https:\/\/serviceobjects.wpaladdin.com\/?page_id=5031"},"modified":"2024-03-29T09:10:12","modified_gmt":"2024-03-29T16:10:12","slug":"lv-rest","status":"publish","type":"page","link":"https:\/\/test.serviceobjects.com\/docs\/dots-lead-validation\/lv-code-snippets-and-sample-code\/lv-rest\/","title":{"rendered":"LV &#8211; REST"},"content":{"rendered":"\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\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=\"C#\" tabindex=\"0\">C#<\/li><li class=\"tab-label\" role=\"tab\" aria-selected=\"false\" aria-controls=\"Java\" tabindex=\"0\">Java<\/li><\/ul><div class=\"tab-content\">\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<p><strong>Lead Validation 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=\"\">ContactInternational response = null;\n\/\/In the event that a production key is purchased, the primary url should point to sws.serviceobjects.com and the backupURL should be pointing to swsbackup.serviceobjects.com\ntry\n{\n    string primaryURL = \"https:\/\/trial.serviceobjects.com\/lv\/api.svc\/XML\/ValidateLead_V3?FullName=\" + FullName.Text + \"&amp;Salutation=\" + Salutation.Text + \"&amp;FirstName=\" + FirstName.Text + \"&amp;LastName=\" + LastName.Text + \"&amp;BusinessName=\" + BusinessName.Text + \"&amp;BusinessDomain=\" + BusinessDomain.Text + \"&amp;BusinessEIN=\" + BusinessEIN.Text + \"&amp;Address1=\" + Address1.Text + \"&amp;Address2=\" + Address2.Text + \"&amp;Address3=\" + Address3.Text + \"&amp;Address4=\" + Address4.Text + \"&amp;Address5=\" + Address5 + \"&amp;Locality=\" + Locality.Text + \"&amp;AdminArea=\" + AdminArea.Text + \"&amp;PostalCode=\" + PostalCode.Text + \"&amp;Country=\" + Country.Text + \"&amp;Phone1=\" + Phone1.Text + \"&amp;Phone2=\" + Phone2.Text + \"&amp;Email=\" + Email.Text + \"&amp;IPAddress=\" + IPAddress.Text + \"&amp;Gender=\" + Gender.Text + \"&amp;DateOfBirth=\" + DateOfBirth.Text + \"&amp;UTCCaptureTime=\" + UTCCaptureTime.Text + \"&amp;OutputLanguage=\" + OutputLanguage.Text + \"&amp;TestType=\" + TestType.Text + \"&amp;LicenseKey=\" + LicenseKey.Text;\n    string backupURL = \"https:\/\/trial.serviceobjects.com\/lv\/api.svc\/XML\/ValidateLead_V3?FullName=\" + FullName.Text + \"&amp;Salutation=\" + Salutation.Text + \"&amp;FirstName=\" + FirstName.Text + \"&amp;LastName=\" + LastName.Text + \"&amp;BusinessName=\" + BusinessName.Text + \"&amp;BusinessDomain=\" + BusinessDomain.Text + \"&amp;BusinessEIN=\" + BusinessEIN.Text + \"&amp;Address1=\" + Address1.Text + \"&amp;Address2=\" + Address2.Text + \"&amp;Address3=\" + Address3.Text + \"&amp;Address4=\" + Address4.Text + \"&amp;Address5=\" + Address5 + \"&amp;Locality=\" + Locality.Text + \"&amp;AdminArea=\" + AdminArea.Text + \"&amp;PostalCode=\" + PostalCode.Text + \"&amp;Country=\" + Country.Text + \"&amp;Phone1=\" + Phone1.Text + \"&amp;Phone2=\" + Phone2.Text + \"&amp;Email=\" + Email.Text + \"&amp;IPAddress=\" + IPAddress.Text + \"&amp;Gender=\" + Gender.Text + \"&amp;DateOfBirth=\" + DateOfBirth.Text + \"&amp;UTCCaptureTime=\" + UTCCaptureTime.Text + \"&amp;OutputLanguage=\" + OutputLanguage.Text + \"&amp;TestType=\" + TestType.Text + \"&amp;LicenseKey=\" + LicenseKey.Text;\n    try\n    {\n        \/\/Make Call to primary URL\n        response = httpGet(primaryURL);\n        if (response == null || (response.Error != null &amp;&amp; response.Error.TypeCode == \"3\"))\n        {\n            throw new Exception();\n        }\n    }\n    catch\n    {\n        response = httpGet(backupURL);\n    }\ncatch (Exception ex)\n{\n    \/\/Deal with Errors Appropriately\n}<\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-create-block-tab tab-panel\" role=\"tabpanel\" tabindex=\"0\">\n<p><strong>Lead Validation Java Rest 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=\"\">ContactInternational Response = null;\nString Request = TrialURL + \"FullName=\" + FullName +\"&amp;Salutation=\" + Salutation +\"&amp;FirstName=\" + FirstName +\"&amp;LastName=\" + LastName +\"&amp;BusinessName=\" + BusinessName +\"&amp;BusinessDomain=\" + BusinessDomain +\"&amp;BusinessEIN=\" + BusinessEIN +\"&amp;Address1=\" + Address1 +\"&amp;Address2=\" + Address2 +\"&amp;Address3=\" + Address3 +\"&amp;Address4=\" + Address4 +\"&amp;Address5=\" + Address5 +\"&amp;Locality=\" + Locality +\"&amp;AdminArea=\" + AdminArea +\"&amp;PostalCode=\" + PostalCode +\"&amp;Country=\" + Country +\"&amp;Phone1=\" + Phone1 +\"&amp;Phone2=\" + Phone2 +\"&amp;Email=\" + Email +\"&amp;IPAddress=\" + IPAddress +\"&amp;Gender=\" + Gender +\"&amp;DateOfBirth=\" + DateOfBirth +\"&amp;UTCCaptureTime=\" + UTCCaptureTime +\"&amp;OutputLanguage=\" + OutputLanguage +\"&amp;TestType=\" + TestType +\"&amp;LicenseKey=\" + LicenseKey;\nString BackupRequest = FailoverURL + \"FullName=\" + FullName +\"&amp;Salutation=\" + Salutation +\"&amp;FirstName=\" + FirstName +\"&amp;LastName=\" + LastName +\"&amp;BusinessName=\" + BusinessName +\"&amp;BusinessDomain=\" + BusinessDomain +\"&amp;BusinessEIN=\" + BusinessEIN +\"&amp;Address1=\" + Address1 +\"&amp;Address2=\" + Address2 +\"&amp;Address3=\" + Address3 +\"&amp;Address4=\" + Address4 +\"&amp;Address5=\" + Address5 +\"&amp;Locality=\" + Locality +\"&amp;AdminArea=\" + AdminArea +\"&amp;PostalCode=\" + PostalCode +\"&amp;Country=\" + Country +\"&amp;Phone1=\" + Phone1 +\"&amp;Phone2=\" + Phone2 +\"&amp;Email=\" + Email +\"&amp;IPAddress=\" + IPAddress +\"&amp;Gender=\" + Gender +\"&amp;DateOfBirth=\" + DateOfBirth +\"&amp;UTCCaptureTime=\" + UTCCaptureTime +\"&amp;OutputLanguage=\" + OutputLanguage +\"&amp;TestType=\" + TestType +\"&amp;LicenseKey=\" + LicenseKey;\ntry {\n      \n    Response = DoHttpRequest(Request);\n    if (Response == null ||(Response.getError() != null &amp;&amp; Response.getError().getTypeCode().equals(\"3\")))\n    {\n        throw new Exception();\n    }\n      \n} catch (Exception e) {\n    \/\/ TODO Auto-generated catch block\n    Response = DoHttpRequest(BackupRequest);\n    e.printStackTrace();\n}<\/pre>\n<\/div>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":2,"featured_media":0,"parent":4996,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-5031","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>LV - REST<\/title>\n<meta name=\"description\" content=\"C#Java Lead Validation C# Rest Code Snippet ContactInternational response = null; \/\/In the event that a production key is purchased, the primary url\" \/>\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=\"LV - REST\" \/>\n<meta property=\"og:description\" content=\"C#Java Lead Validation C# Rest Code Snippet ContactInternational response = null; \/\/In the event that a production key is purchased, the primary url\" \/>\n<meta property=\"og:url\" content=\"https:\/\/test.serviceobjects.com\/docs\/dots-lead-validation\/lv-code-snippets-and-sample-code\/lv-rest\/\" \/>\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-29T16:10:12+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=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/test.serviceobjects.com\/docs\/dots-lead-validation\/lv-code-snippets-and-sample-code\/lv-rest\/\",\"url\":\"https:\/\/test.serviceobjects.com\/docs\/dots-lead-validation\/lv-code-snippets-and-sample-code\/lv-rest\/\",\"name\":\"LV - REST\",\"isPartOf\":{\"@id\":\"https:\/\/test.serviceobjects.com\/docs\/#website\"},\"datePublished\":\"2022-11-13T16:37:06+00:00\",\"dateModified\":\"2024-03-29T16:10:12+00:00\",\"description\":\"C#Java Lead Validation C# Rest Code Snippet ContactInternational response = null; \/\/In the event that a production key is purchased, the primary url\",\"breadcrumb\":{\"@id\":\"https:\/\/test.serviceobjects.com\/docs\/dots-lead-validation\/lv-code-snippets-and-sample-code\/lv-rest\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/test.serviceobjects.com\/docs\/dots-lead-validation\/lv-code-snippets-and-sample-code\/lv-rest\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/test.serviceobjects.com\/docs\/dots-lead-validation\/lv-code-snippets-and-sample-code\/lv-rest\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/test.serviceobjects.com\/docs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"DOTS Lead Validation\",\"item\":\"https:\/\/test.serviceobjects.com\/docs\/dots-lead-validation\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"LV &#8211; Code Snippets and Sample Code\",\"item\":\"https:\/\/test.serviceobjects.com\/docs\/dots-lead-validation\/lv-code-snippets-and-sample-code\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"LV &#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":"LV - REST","description":"C#Java Lead Validation C# Rest Code Snippet ContactInternational response = null; \/\/In the event that a production key is purchased, the primary url","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":"LV - REST","og_description":"C#Java Lead Validation C# Rest Code Snippet ContactInternational response = null; \/\/In the event that a production key is purchased, the primary url","og_url":"https:\/\/test.serviceobjects.com\/docs\/dots-lead-validation\/lv-code-snippets-and-sample-code\/lv-rest\/","og_site_name":"Service Objects | Contact, Phone, Email Verification | Data Quality Services","article_modified_time":"2024-03-29T16:10:12+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/test.serviceobjects.com\/docs\/dots-lead-validation\/lv-code-snippets-and-sample-code\/lv-rest\/","url":"https:\/\/test.serviceobjects.com\/docs\/dots-lead-validation\/lv-code-snippets-and-sample-code\/lv-rest\/","name":"LV - REST","isPartOf":{"@id":"https:\/\/test.serviceobjects.com\/docs\/#website"},"datePublished":"2022-11-13T16:37:06+00:00","dateModified":"2024-03-29T16:10:12+00:00","description":"C#Java Lead Validation C# Rest Code Snippet ContactInternational response = null; \/\/In the event that a production key is purchased, the primary url","breadcrumb":{"@id":"https:\/\/test.serviceobjects.com\/docs\/dots-lead-validation\/lv-code-snippets-and-sample-code\/lv-rest\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/test.serviceobjects.com\/docs\/dots-lead-validation\/lv-code-snippets-and-sample-code\/lv-rest\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/test.serviceobjects.com\/docs\/dots-lead-validation\/lv-code-snippets-and-sample-code\/lv-rest\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/test.serviceobjects.com\/docs\/"},{"@type":"ListItem","position":2,"name":"DOTS Lead Validation","item":"https:\/\/test.serviceobjects.com\/docs\/dots-lead-validation\/"},{"@type":"ListItem","position":3,"name":"LV &#8211; Code Snippets and Sample Code","item":"https:\/\/test.serviceobjects.com\/docs\/dots-lead-validation\/lv-code-snippets-and-sample-code\/"},{"@type":"ListItem","position":4,"name":"LV &#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\/5031","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\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/test.serviceobjects.com\/docs\/wp-json\/wp\/v2\/comments?post=5031"}],"version-history":[{"count":8,"href":"https:\/\/test.serviceobjects.com\/docs\/wp-json\/wp\/v2\/pages\/5031\/revisions"}],"predecessor-version":[{"id":10038,"href":"https:\/\/test.serviceobjects.com\/docs\/wp-json\/wp\/v2\/pages\/5031\/revisions\/10038"}],"up":[{"embeddable":true,"href":"https:\/\/test.serviceobjects.com\/docs\/wp-json\/wp\/v2\/pages\/4996"}],"wp:attachment":[{"href":"https:\/\/test.serviceobjects.com\/docs\/wp-json\/wp\/v2\/media?parent=5031"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}