Skip to Content
Integração APIVeículosRestrição RENAINF

Restrição RENAINF

Esta API retorna dados de multas a nível nacional.

Montando a requisição

Método da requisição

GET

Endereço da requisição

Principal:

Sem UF:

https://api.activethread.com.br/detran/v1/restrictions/renainf/AAA1A11

Com UF:

https://api.activethread.com.br/detran/v1/restrictions/renainf/AAA1A11/MG

Secundário:

Sem UF:

https://api.detran.app.br/detran/v1/restrictions/renainf/AAA1A11

Com UF:

https://api.detran.app.br/detran/v1/restrictions/renainf/AAA1A11/MG

Parâmetros da requisição

Via URL

  • https://api.detran.app.br/detran/v1/restrictions/renainf/AAA1A11?at=XPTO
  • https://api.detran.app.br/detran/v1/restrictions/renainf/AAA1A11/MG?at=XPTO

Via Cabeçalho

  • Authorization: XPTO

Respostas da requisição

200 - Sucesso

Observação: Os dados abaixo são apenas demonstrativos, com a finalidade de mapeamento da estrutura. Por isso, de forma alguma representam a realidade.

{ "status": "SUCCESS", "result": [ { "cnhCondutor": { "impedimento": "", "pontos": 0, "portaria": "", "registro": "INFORMACAO OCULTADA" }, "cnhInfrator": { "impedimento": "", "pontos": 0, "portaria": "", "registro": "INFORMACAO OCULTADA" }, "pagamento": { "dataPagamento": "", "dataRegistro": "", "ufPagamento": "", "valorPago": "" }, "autoInfracao": "INFORMACAO OCULTADA", "codigoInfracao": "7455", "codigoMunicipioInfracao": "", "codigoOrgaoAutuador": "", "dataCadastroInfracao": "09/09/2024", "dataEmissaoNotificacao": "09/09/2024", "dataEmissaoPenalidade": "", "dataInfracao": "18/08/2024", "descricao": "TRANSITAR EM VELOCIDADE SUPERIOR A MAXIMA PERMITIDA EM ATE 20%", "horaInfracao": " 09:30", "limitePermitido": "", "localInfracao": "", "marcaModelo": "", "medicaoConsiderada": "", "medicaoReal": "", "orgaoAutuador": "POLICIA RODOVIARIA FEDERAL", "tipo": "", "ufOrgaoAutuador": "MG", "valor": "130" } ] }

400 - Requisição inválida

Exemplo:

{ "message": "Por favor, informe uma placa válida." }

401 - Não autorizado

{ "message": "Não autorizado." }

403 - Acesso negado

{ "message": "Acesso negado!" }

Exemplos da requisição - Autenticação via URL

HTTP

GET /detran/v1/restrictions/renainf/12345678910 HTTP/1.1 Host: api.activethread.com.br

cURL

curl --location 'https://api.activethread.com.br/detran/v1/restrictions/renainf/12345678910

JavaScript

const requestOptions = { method: "GET", redirect: "follow", }; fetch( "https://api.activethread.com.br/detran/v1/restrictions/renainf/12345678910?at=XPTO", requestOptions ) .then((response) => response.text()) .then((result) => console.log(result)) .catch((error) => console.error(error));

NodeJs

const axios = require("axios"); let config = { method: "get", maxBodyLength: Infinity, url: "https://api.activethread.com.br/detran/v1/restrictions/renainf/12345678910?at=XPTO", headers: {}, }; axios .request(config) .then((response) => { console.log(JSON.stringify(response.data)); }) .catch((error) => { console.log(error); });

PHP

<?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://api.activethread.com.br/detran/v1/restrictions/renainf/12345678910?at=XPTO', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'GET', )); $response = curl_exec($curl); curl_close($curl); echo $response;

Java

Unirest.setTimeouts(0, 0); HttpResponse<String> response = Unirest.get("https://api.activethread.com.br/detran/v1/restrictions/renainf/12345678910?at=XPTO") .asString();

Python

import requests url = "https://api.activethread.com.br/detran/v1/restrictions/renainf/12345678910?at=XPTO" payload = {} headers = {} response = requests.request("GET", url, headers=headers, data=payload) print(response.text)

Exemplos da requisição - Autenticação via Cabeçalho

HTTP

GET /detran/v1/restrictions/renainf/12345678910 HTTP/1.1 Host: api.activethread.com.br Authorization: XPTO

cURL

curl --location 'https://api.activethread.com.br/detran/v1/restrictions/renainf/12345678910' \ --header 'Authorization: XPTO'

JavaScript

const myHeaders = new Headers(); myHeaders.append("Authorization", "XPTO"); const requestOptions = { method: "GET", headers: myHeaders, redirect: "follow", }; fetch( "https://api.activethread.com.br/detran/v1/restrictions/renainf/12345678910", requestOptions ) .then((response) => response.text()) .then((result) => console.log(result)) .catch((error) => console.error(error));

NodeJs

const axios = require("axios"); let config = { method: "get", maxBodyLength: Infinity, url: "https://api.activethread.com.br/detran/v1/restrictions/renainf/12345678910", headers: { Authorization: "XPTO", }, }; axios .request(config) .then((response) => { console.log(JSON.stringify(response.data)); }) .catch((error) => { console.log(error); });

PHP

<?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://api.activethread.com.br/detran/v1/restrictions/renainf/12345678910', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => array( 'Authorization: XPTO' ), )); $response = curl_exec($curl); curl_close($curl); echo $response;

Java

Unirest.setTimeouts(0, 0); HttpResponse<String> response = Unirest.get("https://api.activethread.com.br/detran/v1/restrictions/renainf/12345678910") .header("Authorization", "XPTO") .asString();

Python

import requests url = "https://api.activethread.com.br/detran/v1/restrictions/renainf/12345678910" payload = {} headers = { 'Authorization': 'XPTO' } response = requests.request("GET", url, headers=headers, data=payload) print(response.text)
Last updated on