General conventions
Formats, response structure, idempotency and rate limits common to all endpoints
Request format
- The request body is JSON, UTF-8 encoded, with
Content-Type: application/json. - Field names use lowercase with underscores (for example
nature_of_operation). Some fields keep the Portuguese names of Brazilian tax terms (for examplecliente,informacoes_complementares); the page of each endpoint is authoritative. - The street number is
numeroinclienteandnumberin the pickup and delivery addresses; both spellings are accepted in both places. - Code fields are always sent as strings, with leading zeros preserved, for example
"payment_method": "01","origem": "0". The number1is not equivalent to the string"01". - Amounts are sent as numbers, with a period as the decimal separator and two decimal places. Rates in inline taxes (
impostos) are sent as strings expressed as percentages, for example"18"means 18%. - CPF, CNPJ, CEP and telephone numbers may include punctuation; the platform keeps only the digits.
Dates and times
- Date-time fields (for example
dh_sai_ent) use ISO 8601 with a time zone, for example2026-01-15T10:30:00-03:00. When the value cannot be parsed, the platform uses the current time. - Time filter parameters of list endpoints (for example
start_create_time) are mostly Unix timestamps; the unit (seconds or milliseconds) and the accepted date string formats vary by endpoint, and the page of each endpoint is authoritative.
Response structure
{
"success": false,
"message": "The cliente.cep field cannot be empty",
"code": "FIELD_REQUIRED",
"data": { }
}success: whether the call succeeded. On business failures (including rejection by the tax authority) the HTTP status is still 200, and the result is determined bysuccess.message: descriptive text, which may be in Chinese, English or Portuguese. Its content changes between versions and must not be used for programmatic decisions.code: the error code on failure, used for programmatic decisions; see "Error handling".data: the response data on success; when an issuance is rejected, it containsstatusandmotivo(the reason given by the tax authority).
Pagination
List endpoints use page (starting from 1) and page_size. The upper limit of page_size varies by endpoint (for example 20 for the company list and 50 for the invoice list); exceeding it returns an error.
Idempotency and duplicate submission
The id in an issuance request is a unique order number from the integrator's own system. In the production environment, when an invoice in processing or already authorized exists for the same company, the same id and the same inbound/outbound direction, a new submission does not issue a duplicate and returns the existing invoice instead. This protection does not apply to the test environment or to complementary, adjustment and return invoices. On a network timeout or an uncertain result, the request is retried with the same id; the id must not be changed.
The first 15 characters of id are written to the product lines of the invoice as the order number.
Synchronous and asynchronous
/api/invoice/create and similar endpoints respond only after the tax authority has returned, usually within a few seconds and longer when the tax authority is busy. For batch issuance, or when the connection cannot be held open for a long time, /api/invoice/v2/create is used: it returns a task number immediately, and the result is pushed by webhook or can be polled with /api/invoice/v2/task/get.
Rate limits
The maximum number of calls per second for each token is configured by TF for each integrator. When it is exceeded, code RATE_LIMITED is returned and the request is retried later. Each IP is limited to 60 requests per 10 seconds; beyond that, HTTP 429 is returned. In addition, the tax authority suspends service for about one hour for a CNPJ whose requests are repeatedly rejected within a short period (rejection code 656); after a rejection, the data is corrected first and the same request is not resubmitted unchanged.
Subscription and billing
Some endpoints must first be activated in the subscription center. When an endpoint is not activated or the balance is insufficient, SUBSCRIPTION_REQUIRED or SUBSCRIPTION_NO_BALANCE is returned, respectively.