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
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
Error Responses
| Status | Description |
|---|---|
| 401 Unauthorized | Invalid or missing API key |