← HomeFleetPay / API

Check RNTRC status

Parameters, data structure and responses from the versioned contract.

GET/consultas/rntrc
consultarRntrcSandbox Base: https://api.fleetpay.site/v1

Technical 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.

Simulated sandbox mode

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.

The documento + rntrc pair must match

These 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.

Test sentinels

In simulated mode, these rntrc values always return the same outcome — use them to exercise your integration's error paths:

rntrcResponse
000000000Inactive registration — ativo: false, with data_validade in the past
111111111Active registration treated as a TAC — ativo: true and equiparado_tac: true
the queried carrier's RNTRCSuccess response
any other valid value400 rntrc_nao_confere

Authentication

[
  {
    "oauth2": []
  },
  {
    "chaveApi": []
  }
]
Availability depends on the environment, enabled scopes and provider. This reference does not execute requests or collect credentials.

Parameters

documentoquery · stringRequired

Queried carrier's CPF (11 digits) or CNPJ (14 digits), digits only.

Constraints
{
  "type": "string",
  "pattern": "^([0-9]{11}|[0-9]{14})$"
}
rntrcquery · stringRequired

The 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.

Constraints
{
  "type": "string",
  "pattern": "^[0-9]{8,9}$"
}

Responses

200 HTTP Response

Status of the queried RNTRC

application/json

environmentstringRequired

Environment where the query ran, determined by the URL called.

"homologacao" · "producao"
400 HTTP Response

rntrc_nao_confere — the supplied RNTRC is not the registration for this CPF/CNPJ. validacao — a parameter does not match the required format.

application/json

errorobjectOptional
401 HTTP Response

Unauthenticated (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.

application/json

errorobjectOptional
403 HTTP Response

Scope not enabled for these credentials

application/json

errorobjectOptional
422 HTTP Response

The authenticated company has not completed fiscal registration (empresa_nao_habilitada).

application/json

errorobjectOptional
503 HTTP Response

The query is temporarily unavailable (consulta_indisponivel). Wait and try again.

application/json

errorobjectOptional
Complete Operation Definition
{
  "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"
}