List all companies for the current tenant
curl --request GET \
--url https://api.example.com/companiesimport requests
url = "https://api.example.com/companies"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/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://api.example.com/companies",
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"
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")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/companies")
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": {
"street": "Av Paulista",
"number": "1000",
"city": "São Paulo",
"state": "SP",
"zipCode": "01310-100"
},
"settings": {},
"taxRegime": "SIMPLES_NACIONAL",
"costMethod": "WEIGHTED_AVERAGE",
"createdAt": "2024-01-01T12:00:00.000Z",
"updatedAt": "2024-01-01T12:00:00.000Z"
}
]
Companies
Listar Empresas
Retorna uma lista contendo todas as empresas (companies) atreladas ao seu lojista (tenant).
GET
/
companies
List all companies for the current tenant
curl --request GET \
--url https://api.example.com/companiesimport requests
url = "https://api.example.com/companies"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/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://api.example.com/companies",
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"
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")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/companies")
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": {
"street": "Av Paulista",
"number": "1000",
"city": "São Paulo",
"state": "SP",
"zipCode": "01310-100"
},
"settings": {},
"taxRegime": "SIMPLES_NACIONAL",
"costMethod": "WEIGHTED_AVERAGE",
"createdAt": "2024-01-01T12:00:00.000Z",
"updatedAt": "2024-01-01T12:00:00.000Z"
}
]
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": {
"street": "Av Paulista",
"number": "1000",
"city": "São Paulo",
"state": "SP",
"zipCode": "01310-100"
},
"settings": {},
"taxRegime": "SIMPLES_NACIONAL",
"costMethod": "WEIGHTED_AVERAGE",
"createdAt": "2024-01-01T12:00:00.000Z",
"updatedAt": "2024-01-01T12:00:00.000Z"
}
]
Response
200 - application/json
Return all companies.
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