{"_id":"55cba6d437edd823001a85e4","user":"55ca76068705a70d00b8fbef","project":"55c80e130300460d00c91c1d","__v":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,"editedParams":true,"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"},"updates":["564683efa74cd10d00a3f0a2"],"next":{"pages":[],"description":""},"createdAt":"2015-08-12T17:40:13.546Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"language":"json","status":200,"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              \"IP\":\"192.168.1.1\",\n           },\n           \"IPAddressResult\":  \n              {  \n                \"CountryCode\":\"US\",\n                \"CountryName\":\"United States\",\n                \"RegionCode\":\"WA\",\n                \"RegionName\":\"Washington\",\n                \"City\":\"Bellevue\",                \n                \"MetroCode\":\"819\",\n                \"AreaCode\":\"425\",\n                \"Continient\":\"NA\",\n                \"PostalCode\":\"98007\",\n                \"ISP\":\"Comcast Cable\",\n                \"Organization\":\"Comcast Cable\",\n                \"Domain\":\"comcast.net\",\n                \"AsNum\":\"AS7922 Comcast Cable Communications, Inc.\",\n                \"NetSpeed\":\"Cable/DSL\",\n                \"UserType\":\"residential\",\n                \"AccuracyRadius\":\"26\",\n                \"CountryConfidence\":\"99\",\n                \"CityConfidence\":\"45\",\n                \"RegionConfidence\":\"89\",\n                \"PostalCodeConfidence\":\"13\",\n                \"Codes\":[\n                    {\n                        \"Status\":\"Status\",\n                        \"Code\":\"IP01\",\n                        \"Description\":\"IP address was verified\"\n                    }\n                 ]\n              }\n           \n    }"}]},"settings":"","examples":{"codes":[{"code":"<?php\n    \n$licensekey = \"\";\n\n$url =  \"https://api.accurateappend.com/Services/V2/ValidateIp/\" . $licensekey . \"/?\";\n$querystring = \"ip=50.6.78.30\";\n\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['IP'] = $parsed_json->{'Criteria'}->IP;\n\n\n    $ip_address_results_fields_array = array(\"AccuracyRadius\",\n                                             \"AsNum\",\n                                             \"Continient\",\n                                             \"CountryCode\",\n                                             \"CountryConfidence\",\n                                             \"CountryName\",\n                                             \"ISP\",                                             \n                                             \"NetSpeed\",\n                                             \"Organization\",\n                                             \"UserType\");\n\n\n    // typecast the stdClass to array\n    $obj_arr = (array)$parsed_json->{'IPAddressResult'};\n\n    if(!empty($obj_arr))\n    {\n        for($j = 0; $j < count($ip_address_results_fields_array); $j++)\n        {\n            $response[$ip_address_results_fields_array[$j]] = $obj_arr[$ip_address_results_fields_array[$j]];\n        }\n\n\n        for($i = 0; $i < count($parsed_json->{'IPAddressResult'}->{'Codes'}); $i++)\n        {\n            $keynum = $i + 1;\n\n            $response['Code' . $keynum] = $parsed_json->{'IPAddressResult'}->{'Codes'}[$i]->Code;\n            $response['Description' . $keynum] = $parsed_json->{'IPAddressResult'}->{'Codes'}[$i]->Description;\n            $response['Status' . $keynum] = $parsed_json->{'IPAddressResult'}->{'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","name":""}]},"method":"get","auth":"required","params":[{"_id":"55cbe16e2767710d00bc9c28","ref":"","in":"path","required":true,"desc":"License key issued by customer support.","default":"","type":"string","name":"licensekey"},{"_id":"55cbe16e2767710d00bc9c27","ref":"","in":"query","required":true,"desc":"Search subject's ip address","default":"","type":"string","name":"ip"}],"url":"/ValidateIp/: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## IPAddressResultResult\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field name\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"CountryCode\",\n    \"0-2\": \"Country code\",\n    \"0-1\": \"string\",\n    \"1-0\": \"CountryName\",\n    \"1-1\": \"string\",\n    \"1-2\": \"Country name\",\n    \"2-0\": \"RegionCode\",\n    \"2-2\": \"Region code\",\n    \"2-1\": \"string\",\n    \"3-0\": \"RegionName\",\n    \"3-1\": \"string\",\n    \"3-2\": \"Region name\",\n    \"4-0\": \"City\",\n    \"4-1\": \"string\",\n    \"4-2\": \"Location city\",\n    \"5-0\": \"MetroCode\",\n    \"5-2\": \"Metropolitan Statistical Area\",\n    \"5-1\": \"string\",\n    \"6-0\": \"AreaCode\",\n    \"6-2\": \"Location area code\",\n    \"7-0\": \"Continient\",\n    \"7-2\": \"Continient\",\n    \"8-0\": \"PostalCode\",\n    \"8-2\": \"Location postal code\",\n    \"9-0\": \"ISP\",\n    \"9-2\": \"The name of the ISP associated with the IP address\",\n    \"10-0\": \"Organization\",\n    \"10-2\": \"The name of the organization associated with the IP address\",\n    \"11-0\": \"Domain\",\n    \"11-2\": \"Domain\",\n    \"6-1\": \"string\",\n    \"7-1\": \"string\",\n    \"8-1\": \"string\",\n    \"9-1\": \"string\",\n    \"10-1\": \"string\",\n    \"11-1\": \"string\",\n    \"12-1\": \"string\",\n    \"12-0\": \"AsNum\",\n    \"12-2\": \"Autonomous system number\",\n    \"13-0\": \"NetSpeed\",\n    \"13-2\": \"Estimated line type\",\n    \"14-0\": \"UserType\",\n    \"14-2\": \"User type\",\n    \"15-0\": \"AccuracyRadius\",\n    \"15-2\": \"The radius in kilometers around the specified location where the IP address is likely to be\",\n    \"16-0\": \"CountryConfidence\",\n    \"15-1\": \"string\",\n    \"16-1\": \"string\",\n    \"14-1\": \"string\",\n    \"13-1\": \"string\",\n    \"16-2\": \"Numeric score between 1 and 100 indicating confidence\",\n    \"17-0\": \"CityConfidence\",\n    \"17-2\": \"Numeric score between 1 and 100 indicating confidence\",\n    \"18-0\": \"RegionConfidence\",\n    \"18-2\": \"Numeric score between 1 and 100 indicating confidence\",\n    \"18-1\": \"string\",\n    \"17-1\": \"string\",\n    \"19-0\": \"PostalCodeConfidence\",\n    \"19-1\": \"string\",\n    \"19-2\": \"Numeric score between 1 and 100 indicating confidence\",\n    \"20-0\": \"Codes\",\n    \"20-2\": \"Parsing and validation results. See Status codes.\",\n    \"20-1\": \"array\"\n  },\n  \"cols\": 3,\n  \"rows\": 21\n}\n[/block]\n## ValidateIpAddress Status Codes\nThis section lists the following types of status codes for the ValidateIpAddress method.\nResult Codes\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Code\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"IP01\",\n    \"0-1\": \"IP address was verified\",\n    \"1-0\": \"IP02\",\n    \"1-1\": \"IP not found\",\n    \"2-0\": \"IP03\",\n    \"2-1\": \"Service error - IP not coded\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\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 ValidateIp method.\n\n- Verifies the validity of an IPV4 IP address.","slug":"validateip","type":"endpoint","title":"Validate IP Address"}

getValidate IP Address

This section describes request parameters, responses and potential error messages for the ValidateIp method. - Verifies the validity of an IPV4 IP address.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

licensekey:
required
string
License key issued by customer support.

Query Params

ip:
required
string
Search subject's ip address

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] ## IPAddressResultResult [block:parameters] { "data": { "h-0": "Field name", "h-1": "Type", "h-2": "Description", "0-0": "CountryCode", "0-2": "Country code", "0-1": "string", "1-0": "CountryName", "1-1": "string", "1-2": "Country name", "2-0": "RegionCode", "2-2": "Region code", "2-1": "string", "3-0": "RegionName", "3-1": "string", "3-2": "Region name", "4-0": "City", "4-1": "string", "4-2": "Location city", "5-0": "MetroCode", "5-2": "Metropolitan Statistical Area", "5-1": "string", "6-0": "AreaCode", "6-2": "Location area code", "7-0": "Continient", "7-2": "Continient", "8-0": "PostalCode", "8-2": "Location postal code", "9-0": "ISP", "9-2": "The name of the ISP associated with the IP address", "10-0": "Organization", "10-2": "The name of the organization associated with the IP address", "11-0": "Domain", "11-2": "Domain", "6-1": "string", "7-1": "string", "8-1": "string", "9-1": "string", "10-1": "string", "11-1": "string", "12-1": "string", "12-0": "AsNum", "12-2": "Autonomous system number", "13-0": "NetSpeed", "13-2": "Estimated line type", "14-0": "UserType", "14-2": "User type", "15-0": "AccuracyRadius", "15-2": "The radius in kilometers around the specified location where the IP address is likely to be", "16-0": "CountryConfidence", "15-1": "string", "16-1": "string", "14-1": "string", "13-1": "string", "16-2": "Numeric score between 1 and 100 indicating confidence", "17-0": "CityConfidence", "17-2": "Numeric score between 1 and 100 indicating confidence", "18-0": "RegionConfidence", "18-2": "Numeric score between 1 and 100 indicating confidence", "18-1": "string", "17-1": "string", "19-0": "PostalCodeConfidence", "19-1": "string", "19-2": "Numeric score between 1 and 100 indicating confidence", "20-0": "Codes", "20-2": "Parsing and validation results. See Status codes.", "20-1": "array" }, "cols": 3, "rows": 21 } [/block] ## ValidateIpAddress Status Codes This section lists the following types of status codes for the ValidateIpAddress method. Result Codes [block:parameters] { "data": { "h-0": "Code", "h-1": "Description", "0-0": "IP01", "0-1": "IP address was verified", "1-0": "IP02", "1-1": "IP not found", "2-0": "IP03", "2-1": "Service error - IP not coded" }, "cols": 2, "rows": 3 } [/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 }}