curl --request GET \
--url https://api.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/suppliers/suppliers/reportimport requests
url = "https://api.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/suppliers/suppliers/report"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/suppliers/suppliers/report', 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.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/suppliers/suppliers/report",
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.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/suppliers/suppliers/report"
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.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/suppliers/suppliers/report")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/suppliers/suppliers/report")
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"<string>"{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "INVALID_TYPE",
"origin": "REGISTRY",
"message": "Invalid type"
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "FORBIDDEN_SUPPLIER",
"origin": "REGISTRY",
"message": "You do not have permission to perform this action on supplier"
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "BAD_REQUEST",
"origin": "REGISTRY",
"message": "Bad Request: Your request is invalid or incomplete. Please make sure you are requesting with the right fields.",
"fields": [
{
"field": "type",
"message": "Invalid option: expected one of \"csv\"|\"xlsx\"",
"code": "TYPE_ONE_OF",
"values": [
"csv",
"xlsx"
]
}
]
}Export suppliers
Exports the organization’s suppliers as a CSV or XLSX file.
curl --request GET \
--url https://api.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/suppliers/suppliers/reportimport requests
url = "https://api.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/suppliers/suppliers/report"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/suppliers/suppliers/report', 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.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/suppliers/suppliers/report",
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.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/suppliers/suppliers/report"
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.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/suppliers/suppliers/report")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/suppliers/suppliers/report")
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"<string>"{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "INVALID_TYPE",
"origin": "REGISTRY",
"message": "Invalid type"
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "FORBIDDEN_SUPPLIER",
"origin": "REGISTRY",
"message": "You do not have permission to perform this action on supplier"
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "BAD_REQUEST",
"origin": "REGISTRY",
"message": "Bad Request: Your request is invalid or incomplete. Please make sure you are requesting with the right fields.",
"fields": [
{
"field": "type",
"message": "Invalid option: expected one of \"csv\"|\"xlsx\"",
"code": "TYPE_ONE_OF",
"values": [
"csv",
"xlsx"
]
}
]
}type query parameter: ?type=csv answers a UTF-8 CSV file, ?type=xlsx an Excel workbook, returned base64-encoded unless you ask for encoding=binary. The supplier list’s filters apply here too (name, document, status), and orderBy and order sort the rows. The file has one row per supplier with its name, trade name, document and document type, phone, e-mail, the address in seven columns, PIX key and key type, status and creation and last update dates. The headers are in Portuguese, while the values are as the API gives them: Tipo de Documento is CPF or CNPJ, Pix - Tipo the pixKeyType and Status is ACTIVE or DEACTIVATED. The dates are DD/MM/YYYY HH:mm in Brasília time. A search that finds nothing gets a file with the header row and one empty row.
The file is sent as an attachment named fornecedores_<date>.csv or .xlsx. A file of more than 50,000 rows or 4 MiB is refused.Path Parameters
ID of your realm.
Format: UUID
ID of the organization whose suppliers you want to export.
Format: UUID
Query Parameters
The file format: csv for a UTF-8 CSV file, xlsx for an Excel workbook.
csv, xlsx How an xlsx file is returned: base64 (the default) as base64 text, or binary as the raw bytes. Ignored for csv.
base64, binary Only suppliers whose name or trade name contains this text (case-insensitive).
1 - 50Only suppliers whose document contains these letters and digits (case-insensitive). Send it with no dots, slashes or hyphens.
^[A-Za-z0-9]+$Only suppliers in this status.
ACTIVE, DEACTIVATED Sort direction of the rows. Defaults to DESC: newest first when sorting by createdAt.
ASC, DESC Field the rows are sorted by. Defaults to createdAt.
createdAt, updatedAt, name, tradingName, document Response
application/csv — The suppliers as a UTF-8 CSV file, when ?type=csv.
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet — The Excel workbook, base64-encoded, when ?type=xlsx (the default encoding=base64). With encoding=binary the body is the raw workbook bytes instead of base64 text, but the platform returns those bytes as text, so the workbook usually can't be opened from it: prefer the default.
The suppliers as a UTF-8 CSV file, when ?type=csv.