{"_id":"55cba6d637edd823001a85e9","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"},"project":"55c80e130300460d00c91c1d","user":"55ca76068705a70d00b8fbef","editedParams2":true,"parentDoc":null,"__v":1,"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"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-08-12T18:08:01.549Z","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-08-12T19:32:47.8968343Z\",\n           \"RequestIP\": \"192:168:1:1\",\n           \"TransactionId\": \"04105b0e-1299-4168-90cd-0739b3216517\",\n           \"Address\": \"123 main st\",\n           \"BusinessName\": \"abc company\",\n           \"City\": \"seattle\",\n           \"MatchLevels\": \"BUS1;BUS2;BUS3;BUS4\",\n           \"PostalCode\": \"98101\",\n           \"Sources\": \"C;D\",\n           \"State\": \"wa\" }\n,\n      \"Phones\": [\n          {\n               \"AreaCode\": \"206\",\n                \"LineType\": \"LandLine\",\n                \"MatchLevel\": \"BUS4\",\n                \"MaxValidationLevel\": \"BUS1\",\n                \"PhoneNumber\": \"7226303\",\n                \"Source\": \"C\" }\n      ]\n}","name":""}]},"settings":"","examples":{"codes":[{"code":"<?php\n    \n$licensekey = \"YOURKEYHERE\";\n\n$url =  \"https://api.accurateappend.com/Services/V2/AppendPhone/Business/\" . $licensekey . \"/?\";\n$querystring = \"businessname=\" . urlencode(\"abc company\") .\n               \"&address=\" . urlencode(\"123 main st\") .\n               \"&city=seattle\" .\n               \"&state=wa\" .\n               \"&postalcode=98101\" .\n               \"&source=C;D\" .\n               \"&matchlevel=BUS1;BUS2;BUS3;BUS4\";\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['BusinessName'] = $parsed_json->{'Criteria'}->BusinessName;\n    $response['PostalCode'] = $parsed_json->{'Criteria'}->PostalCode;\n    $response['State'] = $parsed_json->{'Criteria'}->State;\n    $response['MatchLevels'] = $parsed_json->{'Criteria'}->MatchLevels;\n    $response['Sources'] = $parsed_json->{'Criteria'}->Sources;\n\n\n\n    if(isset($parsed_json->{'Phones'}[0]->AreaCode))\n    {\n        // iteration required for mulitple Phones response\n        for($i = 0; $i < count($parsed_json->{'Phones'}); $i++)\n        {\n            $keynum = $i + 1;\n\n            $response['AreaCode_' . $keynum] = $parsed_json->{'Phones'}[$i]->AreaCode;\n            $response['LineType_' . $keynum] = $parsed_json->{'Phones'}[$i]->LineType;\n            $response['MatchLevel_' . $keynum] = $parsed_json->{'Phones'}[$i]->MatchLevel;\n            $response['MaxValidationLevel_' . $keynum] = $parsed_json->{'Phones'}[$i]->MaxValidationLevel;\n            $response['PhoneNumber_' . $keynum] = $parsed_json->{'Phones'}[$i]->PhoneNumber;\n            $response['Source_' . $keynum] = $parsed_json->{'Phones'}[$i]->Source;\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?>","name":"","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            BusinessPhoneAppend();\n        }\n\n        #region Phone Append\n\n        private static void BusinessPhoneAppend()\n        {\n            const String Resource =\n                \"/AppendPhone/Business/\" + Key +\n                \"/?businessname=abc company&&address=123 main st&city=seattle&state=wa&postalcode=98101&source=C;D&matchlevel=BUS1;BUS2;BUS3;BUS4\";\n\n            var request = new RestRequest(Resource) { Method = Method.GET };\n\n            var client = new RestClient(RootUri);\n            var response = client.Execute<PhoneResult>(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.Phones)\n            {\n                Console.WriteLine(\"Phone:{0}-{1}\", item.AreaCode, item.PhoneNumber);\n            }\n        }\n\n        public class PhoneResult\n        {\n            public List<PhoneItem> Phones { get; set; }\n        }\n\n        public class PhoneItem\n        {\n            public String AreaCode { get; set; }\n\n            public String LineType { get; set; }\n\n            public String MatchLevel { get; set; }\n\n            public String MaxValidationLevel { get; set; }\n\n            public String PhoneNumber { get; set; }\n\n            public String Source { get; set; }\n        }\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":"55cb9e7737edd823001a85bc","ref":"","in":"path","required":true,"desc":"License key issued by customer support.","default":"","type":"string","name":"licensekey"},{"_id":"55cb9e7737edd823001a85bb","ref":"","in":"query","required":true,"desc":"Search subject's business name.","default":"","type":"string","name":"businessname"},{"_id":"55cb9e7737edd823001a85ba","ref":"","in":"query","required":true,"desc":"Search subject's address. Currenlty only US postal addresses are accepted.","default":"","type":"string","name":"address"},{"_id":"55cb9e7737edd823001a85b9","ref":"","in":"query","required":false,"desc":"City associated with search subject's address. Optional, if postal code is passed in the request.","default":"","type":"string","name":"city"},{"_id":"55cb9e7737edd823001a85b8","ref":"","in":"query","required":false,"desc":"State associated with search subject's address. Optional, if postal code is passed in the request.","default":"","type":"string","name":"state"},{"_id":"55cb9e7737edd823001a85b7","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"},{"_id":"55cb9e7737edd823001a85b6","ref":"","in":"query","required":true,"desc":"String delimited list of target Source to search. At least one Source must be requested.","default":"","type":"string","name":"source"},{"_id":"55cb9e7737edd823001a85b5","ref":"","in":"query","required":false,"desc":"String delimited list of MatchLevels used to filter response. If omitted, the match levels \"BUS1\",\"BUS2\",\"BUS3\",\"BUS4\",\"BUS5\",\"BUS6\",\"N2\" will be assumed.","default":"","type":"string","name":"matchlevel"}],"url":"/AppendPhone/Business/:licensekey/?"},"isReference":false,"order":4,"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 Business Phone 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 business name and physical address to look-up the phone numbers of your customer.\n\n## Source\nThe returning source element will indicate if the phone number matched a specific database and may determine if the device used is a mobile phone or a landline phone. \nFor a list of codes and descriptions click [here](http://docs.accurateappend.com/docs/phone-source).\n\n## MatchLevel\nBusiness searches are conducted using a combination of business name, location and postal address match. The MatchLevel response field indicates how well the request fields sent to the API match the response fields. For example, a MatchLevel returned of BUS1 gives a high confidence that there is an exact match whereas a return of BUS2 states that business name does not necessarily make a match yet the address is a perfect match. BUS3 gives a low confidence that the business name matches yet the address is an exact match. For a list of MatchLevel codes and descriptions click [here](http://docs.accurateappend.com/docs/matchlevel-business).\n\n## LineType\nFor a list of codes and descriptions click [here](http://docs.accurateappend.com/docs/phone-linetype).\n\n## Error Messages\nFor a list of codes and descriptions click [here](http://docs.accurateappend.com/docs/error-messages).","excerpt":"Reliably add or verify the phone numbers of your clients using other contact information such as business name or physical address information. Accurate Append maintains the most definitive, authoritative source of telephone numbers available in the phone append industry. Our phone databases are comprised of over 600 million landline and mobile phone numbers; helping you stay connected to your customers, prospects, voters, donors, and more.","slug":"appendphone-business","type":"endpoint","title":"Business Phone Append"}

getBusiness Phone Append

Reliably add or verify the phone numbers of your clients using other contact information such as business name or physical address information. Accurate Append maintains the most definitive, authoritative source of telephone numbers available in the phone append industry. Our phone databases are comprised of over 600 million landline and mobile phone numbers; helping you stay connected to your customers, prospects, voters, donors, and more.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

licensekey:
required
string
License key issued by customer support.

Query Params

businessname:
required
string
Search subject's business name.
address:
required
string
Search subject's address. Currenlty only US postal addresses are accepted.
city:
string
City associated with search subject's address. Optional, if postal code is passed in the request.
state:
string
State associated with search subject's address. Optional, if postal code 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.
source:
required
string
String delimited list of target Source to search. At least one Source must be requested.
matchlevel:
string
String delimited list of MatchLevels used to filter response. If omitted, the match levels "BUS1","BUS2","BUS3","BUS4","BUS5","BUS6","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 Business Phone 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 business name and physical address to look-up the phone numbers of your customer. ## Source The returning source element will indicate if the phone number matched a specific database and may determine if the device used is a mobile phone or a landline phone. For a list of codes and descriptions click [here](http://docs.accurateappend.com/docs/phone-source). ## MatchLevel Business searches are conducted using a combination of business name, location and postal address match. The MatchLevel response field indicates how well the request fields sent to the API match the response fields. For example, a MatchLevel returned of BUS1 gives a high confidence that there is an exact match whereas a return of BUS2 states that business name does not necessarily make a match yet the address is a perfect match. BUS3 gives a low confidence that the business name matches yet the address is an exact match. For a list of MatchLevel codes and descriptions click [here](http://docs.accurateappend.com/docs/matchlevel-business). ## LineType For a list of codes and descriptions click [here](http://docs.accurateappend.com/docs/phone-linetype). ## 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 }}