Get how much of your audience has a known location
GET
/api/v3/contacts/segments/location-coverage
const url = 'https://api.tryletterhead.com/api/v3/contacts/segments/location-coverage?api=true';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.tryletterhead.com/api/v3/contacts/segments/location-coverage?api=true' \ --header 'Authorization: Bearer <token>'Returns what share of your contacts Letterhead has a derived location for β the figure the segment builder shows beside a distance-of-a-location condition, so a thin geoRadius segment is explainable rather than looking broken.
This is a company-level (v3) read. Authenticate with a company API key as a Bearer token.
Authorizations
Section titled βAuthorizations βParameters
Section titled β Parameters βQuery Parameters
Section titled βQuery Parameters β api
required
boolean
Required. Set to true.
channel
string
Narrow the figure to contacts subscribed to the given channel identifier (slug). Omit for the full company audience.
Responses
Section titled β Responses β200 OK
Media type application/json
object
items
object
contactsWithKnownLocation
How many contacts have a derived location.
integer
totalContacts
Total contacts considered.
integer
coverageRate
ContactsWithKnownLocation divided by totalContacts, as a fraction (0 when totalContacts is 0).
number
message
string
total
integer
Example
{ "items": { "contactsWithKnownLocation": 8420, "totalContacts": 14285, "coverageRate": 0.5895 }, "message": "Location coverage retrieved.", "total": 1}Still can’t find what you need? Contact support.