Skip to main content
GET
Export suppliers
Only organization admins can export. Choose the file format with the required 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

realmId
string<uuid>
required

ID of your realm.

Format: UUID

organizationId
string<uuid>
required

ID of the organization whose suppliers you want to export.

Format: UUID

Query Parameters

type
enum<string>
required

The file format: csv for a UTF-8 CSV file, xlsx for an Excel workbook.

Available options:
csv,
xlsx
encoding
enum<string>
default:base64

How an xlsx file is returned: base64 (the default) as base64 text, or binary as the raw bytes. Ignored for csv.

Available options:
base64,
binary
name
string

Only suppliers whose name or trade name contains this text (case-insensitive).

Required string length: 1 - 50
document
string

Only suppliers whose document contains these letters and digits (case-insensitive). Send it with no dots, slashes or hyphens.

Pattern: ^[A-Za-z0-9]+$
status
enum<string>

Only suppliers in this status.

Available options:
ACTIVE,
DEACTIVATED
order
enum<string>
default:DESC

Sort direction of the rows. Defaults to DESC: newest first when sorting by createdAt.

Available options:
ASC,
DESC
orderBy
enum<string>
default:createdAt

Field the rows are sorted by. Defaults to createdAt.

Available options:
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.