documentoquery · stringRequiredQueried carrier's CPF (11 digits) or CNPJ (14 digits), digits only.
Constraints
{
"type": "string",
"pattern": "^([0-9]{11}|[0-9]{14})$"
}Parameters, data structure and responses from the versioned contract.
/consultas/rntrcTechnical descriptions are translated from the versioned contract. Original identifiers and JSON are preserved; data examples are omitted.
Queries an RNTRC registration's status with ANTT: whether it is active, the legal name, carrier type and whether it is treated as a TAC.
Prerequisite for the querying company: completed tax registration, including an A1 digital certificate uploaded in Settings. Otherwise, the response is 422 with empresa_nao_habilitada.
Requires the consultas scope enabled in the dashboard.
This query has no contracted provider behind it: in the sandbox environment, FleetPay generates a deterministic response with no regulatory effect — the data does not come from ANTT and does not reflect the carrier's real registration. To make that explicit in the response, razao_social does not contain the real name: in simulated mode, the entire field is replaced by TRANSPORTES SIMULADOS HML LTDA when documento is a CNPJ, or TRANSPORTADOR AUTONOMO SIMULADO when it is a CPF.
The request and response contract is already final: you can integrate now. When the real provider is introduced, behavior stops being simulated without a contract change.
documento + rntrc pair must matchThese parameters ask a single question: "the status of THIS registration for THIS carrier." An RNTRC that does not belong to the supplied CPF/CNPJ does not identify a carrier for this query. The response is 400 with rntrc_nao_confere — never a 200 about whichever registration happened to be found.
It is 400, not 503, because the query ran and reached a conclusion: there was no outage. It is not 404, because the problem is the combination of parameters, not a missing resource at the address.
The test sentinels below are exempt from this check — they are deliberately not anyone's RNTRC.
In simulated mode, these rntrc values always return the same outcome — use them to exercise your integration's error paths:
rntrc | Response |
|---|---|
000000000 | Inactive registration — ativo: false, with data_validade in the past |
111111111 | Active registration treated as a TAC — ativo: true and equiparado_tac: true |
| the queried carrier's RNTRC | Success response |
| any other valid value | 400 rntrc_nao_confere |
[
{
"oauth2": []
},
{
"chaveApi": []
}
]documentoquery · stringRequiredQueried carrier's CPF (11 digits) or CNPJ (14 digits), digits only.
{
"type": "string",
"pattern": "^([0-9]{11}|[0-9]{14})$"
}rntrcquery · stringRequiredThe queried carrier's RNTRC, with 8 or 9 digits.
In the sandbox environment, 000000000 returns an inactive registration and 111111111 returns an active registration treated as a TAC; any other valid value returns success.
{
"type": "string",
"pattern": "^[0-9]{8,9}$"
}200 HTTP ResponseStatus of the queried RNTRC
application/jsondataobjectRequiredenvironmentstringRequiredEnvironment where the query ran, determined by the URL called.
"homologacao" · "producao"400 HTTP Responserntrc_nao_confere — the supplied RNTRC is not the registration for this CPF/CNPJ.
validacao — a parameter does not match the required format.
401 HTTP ResponseUnauthenticated (autenticacao): missing, invalid or expired credentials, including an API key used in the wrong environment. A sandbox key is not valid in production, nor a production key in the sandbox; the error message indicates the expected environment.
422 HTTP ResponseThe authenticated company has not completed fiscal registration (empresa_nao_habilitada).
503 HTTP ResponseThe query is temporarily unavailable (consulta_indisponivel). Wait and try again.
{
"tags": [
"Consultas"
],
"summary": "Consultar a situação do RNTRC",
"operationId": "consultarRntrc",
"description": "Consulta a situação cadastral de um RNTRC na ANTT: se está ativo, a razão social, o\ntipo de transportador e se é equiparado a TAC.\n\n**Pré-requisito da empresa que consulta:** ter o cadastro fiscal concluído — com o\ncertificado digital A1 enviado em Configurações. Sem isso a resposta é `422` com\n`empresa_nao_habilitada`.\n\nExige o escopo `consultas` habilitado no painel.\n\n## Modo simulado em homologação\n\nEsta consulta **não tem provedor contratado** por trás: em homologação a resposta é\ngerada pela FleetPay, é determinística e **não tem efeito regulatório** — o dado não vem\nda ANTT e não reflete o cadastro real do transportador. Para deixar isso explícito na\nresposta, o campo `razao_social` **não traz o nome real**: em modo simulado ele é\nsubstituído por inteiro por `TRANSPORTES SIMULADOS HML LTDA` quando o `documento` é um\nCNPJ, ou por `TRANSPORTADOR AUTONOMO SIMULADO` quando é um CPF.\n\nO contrato de request e response já é o definitivo: integre agora. Quando o provedor real\nentrar, o comportamento deixa de ser simulado **sem mudança de contrato**.\n\n\n### O par `documento` + `rntrc` precisa conferir\n\nOs dois parâmetros são uma pergunta só: *\"a situação DESTE registro DESTE\ntransportador\"*. Um RNTRC que não seja o daquele CPF/CNPJ não descreve transportador\nnenhum, e a resposta é **`400` com `rntrc_nao_confere`** — nunca um `200` sobre o\ncadastro que por acaso foi encontrado.\n\nÉ `400` e não `503` porque a consulta rodou e concluiu: não houve indisponibilidade. E\nnão é `404` porque o que está errado é a **combinação** dos dois parâmetros, não um\nrecurso ausente no endereço.\n\nAs sentinelas abaixo são **isentas** dessa checagem — elas existem justamente para não\nserem o RNTRC de ninguém.\n\n### Sentinelas de teste\n\nEm modo simulado, estes valores de `rntrc` respondem sempre a mesma coisa — use-os para\nexercitar o caminho de erro da sua integração:\n\n| `rntrc` | Resposta |\n|---|---|\n| `000000000` | Registro inativo — `ativo: false`, e `data_validade` no passado |\n| `111111111` | Registro ativo e equiparado a TAC — `ativo: true` e `equiparado_tac: true` |\n| o RNTRC do transportador consultado | Resposta de sucesso |\n| qualquer outro valor válido | `400` `rntrc_nao_confere` |\n",
"parameters": [
{
"name": "documento",
"in": "query",
"required": true,
"schema": {
"type": "string",
"pattern": "^([0-9]{11}|[0-9]{14})$"
},
"description": "CPF (11 dígitos) ou CNPJ (14 dígitos) do transportador consultado, somente dígitos."
},
{
"name": "rntrc",
"in": "query",
"required": true,
"schema": {
"type": "string",
"pattern": "^[0-9]{8,9}$"
},
"description": "RNTRC do transportador consultado, com 8 ou 9 dígitos.\n\nEm homologação, `000000000` devolve registro inativo e `111111111` devolve registro\nativo equiparado a TAC; qualquer outro valor válido devolve sucesso.\n"
}
],
"responses": {
"200": {
"description": "Situação do RNTRC consultado",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RespostaConsultaRntrc"
}
}
}
},
"400": {
"description": "`rntrc_nao_confere` — o RNTRC informado não é o registro deste CPF/CNPJ.\n`validacao` — algum parâmetro está fora do formato exigido.\n",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Erro"
}
}
}
},
"401": {
"$ref": "#/components/responses/Erro401"
},
"403": {
"$ref": "#/components/responses/Erro403"
},
"422": {
"description": "A empresa autenticada ainda não concluiu o cadastro fiscal (`empresa_nao_habilitada`).",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Erro"
}
}
}
},
"503": {
"description": "A consulta está temporariamente indisponível (`consulta_indisponivel`). Aguarde e tente de novo.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Erro"
}
}
}
}
},
"method": "GET",
"path": "/consultas/rntrc"
}