Closemore API Service

To support other sales and BDC activities we offer a convenient data enrichment API that can append our profile data to every customer or prospect record in your CRM. An additional benefit is our ability to develop a lead scoring algorithm specific to individual dealerships using your first party data. Scoring leads in your CRM helps identify your best prospects and prioritize sales, service and BDC activity on a daily basis. For more information about our API and integration with your CRM, please contact us a sales@closemore.io. If you’re a CRM vendor, please contact us at integrations@closemore.io.

Your closemore API Key

Your API Request

You will need to POST the address you wish to append in JSON format via HTTPs to the above endpoint. HTTP basic auth is not required or used. You only require one header key to pass with your JSON payload which is your API key. Content-type should be application/json. State can be the full name of the state also. First and last name may be empty if not available.

POST Request Headers
"
X-API-Key
: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"
Content-Type
: application/json"
Request Object (JSON block)
{

"
first_name
": "John",
"
last_name
": "Doe",
"
address
": "2330 Maple Road",
"
city
": "Buffalo",
"
state
": "NY",
"
zip
": "14221",
"
country
": "US"
}



closemore API Response

If successful the following JSON object will be returned with the appended data for the given address. Note the actual response object you get back may be different, the information is based on your account type.

Response Object
{

"
error
": false,
"
message
": "address successfully profiled",
"
fingerprint
": "0e19f68e5241d0...e24e25cd5a0",
"
address_as_provided
": "2330 Maple Rd., Buffalo, NY, 14221, US",
"
demographic_bio
":
{

"
demographic
": "Midscale Younger",
"
bio
": "A collection of mobile urbanites, these..."
}
,
"
likely_behaviours
":
{

...
}

"
latitude
": "42.899535",
"
longitude
": "-78.870747",
"
credits_used_for_api_request
": 10,
"
credits_remaining
": 7001
}

Sample Usage

The following are several examples on how to put the API into action. All languages and platforms are supported as it is simply HTTP POST. However, only a few usage scenarios are shown below. cURL is typically the most convenient way to issue an API request and is required in most of these examples. Requests typically take a few seconds to execute.
cURL should be installed for these command line examples to work. Note the primary difference is the use of quotes and double quotes. They must be exact and escaped where shown for Windows.

 Command Line - Linux
bash($)
:
curl
--header "
Content-Type: application/json
" --header "
X-API-Key:
" --request POST --data '
{"address":"2330 Maple Road","city":"Buffalo","state":"NY","zip":"14221","country":"US"}
' "
https://api.closemore.io/service/getprofile
"   
 Command Line - Windows
C:\>
curl
--header "
Content-Type: application/json
" --header "
X-API-Key:
" --request POST --data "
{\"address\":\"2330 Maple Road\",\"city\":\"Buffalo\",\"state\":\"NY\",\"zip\":\"14221\",\"country\":\"US\"}
" "
https://api.closemore.io/service/getprofile
"    
curl --header "Content-Type: application/json" --header "X-API-Key: HSunS8uBPX1EpExlOdHeUdmoxZ6Ghr" --request POST --data '{"address":"2330 Maple Road","city":"Buffalo","state":"NY","zip":"14221","country":"US"}' "https://api.closemore.io/service/getprofile"
curl --header "Content-Type: application/json" --header "X-API-Key: HSunS8uBPX1EpExlOdHeUdmoxZ6Ghr" --request POST --data "{\"address\":\"2330 Maple Road\",\"city\":\"Buffalo\",\"state\":\"NY\",\"zip\":\"14221\",\"country\":\"US\"}" "https://api.closemore.io/service/getprofile"
Using cURL within PHP makes it easy to get append an address on demand as shown below. This simple example code snippet will directly work without any changes. Simply download and run!

PHP Example
<?php

$aAddressToProcess
= array('
first_name
' => 'John',
'
last_name
' => 'Doe',
'
address
' => '2330 Maple Road',
'
city
' => 'Buffalo',
'
state
' => 'New York',
'
zip
' => '14221',
'
country
' => 'US');
$jsonAddressToProcess
= json_encode(
$aAddressToProcess
);

$curlRequest
= curl_init();
$aRequestHeaders
= array('
X-API-Key:
', '
Content-Type: application/json
', '
Content-Length:
' . strlen(
$jsonAddressToProcess
));
curl_setopt($curlRequest, CURLOPT_URL, "
https://api.closemore.io/service/getprofile
");
curl_setopt($curlRequest, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curlRequest, CURLOPT_POST, true);
curl_setopt($curlRequest, CURLOPT_POSTFIELDS,
$jsonAddressToProcess
);
curl_setopt($curlRequest, CURLOPT_HTTPHEADER,
$aRequestHeaders
);
curl_setopt($curlRequest, CURLOPT_CONNECTTIMEOUT, 7);
curl_setopt($curlRequest, CURLOPT_TIMEOUT, 9);
$curlResponse
= curl_exec(
$curlRequest
);
curl_close(
$curlRequest
);

$jsonResponse
= json_decode(
$curlResponse
, true);

if (
$jsonResponse
[
message
] == "
address successfully appended
")
{
echo "
It worked with a demographic of
" .
$jsonResponse
[
demographic_bio
][
demographic
] . "
!
";

# eg. (note your response object information may be different - it is based on your account type
# $jsonResponse[demographic_bio][demographic]; // demographic_bio -> demographic
# $jsonResponse[demographic_bio][bio]; // demographic_bio -> bio
# $jsonResponse[likely_behaviours][likely_behaviour]; // likely_behaviours -> likely_behaviour
# $jsonResponse[likely_behaviours][about_me_list][1]; // likely_behaviours -> about_me_list - point 1 of 9 max
# $jsonResponse[likely_behaviours][about_me_list][2]; // likely_behaviours -> about_me_list - point 2 of 9 max
# ...
# $jsonResponse[likely_behaviours][about_me_list][9]; // likely_behaviours -> about_me_list - point 9 of 9 max
# $jsonResponse[lifestage][lifestage]; // lifestage -> lifestage
# $jsonResponse[lifestage][household_composition]; // lifestage -> household_composition
# $jsonResponse[lifestage][household_tenure]; // lifestage -> household_tenure
# $jsonResponse[lifestage][household_employment]; // lifestage -> household_employment
# $jsonResponse[lifestage][household_education]; // lifestage -> household_education
# $jsonResponse[income][income_class]; // income -> income_class
# $jsonResponse[income][avg_household_income]; // income -> avg_household_income
# $jsonResponse[income][median_household_income]; // income -> median_household_income
# $jsonResponse[income][net_worth_class]; // income -> net_worth_class
# $jsonResponse[income][avg_net_worth]; // income -> avg_net_worth
# $jsonResponse[income][median_net_worth]; // income -> median_net_worth
# $jsonResponse[lifestyle_indicator][snapshot][0]; // lifestyle_indicator -> snapshot - point 1
# ...
# $jsonResponse[lifestyle_indicator][snapshot][7]; // lifestyle_indicator -> snapshot - point 8
# $jsonResponse[lifestyle_indicator][deepdive][automotive_products]; // lifestyle_indicator -> deepdive -> automotive_products
# $jsonResponse[lifestyle_indicator][deepdive][sports_and_leisure]; // lifestyle_indicator -> deepdive -> sports_and_leisure
# $jsonResponse[lifestyle_indicator][deepdive][retailers_and_shopping]; // lifestyle_indicator -> deepdive -> retailers_and_shopping
# $jsonResponse[lifestyle_indicator][deepdive][online_behaviors]; // lifestyle_indicator -> deepdive -> online_behaviors
# $jsonResponse[lifestyle_indicator][deepdive][television_viewership]; // lifestyle_indicator -> deepdive -> television_viewership
# $jsonResponse[top_5_important_to_me][top5_num1]; // top_5_important_to_me - point 1
# ...
# $jsonResponse[top_5_important_to_me][top5_num5]; // top_5_important_to_me - point 5
# $jsonResponse[latitude]; // latitude of address
# $jsonResponse[longitude]; // longitude of address
# $jsonResponse[credits_used_for_api_request] // credits used for this request
# $jsonResponse[credits_remaining]; // closemore credits remaining
}
?>


Postman can help you debug and use the closemore API from a technical perspective to get familiar with it. The following screenshots will quickly show what settings to use and how to get a proper response.