Skip to content

open-fidias/consultar-placa-api

Repository files navigation

consultar-placa-api

API de Histórico Veicular

  • API version: 1.0.12
    • Build date: 2025-04-30T10:21:51.050-03:00[America/Fortaleza]

Consulte o histórico completo de veículos usando apenas a placa com a API do Consultar Placa.

Automatically generated by the OpenAPI Generator

Requirements

Building the API client library requires:

  1. Java 1.8+
  2. Maven/Gradle

Installation

To install the API client library to your local Maven repository, simply execute:

mvn clean install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn clean deploy

Refer to the OSSRH Guide for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
  <groupId>br.com.fidias</groupId>
  <artifactId>consultar-placa-api</artifactId>
  <version>1.0.0</version>
  <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

compile "br.com.fidias:consultar-placa-api:1.0.0"

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/consultar-placa-api-1.0.0.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and execute the following Java code:

// Import classes:
import br.com.fidias.consultar_placa.ApiClient;
import br.com.fidias.consultar_placa.ApiException;
import br.com.fidias.consultar_placa.Configuration;
import br.com.fidias.consultar_placa.auth.*;
import br.com.fidias.consultar_placa.models.*;
import br.com.fidias.consultar_placa.api.DefaultApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.consultarplaca.com.br/v2");
    
    // Configure HTTP basic authorization: basicAuth
    HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
    basicAuth.setUsername("YOUR USERNAME");
    basicAuth.setPassword("YOUR PASSWORD");

    DefaultApi apiInstance = new DefaultApi(defaultClient);
    String placa = "placa_example"; // String | 
    try {
      Veiculo result = apiInstance.consultarPlacaGet(placa);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling DefaultApi#consultarPlacaGet");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Documentation for API Endpoints

All URIs are relative to https://api.consultarplaca.com.br/v2

Class Method HTTP request Description
DefaultApi consultarPlacaGet GET /consultarPlaca

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

basicAuth

  • Type: HTTP basic authentication

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author

contato@consultarplaca.com.br

About

Consulte o histórico completo de veículos usando apenas a placa com a API do Consultar Placa.

Resources

License

Stars

Watchers

Forks

Packages

No packages published