{"_id":"55cba6d637edd823001a85e7","editedParams":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"},"editedParams2":true,"parentDoc":null,"project":"55c80e130300460d00c91c1d","__v":0,"user":"55c80d9f0300460d00c91c1a","category":{"_id":"55cba6d337edd823001a85d9","pages":["55cba6d637edd823001a85e7","55cba6d637edd823001a85e8","55cba6d637edd823001a85e9","55cba6d637edd823001a85ea","55cbbab850046e3700d91055","55cc983d791e5b1900e81d5b","55cc9871791e5b1900e81d5c","55cc9885791e5b1900e81d5f","55df34f6ddfb40170061cf79","55f2ca3571c6462100e0fd95","55f2ccd8fb7aad2300bf17fa","55f2e12dfb7aad2300bf1826","564bb14202c94e0d00a7e88a"],"project":"55c80e130300460d00c91c1d","version":"55cba6d237edd823001a85d7","__v":10,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-08-10T02:48:35.940Z","from_sync":false,"order":1,"slug":"data-append-end-api","title":"DATA APPEND END API"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-08-10T02:55:07.765Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"","examples":{"codes":[{"language":"php","code":"<?php\n\n$licensekey = \"YOURKEYHERE\";\n\n$url =  \"https://api.accurateappend.com/Services/V2/AppendEmail/\" . $licensekey . \"/?\";\n$querystring = \"firstname=john\" .\n               \"&lastname=smith\" .\n               \"&address=\" . urlencode(\"123 main st\") .\n               \"&city=seattle\" .\n               \"&state=wa\" .\n               \"&postalcode=98101\" .\n               \"&matchlevel=E1;E2;N1;N2\";\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['FirstName'] = $parsed_json->{'Criteria'}->FirstName;\n    $response['LastName'] = $parsed_json->{'Criteria'}->LastName;\n    $response['PostalCode'] = $parsed_json->{'Criteria'}->PostalCode;\n    $response['State'] = $parsed_json->{'Criteria'}->State;\n\n\n    // typecast the stdClass to array\n    $obj_arr = (array)$parsed_json->{'Emails'};\n\n    if(!empty($obj_arr))\n    {\n        // iteration required for mulitple Emails response\n        for($i = 0; $i < count($parsed_json->{'Emails'}); $i++)\n        {\n            $keynum = $i + 1;\n            $response['Email_' . $keynum] = $parsed_json->{'Emails'}[$i]->Email;\n            $response['FirstName_' . $keynum] = $parsed_json->{'Emails'}[$i]->FirstName;\n            $response['LastName_' . $keynum] = $parsed_json->{'Emails'}[$i]->LastName;\n            $response['MatchLevel_' . $keynum] = $parsed_json->{'Emails'}[$i]->MatchLevel;\n        }\n    }\n    return $response;\n}\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*/","name":""},{"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            EmailAppend();\n        }\n\n        #region Email Append\n\n        private static void EmailAppend()\n        {\n            const String Resource =\n                \"/AppendEmail/\" + Key +\n                \"/?firstname=john&lastname=smith&address=123 main st&city=seattle&state=wa&postalcode=98101&matchlevel=E1;E2;N1;N2\";\n\n            var request = new RestRequest(Resource) {Method = Method.GET};\n\n            var client = new RestClient(RootUri);\n            var response = client.Execute<EmailResult>(request);\n            if (response.StatusCode != HttpStatusCode.OK)\n            {\n                // Error Handling Omitted For Brevity\n            }\n            var data = response.Data;\n            foreach (var item in data.Emails)\n            {\n                Console.WriteLine(\"Email:{0}\", item.Email);\n            }\n        }\n\n        public class EmailResult\n        {\n            public List<EmailItem> Emails { get; set; }\n        }\n\n        public class EmailItem\n        {\n            public String Email { get; set; }\n\n            public String FirstName { get; set; }\n\n            public String LastName { get; set; }\n\n            public String MatchLevel { 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","results":{"codes":[{"name":"","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      \"FirstName\":\"John\",\n      \"LastName\":\"Smith\",\n      \"PostalCode\":\"98101\",\n      \"State\":\"WA\",\n      \"MatchLevels\":\"E1;E2;N1;N2\"\n   },\n   \"Emails\":[  \n      {  \n         \"Email\":\"JOHN.SMITH@YAHOO.COM\",\n         \"FirstName\":\"JOHN\",\n         \"LastName\":\"SMITH\",\n         \"MatchLevel\":\"E1\"\n      }\n   ]\n}","language":"json","status":200},{"language":"json","status":401,"code":"{ Error: \"License key is required\" }"},{"code":"{ Error: \"An invalid match level was entered\" }","language":"json","status":400},{"status":500,"code":"{ Error: \"An error has occurred. The system administrator has been contacted\" }","language":"json"},{"language":"json","status":400,"code":"{ Error: \"First name, last name, address, city, state and match level is required\" }"}]},"auth":"required","params":[{"_id":"55c813200300460d00c91c3f","ref":"","in":"path","required":true,"desc":"License key issued by customer support.","default":"Default","type":"string","name":"licensekey"},{"_id":"55c8128b71d7580d0063a410","ref":"","in":"query","required":false,"desc":"Search subject's first name. Optional, if lastname is passed in the request.","default":"","type":"string","name":"firstname"},{"_id":"55c8128b71d7580d0063a40f","ref":"","in":"query","required":true,"desc":"Search subject's last name.","default":"","type":"string","name":"lastname"},{"_id":"55c8128b71d7580d0063a40e","ref":"","in":"query","required":false,"desc":"Search subject's address. Currently only US postal addresses are accepted.","default":"","type":"string","name":"address"},{"_id":"55c8128b71d7580d0063a40d","ref":"","in":"query","required":false,"desc":"City associated with search subject's address.","default":"","type":"string","name":"city"},{"_id":"55c8128b71d7580d0063a40c","ref":"","in":"query","required":true,"desc":"State associated with search subject's address.","default":"","type":"string","name":"state"},{"_id":"55c8128b71d7580d0063a40b","ref":"","in":"query","required":false,"desc":"Postal code associated with search subject's address.","default":"","type":"string","name":"postalcode"},{"_id":"55c8128b71d7580d0063a40a","ref":"","in":"query","required":false,"desc":"String delimited list of MatchLevel used to filter response. If omitted, the match levels \"E1\",\"E2\",\"N1\",\"N2\" will. be assumed.","default":"","type":"string","name":"matchlevel"}],"url":"/AppendEmail/:licensekey/?"},"isReference":false,"order":0,"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## Making a Request\nThe Accurate Append Email Append Web API closely mimics the logic and data sources used in our batch append service except it allows the user to programmatically make single calls using an API. The service is accessible via secure HTTP through a RESTful API. With an Accurate Append account use simple contact information such as first name, last name, city, state and physical address to look-up the email address of your customer.\n\n## Response Definitions\nA single response may include one or more Email elements.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field name\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"Email\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Fully verified email address\",\n    \"1-0\": \"FirstName\",\n    \"1-1\": \"string\",\n    \"1-2\": \"Listing identity's first name\",\n    \"2-0\": \"LastName\",\n    \"2-2\": \"Listing identity's last name\",\n    \"2-1\": \"string\",\n    \"3-0\": \"MatchLevel\",\n    \"3-2\": \"Indicates the MatchLevel under which the match was found\",\n    \"3-1\": \"string\"\n  },\n  \"cols\": 3,\n  \"rows\": 4\n}\n[/block]\n## MatchLevel\nThe MatchLevel response field indicates how well the request fields sent to the API match the response fields. For example, a MatchLevel returned of E1 might be considered an exact match whereas a return of E2 reveals that the first name of the individual does not necessarily match the request fields. To see the MatchLevel codes and descriptions click [here](http://docs.accurateappend.com/docs/matchlevel).\n\n## Error Messages\nThe following is a complete listing of error messages that could be returned by the service. To see the Error codes and descriptions click [here](http://docs.accurateappend.com/docs/error-messages).","excerpt":"Reliably add email addresses to your consumer lists by searching our database using other contact information such as first name, last name, city, state and physical address. Our email database is comprised of more than 900 million email addresses. Any email that Accurate Append appends or verifies is verified as deliverable in real-time using the latest advancements in SMTP verification.","slug":"appendemail","type":"endpoint","title":"Email Append"}

getEmail Append

Reliably add email addresses to your consumer lists by searching our database using other contact information such as first name, last name, city, state and physical address. Our email database is comprised of more than 900 million email addresses. Any email that Accurate Append appends or verifies is verified as deliverable in real-time using the latest advancements in SMTP verification.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

licensekey:
required
stringDefault
License key issued by customer support.

Query Params

firstname:
string
Search subject's first name. Optional, if lastname is passed in the request.
lastname:
required
string
Search subject's last name.
address:
string
Search subject's address. Currently only US postal addresses are accepted.
city:
string
City associated with search subject's address.
state:
required
string
State associated with search subject's address.
postalcode:
string
Postal code associated with search subject's address.
matchlevel:
string
String delimited list of MatchLevel used to filter response. If omitted, the match levels "E1","E2","N1","N2" will. be assumed.

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] ## Making a Request The Accurate Append Email Append Web API closely mimics the logic and data sources used in our batch append service except it allows the user to programmatically make single calls using an API. The service is accessible via secure HTTP through a RESTful API. With an Accurate Append account use simple contact information such as first name, last name, city, state and physical address to look-up the email address of your customer. ## Response Definitions A single response may include one or more Email elements. [block:parameters] { "data": { "h-0": "Field name", "h-1": "Type", "h-2": "Description", "0-0": "Email", "0-1": "string", "0-2": "Fully verified email address", "1-0": "FirstName", "1-1": "string", "1-2": "Listing identity's first name", "2-0": "LastName", "2-2": "Listing identity's last name", "2-1": "string", "3-0": "MatchLevel", "3-2": "Indicates the MatchLevel under which the match was found", "3-1": "string" }, "cols": 3, "rows": 4 } [/block] ## MatchLevel The MatchLevel response field indicates how well the request fields sent to the API match the response fields. For example, a MatchLevel returned of E1 might be considered an exact match whereas a return of E2 reveals that the first name of the individual does not necessarily match the request fields. To see the MatchLevel codes and descriptions click [here](http://docs.accurateappend.com/docs/matchlevel). ## Error Messages The following is a complete listing of error messages that could be returned by the service. To see the Error 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 }}