Search companies
curl --request POST \
--url https://prod.truv.com/v1/companies/ \
--header 'Content-Type: application/json' \
--header 'X-Access-Client-Id: <api-key>' \
--header 'X-Access-Secret: <api-key>' \
--data '
{
"name": "Google",
"domain": "google.com",
"ein": "770493581",
"phone": "6503087300",
"id": "d94df7ecffcb4b218ab2dbff70e7cda8",
"product_type": "income"
}
'import requests
url = "https://prod.truv.com/v1/companies/"
payload = {
"name": "Google",
"domain": "google.com",
"ein": "770493581",
"phone": "6503087300",
"id": "d94df7ecffcb4b218ab2dbff70e7cda8",
"product_type": "income"
}
headers = {
"X-Access-Client-Id": "<api-key>",
"X-Access-Secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Access-Client-Id': '<api-key>',
'X-Access-Secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Google',
domain: 'google.com',
ein: '770493581',
phone: '6503087300',
id: 'd94df7ecffcb4b218ab2dbff70e7cda8',
product_type: 'income'
})
};
fetch('https://prod.truv.com/v1/companies/', 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://prod.truv.com/v1/companies/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Google',
'domain' => 'google.com',
'ein' => '770493581',
'phone' => '6503087300',
'id' => 'd94df7ecffcb4b218ab2dbff70e7cda8',
'product_type' => 'income'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Access-Client-Id: <api-key>",
"X-Access-Secret: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://prod.truv.com/v1/companies/"
payload := strings.NewReader("{\n \"name\": \"Google\",\n \"domain\": \"google.com\",\n \"ein\": \"770493581\",\n \"phone\": \"6503087300\",\n \"id\": \"d94df7ecffcb4b218ab2dbff70e7cda8\",\n \"product_type\": \"income\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Access-Client-Id", "<api-key>")
req.Header.Add("X-Access-Secret", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://prod.truv.com/v1/companies/")
.header("X-Access-Client-Id", "<api-key>")
.header("X-Access-Secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Google\",\n \"domain\": \"google.com\",\n \"ein\": \"770493581\",\n \"phone\": \"6503087300\",\n \"id\": \"d94df7ecffcb4b218ab2dbff70e7cda8\",\n \"product_type\": \"income\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod.truv.com/v1/companies/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Access-Client-Id"] = '<api-key>'
request["X-Access-Secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Google\",\n \"domain\": \"google.com\",\n \"ein\": \"770493581\",\n \"phone\": \"6503087300\",\n \"id\": \"d94df7ecffcb4b218ab2dbff70e7cda8\",\n \"product_type\": \"income\"\n}"
response = http.request(request)
puts response.read_body{
"company_mapping_id": "48427a36d43c4d5aa6324bc06c692456",
"name": "Facebook Demo",
"domain": "facebook.com",
"logo_url": "https://cdn.truv.com/facebook.png",
"success_rate": "high",
"confidence_level": "0.9",
"mapping_status": "verified"
}{
"error": {
"code": "incorrect_parameters",
"message": "Incorrect request parameters",
"extra": {
"invalid-params": [
{
"field": "access_token",
"message": "This field is required."
}
]
}
}
}{
"error": {
"code": "authentication_failed",
"message": "No such token"
}
}{
"error": {
"code": "not_authenticated",
"message": "Authentication credentials were not provided."
}
}Companies
Search companies
The endpoint returns the company_mapping_id for a company if it exists. This company_mapping_id can be passed to the /bridge-tokens endpoint to have the user skip the company selection step and suggest a data provider.
POST
/
v1
/
companies
/
Search companies
curl --request POST \
--url https://prod.truv.com/v1/companies/ \
--header 'Content-Type: application/json' \
--header 'X-Access-Client-Id: <api-key>' \
--header 'X-Access-Secret: <api-key>' \
--data '
{
"name": "Google",
"domain": "google.com",
"ein": "770493581",
"phone": "6503087300",
"id": "d94df7ecffcb4b218ab2dbff70e7cda8",
"product_type": "income"
}
'import requests
url = "https://prod.truv.com/v1/companies/"
payload = {
"name": "Google",
"domain": "google.com",
"ein": "770493581",
"phone": "6503087300",
"id": "d94df7ecffcb4b218ab2dbff70e7cda8",
"product_type": "income"
}
headers = {
"X-Access-Client-Id": "<api-key>",
"X-Access-Secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Access-Client-Id': '<api-key>',
'X-Access-Secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Google',
domain: 'google.com',
ein: '770493581',
phone: '6503087300',
id: 'd94df7ecffcb4b218ab2dbff70e7cda8',
product_type: 'income'
})
};
fetch('https://prod.truv.com/v1/companies/', 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://prod.truv.com/v1/companies/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Google',
'domain' => 'google.com',
'ein' => '770493581',
'phone' => '6503087300',
'id' => 'd94df7ecffcb4b218ab2dbff70e7cda8',
'product_type' => 'income'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Access-Client-Id: <api-key>",
"X-Access-Secret: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://prod.truv.com/v1/companies/"
payload := strings.NewReader("{\n \"name\": \"Google\",\n \"domain\": \"google.com\",\n \"ein\": \"770493581\",\n \"phone\": \"6503087300\",\n \"id\": \"d94df7ecffcb4b218ab2dbff70e7cda8\",\n \"product_type\": \"income\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Access-Client-Id", "<api-key>")
req.Header.Add("X-Access-Secret", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://prod.truv.com/v1/companies/")
.header("X-Access-Client-Id", "<api-key>")
.header("X-Access-Secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Google\",\n \"domain\": \"google.com\",\n \"ein\": \"770493581\",\n \"phone\": \"6503087300\",\n \"id\": \"d94df7ecffcb4b218ab2dbff70e7cda8\",\n \"product_type\": \"income\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod.truv.com/v1/companies/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Access-Client-Id"] = '<api-key>'
request["X-Access-Secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Google\",\n \"domain\": \"google.com\",\n \"ein\": \"770493581\",\n \"phone\": \"6503087300\",\n \"id\": \"d94df7ecffcb4b218ab2dbff70e7cda8\",\n \"product_type\": \"income\"\n}"
response = http.request(request)
puts response.read_body{
"company_mapping_id": "48427a36d43c4d5aa6324bc06c692456",
"name": "Facebook Demo",
"domain": "facebook.com",
"logo_url": "https://cdn.truv.com/facebook.png",
"success_rate": "high",
"confidence_level": "0.9",
"mapping_status": "verified"
}{
"error": {
"code": "incorrect_parameters",
"message": "Incorrect request parameters",
"extra": {
"invalid-params": [
{
"field": "access_token",
"message": "This field is required."
}
]
}
}
}{
"error": {
"code": "authentication_failed",
"message": "No such token"
}
}{
"error": {
"code": "not_authenticated",
"message": "Authentication credentials were not provided."
}
}Authorizations
Body
application/json
Response
Was this page helpful?