Get All Legal Entities
curl --request GET \
--url https://dataapi.dncscrub.com/v1.5/TrustCall/GetAllLegalEntities \
--header 'loginId: <loginid>'import requests
url = "https://dataapi.dncscrub.com/v1.5/TrustCall/GetAllLegalEntities"
headers = {"loginId": "<loginid>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {loginId: '<loginid>'}};
fetch('https://dataapi.dncscrub.com/v1.5/TrustCall/GetAllLegalEntities', 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://dataapi.dncscrub.com/v1.5/TrustCall/GetAllLegalEntities",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"loginId: <loginid>"
],
]);
$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://dataapi.dncscrub.com/v1.5/TrustCall/GetAllLegalEntities"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("loginId", "<loginid>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://dataapi.dncscrub.com/v1.5/TrustCall/GetAllLegalEntities")
.header("loginId", "<loginid>")
.asString();require 'uri'
require 'net/http'
url = URI("https://dataapi.dncscrub.com/v1.5/TrustCall/GetAllLegalEntities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["loginId"] = '<loginid>'
response = http.request(request)
puts response.read_body[
{
"LegalEntityId": 123,
"AcctId": "YOUR_ACCOUNT_ID",
"IsDefault": true,
"LegalName": "Acme Corporation",
"Ein": "***6789",
"PrimaryPhoneNumber": "5551234567",
"StreetAddress": "123 Main Street",
"City": "New York",
"State": "NY",
"Zip": "10001",
"CountryCode": "US"
},
{
"LegalEntityId": 456,
"AcctId": "YOUR_ACCOUNT_ID",
"IsDefault": false,
"LegalName": "Acme Subsidiary LLC",
"Ein": "***4321",
"PrimaryPhoneNumber": "5559876543",
"StreetAddress": "456 Oak Avenue",
"City": "Los Angeles",
"State": "CA",
"Zip": "90001",
"CountryCode": "US"
}
]
Call Deliverability (TrustCall)
Get All Legal Entities
Retrieve all legal entities associated with an account
GET
/
v1.5
/
TrustCall
/
GetAllLegalEntities
Get All Legal Entities
curl --request GET \
--url https://dataapi.dncscrub.com/v1.5/TrustCall/GetAllLegalEntities \
--header 'loginId: <loginid>'import requests
url = "https://dataapi.dncscrub.com/v1.5/TrustCall/GetAllLegalEntities"
headers = {"loginId": "<loginid>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {loginId: '<loginid>'}};
fetch('https://dataapi.dncscrub.com/v1.5/TrustCall/GetAllLegalEntities', 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://dataapi.dncscrub.com/v1.5/TrustCall/GetAllLegalEntities",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"loginId: <loginid>"
],
]);
$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://dataapi.dncscrub.com/v1.5/TrustCall/GetAllLegalEntities"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("loginId", "<loginid>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://dataapi.dncscrub.com/v1.5/TrustCall/GetAllLegalEntities")
.header("loginId", "<loginid>")
.asString();require 'uri'
require 'net/http'
url = URI("https://dataapi.dncscrub.com/v1.5/TrustCall/GetAllLegalEntities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["loginId"] = '<loginid>'
response = http.request(request)
puts response.read_body[
{
"LegalEntityId": 123,
"AcctId": "YOUR_ACCOUNT_ID",
"IsDefault": true,
"LegalName": "Acme Corporation",
"Ein": "***6789",
"PrimaryPhoneNumber": "5551234567",
"StreetAddress": "123 Main Street",
"City": "New York",
"State": "NY",
"Zip": "10001",
"CountryCode": "US"
},
{
"LegalEntityId": 456,
"AcctId": "YOUR_ACCOUNT_ID",
"IsDefault": false,
"LegalName": "Acme Subsidiary LLC",
"Ein": "***4321",
"PrimaryPhoneNumber": "5559876543",
"StreetAddress": "456 Oak Avenue",
"City": "Los Angeles",
"State": "CA",
"Zip": "90001",
"CountryCode": "US"
}
]
Retrieve all legal entities associated with your account. Legal entities represent the business identities under which your phone numbers are registered.
Request
Headers
string
required
Your API Key (LoginId from your DNCScrub account)
Example Request
curl --location --request GET \
'https://dataapi.dncscrub.com/v1.5/TrustCall/GetAllLegalEntities' \
--header 'loginId: YOUR_API_KEY'
const response = await fetch(
'https://dataapi.dncscrub.com/v1.5/TrustCall/GetAllLegalEntities',
{
method: 'GET',
headers: { 'loginId': 'YOUR_API_KEY' }
}
);
const data = await response.json();
console.log(data);
using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Add("loginId", "YOUR_API_KEY");
var response = await client.GetAsync(
"https://dataapi.dncscrub.com/v1.5/TrustCall/GetAllLegalEntities"
);
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
}
[
{
"LegalEntityId": 123,
"AcctId": "YOUR_ACCOUNT_ID",
"IsDefault": true,
"LegalName": "Acme Corporation",
"Ein": "***6789",
"PrimaryPhoneNumber": "5551234567",
"StreetAddress": "123 Main Street",
"City": "New York",
"State": "NY",
"Zip": "10001",
"CountryCode": "US"
},
{
"LegalEntityId": 456,
"AcctId": "YOUR_ACCOUNT_ID",
"IsDefault": false,
"LegalName": "Acme Subsidiary LLC",
"Ein": "***4321",
"PrimaryPhoneNumber": "5559876543",
"StreetAddress": "456 Oak Avenue",
"City": "Los Angeles",
"State": "CA",
"Zip": "90001",
"CountryCode": "US"
}
]
Response Fields
integer
Unique identifier for the legal entity
string
The account ID the legal entity belongs to
boolean
Whether this is the default legal entity for the account
string
The registered legal name of the business entity
string
Masked Employer Identification Number (EIN) showing only the last 4 digits (e.g.,
***6789)string
Primary contact phone number for the legal entity
string
Street address of the legal entity
string
City of the legal entity’s address
string
State or province code
string
ZIP or postal code
string
Two-letter country code (e.g., “US”)
Error Responses
| Status | Description |
|---|---|
| 401 Unauthorized | Invalid or missing API key |
⌘I