Get a specific company by ID
curl --request GET \
--url https://api.example.com/companies/{id}import requests
url = "https://api.example.com/companies/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/companies/{id}', 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.example.com/companies/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/companies/{id}"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/companies/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/companies/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": "e4b6d4e8-8e6d-41da-abdb-8fc358a9e7f1",
"tenantId": "e305e9a4-585e-49b8-bc88-9fba992c6326",
"name": "Acme Corp",
"document": "12345678000199",
"status": "ACTIVE",
"email": "contact@acme.com",
"address": null,
"settings": {},
"taxRegime": "SIMPLES_NACIONAL",
"costMethod": "WEIGHTED_AVERAGE",
"createdAt": "2024-01-01T12:00:00.000Z",
"updatedAt": "2024-01-01T12:00:00.000Z"
}
Companies
Obter Empresa
Retorna os detalhes de uma empresa específica a partir do seu ID.
GET
/
companies
/
{id}
Get a specific company by ID
curl --request GET \
--url https://api.example.com/companies/{id}import requests
url = "https://api.example.com/companies/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/companies/{id}', 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.example.com/companies/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/companies/{id}"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/companies/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/companies/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": "e4b6d4e8-8e6d-41da-abdb-8fc358a9e7f1",
"tenantId": "e305e9a4-585e-49b8-bc88-9fba992c6326",
"name": "Acme Corp",
"document": "12345678000199",
"status": "ACTIVE",
"email": "contact@acme.com",
"address": null,
"settings": {},
"taxRegime": "SIMPLES_NACIONAL",
"costMethod": "WEIGHTED_AVERAGE",
"createdAt": "2024-01-01T12:00:00.000Z",
"updatedAt": "2024-01-01T12:00:00.000Z"
}
Path
string
required
UUID da empresa.
Response
{
"id": "e4b6d4e8-8e6d-41da-abdb-8fc358a9e7f1",
"tenantId": "e305e9a4-585e-49b8-bc88-9fba992c6326",
"name": "Acme Corp",
"document": "12345678000199",
"status": "ACTIVE",
"email": "contact@acme.com",
"address": null,
"settings": {},
"taxRegime": "SIMPLES_NACIONAL",
"costMethod": "WEIGHTED_AVERAGE",
"createdAt": "2024-01-01T12:00:00.000Z",
"updatedAt": "2024-01-01T12:00:00.000Z"
}
Path Parameters
Response
Return the company.
Company Name
Example:
"Acme Corp"
CNPJ or CPF
Example:
"12345678000199"
Company Status
Available options:
ACTIVE, DISABLED, BLOCKED, SUSPENDED Example:
"ACTIVE"
Configuration Settings
Example:
{}
Tax Regime
Available options:
SIMPLES_NACIONAL, LUCRO_PRESUMIDO, LUCRO_REAL Example:
"SIMPLES_NACIONAL"
Cost Method
Available options:
REPLACEMENT, WEIGHTED_AVERAGE Example:
"WEIGHTED_AVERAGE"
Contact Email
Example:
"contact@acme.com"
Address Object