{"_id":"55cba6d437edd823001a85e3","editedParams2":true,"version":{"_id":"55cba6d237edd823001a85d7","project":"55c80e130300460d00c91c1d","__v":3,"createdAt":"2015-08-12T20:04:34.776Z","releaseDate":"2015-08-12T20:04:34.776Z","categories":["55cba6d337edd823001a85d8","55cba6d337edd823001a85d9","55cba6d337edd823001a85da","55cba6d337edd823001a85db","55cbd8e84cf2180d00bb1c15","561312bc41a9ec0d00a3fdfc"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2"},"category":{"_id":"55cba6d337edd823001a85da","__v":1,"pages":["55cba6d437edd823001a85e0","55cba6d437edd823001a85e1","55cba6d437edd823001a85e2","55cba6d437edd823001a85e3","55cba6d437edd823001a85e4","55cba6d437edd823001a85e5"],"project":"55c80e130300460d00c91c1d","version":"55cba6d237edd823001a85d7","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-08-11T19:40:06.209Z","from_sync":false,"order":2,"slug":"lead-validation-end-api","title":"LEAD VALIDATION END API"},"parentDoc":null,"__v":2,"editedParams":true,"project":"55c80e130300460d00c91c1d","user":"55ca76068705a70d00b8fbef","updates":["5646806d36961e0d005c6212"],"next":{"pages":[],"description":""},"createdAt":"2015-08-12T17:39:59.902Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{  \n       \"Criteria\":{  \n              \"Host\":\"XXXX\",\n              \"RequestDate\":\"2015-07-14T15:31:51.3449564Z\",\n              \"RequestIP\":\"::192.168.1.1\",\n              \"TransactionId\":\"e5be8f0e-a6ee-46b0-bd9b-e2450efbb70e\",\n              \"Address\":\"123 Main St\",\n              \"City\":\"Seattle\",\n              \"PostalCode\":\"98101\",\n              \"State\":\"WA\"\n           },\n           \"AddressResult\":{  \n              {  \n                \"Address\":\"123 Main St\",\n                \"AddressRange\":\"123\",\n                \"StreetName\":\"Main\",\n                \"Suffix\":\"St\",\n                \"City\":\"Seattle\",\n                \"CountyName\":\"King\",\n                \"CountyFips\":\"53033\",\n                \"State\":\"WA\",\n                \"Zip\":\"98101\",\n                \"Zip4\":\"7418\",\n                \"CountryCode\":\"US\",\n                \"CarrierRoute\":\"C005\",\n                \"CongressionalDistrict\":\"09\",\n                \"TimeZone\":\"Pacific Time\",\n                \"TimeZoneCode\":\"08\",\n                \"AddressTypeCode\":\"S\",                \n                \"Codes\":[\n                    {\n                        \"Status\":\"Status\",\n                        \"Code\":\"A1\",\n                        \"Description\":\"Address matched to postal database\"\n                    },\n                    {\n                        \"Status\":\"DPV\",\n                        \"Code\":\"DPV3\",\n                        \"Description\":\"Address matched to DPV database\"\n                    }\n                ]\n              }\n           }\n    }","name":""}]},"settings":"","examples":{"codes":[{"name":"","code":"<?php\n    \n$licensekey = \"YOURKEYHERE\";\n\n$url =  \"https://api.accurateappend.com/Services/V2/ValidateAddress/\" . $licensekey . \"/?\";\n$querystring = \"address=\" . urlencode(\"123 main st\") .\n               \"&city=seattle\" .\n               \"&state=wa\" .\n               \"&postalcode=98101\";\n\n$url .= $querystring;\n//echo \"request url: \" . $url . \"<br>\\n<br>\\n\";\n\nif(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN')\n{\n    // windows operating system as the requesting server\n    $cacert_path_file = dirname(__FILE__) . \"\\cacert.pem\";\n}\nelse\n{\n    // other os\n    $cacert_path_file = \"cacert.pem\";\n}\n\n$ch = curl_init();\ncurl_setopt($ch, CURLOPT_URL, $url);\ncurl_setopt($ch, CURLOPT_HTTPGET, true);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));\ncurl_setopt($ch, CURLOPT_SSLVERSION, 'CURL_SSLVERSION_DEFAULT');  // on a windows server the single quotes are required on 3rd parameter\ncurl_setopt($ch, CURLOPT_CAINFO, $cacert_path_file);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_VERBOSE, true);\n\n$json_string = curl_exec($ch);\n$curl_err = curl_error($ch);\n\nif($curl_err)\n{\n    echo \"curl error: $curl_err\";\n}\nelse\n{\n    curl_close($ch);\n\n    // decode json\n    $parsed_json = json_decode($json_string);\n\n    // instantiate an associative array\n    $response = array();\n    // load json data into associative array\n    $response = json_to_associative($parsed_json);\n\n    // print the associative array to the screen\n    foreach ($response as $key => $value)\n    {\n        echo $key . \" = \" . $value . \"<br>\\n\";\n    }\n}\n\n\necho \"<br>\\n\";\necho \"<br>\\n\";\necho \"<br>\\n\";\necho \"<br>\\n\";\necho \"<br>\\n\";\necho \"<br>\\n\";\necho \"<br>\\n\";\n\n\n\n// --------------------------------------------------------- //\n//\n// --------------------------------------------------------- //\nfunction json_to_associative($parsed_json)\n{\n    $response = array();\n\n    // load the associative array with all response key/value pairs\n    $response['Host'] = $parsed_json->{'Criteria'}->Host;\n    $response['RequestDate'] = $parsed_json->{'Criteria'}->RequestDate;\n    $response['RequestIP'] = $parsed_json->{'Criteria'}->RequestIP;\n    $response['TransactionId'] = $parsed_json->{'Criteria'}->TransactionId;\n    $response['Address'] = $parsed_json->{'Criteria'}->Address;\n    $response['City'] = $parsed_json->{'Criteria'}->City;\n    $response['PostalCode'] = $parsed_json->{'Criteria'}->PostalCode;\n    $response['State'] = $parsed_json->{'Criteria'}->State;\n\n\n    $address_results_fields_array = array(\"Address\",\n                                          \"AddressRange\",\n                                          \"AddressTypeCode\",\n                                          \"CarrierRoute\",\n                                          \"City\",\n                                          \"CongressionalDistrict\",\n                                          \"CountryCode\",\n                                          \"CountyFips\",\n                                          \"CountyName\",                                          \n                                          \"State\",\n                                          \"StreetName\",\n                                          \"Suffix\",\n                                          \"TimeZone\",\n                                          \"TimeZoneCode\",\n                                          \"Zip\",\n                                          \"Zip4\");\n\n\n\n    // typecast the stdClass to array\n    $obj_arr = (array)$parsed_json->{'AddressResult'};\n\n    if(!empty($obj_arr))\n    {\n        for($j = 0; $j < count($address_results_fields_array); $j++)\n        {\n            $response[$address_results_fields_array[$j]] = $obj_arr[$address_results_fields_array[$j]];\n        }\n\n\n        // iteration required for mulitple Address response\n        for($i = 0; $i < count($parsed_json->{'AddressResult'}->{'Codes'}); $i++)\n        {\n\n            $keynum = $i + 1;\n\n            $response['Code' . $keynum] = $parsed_json->{'AddressResult'}->{'Codes'}[$i]->Code;\n            $response['Description' . $keynum] = $parsed_json->{'AddressResult'}->{'Codes'}[$i]->Description;\n            $response['Status' . $keynum] = $parsed_json->{'AddressResult'}->{'Codes'}[$i]->Status;\n        }\n    }\n    return $response;\n}\n\n/*\nCopyright (c) 2015, AccurateAppend Corp\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are permitted \nprovided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this list of conditions \n   and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions \n   and the following disclaimer in the documentation and/or other materials provided with the distribution.\n\n3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse \n   or promote products derived from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR \nIMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND \nFITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS \nBE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, \nBUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS \nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR \nTORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF \nADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\n?>","language":"php"},{"code":"using System;\nusing System.Collections.Generic;\nusing System.Net;\nusing RestSharp;\n\nnamespace Samples\n{\n    // This example uses the RestSharp NuGet package (https://www.nuget.org/packages/RestSharp)\n  \n    public static class Program\n    {\n        private const String Key = \"YOURKEYHERE\";\n        private const String RootUri = :::at:::\"http://api.accurateappend.com/Services/V2\";\n\n        public static void Main(String[] args)\n        {\n            ValidateAddress();\n        }\n\n\n        #region Validation\n\n        public class Result\n        {\n            public String Type { get; set; }\n\n            public String Status { get; set; }\n\n            public String Code { get; set; }\n\n            public String Description { get; set; }\n        }\n\n\n        #region Validate Address\n\n        private static void ValidateAddress()\n        {\n            const String Resource =\n                \"/ValidateAddress/\" + Key +\n                \"/?address=123 main st&city=seattle&state=wa&postalcode=98101\";\n\n            var request = new RestRequest(Resource) { Method = Method.GET };\n\n            var client = new RestClient(RootUri);\n            var response = client.Execute<AddressResponse>(request);\n            if (response.StatusCode != HttpStatusCode.OK)\n            {\n                // Error Handling Omitted For Brevity\n            }\n            var data = response.Data;\n            Console.WriteLine(\"{0} - {1}, {2}\", data.AddressResult.Latitude, data.AddressResult.Longitude, data.AddressResult.TimeZone);\n        }\n\n        public class AddressResponse\n        {\n            public AddressResult AddressResult { get; set; }\n        }\n\n        public class AddressResult\n        {\n            public String CongressionalDistrict { get; set; }\n\n            public String CountryCode { get; set; }\n\n            public String CountyFips { get; set; }\n\n            public String CountyName { get; set; }\n\n            public String Latitude { get; set; }\n\n            public String Longitude { get; set; }\n\n            public String State { get; set; }\n\n            public String StreetName { get; set; }\n\n            public String Suffix { get; set; }\n\n            public String TimeZone { get; set; }\n\n            public String TimeZoneCode { get; set; }\n\n            public String Zip { get; set; }\n\n            public String Zip4 { get; set; }\n\n            public List<Result> Codes { get; set; }\n        }\n\n        #endregion\n    }\n}\n\n/*\nCopyright (c) 2015, AccurateAppend Corp\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are permitted \nprovided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this list of conditions \n   and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions \n   and the following disclaimer in the documentation and/or other materials provided with the distribution.\n\n3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse \n   or promote products derived from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR \nIMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND \nFITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS \nBE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, \nBUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS \nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR \nTORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF \nADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/","language":"csharp"}]},"method":"get","auth":"required","params":[{"_id":"55cbdf7c2767710d00bc9c21","ref":"","in":"path","required":true,"desc":"License key issued by customer support.","default":"","type":"string","name":"licensekey"},{"_id":"55cbdf7c2767710d00bc9c20","ref":"","in":"query","required":true,"desc":"Search subject's address. Currently only US postal addresses are accepted.","default":"","type":"string","name":"address"},{"_id":"55cbdf7c2767710d00bc9c1f","ref":"","in":"query","required":false,"desc":"City associated with search subject's address. Optional, if postalcode is passed in the request.","default":"","type":"string","name":"city"},{"_id":"55cbdf7c2767710d00bc9c1e","ref":"","in":"query","required":false,"desc":"State associated with search subject's address.  Optional, if postalcode is passed in the request.","default":"","type":"string","name":"state"},{"_id":"55cbdf7c2767710d00bc9c1d","ref":"","in":"query","required":false,"desc":"Postal code associated with search subject's address. Optional, if City and State are passed in the request.","default":"","type":"string","name":"postalcode"}],"url":"/ValidateAddress/:licensekey/?"},"isReference":false,"order":3,"body":"[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"HTTP Headers\",\n  \"body\": \"When making a call to this API, the HTTP header \\\"content-type\\\" MUST be supplied with a value of \\\"application/json\\\". Failure to include this header will result in an HTTP 400 Bad Request response. Your choice of client library may automatically include this header. Please consult your documentation.\"\n}\n[/block]\n## AddressResult\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field name\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"Address\",\n    \"0-2\": \"Formatted full street address\",\n    \"1-0\": \"AddressRange\",\n    \"0-1\": \"string\",\n    \"1-1\": \"string\",\n    \"2-1\": \"string\",\n    \"1-2\": \"Parsed address range\",\n    \"2-0\": \"StreetName\",\n    \"2-2\": \"Parsed street name\",\n    \"3-0\": \"Suffix\",\n    \"3-1\": \"string\",\n    \"4-1\": \"string\",\n    \"3-2\": \"Parsed street suffix. i.e. St, Ave, Rd\",\n    \"4-0\": \"PostDirection\",\n    \"4-2\": \"Parsed street post direction\",\n    \"5-0\": \"City\",\n    \"5-1\": \"string\",\n    \"5-2\": \"Parsed and corrected city\",\n    \"6-0\": \"CountyName\",\n    \"6-2\": \"County name\",\n    \"7-0\": \"CountyFips\",\n    \"7-2\": \"County FIP code\",\n    \"8-0\": \"State\",\n    \"8-2\": \"2 digit state abbreviation\",\n    \"6-1\": \"string\",\n    \"7-1\": \"string\",\n    \"8-1\": \"string\",\n    \"9-1\": \"string\",\n    \"9-0\": \"Zip\",\n    \"9-2\": \"5 digit postal code\",\n    \"10-1\": \"string\",\n    \"10-0\": \"Zip4\",\n    \"10-2\": \"4 digit Zip extension\",\n    \"11-0\": \"CountryCode\",\n    \"11-2\": \"Country code\",\n    \"12-0\": \"CarrierRoute\",\n    \"12-2\": \"Carrier route number\",\n    \"11-1\": \"string\",\n    \"12-1\": \"string\",\n    \"13-0\": \"CongressionalDistrict\",\n    \"13-2\": \"Congressional district number\",\n    \"14-0\": \"TimeZone\",\n    \"14-2\": \"Time zone description\",\n    \"13-1\": \"string\",\n    \"14-1\": \"string\",\n    \"15-0\": \"TimeZoneCode\",\n    \"15-2\": \"Time zone code\",\n    \"15-1\": \"string\",\n    \"16-0\": \"AddressTypeCode\",\n    \"16-2\": \"Address type code\",\n    \"16-1\": \"string\",\n    \"17-0\": \"Codes\",\n    \"17-1\": \"array\",\n    \"17-2\": \"Result\"\n  },\n  \"cols\": 3,\n  \"rows\": 18\n}\n[/block]\n## ValidateAddress Status Codes\nThis section lists the following types of status codes for the ValidateAddress method\n\n## Result Codes\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Code\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"A1\",\n    \"0-1\": \"Address matched to postal database\",\n    \"1-0\": \"A2\",\n    \"1-1\": \"Street address match\",\n    \"2-0\": \"A3\",\n    \"2-1\": \"Non-USPS address\",\n    \"3-0\": \"A4\",\n    \"3-1\": \"Foreign postal code detected\",\n    \"4-0\": \"A5\",\n    \"4-1\": \"Address matched to CMRA\",\n    \"5-0\": \"A6\",\n    \"5-1\": \"Address has been updated by LACS\",\n    \"6-0\": \"A7\",\n    \"6-1\": \"Suite appended by Suite Link\",\n    \"7-0\": \"A8\",\n    \"7-1\": \"Address is vacant\",\n    \"8-0\": \"A9\",\n    \"8-1\": \"Alternate delivery\",\n    \"9-0\": \"A10\",\n    \"9-1\": \"DPV Error\",\n    \"10-0\": \"A11\",\n    \"10-1\": \"This address is deliverable by USPS only\",\n    \"11-0\": \"A12\",\n    \"11-1\": \"No suggestions\",\n    \"12-0\": \"A13\",\n    \"12-1\": \"Extraneous information found\",\n    \"13-0\": \"A47\",\n    \"13-1\": \"Last name reported at address\"\n  },\n  \"cols\": 2,\n  \"rows\": 14\n}\n[/block]\n## Error Codes\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Code\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"A14\",\n    \"0-1\": \"Zip code error\",\n    \"1-0\": \"A15\",\n    \"1-1\": \"Unknown street error\",\n    \"2-0\": \"A16\",\n    \"2-1\": \"Component match error\",\n    \"3-0\": \"A17\",\n    \"3-1\": \"Non-deliverable address error\",\n    \"4-0\": \"A18\",\n    \"4-1\": \"Multiple match error\",\n    \"5-0\": \"A19\",\n    \"5-1\": \"Early warning system error\",\n    \"6-0\": \"A20\",\n    \"6-1\": \"Missing minimum address input error\",\n    \"7-0\": \"A21\",\n    \"7-1\": \"Suite range invalid error\",\n    \"8-0\": \"A22\",\n    \"8-1\": \"Suite range missing error\",\n    \"9-0\": \"A23\",\n    \"9-1\": \"Primary range invalid error\",\n    \"10-0\": \"A24\",\n    \"10-1\": \"Primary range missing error\",\n    \"11-0\": \"A25\",\n    \"11-1\": \"PO HC or RR box number invalid error\",\n    \"12-0\": \"A26\",\n    \"12-1\": \"PO HC or RR Box number missing error\",\n    \"13-0\": \"A27\",\n    \"13-1\": \"CMRA secondary missing error\",\n    \"14-0\": \"A30\",\n    \"14-1\": \"Suite range extraneous error\"\n  },\n  \"cols\": 2,\n  \"rows\": 15\n}\n[/block]\n## Correction Codes\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Code\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"A33\",\n    \"0-1\": \"Zip code change\",\n    \"1-0\": \"A34\",\n    \"1-1\": \"State change\",\n    \"2-0\": \"A35\",\n    \"2-1\": \"City change\",\n    \"3-0\": \"A36\",\n    \"3-1\": \"Base alternate change\",\n    \"4-0\": \"A37\",\n    \"4-1\": \"Alias change\",\n    \"5-0\": \"A38\",\n    \"5-1\": \"Address1/address2 swap\",\n    \"6-0\": \"A39\",\n    \"6-1\": \"Address/company swap\",\n    \"7-0\": \"A40\",\n    \"7-1\": \"Plus4 change\",\n    \"8-0\": \"A41\",\n    \"8-1\": \"Urbanization Change\",\n    \"9-0\": \"A42\",\n    \"9-1\": \"Street name change\",\n    \"10-0\": \"A43\",\n    \"10-1\": \"Suffix change\",\n    \"11-0\": \"A44\",\n    \"11-1\": \"Street direction change\",\n    \"12-0\": \"A45\",\n    \"12-1\": \"Suite name change\",\n    \"13-0\": \"A46\",\n    \"13-1\": \"Suite range change\"\n  },\n  \"cols\": 2,\n  \"rows\": 14\n}\n[/block]\n## DPV Status Codes\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Code\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"DPV1\",\n    \"0-1\": \"Address matched to postal database\",\n    \"1-0\": \"DPV2\",\n    \"1-1\": \"Address not matched to postal database\",\n    \"2-0\": \"DPV3\",\n    \"2-1\": \"Address matched to DPV database\",\n    \"3-0\": \"DPV4\",\n    \"3-1\": \"Input address house number matched to DPV but secondary number not matched\",\n    \"4-0\": \"DPV5\",\n    \"4-1\": \"Input address house number matched to DPV but address is missing secondary house number\",\n    \"5-0\": \"DPV6\",\n    \"5-1\": \"Input address house number missing\",\n    \"6-0\": \"DPV7\",\n    \"6-1\": \"Input address house number invalid\",\n    \"7-0\": \"DPV8\",\n    \"7-1\": \"Input address missing PO, RR, or HC box number\",\n    \"8-0\": \"DPV9\",\n    \"8-1\": \"Input address PO, RR or HC number invalid\",\n    \"9-0\": \"DPV10\",\n    \"9-1\": \"Input address matched to commercial mail handler\",\n    \"10-0\": \"DPV11\",\n    \"10-1\": \"Input address matched to commercial mail handler but secondary house number not present\",\n    \"11-0\": \"DPV12\",\n    \"11-1\": \"Address is a military address\",\n    \"12-0\": \"DPV13\",\n    \"12-1\": \"Address is a general delivery address\",\n    \"13-0\": \"DPV14\",\n    \"13-1\": \"Address was coded to a unique postal code\"\n  },\n  \"cols\": 2,\n  \"rows\": 14\n}\n[/block]\n## Address Type Codes\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Code\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"F\",\n    \"0-1\": \"Firm or Company address\",\n    \"1-0\": \"G\",\n    \"1-1\": \"General Delivery address\",\n    \"2-0\": \"H\",\n    \"2-1\": \"High Rise or Business complex\",\n    \"3-0\": \"P\",\n    \"3-1\": \"PO Box address\",\n    \"4-0\": \"R\",\n    \"4-1\": \"Rural Route address\",\n    \"5-0\": \"S\",\n    \"5-1\": \"Street or Residential address\"\n  },\n  \"cols\": 2,\n  \"rows\": 6\n}\n[/block]\n ## Error Messages\nFor a list of codes and descriptions click [here](http://docs.accurateappend.com/docs/error-messages).","excerpt":"This section describes request parameters, responses and potential error messages for the ValidateAddress method.\n\n- Verifies and standardizes input address to USPS standards.\n- Parses input address into its individual elements, which may include house number, street name, street type, unit number, and more.\n- Confirms deliverability using Delivery Point Validation (DPV).\n- Corrects street name misspellings.\n- Corrects city name misspellings.\n- Appends city and state in cases where only a street address and postal code are input.\n- Appends postal code in cases where only city and state are input.\n- Verifies whether delivery type is business or residential.\n- Appends time zone.","slug":"validateaddress","type":"endpoint","title":"Validate Postal Address"}

getValidate Postal Address

This section describes request parameters, responses and potential error messages for the ValidateAddress method. - Verifies and standardizes input address to USPS standards. - Parses input address into its individual elements, which may include house number, street name, street type, unit number, and more. - Confirms deliverability using Delivery Point Validation (DPV). - Corrects street name misspellings. - Corrects city name misspellings. - Appends city and state in cases where only a street address and postal code are input. - Appends postal code in cases where only city and state are input. - Verifies whether delivery type is business or residential. - Appends time zone.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

licensekey:
required
string
License key issued by customer support.

Query Params

address:
required
string
Search subject's address. Currently only US postal addresses are accepted.
city:
string
City associated with search subject's address. Optional, if postalcode is passed in the request.
state:
string
State associated with search subject's address. Optional, if postalcode is passed in the request.
postalcode:
string
Postal code associated with search subject's address. Optional, if City and State are passed in the request.

Examples


Result Format


Documentation

[block:callout] { "type": "warning", "title": "HTTP Headers", "body": "When making a call to this API, the HTTP header \"content-type\" MUST be supplied with a value of \"application/json\". Failure to include this header will result in an HTTP 400 Bad Request response. Your choice of client library may automatically include this header. Please consult your documentation." } [/block] ## AddressResult [block:parameters] { "data": { "h-0": "Field name", "h-1": "Type", "h-2": "Description", "0-0": "Address", "0-2": "Formatted full street address", "1-0": "AddressRange", "0-1": "string", "1-1": "string", "2-1": "string", "1-2": "Parsed address range", "2-0": "StreetName", "2-2": "Parsed street name", "3-0": "Suffix", "3-1": "string", "4-1": "string", "3-2": "Parsed street suffix. i.e. St, Ave, Rd", "4-0": "PostDirection", "4-2": "Parsed street post direction", "5-0": "City", "5-1": "string", "5-2": "Parsed and corrected city", "6-0": "CountyName", "6-2": "County name", "7-0": "CountyFips", "7-2": "County FIP code", "8-0": "State", "8-2": "2 digit state abbreviation", "6-1": "string", "7-1": "string", "8-1": "string", "9-1": "string", "9-0": "Zip", "9-2": "5 digit postal code", "10-1": "string", "10-0": "Zip4", "10-2": "4 digit Zip extension", "11-0": "CountryCode", "11-2": "Country code", "12-0": "CarrierRoute", "12-2": "Carrier route number", "11-1": "string", "12-1": "string", "13-0": "CongressionalDistrict", "13-2": "Congressional district number", "14-0": "TimeZone", "14-2": "Time zone description", "13-1": "string", "14-1": "string", "15-0": "TimeZoneCode", "15-2": "Time zone code", "15-1": "string", "16-0": "AddressTypeCode", "16-2": "Address type code", "16-1": "string", "17-0": "Codes", "17-1": "array", "17-2": "Result" }, "cols": 3, "rows": 18 } [/block] ## ValidateAddress Status Codes This section lists the following types of status codes for the ValidateAddress method ## Result Codes [block:parameters] { "data": { "h-0": "Code", "h-1": "Description", "0-0": "A1", "0-1": "Address matched to postal database", "1-0": "A2", "1-1": "Street address match", "2-0": "A3", "2-1": "Non-USPS address", "3-0": "A4", "3-1": "Foreign postal code detected", "4-0": "A5", "4-1": "Address matched to CMRA", "5-0": "A6", "5-1": "Address has been updated by LACS", "6-0": "A7", "6-1": "Suite appended by Suite Link", "7-0": "A8", "7-1": "Address is vacant", "8-0": "A9", "8-1": "Alternate delivery", "9-0": "A10", "9-1": "DPV Error", "10-0": "A11", "10-1": "This address is deliverable by USPS only", "11-0": "A12", "11-1": "No suggestions", "12-0": "A13", "12-1": "Extraneous information found", "13-0": "A47", "13-1": "Last name reported at address" }, "cols": 2, "rows": 14 } [/block] ## Error Codes [block:parameters] { "data": { "h-0": "Code", "h-1": "Description", "0-0": "A14", "0-1": "Zip code error", "1-0": "A15", "1-1": "Unknown street error", "2-0": "A16", "2-1": "Component match error", "3-0": "A17", "3-1": "Non-deliverable address error", "4-0": "A18", "4-1": "Multiple match error", "5-0": "A19", "5-1": "Early warning system error", "6-0": "A20", "6-1": "Missing minimum address input error", "7-0": "A21", "7-1": "Suite range invalid error", "8-0": "A22", "8-1": "Suite range missing error", "9-0": "A23", "9-1": "Primary range invalid error", "10-0": "A24", "10-1": "Primary range missing error", "11-0": "A25", "11-1": "PO HC or RR box number invalid error", "12-0": "A26", "12-1": "PO HC or RR Box number missing error", "13-0": "A27", "13-1": "CMRA secondary missing error", "14-0": "A30", "14-1": "Suite range extraneous error" }, "cols": 2, "rows": 15 } [/block] ## Correction Codes [block:parameters] { "data": { "h-0": "Code", "h-1": "Description", "0-0": "A33", "0-1": "Zip code change", "1-0": "A34", "1-1": "State change", "2-0": "A35", "2-1": "City change", "3-0": "A36", "3-1": "Base alternate change", "4-0": "A37", "4-1": "Alias change", "5-0": "A38", "5-1": "Address1/address2 swap", "6-0": "A39", "6-1": "Address/company swap", "7-0": "A40", "7-1": "Plus4 change", "8-0": "A41", "8-1": "Urbanization Change", "9-0": "A42", "9-1": "Street name change", "10-0": "A43", "10-1": "Suffix change", "11-0": "A44", "11-1": "Street direction change", "12-0": "A45", "12-1": "Suite name change", "13-0": "A46", "13-1": "Suite range change" }, "cols": 2, "rows": 14 } [/block] ## DPV Status Codes [block:parameters] { "data": { "h-0": "Code", "h-1": "Description", "0-0": "DPV1", "0-1": "Address matched to postal database", "1-0": "DPV2", "1-1": "Address not matched to postal database", "2-0": "DPV3", "2-1": "Address matched to DPV database", "3-0": "DPV4", "3-1": "Input address house number matched to DPV but secondary number not matched", "4-0": "DPV5", "4-1": "Input address house number matched to DPV but address is missing secondary house number", "5-0": "DPV6", "5-1": "Input address house number missing", "6-0": "DPV7", "6-1": "Input address house number invalid", "7-0": "DPV8", "7-1": "Input address missing PO, RR, or HC box number", "8-0": "DPV9", "8-1": "Input address PO, RR or HC number invalid", "9-0": "DPV10", "9-1": "Input address matched to commercial mail handler", "10-0": "DPV11", "10-1": "Input address matched to commercial mail handler but secondary house number not present", "11-0": "DPV12", "11-1": "Address is a military address", "12-0": "DPV13", "12-1": "Address is a general delivery address", "13-0": "DPV14", "13-1": "Address was coded to a unique postal code" }, "cols": 2, "rows": 14 } [/block] ## Address Type Codes [block:parameters] { "data": { "h-0": "Code", "h-1": "Description", "0-0": "F", "0-1": "Firm or Company address", "1-0": "G", "1-1": "General Delivery address", "2-0": "H", "2-1": "High Rise or Business complex", "3-0": "P", "3-1": "PO Box address", "4-0": "R", "4-1": "Rural Route address", "5-0": "S", "5-1": "Street or Residential address" }, "cols": 2, "rows": 6 } [/block] ## Error Messages For a list of codes and descriptions click [here](http://docs.accurateappend.com/docs/error-messages).

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}