curl --request GET \
--url https://api.sandbox.tesouro.com/identity/v1/organizations/{organizationId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox.tesouro.com/identity/v1/organizations/{organizationId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.tesouro.com/identity/v1/organizations/{organizationId}', 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/identity/v1/organizations/{organizationId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.sandbox.tesouro.com/identity/v1/organizations/{organizationId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sandbox.tesouro.com/identity/v1/organizations/{organizationId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.tesouro.com/identity/v1/organizations/{organizationId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"displayName": "<string>",
"isEnabled": true,
"legalName": "<string>",
"shortName": "<string>",
"types": [
"BANK"
],
"address": {
"address1": "<string>",
"address2": "<string>",
"city": "<string>",
"country": "<string>",
"postalCode": "<string>",
"stateOrProvince": "<string>"
},
"childOrganizationTypeCounts": {},
"domainName": "<string>",
"embeddedBusinessData": {
"businessStructureType": "<string>",
"formationDate": "2023-12-25",
"naicsCode": "SOYBEAN_FARMING",
"taxId": {
"maskedTaxId": "<string>",
"taxIdType": "<string>"
}
},
"logo": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdTsUtc": "2023-11-07T05:31:56Z",
"md5": "<string>",
"mimetype": "<string>",
"name": "<string>",
"size": 123,
"url": "<string>"
},
"phoneNumber": "<string>"
}{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}Get organization
The caller must have a relationship with the target organization to access its details. Requires the organization:read:org scope.
Token types: APP, USER | Required scopes: organization:read:org
curl --request GET \
--url https://api.sandbox.tesouro.com/identity/v1/organizations/{organizationId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox.tesouro.com/identity/v1/organizations/{organizationId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.tesouro.com/identity/v1/organizations/{organizationId}', 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/identity/v1/organizations/{organizationId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.sandbox.tesouro.com/identity/v1/organizations/{organizationId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sandbox.tesouro.com/identity/v1/organizations/{organizationId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.tesouro.com/identity/v1/organizations/{organizationId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"displayName": "<string>",
"isEnabled": true,
"legalName": "<string>",
"shortName": "<string>",
"types": [
"BANK"
],
"address": {
"address1": "<string>",
"address2": "<string>",
"city": "<string>",
"country": "<string>",
"postalCode": "<string>",
"stateOrProvince": "<string>"
},
"childOrganizationTypeCounts": {},
"domainName": "<string>",
"embeddedBusinessData": {
"businessStructureType": "<string>",
"formationDate": "2023-12-25",
"naicsCode": "SOYBEAN_FARMING",
"taxId": {
"maskedTaxId": "<string>",
"taxIdType": "<string>"
}
},
"logo": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdTsUtc": "2023-11-07T05:31:56Z",
"md5": "<string>",
"mimetype": "<string>",
"name": "<string>",
"size": 123,
"url": "<string>"
},
"phoneNumber": "<string>"
}{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}Authorizations
Application (M2M) OAuth2 access token (client credentials).
Path Parameters
The unique identifier of the organization to retrieve.
Response
Returns the organization details.
Response DTO for the organization details endpoint.
The unique identifier of the organization.
The display name of the organization.
Whether the organization is currently enabled (active within the time window).
The legal name of the organization.
A short identifier for the organization.
The types assigned to the organization (e.g., VSP, Bank).
BANK, EMBEDDED, PLATFORM, TRANSACTOR, VERTICAL_SOFTWARE_PROVIDER The organization's address, if available.
Show child attributes
Show child attributes
Counts of direct child organizations grouped by type (e.g., {"VERTICAL_SOFTWARE_PROVIDER": 3, "EMBEDDED": 2}). Empty dictionary if the organization has no children.
Show child attributes
Show child attributes
The domain name / website of the organization.
Embedded business entity data, populated when the target organization has embedded data.
Show child attributes
Show child attributes
The organization's uploaded logo, including image metadata and CDN URLs. Null when no logo has been uploaded.
Show child attributes
Show child attributes
The organization's phone number, if available.
Was this page helpful?