---
title: "CSV Completa"
description: "🚨🚨🚨 Atenção: O atendimento online do DETRAN para emissão de documentos em alguns estados podem ocorrer períodos de instabilidade devido a manutenções do sistema, atualizações da base SENATRAN ou indisponibilidades temporárias do portal, com o intuito de preservar a integridade da consulta e garantir o melhor produto possível essa api se encontrará indisponível de 00:00 as 7:00 diariamente devido a essas atualizações dos órgãos oficiais."
lang: en
canonical: https://doc.apibrasil.io/apis/creditos/pyb1f539-bf4d-4z7f-8fc4-ba88f201asab
markdown: https://doc.apibrasil.io/apis/creditos/pyb1f539-bf4d-4z7f-8fc4-ba88f201asab.md
source: apibrasil-documentation
---

# CSV Completa

> 🚨🚨🚨 
> Atenção: O atendimento online do DETRAN para emissão de documentos em alguns estados podem ocorrer períodos de instabilidade devido a manutenções do sistema, atualizações da base SENATRAN ou indisponibilidades temporárias do portal, com o intuito de preservar a integridade da consulta e garantir o melhor produto possível essa api se encontrará indisponível de 00:00 as 7:00 diariamente devido a essas atualizações dos órgãos oficiais.

- **Category:** Vehicle Security
- **Billing:** per query, with the Bearer Token only
- **Price:** R$4.00 per query
- **Limit:** 990,000 per month
- **Registration:** requires a CNPJ
- **Version:** v2
- **Published by:** APIBrasil
- **OpenAPI specification:** https://doc.apibrasil.io/apis/creditos/pyb1f539-bf4d-4z7f-8fc4-ba88f201asab/openapi.json

## How to call

**Base address:** `https://gateway.apibrasil.io/api/v2`

Authentication: the `Authorization: Bearer <token>` header. Nothing else.

With `homolog: true` in the body, the gateway answers from a fixed base, with the real shape of the response, and does not charge. The CPF 00000000000 belongs to that base and to nobody: use it in tests, never in production.

## Endpoints (1 endpoint)

### 1. POST /consulta/veiculos/credits

API Veicular — Relatório Integrado de Consultas Veiculares

A API Veicular reúne em uma única consulta diversas informações oficiais e complementares sobre veículos, oferecendo uma visão ampla e detalhada para validação e análise.
O retorno da API contempla:

Identificação completa do veículo (BIN Nacional): placa, chassi, RENAVAM, ano de fabricação/modelo, categoria, espécie, potência, cor, procedência, município, estado e proprietário atual.

Alertas e indícios: verificação de registros de sinistro, roubo/furto, restrições RENAJUD e bloqueios administrativos ou judiciais.

Laudo CSV: relatório complementar de vistoria veicular, quando disponível.

Infrações (RENainf): checagem de multas registradas em nível nacional, com quantidade e detalhes de ocorrências.

Restrição judicial (RENAJUD): validação da existência de processos ou bloqueios relacionados ao veículo.

Proprietário atual: informações oficiais do proprietário vinculado, incluindo nome, documento, município e estado.

Recall: identificação de eventuais campanhas de recall registradas para o veículo.

Precificação (FIPE): valores médios de mercado, informados pela FIPE, incluindo vigência e código de referência.

Relatório em PDF: link para download do documento consolidado em formato oficial.

Status da consulta: retorno com código e descrição da operação, confirmando o sucesso da requisição.

Essa API é especialmente útil para seguradoras, financeiras, despachantes, locadoras, empresas de crédito e marketplaces automotivos, que necessitam verificar em tempo real a situação legal, cadastral e de risco dos veículos.

- **Method:** `POST`
- **Address:** `https://gateway.apibrasil.io/api/v2/consulta/veiculos/credits`
- **Route version:** v2

**Headers**

| Header | Value |
| --- | --- |
| `Content-Type` | `application/json` |
| `Authorization` | `Bearer $APIBRASIL_TOKEN` |

**Request body**

```json
{
  "tipo": "csv-renainf-renajud-bin-proprietario",
  "placa": "ABC1234",
  "homolog": true
}
```

**In cURL**

```bash
curl -X POST "https://gateway.apibrasil.io/api/v2/consulta/veiculos/credits" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $APIBRASIL_TOKEN" \
  -d '{"tipo":"csv-renainf-renajud-bin-proprietario","placa":"ABC1234","homolog":true}'
```

This endpoint accepts `homolog: true` in the body: the response comes back with valid data, `api_limit_for` equal to `homolog` and no charge.

**Sample response, from the catalog**

```json
{
  "user": {
    "first_name": "[omitido]",
    "email": "[omitido]",
    "cellphone": "[omitido]",
    "notification": "yes"
  },
  "balance": "97,360",
  "balance_before": "101,360",
  "tax": "4,000",
  "status_code": 200,
  "error": false,
  "message": "Dados validos! Voce foi tarifado em R$ 4,00.",
  "valor_consulta": 4,
  "api_limit_for": "credit",
  "homolog": false,
  "data": {
    "veicular": {
      "bin_nacional": {
        "alerta_informativo": "",
        "ano_fabricacao": "",
        "ano_modelo": "",
        "caixa_cambio": "",
        "capacidade_carga": "",
        "categoria_veiculo": "PARTICULAR",
        "chassi": "9BWZZZ32ZGP246344",
        "cilindrada": "0",
        "cmt": "0",
        "codigo_do_orgao_srf": "",
        "codigo_seguranca_crv": "",
        "combustivel": "ALCOOL",
        "cor_veiculo": "VERMELHA",
        "data_atualizacao": "",
        "data_emissao_crlv": "",
        "data_emissao_ultimo_crv": "",
        "data_emplacamento": "",
        "data_limite_restricao_tributaria": "",
        "data_registro_di": "",
        "especie_veiculo": "PASSAGEIRO",
        "informacoes_avulsas": [],
        "logo_fabricante": {
          "imagem_url": ""
        },
        "marca_modelo": "VW/SANTANA CG",
        "municipio": "LOBATO",
        "numero_carroceria": "",
        "numero_crv": "",
        "numero_di": "",
        "numero_eixo_auxiliar": "",
        "numero_eixo_traseiro": "",
        "numero_eixos": "0",
        "numero_identificacao_faturado": "",
        "numero_identificacao_importador": "",
        "numero_motor": "",
        "numero_processo_importacao": "",
        "numero_reda": "",
        "numero_sequencia_crv": "",
        "numero_via_crlv": "",
        "numero_via_crv": "",
        "off_line": "0",
        "pbt": "0",
        "placa": "ABC1234",
        "potencia_veiculo": "94",
        "procedencia": "NACIONAL",
        "proprietario": {
          "documento": "79961886968",
          "nome": "ANEZIO PEREIRA DE SOUZA"
        },
        "quantidade_passageiros": "5",
        "renavam": "00539918229",
        "restricoes": {
          "existe_restricao_geral": "0",
          "existe_restricao_renajud": "0",
          "existe_restricao_roubo_furto": "1",
          "mensagens_restricoes": [
            {
              "mensagem": "RESTRICAO JUDICIAL: SIM - EXISTE ALERTA"
            },
            {
              "mensagem": "MULTA RENAINF:  SIM - EXISTE ALERTA"
            }
          ],
          "veiculo_baixado": "0"
        },
        "situacao": "EM CIRCULACAO",
        "situacao_chassi": "",
        "status_retorno": {
          "codigo": "1",
          "descricao": "CONSULTA CONCLUIDA COM SUCESSO"
        },
        "tipo_carroceria": "NAO APLICAVEL",
        "tipo_documento_faturado": "",
        "tipo_documento_importador": "",
        "tipo_montagem": "",
        "tipo_operacao_importacao_veiculo": "",
        "tipo_veiculo": "AUTOMOVEL",
        "uf": "PR",
        "uf_faturamento": ""
      },
      "comunicado_venda": {
        "ocorrencias": [],
        "quantidade_ocorrencias": "0",
        "status_retorno": {
          "codigo": "1",
          "descricao": "CONSULTA CONCLUIDA COM SUCESSO"
        }
      },
      "csv": {
        "mensagem_observacao": "",
        "ocorrencias": [],
        "quantidade_ocorrencia": "0",
        "status_retorno": {
          "codigo": "1",
          "descricao": "CONSULTA CONCLUIDA COM SUCESSO"
        }
      },
      "recall": {
        "ano_fabricacao": "",
        "ano_modelo": "",
        "chassi": "",
        "marca_modelo": "",
        "placa": "",
        "quantidade_ocorrencias": "0",
        "status_retorno": {
          "codigo": "1",
          "descricao": "CONSULTA CONCLUIDA COM SUCESSO"
        }
      },
      "renainf": {
        "ocorrencias": [],
        "qtd_ocorrencias": "0",
        "status_retorno": {
          "codigo": "1",
          "descricao": "CONSULTA CONCLUIDA COM SUCESSO"
        }
      },
      "renajud": {
        "msg_alerta": "",
        "ocorrencias": [
          {
            "ano_de_fabricacao": "",
            "ano_modelo": "",
            "ano_oficio": "",
            "ano_processo": "",
            "ano_protocolo": "",
            "codigo_judicial": "09745",
            "data": "2023-03-23 15:28:57",
            "marca_modelo": "VW/SANTANA CG",
            "numero_oficio": "",
            "numero_protocolo": "",
            "orgao_judiciario": "1A V CIVEL DE SANTOS",
            "placa": "ABC1234",
            "processo": "10161220520218260562",
            "renavam": "00539918229",
            "restricoes": "03 - CIRCULACAO",
            "tipo_bloqueio": "",
            "tribunal": "TJSP - TRIBUNAL DE JUSTICA DE SAO PAULO"
          }
        ],
        "quantidade_ocorrencias": "1",
        "status_retorno": {
          "codigo": "1",
          "descricao": "CONSULTA CONCLUIDA COM SUCESSO"
        }
      }
    }
  }
}
```

In the sample responses, the fields of the account that generated the sample (`user.first_name`, `user.email`, `user.cellphone`) come out as `[omitido]`. The rest is what the catalog publishes.

## Pitfalls: what an integration gets wrong without warning

Established from the responses the catalog itself publishes. In every one of them the code works on the happy path and fails silently everywhere else:

1. **The error arrives in the BODY, with HTTP 200.**
   The response carries a boolean `error` field and a `message`. Checking only `response.ok` or the HTTP status lets a failure through as a success. ALWAYS check `error === false` before reading `data`.

2. **`balance`, `tax` and `extra_charges.total` are STRINGS in Brazilian format — and the format varies between APIs.**
   Values seen in the catalog: `"154,380"`, `"497,84"`, `"0,000"` and `"0.19"`. Comma in some, dot in another; three decimal places in some, two in another. In JavaScript, `parseFloat("154,380")` returns `154` and drops the cents with no error at all, and `Number("154,380")` returns `NaN`. Write a converter that handles both separators, and never use these fields in a financial decision without converting them.

3. **Every call costs money.**
   Blind retries multiply the bill. Never automatically repeat a 4xx: a bad parameter repeated is still bad, and still charged. Retry only timeouts and 5xx, with exponential backoff and a small attempt ceiling.

4. **HTTP 402 means insufficient balance, and retrying does not fix it.**
   It is the one status that needs a human — a top-up. Treat it as a terminal error with its own message, and do not lump it in with generic 4xx.

5. **`extra_charges` bills on top of the lookup price.**
   When the body asks for add-on services, the response lists each one with its price plus a `total` that is NOT included in the base amount. If you show cost to an end user, add both.

## See also

- OpenAPI specification: https://doc.apibrasil.io/apis/creditos/pyb1f539-bf4d-4z7f-8fc4-ba88f201asab/openapi.json
- API catalog: [API catalog](https://doc.apibrasil.io/apis.md)
- Official SDKs: [Official SDKs](https://doc.apibrasil.io/sdks.md)
- Documentation index: https://doc.apibrasil.io/llms.txt
- HTML version of this page: https://doc.apibrasil.io/apis/creditos/pyb1f539-bf4d-4z7f-8fc4-ba88f201asab
