curl --request POST \
--url https://api.sandbox.tesouro.com/finops/v1/entities \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-finops-version: <x-finops-version>' \
--data '
{
"address": {
"city": "<string>",
"line1": "<string>",
"postal_code": "<string>",
"line2": "<string>",
"state": "<string>"
},
"email": "jsmith@example.com",
"individual": {
"first_name": "<string>",
"last_name": "<string>",
"date_of_birth": "2023-12-25",
"id_number": "<string>",
"ssn_last_4": "<string>",
"title": "<string>"
},
"organization": {
"legal_name": "<string>",
"directors_provided": true,
"executives_provided": true,
"legal_entity_id": "<string>",
"owners_provided": true,
"representative_provided": true
},
"phone": "<string>",
"registration_authority": "Amtsgericht Charlottenburg",
"registration_number": "HRB 202324",
"tax_id": "<string>",
"website": "<string>"
}
'import requests
url = "https://api.sandbox.tesouro.com/finops/v1/entities"
payload = {
"address": {
"city": "<string>",
"line1": "<string>",
"postal_code": "<string>",
"line2": "<string>",
"state": "<string>"
},
"email": "jsmith@example.com",
"individual": {
"first_name": "<string>",
"last_name": "<string>",
"date_of_birth": "2023-12-25",
"id_number": "<string>",
"ssn_last_4": "<string>",
"title": "<string>"
},
"organization": {
"legal_name": "<string>",
"directors_provided": True,
"executives_provided": True,
"legal_entity_id": "<string>",
"owners_provided": True,
"representative_provided": True
},
"phone": "<string>",
"registration_authority": "Amtsgericht Charlottenburg",
"registration_number": "HRB 202324",
"tax_id": "<string>",
"website": "<string>"
}
headers = {
"x-finops-version": "<x-finops-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-finops-version': '<x-finops-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
address: {
city: '<string>',
line1: '<string>',
postal_code: '<string>',
line2: '<string>',
state: '<string>'
},
email: 'jsmith@example.com',
individual: {
first_name: '<string>',
last_name: '<string>',
date_of_birth: '2023-12-25',
id_number: '<string>',
ssn_last_4: '<string>',
title: '<string>'
},
organization: {
legal_name: '<string>',
directors_provided: true,
executives_provided: true,
legal_entity_id: '<string>',
owners_provided: true,
representative_provided: true
},
phone: '<string>',
registration_authority: 'Amtsgericht Charlottenburg',
registration_number: 'HRB 202324',
tax_id: '<string>',
website: '<string>'
})
};
fetch('https://api.sandbox.tesouro.com/finops/v1/entities', 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://api.sandbox.tesouro.com/finops/v1/entities",
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([
'address' => [
'city' => '<string>',
'line1' => '<string>',
'postal_code' => '<string>',
'line2' => '<string>',
'state' => '<string>'
],
'email' => 'jsmith@example.com',
'individual' => [
'first_name' => '<string>',
'last_name' => '<string>',
'date_of_birth' => '2023-12-25',
'id_number' => '<string>',
'ssn_last_4' => '<string>',
'title' => '<string>'
],
'organization' => [
'legal_name' => '<string>',
'directors_provided' => true,
'executives_provided' => true,
'legal_entity_id' => '<string>',
'owners_provided' => true,
'representative_provided' => true
],
'phone' => '<string>',
'registration_authority' => 'Amtsgericht Charlottenburg',
'registration_number' => 'HRB 202324',
'tax_id' => '<string>',
'website' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-finops-version: <x-finops-version>"
],
]);
$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://api.sandbox.tesouro.com/finops/v1/entities"
payload := strings.NewReader("{\n \"address\": {\n \"city\": \"<string>\",\n \"line1\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"line2\": \"<string>\",\n \"state\": \"<string>\"\n },\n \"email\": \"jsmith@example.com\",\n \"individual\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"id_number\": \"<string>\",\n \"ssn_last_4\": \"<string>\",\n \"title\": \"<string>\"\n },\n \"organization\": {\n \"legal_name\": \"<string>\",\n \"directors_provided\": true,\n \"executives_provided\": true,\n \"legal_entity_id\": \"<string>\",\n \"owners_provided\": true,\n \"representative_provided\": true\n },\n \"phone\": \"<string>\",\n \"registration_authority\": \"Amtsgericht Charlottenburg\",\n \"registration_number\": \"HRB 202324\",\n \"tax_id\": \"<string>\",\n \"website\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-finops-version", "<x-finops-version>")
req.Header.Add("Authorization", "Bearer <token>")
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://api.sandbox.tesouro.com/finops/v1/entities")
.header("x-finops-version", "<x-finops-version>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"address\": {\n \"city\": \"<string>\",\n \"line1\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"line2\": \"<string>\",\n \"state\": \"<string>\"\n },\n \"email\": \"jsmith@example.com\",\n \"individual\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"id_number\": \"<string>\",\n \"ssn_last_4\": \"<string>\",\n \"title\": \"<string>\"\n },\n \"organization\": {\n \"legal_name\": \"<string>\",\n \"directors_provided\": true,\n \"executives_provided\": true,\n \"legal_entity_id\": \"<string>\",\n \"owners_provided\": true,\n \"representative_provided\": true\n },\n \"phone\": \"<string>\",\n \"registration_authority\": \"Amtsgericht Charlottenburg\",\n \"registration_number\": \"HRB 202324\",\n \"tax_id\": \"<string>\",\n \"website\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.tesouro.com/finops/v1/entities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-finops-version"] = '<x-finops-version>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"address\": {\n \"city\": \"<string>\",\n \"line1\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"line2\": \"<string>\",\n \"state\": \"<string>\"\n },\n \"email\": \"jsmith@example.com\",\n \"individual\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"id_number\": \"<string>\",\n \"ssn_last_4\": \"<string>\",\n \"title\": \"<string>\"\n },\n \"organization\": {\n \"legal_name\": \"<string>\",\n \"directors_provided\": true,\n \"executives_provided\": true,\n \"legal_entity_id\": \"<string>\",\n \"owners_provided\": true,\n \"representative_provided\": true\n },\n \"phone\": \"<string>\",\n \"registration_authority\": \"Amtsgericht Charlottenburg\",\n \"registration_number\": \"HRB 202324\",\n \"tax_id\": \"<string>\",\n \"website\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"address": {
"city": "<string>",
"line1": "<string>",
"postal_code": "<string>",
"line2": "<string>",
"state": "<string>"
},
"organization": {
"legal_name": "<string>",
"directors_provided": true,
"executives_provided": true,
"legal_entity_id": "<string>",
"owners_provided": true,
"representative_provided": true
},
"type": "<string>",
"email": "<string>",
"logo": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"file_type": "<string>",
"md5": "<string>",
"mimetype": "<string>",
"name": "<string>",
"region": "<string>",
"size": 1,
"url": "<string>",
"pages": [],
"previews": []
},
"phone": "<string>",
"registration_authority": "Amtsgericht Charlottenburg",
"registration_number": "HRB 202324",
"tax_id": "<string>",
"website": "<string>"
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"error": {
"message": "<string>"
}
}Create an entity
Create a new entity from the specified values.
curl --request POST \
--url https://api.sandbox.tesouro.com/finops/v1/entities \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-finops-version: <x-finops-version>' \
--data '
{
"address": {
"city": "<string>",
"line1": "<string>",
"postal_code": "<string>",
"line2": "<string>",
"state": "<string>"
},
"email": "jsmith@example.com",
"individual": {
"first_name": "<string>",
"last_name": "<string>",
"date_of_birth": "2023-12-25",
"id_number": "<string>",
"ssn_last_4": "<string>",
"title": "<string>"
},
"organization": {
"legal_name": "<string>",
"directors_provided": true,
"executives_provided": true,
"legal_entity_id": "<string>",
"owners_provided": true,
"representative_provided": true
},
"phone": "<string>",
"registration_authority": "Amtsgericht Charlottenburg",
"registration_number": "HRB 202324",
"tax_id": "<string>",
"website": "<string>"
}
'import requests
url = "https://api.sandbox.tesouro.com/finops/v1/entities"
payload = {
"address": {
"city": "<string>",
"line1": "<string>",
"postal_code": "<string>",
"line2": "<string>",
"state": "<string>"
},
"email": "jsmith@example.com",
"individual": {
"first_name": "<string>",
"last_name": "<string>",
"date_of_birth": "2023-12-25",
"id_number": "<string>",
"ssn_last_4": "<string>",
"title": "<string>"
},
"organization": {
"legal_name": "<string>",
"directors_provided": True,
"executives_provided": True,
"legal_entity_id": "<string>",
"owners_provided": True,
"representative_provided": True
},
"phone": "<string>",
"registration_authority": "Amtsgericht Charlottenburg",
"registration_number": "HRB 202324",
"tax_id": "<string>",
"website": "<string>"
}
headers = {
"x-finops-version": "<x-finops-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-finops-version': '<x-finops-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
address: {
city: '<string>',
line1: '<string>',
postal_code: '<string>',
line2: '<string>',
state: '<string>'
},
email: 'jsmith@example.com',
individual: {
first_name: '<string>',
last_name: '<string>',
date_of_birth: '2023-12-25',
id_number: '<string>',
ssn_last_4: '<string>',
title: '<string>'
},
organization: {
legal_name: '<string>',
directors_provided: true,
executives_provided: true,
legal_entity_id: '<string>',
owners_provided: true,
representative_provided: true
},
phone: '<string>',
registration_authority: 'Amtsgericht Charlottenburg',
registration_number: 'HRB 202324',
tax_id: '<string>',
website: '<string>'
})
};
fetch('https://api.sandbox.tesouro.com/finops/v1/entities', 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://api.sandbox.tesouro.com/finops/v1/entities",
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([
'address' => [
'city' => '<string>',
'line1' => '<string>',
'postal_code' => '<string>',
'line2' => '<string>',
'state' => '<string>'
],
'email' => 'jsmith@example.com',
'individual' => [
'first_name' => '<string>',
'last_name' => '<string>',
'date_of_birth' => '2023-12-25',
'id_number' => '<string>',
'ssn_last_4' => '<string>',
'title' => '<string>'
],
'organization' => [
'legal_name' => '<string>',
'directors_provided' => true,
'executives_provided' => true,
'legal_entity_id' => '<string>',
'owners_provided' => true,
'representative_provided' => true
],
'phone' => '<string>',
'registration_authority' => 'Amtsgericht Charlottenburg',
'registration_number' => 'HRB 202324',
'tax_id' => '<string>',
'website' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-finops-version: <x-finops-version>"
],
]);
$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://api.sandbox.tesouro.com/finops/v1/entities"
payload := strings.NewReader("{\n \"address\": {\n \"city\": \"<string>\",\n \"line1\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"line2\": \"<string>\",\n \"state\": \"<string>\"\n },\n \"email\": \"jsmith@example.com\",\n \"individual\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"id_number\": \"<string>\",\n \"ssn_last_4\": \"<string>\",\n \"title\": \"<string>\"\n },\n \"organization\": {\n \"legal_name\": \"<string>\",\n \"directors_provided\": true,\n \"executives_provided\": true,\n \"legal_entity_id\": \"<string>\",\n \"owners_provided\": true,\n \"representative_provided\": true\n },\n \"phone\": \"<string>\",\n \"registration_authority\": \"Amtsgericht Charlottenburg\",\n \"registration_number\": \"HRB 202324\",\n \"tax_id\": \"<string>\",\n \"website\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-finops-version", "<x-finops-version>")
req.Header.Add("Authorization", "Bearer <token>")
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://api.sandbox.tesouro.com/finops/v1/entities")
.header("x-finops-version", "<x-finops-version>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"address\": {\n \"city\": \"<string>\",\n \"line1\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"line2\": \"<string>\",\n \"state\": \"<string>\"\n },\n \"email\": \"jsmith@example.com\",\n \"individual\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"id_number\": \"<string>\",\n \"ssn_last_4\": \"<string>\",\n \"title\": \"<string>\"\n },\n \"organization\": {\n \"legal_name\": \"<string>\",\n \"directors_provided\": true,\n \"executives_provided\": true,\n \"legal_entity_id\": \"<string>\",\n \"owners_provided\": true,\n \"representative_provided\": true\n },\n \"phone\": \"<string>\",\n \"registration_authority\": \"Amtsgericht Charlottenburg\",\n \"registration_number\": \"HRB 202324\",\n \"tax_id\": \"<string>\",\n \"website\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.tesouro.com/finops/v1/entities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-finops-version"] = '<x-finops-version>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"address\": {\n \"city\": \"<string>\",\n \"line1\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"line2\": \"<string>\",\n \"state\": \"<string>\"\n },\n \"email\": \"jsmith@example.com\",\n \"individual\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"id_number\": \"<string>\",\n \"ssn_last_4\": \"<string>\",\n \"title\": \"<string>\"\n },\n \"organization\": {\n \"legal_name\": \"<string>\",\n \"directors_provided\": true,\n \"executives_provided\": true,\n \"legal_entity_id\": \"<string>\",\n \"owners_provided\": true,\n \"representative_provided\": true\n },\n \"phone\": \"<string>\",\n \"registration_authority\": \"Amtsgericht Charlottenburg\",\n \"registration_number\": \"HRB 202324\",\n \"tax_id\": \"<string>\",\n \"website\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"address": {
"city": "<string>",
"line1": "<string>",
"postal_code": "<string>",
"line2": "<string>",
"state": "<string>"
},
"organization": {
"legal_name": "<string>",
"directors_provided": true,
"executives_provided": true,
"legal_entity_id": "<string>",
"owners_provided": true,
"representative_provided": true
},
"type": "<string>",
"email": "<string>",
"logo": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"file_type": "<string>",
"md5": "<string>",
"mimetype": "<string>",
"name": "<string>",
"region": "<string>",
"size": 1,
"url": "<string>",
"pages": [],
"previews": []
},
"phone": "<string>",
"registration_authority": "Amtsgericht Charlottenburg",
"registration_number": "HRB 202324",
"tax_id": "<string>",
"website": "<string>"
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"error": {
"message": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Body
A schema for a request to create an entity of different types
An address description of the entity
Show child attributes
Show child attributes
An official email address of the entity
A type for an entity
individual, organization A set of meta data describing the individual
Show child attributes
Show child attributes
A set of meta data describing the organization
Show child attributes
Show child attributes
The contact phone number of the entity. Required for US organizations to use payments.
20(Germany only) The name of the local district court (Amtsgericht) where the entity is registered. Required if registration_number is provided.
1 - 100"Amtsgericht Charlottenburg"
(Germany only) The entity's commercial register number (Handelsregisternummer) in the German Commercial Register, if available.
1 - 100"HRB 202324"
The entity's taxpayer identification number or tax ID. This field is required for entities that are non-VAT registered.
1 - 30A website of the entity
1 - 2083Response
Successful Response
- Option 1
- Option 2
A schema for a response after creation of an entity of different types
UUID entity ID
UTC datetime
UTC datetime
An address description of the entity
Show child attributes
Show child attributes
A set of metadata describing an organization
Show child attributes
Show child attributes
record status, 'active' by default
active, inactive, deleted A type for an organization
"organization"An official email address of the entity
A logo image of the entity
Show child attributes
Show child attributes
A phone number of the entity
100(Germany only) The name of the local district court (Amtsgericht) where the entity is registered. Required if registration_number is provided.
1 - 100"Amtsgericht Charlottenburg"
(Germany only) The entity's commercial register number (Handelsregisternummer) in the German Commercial Register, if available.
1 - 100"HRB 202324"
The entity's taxpayer identification number or tax ID. This field is required for entities that are non-VAT registered.
30A website of the entity
1 - 2083Was this page helpful?