Skip to content

Latest commit

 

History

History
802 lines (649 loc) · 25.4 KB

File metadata and controls

802 lines (649 loc) · 25.4 KB

Br.Com.Parallelum.Fipe.Api.FipeApi

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

Method HTTP request Description
GetBrandsByType GET /{vehicleType}/brands Brands by type
GetFipeInfo GET /{vehicleType}/brands/{brandId}/models/{modelId}/years/{yearId} Fipe info
GetHistoryByFipeCode GET /{vehicleType}/{fipeCode}/years/{yearId}/history Fipe price history by Fipe code
GetInfoByFipeCode GET /{vehicleType}/{fipeCode}/years/{yearId} Fipe info by Fipe code
GetModelsByBrand GET /{vehicleType}/brands/{brandId}/models Models by brand
GetReferences GET /references Fipe month references
GetYearByModel GET /{vehicleType}/brands/{brandId}/models/{modelId}/years Years by model
GetYearsByFipeCode GET /{vehicleType}/{fipeCode}/years Years by Fipe code

GetBrandsByType

List<NamedCode> GetBrandsByType (VehiclesType vehicleType)

Brands by type

Returns brands for the type of vehicle

Example

using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using Br.Com.Parallelum.Fipe.Api;
using Br.Com.Parallelum.Fipe.Client;
using Br.Com.Parallelum.Fipe.Model;

namespace Example
{
    public class GetBrandsByTypeExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://parallelum.com.br/fipe/api/v2";
            // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
            HttpClient httpClient = new HttpClient();
            HttpClientHandler httpClientHandler = new HttpClientHandler();
            var apiInstance = new FipeApi(httpClient, config, httpClientHandler);
            var vehicleType = (VehiclesType) "cars";  // VehiclesType | Type of vehicle

            try
            {
                // Brands by type
                List<NamedCode> result = apiInstance.GetBrandsByType(vehicleType);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling FipeApi.GetBrandsByType: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the GetBrandsByTypeWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Brands by type
    ApiResponse<List<NamedCode>> response = apiInstance.GetBrandsByTypeWithHttpInfo(vehicleType);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling FipeApi.GetBrandsByTypeWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
vehicleType VehiclesType Type of vehicle

Return type

List<NamedCode>

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Ok -
404 Not found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetFipeInfo

FipeResult GetFipeInfo (VehiclesType vehicleType, int brandId, int modelId, string yearId, int? reference = null)

Fipe info

Returns the Fipe information for the vehicle (price estimation)

Example

using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using Br.Com.Parallelum.Fipe.Api;
using Br.Com.Parallelum.Fipe.Client;
using Br.Com.Parallelum.Fipe.Model;

namespace Example
{
    public class GetFipeInfoExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://parallelum.com.br/fipe/api/v2";
            // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
            HttpClient httpClient = new HttpClient();
            HttpClientHandler httpClientHandler = new HttpClientHandler();
            var apiInstance = new FipeApi(httpClient, config, httpClientHandler);
            var vehicleType = cars;  // VehiclesType | Type of vehicle
            var brandId = 59;  // int | Brand of the vehicle
            var modelId = 5940;  // int | Model of the vehicle
            var yearId = 2014-3;  // string | Year for the vehicle
            var reference = 278;  // int? | Month reference code (optional) 

            try
            {
                // Fipe info
                FipeResult result = apiInstance.GetFipeInfo(vehicleType, brandId, modelId, yearId, reference);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling FipeApi.GetFipeInfo: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the GetFipeInfoWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Fipe info
    ApiResponse<FipeResult> response = apiInstance.GetFipeInfoWithHttpInfo(vehicleType, brandId, modelId, yearId, reference);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling FipeApi.GetFipeInfoWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
vehicleType VehiclesType Type of vehicle
brandId int Brand of the vehicle
modelId int Model of the vehicle
yearId string Year for the vehicle
reference int? Month reference code [optional]

Return type

FipeResult

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Ok -
404 Not found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetHistoryByFipeCode

FipeHistoryResult GetHistoryByFipeCode (VehiclesType vehicleType, string fipeCode, string yearId)

Fipe price history by Fipe code

Returns the price history for the vehicle (price estimation)

Example

using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using Br.Com.Parallelum.Fipe.Api;
using Br.Com.Parallelum.Fipe.Client;
using Br.Com.Parallelum.Fipe.Model;

namespace Example
{
    public class GetHistoryByFipeCodeExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://parallelum.com.br/fipe/api/v2";
            // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
            HttpClient httpClient = new HttpClient();
            HttpClientHandler httpClientHandler = new HttpClientHandler();
            var apiInstance = new FipeApi(httpClient, config, httpClientHandler);
            var vehicleType = cars;  // VehiclesType | Type of vehicle
            var fipeCode = 004278-1;  // string | Fipe internal reference code
            var yearId = 2005-1;  // string | Year for the vehicle

            try
            {
                // Fipe price history by Fipe code
                FipeHistoryResult result = apiInstance.GetHistoryByFipeCode(vehicleType, fipeCode, yearId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling FipeApi.GetHistoryByFipeCode: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the GetHistoryByFipeCodeWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Fipe price history by Fipe code
    ApiResponse<FipeHistoryResult> response = apiInstance.GetHistoryByFipeCodeWithHttpInfo(vehicleType, fipeCode, yearId);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling FipeApi.GetHistoryByFipeCodeWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
vehicleType VehiclesType Type of vehicle
fipeCode string Fipe internal reference code
yearId string Year for the vehicle

Return type

FipeHistoryResult

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Ok -
404 Not found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetInfoByFipeCode

FipeResult GetInfoByFipeCode (VehiclesType vehicleType, string fipeCode, string yearId)

Fipe info by Fipe code

Returns the Fipe information for the vehicle (price estimation)

Example

using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using Br.Com.Parallelum.Fipe.Api;
using Br.Com.Parallelum.Fipe.Client;
using Br.Com.Parallelum.Fipe.Model;

namespace Example
{
    public class GetInfoByFipeCodeExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://parallelum.com.br/fipe/api/v2";
            // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
            HttpClient httpClient = new HttpClient();
            HttpClientHandler httpClientHandler = new HttpClientHandler();
            var apiInstance = new FipeApi(httpClient, config, httpClientHandler);
            var vehicleType = cars;  // VehiclesType | Type of vehicle
            var fipeCode = 004278-1;  // string | Fipe internal reference code
            var yearId = 2005-1;  // string | Year for the vehicle

            try
            {
                // Fipe info by Fipe code
                FipeResult result = apiInstance.GetInfoByFipeCode(vehicleType, fipeCode, yearId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling FipeApi.GetInfoByFipeCode: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the GetInfoByFipeCodeWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Fipe info by Fipe code
    ApiResponse<FipeResult> response = apiInstance.GetInfoByFipeCodeWithHttpInfo(vehicleType, fipeCode, yearId);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling FipeApi.GetInfoByFipeCodeWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
vehicleType VehiclesType Type of vehicle
fipeCode string Fipe internal reference code
yearId string Year for the vehicle

Return type

FipeResult

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Ok -
404 Not found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetModelsByBrand

List<NamedCode> GetModelsByBrand (VehiclesType vehicleType, int brandId)

Models by brand

Returns models for the brand

Example

using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using Br.Com.Parallelum.Fipe.Api;
using Br.Com.Parallelum.Fipe.Client;
using Br.Com.Parallelum.Fipe.Model;

namespace Example
{
    public class GetModelsByBrandExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://parallelum.com.br/fipe/api/v2";
            // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
            HttpClient httpClient = new HttpClient();
            HttpClientHandler httpClientHandler = new HttpClientHandler();
            var apiInstance = new FipeApi(httpClient, config, httpClientHandler);
            var vehicleType = cars;  // VehiclesType | Type of vehicle
            var brandId = 59;  // int | Brand of the vehicle

            try
            {
                // Models by brand
                List<NamedCode> result = apiInstance.GetModelsByBrand(vehicleType, brandId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling FipeApi.GetModelsByBrand: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the GetModelsByBrandWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Models by brand
    ApiResponse<List<NamedCode>> response = apiInstance.GetModelsByBrandWithHttpInfo(vehicleType, brandId);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling FipeApi.GetModelsByBrandWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
vehicleType VehiclesType Type of vehicle
brandId int Brand of the vehicle

Return type

List<NamedCode>

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Ok -
404 Not found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetReferences

List<Reference> GetReferences ()

Fipe month references

Returns months and codes reference from Fipe

Example

using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using Br.Com.Parallelum.Fipe.Api;
using Br.Com.Parallelum.Fipe.Client;
using Br.Com.Parallelum.Fipe.Model;

namespace Example
{
    public class GetReferencesExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://parallelum.com.br/fipe/api/v2";
            // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
            HttpClient httpClient = new HttpClient();
            HttpClientHandler httpClientHandler = new HttpClientHandler();
            var apiInstance = new FipeApi(httpClient, config, httpClientHandler);

            try
            {
                // Fipe month references
                List<Reference> result = apiInstance.GetReferences();
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling FipeApi.GetReferences: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the GetReferencesWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Fipe month references
    ApiResponse<List<Reference>> response = apiInstance.GetReferencesWithHttpInfo();
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling FipeApi.GetReferencesWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

This endpoint does not need any parameter.

Return type

List<Reference>

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Ok -
500 Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetYearByModel

List<NamedCode> GetYearByModel (VehiclesType vehicleType, int brandId, int modelId)

Years by model

Returns years for the specific model

Example

using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using Br.Com.Parallelum.Fipe.Api;
using Br.Com.Parallelum.Fipe.Client;
using Br.Com.Parallelum.Fipe.Model;

namespace Example
{
    public class GetYearByModelExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://parallelum.com.br/fipe/api/v2";
            // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
            HttpClient httpClient = new HttpClient();
            HttpClientHandler httpClientHandler = new HttpClientHandler();
            var apiInstance = new FipeApi(httpClient, config, httpClientHandler);
            var vehicleType = cars;  // VehiclesType | Type of vehicle
            var brandId = 59;  // int | Brand of the vehicle
            var modelId = 5940;  // int | Model of the vehicle

            try
            {
                // Years by model
                List<NamedCode> result = apiInstance.GetYearByModel(vehicleType, brandId, modelId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling FipeApi.GetYearByModel: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the GetYearByModelWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Years by model
    ApiResponse<List<NamedCode>> response = apiInstance.GetYearByModelWithHttpInfo(vehicleType, brandId, modelId);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling FipeApi.GetYearByModelWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
vehicleType VehiclesType Type of vehicle
brandId int Brand of the vehicle
modelId int Model of the vehicle

Return type

List<NamedCode>

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Ok -
404 Not found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetYearsByFipeCode

List<NamedCode> GetYearsByFipeCode (VehiclesType vehicleType, string fipeCode)

Years by Fipe code

Returns years available for vehicle by fipe code

Example

using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using Br.Com.Parallelum.Fipe.Api;
using Br.Com.Parallelum.Fipe.Client;
using Br.Com.Parallelum.Fipe.Model;

namespace Example
{
    public class GetYearsByFipeCodeExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://parallelum.com.br/fipe/api/v2";
            // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
            HttpClient httpClient = new HttpClient();
            HttpClientHandler httpClientHandler = new HttpClientHandler();
            var apiInstance = new FipeApi(httpClient, config, httpClientHandler);
            var vehicleType = cars;  // VehiclesType | Type of vehicle
            var fipeCode = 004278-1;  // string | Fipe internal reference code

            try
            {
                // Years by Fipe code
                List<NamedCode> result = apiInstance.GetYearsByFipeCode(vehicleType, fipeCode);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling FipeApi.GetYearsByFipeCode: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the GetYearsByFipeCodeWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Years by Fipe code
    ApiResponse<List<NamedCode>> response = apiInstance.GetYearsByFipeCodeWithHttpInfo(vehicleType, fipeCode);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling FipeApi.GetYearsByFipeCodeWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
vehicleType VehiclesType Type of vehicle
fipeCode string Fipe internal reference code

Return type

List<NamedCode>

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Ok -
404 Not found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]