Identificar ou cadastrar empresa internacional
curl --request POST \
--url https://api.base39.com.br/v2/entities/international \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"countryCode": "US",
"name": "Smart Wires Inc."
}
'import requests
url = "https://api.base39.com.br/v2/entities/international"
payload = {
"countryCode": "US",
"name": "Smart Wires Inc."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({countryCode: 'US', name: 'Smart Wires Inc.'})
};
fetch('https://api.base39.com.br/v2/entities/international', 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.base39.com.br/v2/entities/international",
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([
'countryCode' => 'US',
'name' => 'Smart Wires Inc.'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.base39.com.br/v2/entities/international"
payload := strings.NewReader("{\n \"countryCode\": \"US\",\n \"name\": \"Smart Wires Inc.\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.base39.com.br/v2/entities/international")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"countryCode\": \"US\",\n \"name\": \"Smart Wires Inc.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.base39.com.br/v2/entities/international")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"countryCode\": \"US\",\n \"name\": \"Smart Wires Inc.\"\n}"
response = http.request(request)
puts response.read_body{
"object": "entity",
"id": "<string>",
"entityType": "company",
"document": "<string>",
"name": "<string>",
"legalName": "<string>",
"tradeName": "<string>",
"icon": {
"type": "emoji",
"emoji": "page_icon",
"external": {
"url": "https://example.com/image.jpg"
},
"file_upload": {
"id": "fu_abc123"
},
"domain": "acme.com",
"file": {
"url": "https://s3.amazonaws.com/...",
"expiryTime": "2024-01-15T10:30:00.000Z"
},
"lucide": "file-text",
"brand": "github",
"dicebear": {
"style": "notionists-neutral",
"seed": "0256de50-f90c-49a8-81f0-3988b2b89d8d",
"backgroundColor": "b6e3f4,b6e3f4",
"options": {
"shape": "circle",
"bodyColor": "<string>",
"animationVariant": "fastest",
"brows": "<string>",
"eyes": "<string>",
"glasses": "<string>",
"lips": "<string>",
"nose": "<string>",
"flip": true,
"rotate": 123,
"scale": 123,
"radius": 123,
"size": 123,
"backgroundType": "solid",
"backgroundRotation": [
123
],
"translateX": 123,
"translateY": 123,
"clip": true,
"randomizeIds": true
}
},
"background": "blue",
"empty": true,
"updatedBy": "dataset:empresas"
}
}Entidades
Identificar ou cadastrar empresa internacional
Identifica ou cadastra uma empresa pelo país e nome. Requer acesso a entidades internacionais no plano. As consultas brasileiras por domínio não estão disponíveis para entidades internacionais.
POST
/
v2
/
entities
/
international
Identificar ou cadastrar empresa internacional
curl --request POST \
--url https://api.base39.com.br/v2/entities/international \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"countryCode": "US",
"name": "Smart Wires Inc."
}
'import requests
url = "https://api.base39.com.br/v2/entities/international"
payload = {
"countryCode": "US",
"name": "Smart Wires Inc."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({countryCode: 'US', name: 'Smart Wires Inc.'})
};
fetch('https://api.base39.com.br/v2/entities/international', 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.base39.com.br/v2/entities/international",
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([
'countryCode' => 'US',
'name' => 'Smart Wires Inc.'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.base39.com.br/v2/entities/international"
payload := strings.NewReader("{\n \"countryCode\": \"US\",\n \"name\": \"Smart Wires Inc.\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.base39.com.br/v2/entities/international")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"countryCode\": \"US\",\n \"name\": \"Smart Wires Inc.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.base39.com.br/v2/entities/international")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"countryCode\": \"US\",\n \"name\": \"Smart Wires Inc.\"\n}"
response = http.request(request)
puts response.read_body{
"object": "entity",
"id": "<string>",
"entityType": "company",
"document": "<string>",
"name": "<string>",
"legalName": "<string>",
"tradeName": "<string>",
"icon": {
"type": "emoji",
"emoji": "page_icon",
"external": {
"url": "https://example.com/image.jpg"
},
"file_upload": {
"id": "fu_abc123"
},
"domain": "acme.com",
"file": {
"url": "https://s3.amazonaws.com/...",
"expiryTime": "2024-01-15T10:30:00.000Z"
},
"lucide": "file-text",
"brand": "github",
"dicebear": {
"style": "notionists-neutral",
"seed": "0256de50-f90c-49a8-81f0-3988b2b89d8d",
"backgroundColor": "b6e3f4,b6e3f4",
"options": {
"shape": "circle",
"bodyColor": "<string>",
"animationVariant": "fastest",
"brows": "<string>",
"eyes": "<string>",
"glasses": "<string>",
"lips": "<string>",
"nose": "<string>",
"flip": true,
"rotate": 123,
"scale": 123,
"radius": 123,
"size": 123,
"backgroundType": "solid",
"backgroundRotation": [
123
],
"translateX": 123,
"translateY": 123,
"clip": true,
"randomizeIds": true
}
},
"background": "blue",
"empty": true,
"updatedBy": "dataset:empresas"
}
}Autorizações
OAuth2 Authorization Code flow
Corpo
application/json
Resposta
201 - application/json
Identidade da empresa internacional identificada ou cadastrada.
Tipo do objeto retornado.
Opções disponíveis:
entity Identificador canônico da entidade.
Tipo da entidade: company (empresa) ou person (pessoa).
Opções disponíveis:
company, person Documento da entidade: CPF, CNPJ ou identificador internacional.
Nome da entidade, quando disponível.
Razão social, disponível para empresas.
Nome fantasia, disponível para empresas.
Ícone ou logotipo da empresa, quando disponível.
Show child attributes
Show child attributes
⌘I