curl --request GET \
--url https://public-api.lonescale.com/contacts/{identifier}/enrichment-history \
--header 'x-api-key: <api-key>'import requests
url = "https://public-api.lonescale.com/contacts/{identifier}/enrichment-history"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://public-api.lonescale.com/contacts/{identifier}/enrichment-history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://public-api.lonescale.com/contacts/{identifier}/enrichment-history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://public-api.lonescale.com/contacts/{identifier}/enrichment-history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://public-api.lonescale.com/contacts/{identifier}/enrichment-history")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.lonescale.com/contacts/{identifier}/enrichment-history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"date": "2023-11-07T05:31:56Z",
"first_enriched_at": "2023-11-07T05:31:56Z",
"fields_found": [
"email"
],
"identifier": {
"linkedin_url": "<string>",
"email": "<string>",
"crm_id": "<string>"
},
"data": {
"firstname": "<string>",
"lastname": "<string>",
"email": "<string>",
"email_status": "<string>",
"emails": [
{
"email": "<string>",
"status": "<string>"
}
],
"phone": "<string>",
"phones": [
{
"number": "<string>",
"region": "<string>"
}
],
"linkedin_url": "<string>",
"job_title": "<string>",
"company_name": "<string>",
"company_domain": "<string>"
}
}
],
"next_cursor": "<string>"
}{
"message": "Invalid API Key",
"error": "Unauthorized",
"statusCode": 401
}Contact Enrichment History
The last enrichment LoneScale holds for a contact, so you can keep your own long-lived cache and skip an enrichment you have already paid for.
This is a per-contact record, not a log of your calls. Three limits follow from that, worth reading before you build on it:
- At most one entry per contact: the latest state we know, not one entry per
/trigger/enrichcall.providersandcreditsare therefore not returned, since they are not retained per contact. - An enrichment that found nothing leaves no entry. A contact we searched and missed is indistinguishable from one we never searched: both return an empty
data. - A hit on the 24h enrichment cache does not refresh
date. It is the date of the last enrichment that actually ran, which is the date your cache should key on.
The history is scoped to your API key: you only ever read contacts your own account enriched.
curl --request GET \
--url https://public-api.lonescale.com/contacts/{identifier}/enrichment-history \
--header 'x-api-key: <api-key>'import requests
url = "https://public-api.lonescale.com/contacts/{identifier}/enrichment-history"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://public-api.lonescale.com/contacts/{identifier}/enrichment-history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://public-api.lonescale.com/contacts/{identifier}/enrichment-history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://public-api.lonescale.com/contacts/{identifier}/enrichment-history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://public-api.lonescale.com/contacts/{identifier}/enrichment-history")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.lonescale.com/contacts/{identifier}/enrichment-history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"date": "2023-11-07T05:31:56Z",
"first_enriched_at": "2023-11-07T05:31:56Z",
"fields_found": [
"email"
],
"identifier": {
"linkedin_url": "<string>",
"email": "<string>",
"crm_id": "<string>"
},
"data": {
"firstname": "<string>",
"lastname": "<string>",
"email": "<string>",
"email_status": "<string>",
"emails": [
{
"email": "<string>",
"status": "<string>"
}
],
"phone": "<string>",
"phones": [
{
"number": "<string>",
"region": "<string>"
}
],
"linkedin_url": "<string>",
"job_title": "<string>",
"company_name": "<string>",
"company_domain": "<string>"
}
}
],
"next_cursor": "<string>"
}{
"message": "Invalid API Key",
"error": "Unauthorized",
"statusCode": 401
}Authorizations
Provide your API key in the x-api-key header.
Path Parameters
The contact, as an email, a phone number, a LinkedIn profile URL or a CRM record id. URL-encode the value (+ in a phone number especially). A LinkedIn URL can also be passed as its bare vanity slug (jane-doe), which avoids encoding slashes altogether.
Emails and phone numbers match secondary values too, not just the main one, and a phone number matches whatever spelling we stored it in: +33621114568 and +33 6 21 11 45 68 find the same contact.
One case to know about: a contact that only ever reached LoneScale through this API, never through a CRM sync or a list import, carries no CRM id and, if you asked for email or phone alone, no LinkedIn URL either. Look those up by the email or phone we returned.
Query Parameters
Return the enriched contact itself in data. Off by default: the entry otherwise carries only what happened, not the data.
Entries per page.
1 <= x <= 100The next_cursor of the previous page. Entries come back newest first.

