### Basic Pagination GET Request Example Source: https://api.fipex.com.br/v1/docs This example demonstrates a basic GET request to an API endpoint for retrieving a list of makes, utilizing pagination parameters. It specifies the desired page number and the number of items per page. ```http GET /v1/makes?page=2&limit=20 ``` -------------------------------- ### GET Request with Filters and Ordering Example Source: https://api.fipex.com.br/v1/docs This example shows a GET request to an API endpoint that includes pagination, filtering, and ordering parameters. It requests a specific page and limit, sorts results by 'name', and applies a filter to find makes where the 'name' field contains 'honda'. ```http GET /v1/makes?page=2&limit=20&order_by=name&filters[0].field=name&filters[0].op=CONTAINS&filters[0].value=honda ``` -------------------------------- ### Filtering Examples Source: https://api.fipex.com.br/v1/docs Examples demonstrating how to apply filters to API requests. ```APIDOC ## Filtering Examples **Single filter (year greater than 2010):** ``` GET /v1/search?filters[0].field=year&filters[0].op=%3E&filters[0].value=2010 ``` **Multiple filters (year > 2010 AND price between 20000-50000):** ``` GET /v1/search?filters[0].field=year&filters[0].op=%3E&filters[0].value=2010&filters[1].field=price&filters[1].op=TO&filters[1].value=20000,50000 ``` **IN operator (multiple makes):** ``` GET /v1/search?filters[0].field=make&filters[0].op=IN&filters[0].value=uuid1,uuid2,uuid3 ``` ``` -------------------------------- ### GET /v1/assets/{path} Source: https://api.fipex.com.br/v1/docs Retrieves static files used for Protocol Buffers typings. These are intended for initial application setup. ```APIDOC ## GET /v1/assets/{path} ### Description Esses arquivos são utilizados para tipagens dos protocol buffers e devem ser utilizado apenas para setup inicial de aplicações. ### Method GET ### Endpoint /v1/assets/{path} ### Parameters #### Path Parameters - **path** (string) - Required - Caminho do arquivo. Enum: "v1/schema.ts", "google/protobuf/timestamp.ts", "google/protobuf/wrappers.ts", "schema.proto" ### Request Example ``` GET /v1/assets/v1/schema.ts ``` ### Response #### Success Response (200) - **file content** (binary) - O conteúdo do arquivo estático solicitado. #### Error Response (404) - **message** (string) - Mensagem indicando que o recurso não foi encontrado. #### Error Response (429) - **message** (string) - Mensagem indicando que o limite de requisições foi excedido. ``` -------------------------------- ### Exemplo de Requisição GET com Filtro Único (API FIPE) Source: https://api.fipex.com.br/v1/docs Demonstra como aplicar um único filtro a uma requisição GET. Neste caso, filtra veículos com ano maior que 2010. ```http GET /v1/search?filters[0].field=year&filters[0].op=%3E&filters[0].value=2010 ``` -------------------------------- ### GET /v1/prices/compare Source: https://api.fipex.com.br/v1/docs Compares prices between multiple vehicles based on provided specifications. ```APIDOC ## GET /v1/prices/compare ### Description Compares prices across multiple vehicles. Specifications are provided as a semicolon-separated string of 'slug-model,slug-fuel,year'. ### Method GET ### Endpoint https://api.fipex.com.br/v1/prices/compare ### Parameters #### Query Parameters - **vehicle_specs** (string) - Required - Semicolon-separated list of vehicle specs (e.g., 'model-slug,fuel-slug,year;model-slug,fuel-slug,year'). ### Response #### Success Response (200) - **data** (array) - List of comparison objects including price history for each specified vehicle. #### Response Example { "data": [ { "model_name": "string", "price_history": [] } ] } ``` -------------------------------- ### Exemplo de Requisição GET com Operador IN (API FIPE) Source: https://api.fipex.com.br/v1/docs Mostra como utilizar o operador 'IN' para filtrar por múltiplos valores em uma requisição GET. Filtra veículos pelas marcas com UUIDs especificados. ```http GET /v1/search?filters[0].field=make&filters[0].op=IN&filters[0].value=uuid1,uuid2,uuid3 ``` -------------------------------- ### GET /v1/makes Source: https://api.fipex.com.br/v1/docs Retrieves a list of vehicle makes. Supports filtering and pagination. ```APIDOC ## GET /v1/makes ### Description Retrieves a list of vehicle makes. Supports filtering and pagination. ### Method GET ### Endpoint https://api.fipex.com.br/v1/makes ### Query Parameters - **page** (integer) - Optional - Page number (minimum 1). - **limit** (integer) - Optional - Number of items per page (1-50). ### Response #### Success Response (200) - **data** (array) - List of makes, each with id, name, and slug. - **pagination** (object) - Pagination details. - **links** (object) - Links for pagination. #### Response Example ```json { "data": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "slug": "string" } ], "pagination": { "total": null, "limit": null, "offset": null, "page": null, "pages": null }, "links": { "self": null, "next": null, "prev": null, "first": null, "last": null } } ``` ``` -------------------------------- ### GET /v1/prices/compare Source: https://api.fipex.com.br/v1/docs Compares prices between multiple vehicles using a specific format for vehicle specification. ```APIDOC ## GET /v1/prices/compare ### Description Compares prices between multiple vehicles using a specific format for vehicle specification. Each vehicle is specified as: `slug-do-modelo,slug-do-combustivel,ano`. Multiple vehicles are separated by semicolon (`;`, or `%3B` in percent encoding). ### Method GET ### Endpoint /v1/prices/compare ### Query Parameters - **vehicle_specs** (string) - Required - Vehicle specifications separated by comma in the format "model-slug,fuel-slug,year". Example: `vehicle_specs=850-glt-2-5-20v,g,1997;850-glt-2-5-20v,g,1996;850-glt-2-5-20v,g,1995;850-glt-2-5-20v,g,1994;850-glt-2-5-20v,g,1993;850-glt-2-5-20v,g,1992` ### Responses #### Success Response (200) - **data** (array) - An array of vehicle comparison data. - **data[].price_id** (string) - The unique identifier for the price record. - **data[].model_id** (string) - The unique identifier for the model. - **data[].model_name** (string) - The name of the model. - **data[].model_slug** (string) - The slug of the model. - **data[].make_id** (string) - The unique identifier for the make. - **data[].make_name** (string) - The name of the make. - **data[].make_slug** (string) - The slug of the make. - **data[].fuel_id** (string) - The unique identifier for the fuel. - **data[].fuel_name** (string) - The name of the fuel. - **data[].fuel_acronym** (string) - The acronym of the fuel. - **data[].type_id** (string) - The unique identifier for the vehicle type. - **data[].type_name** (string) - The name of the vehicle type. - **data[].year_specification** (object) - Details about the year specification. - **data[].year_specification.model_year** (integer) - The model year. - **data[].year_specification.is_zero_km** (boolean) - Indicates if the vehicle is zero km. - **data[].price_history** (array) - The price history for the vehicle. - **data[].price_history[].year** (integer) - The year of the price record. - **data[].price_history[].month** (integer) - The month of the price record. - **data[].price_history[].market_price_cents** (integer) - The market price in cents. - **data[].price_history[].formatted_price** (string) - The formatted market price. #### Response Example (200) ```json { "data": [ { "price_id": "5eff5d89-979e-4e4f-aa76-6cbbbf11362c", "model_id": "f8ff2fb8-4acc-4e48-bd83-cbdac23e1224", "model_name": "string", "model_slug": "string", "make_id": "995b8715-a71e-4de8-adac-2f7da8b6295b", "make_name": "string", "make_slug": "string", "fuel_id": "f93089da-050c-4cf7-a9cb-d0fe8d3f2b75", "fuel_name": "string", "fuel_acronym": "string", "type_id": "d9779ea4-ba95-4824-86d7-4f1ac083a564", "type_name": "string", "year_specification": { "model_year": 0, "is_zero_km": true }, "price_history": [ { "year": 0, "month": 1, "market_price_cents": 0, "formatted_price": "string" } ] } ] } ``` ``` -------------------------------- ### GET /v1/fuels Source: https://api.fipex.com.br/v1/docs Retrieves a list of all available fuel types. ```APIDOC ## GET /v1/fuels ### Description Recupera todos os tipos de combustível disponíveis. ### Method GET ### Endpoint /v1/fuels ### Parameters #### Query Parameters - **page** (integer) - Optional - Número da página (mínimo 1). Default: 1 - **limit** (integer) - Optional - Número de itens por página (1-50). Default: 10 ### Request Example ``` GET /v1/fuels?limit=5 ``` ### Response #### Success Response (200) - **data** (array) - Lista de tipos de combustível. - **id** (string) - Identificador único do tipo de combustível. - **acronym** (string) - Acrônimo do tipo de combustível. - **name** (string) - Nome do tipo de combustível. - **slug** (string) - Slug do tipo de combustível. - **pagination** (object) - Informações de paginação. - **links** (object) - Links para navegação. #### Response Example ```json { "data": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "acronym": "G", "name": "Gasolina", "slug": "gasolina" } ], "pagination": { "total": 5, "limit": 10, "offset": 0, "page": 1, "pages": 1 }, "links": { "self": "/v1/fuels?page=1&limit=10", "next": null, "prev": null, "first": "/v1/fuels?page=1&limit=10", "last": "/v1/fuels?page=1&limit=10" } } ``` ``` -------------------------------- ### Execute Complete API Workflow Source: https://api.fipex.com.br/v1/docs An example of a complete workflow including fetching data, processing pagination, and handling potential errors. ```typescript async function exemploCompleto(): Promise { try { const tiposVeiculos = await buscarTiposDeVeiculos(); console.log('=== TIPOS DE VEÍCULOS DISPONÍVEIS ==='); tiposVeiculos.data.forEach((tipo, index) => { console.log(`${index + 1}. ${tipo.name} (ID: ${tipo.id})`); }); } catch (error) { console.log('Falha ao buscar dados da API FIPEX:', error); } } exemploCompleto(); ``` -------------------------------- ### API Request Sorting Examples Source: https://api.fipex.com.br/v1/docs Demonstrates how to apply sorting to API requests. It shows basic ascending and descending order using a single field, and how to specify multiple sorting fields with mixed ascending and descending orders. ```http GET /v1/makes?order_by=name # Ascendente GET /v1/makes?order_by=-name # Descendente GET /v1/search?order_by=make,year,-price # Marca asc, ano asc, preço desc ``` -------------------------------- ### Exemplo de Requisição GET com Múltiplos Filtros (API FIPE) Source: https://api.fipex.com.br/v1/docs Ilustra a aplicação de múltiplos filtros em uma requisição GET. Filtra veículos com ano maior que 2010 e preço entre 20000 e 50000. ```http GET /v1/search?filters[0].field=year&filters[0].op=%3E&filters[0].value=2010&filters[1].field=price&filters[1].op=TO&filters[1].value=20000,50000 ``` -------------------------------- ### GET /v1/search/labels Source: https://api.fipex.com.br/v1/docs Searches for model or make labels for autocomplete functionality. ```APIDOC ## GET /v1/search/labels ### Description Searches for model or make labels for autocomplete functionality. ### Method GET ### Endpoint https://api.fipex.com.br/v1/search/labels ### Query Parameters - **q** (string) - Required - Search term in JSON format. - **type** (string) - Required - Type of label to search for ("model" or "make"). - **vehicle_type_id** (string) - Optional - Filter by vehicle type UUID. - **make_id** (string) - Optional - Filter by make UUID (for model searches). - **page** (integer) - Optional - Page number (minimum 1). - **limit** (integer) - Optional - Number of items per page (1-50). ### Response #### Success Response (200) - **data** (array) - List of labels, each with id, name, and slug. - **pagination** (object) - Pagination details. - **links** (object) - Links for pagination. #### Response Example ```json { "data": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "slug": "string" } ], "pagination": { "total": null, "limit": null, "offset": null, "page": null, "pages": null }, "links": { "self": null, "next": null, "prev": null, "first": null, "last": null } } ``` ``` -------------------------------- ### GET /v1/prices/expanded Source: https://api.fipex.com.br/v1/docs Obtains comprehensive price data, including analysis, history, and available years, using the same parameters as /v1/prices. ```APIDOC ## GET /v1/prices/expanded ### Description Obtains comprehensive price data, including analysis, history, and available years. This endpoint uses the same parameters as the `/v1/prices` endpoint but returns expanded information. ### Method GET ### Endpoint /v1/prices/expanded ### Parameters #### Query Parameters - **model_id** (string) - Required (if `model_slug` is not provided) - UUID of the model. - **fuel_id** (string) - Required (if `model_id` is provided) - UUID of the fuel. - **model_slug** (string) - Required (if `model_id` is not provided) - Slug of the model. - **fuel_acronym** (string) - Required (if `model_slug` is provided) - Slug of the fuel. - **year** (integer or string) - Required - The year of the vehicle. - **ref_id** (string) - Optional - UUID of a specific reference period. - **ref_date** (string) - Optional - Reference date in YYYY-MM-DD format. ### Response #### Success Response (200) - The response structure is similar to `/v1/prices` but contains more detailed historical and analytical data. #### Response Example (Response structure is similar to `/v1/prices` but with additional expanded data fields.) ```json { "data": { "price": 2, "formatted_price": "string", "year_specifier": { "model_year": 0, "is_zero_km": true }, "query_date": "2019-08-24T14:15:22Z", "make": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "slug": "string" }, "model": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "slug": "string", "make": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "slug": "string" }, "type": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "slug": "string" }, "year_fuels": [ { "year_specifier": { "model_year": 0, "is_zero_km": true }, "fuels": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "acronym": "string", "name": "string", "slug": "string" } ] } ] }, "fuel": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "acronym": "string", "name": "string", "slug": "string" }, "reference": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "month": 1, "month_name": "string", "year": 0 } } } ``` ``` -------------------------------- ### GET /v1/prices/{id} Source: https://api.fipex.com.br/v1/docs Retrieves a specific price record by its UUID. ```APIDOC ## GET /v1/prices/{id} ### Description Retrieves a specific price record by its UUID. ### Method GET ### Endpoint /v1/prices/{id} ### Path Parameters - **id** (string ) - Required - UUID of the price. ### Responses #### Success Response (200) - **data** (object) - Contains the price details. - **data.price** (object) - Price information. - **data.price.price** (integer) - The price value. - **data.price.formatted_price** (string or null) - The formatted price. - **data.price.year_specifier** (object) - Year specification details. - **data.price.year_specifier.model_year** (integer) - The model year. - **data.price.year_specifier.is_zero_km** (boolean) - Indicates if the vehicle is zero km. - **data.price.query_date** (string) - The date of the query. - **data.price.make** (object) - Make details. - **data.price.make.id** (string) - The unique identifier for the make. - **data.price.make.name** (string) - The name of the make. - **data.price.make.slug** (string) - The slug of the make. - **data.price.model** (object) - Model details. - **data.price.model.id** (string) - The unique identifier for the model. - **data.price.model.name** (string) - The name of the model. - **data.price.model.slug** (string) - The slug of the model. - **data.price.model.make** (object) - Make details. - **data.price.model.make.id** (string) - The unique identifier for the make. - **data.price.model.make.name** (string) - The name of the make. - **data.price.model.make.slug** (string) - The slug of the make. - **data.price.model.type** (object) - Type details. - **data.price.model.type.id** (string) - The unique identifier for the type. - **data.price.model.type.name** (string) - The name of the type. - **data.price.model.type.slug** (string) - The slug of the type. - **data.price.model.year_fuels** (array) - Array of year and fuel specifications. - **data.price.model.year_fuels[].year_specifier** (object) - Year specification details. - **data.price.model.year_fuels[].year_specifier.model_year** (integer) - The model year. - **data.price.model.year_fuels[].year_specifier.is_zero_km** (boolean) - Indicates if the vehicle is zero km. - **data.price.model.year_fuels[].fuels** (array) - Array of fuel details. - **data.price.model.year_fuels[].fuels[].id** (string) - The unique identifier for the fuel. - **data.price.model.year_fuels[].fuels[].acronym** (string) - The acronym of the fuel. - **data.price.model.year_fuels[].fuels[].name** (string) - The name of the fuel. - **data.price.model.year_fuels[].fuels[].slug** (string) - The slug of the fuel. - **data.price.fuel** (object) - Fuel details. - **data.price.fuel.id** (string) - The unique identifier for the fuel. - **data.price.fuel.acronym** (string) - The acronym of the fuel. - **data.price.fuel.name** (string) - The name of the fuel. - **data.price.fuel.slug** (string) - The slug of the fuel. - **data.price.type** (object) - Type details. - **data.price.type.id** (string) - The unique identifier for the type. - **data.price.type.name** (string) - The name of the type. - **data.price.type.slug** (string) - The slug of the type. - **data.price.reference** (object) - Reference period details. - **data.price.reference.id** (string) - The unique identifier for the reference. - **data.price.reference.month** (integer) - The reference month. - **data.price.reference.month_name** (string) - The name of the reference month. - **data.price.reference.year** (integer) - The reference year. - **data.analytics** (object) - Analytics data. - **data.analytics.price_volatility** (any) - Price volatility. - **data.analytics.price_rank** (any) - Price rank. - **data.analytics.price_rank_total_in_category** (any) - Total price rank in category. - **data.analytics.value_retention_pct** (any) - Value retention percentage. - **data.analytics.annual_depreciation_rate** (any) - Annual depreciation rate. - **data.analytics.lifecycle_status** (any) - Lifecycle status. - **data.analytics.anomaly_status** (any) - Anomaly status. - **data.analytics.anomaly_z_score** (any) - Anomaly Z-score. - **data.history** (array) - Price history. - **data.history[].year** (integer) - The year of the price record. - **data.history[].month** (integer) - The month of the price record. - **data.history[].market_price_cents** (integer) - The market price in cents. - **data.history[].formatted_price** (string) - The formatted market price. - **data.available_years** (array) - Array of available year specifications. - **data.available_years[].model_year** (integer) - The model year. - **data.available_years[].is_zero_km** (boolean) - Indicates if the vehicle is zero km. #### Response Example (200) ```json { "data": { "price": { "price": 2, "formatted_price": null, "year_specifier": { "model_year": 0, "is_zero_km": true }, "query_date": "2019-08-24T14:15:22Z", "make": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "slug": "string" }, "model": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "slug": "string", "make": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "slug": "string" }, "type": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "slug": "string" }, "year_fuels": [ { "year_specifier": { "model_year": 0, "is_zero_km": true }, "fuels": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "acronym": "string", "name": "string", "slug": "string" } ] } ] }, "fuel": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "acronym": "string", "name": "string", "slug": "string" }, "type": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "slug": "string" }, "reference": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "month": 1, "month_name": "string", "year": 0 } }, "analytics": { "price_volatility": null, "price_rank": null, "price_rank_total_in_category": null, "value_retention_pct": null, "annual_depreciation_rate": null, "lifecycle_status": null, "anomaly_status": null, "anomaly_z_score": null }, "history": [ { "year": 0, "month": 1, "market_price_cents": 0, "formatted_price": "string" } ], "available_years": [ { "model_year": 0, "is_zero_km": true } ] } } ``` ``` -------------------------------- ### GET /v1/models Source: https://api.fipex.com.br/v1/docs Retrieves a paginated list of vehicle models with optional filtering and search capabilities. ```APIDOC ## GET /v1/models ### Description Recupera uma lista paginada de modelos de veículos com filtros e busca opcionais. ### Method GET ### Endpoint https://api.fipex.com.br/v1/models ### Parameters #### Query Parameters - **page** (integer) - Optional - Número da página (mínimo 1). - **limit** (integer) - Optional - Número de itens por página (1-50). - **order_by** (string) - Optional - Especificação de ordenação (ex: name, -price). - **q** (string) - Optional - Termo de busca (1-255 caracteres). - **make_id** (string) - Optional - Filtra pelo UUID da marca. - **fuel_id** (string) - Optional - Filtra pelo UUID do combustível. - **type_id** (string) - Optional - Filtra pelo UUID do tipo de veículo. - **ref_id** (string) - Optional - Filtra pelo UUID do período de referência. - **year** (integer/string) - Optional - Filtra pelo ano (1980-ano atual ou "zero"). - **filters** (Array) - Optional - Filtragem avançada usando notação de array (field, op, value). ### Response #### Success Response (200) - **data** (array) - Lista de modelos. - **pagination** (object) - Informações de paginação. ### Response Example { "data": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "make_id": "995b8715-a71e-4de8-adac-2f7da8b6295b", "slug": "string" } ] } ``` -------------------------------- ### GET /v1/makes Source: https://api.fipex.com.br/v1/docs Retrieves a paginated list of vehicle makes. Supports filtering and sorting parameters to refine the results. ```APIDOC ## GET /v1/makes ### Description Retrieves a list of vehicle makes available in the FIPE table database with support for pagination, filtering, and sorting. ### Method GET ### Endpoint /v1/makes ### Parameters #### Query Parameters - **page** (integer) - Optional - Page number (default: 1) - **limit** (integer) - Optional - Items per page (1-50, default: 10) - **order_by** (string) - Optional - Field name to sort results by - **filters[INDEX].field** (string) - Optional - Field to filter - **filters[INDEX].op** (string) - Optional - Operator (e.g., CONTAINS, EQ) - **filters[INDEX].value** (string) - Optional - Value to match ### Request Example GET /v1/makes?page=2&limit=20&order_by=name&filters[0].field=name&filters[0].op=CONTAINS&filters[0].value=honda ### Response #### Success Response (200) - **data** (array) - List of make objects - **pagination** (object) - Metadata regarding current page, total items, and limits - **links** (object) - HATEOAS links for navigation (self, next, prev, first, last) #### Response Example { "data": [{"id": 1, "name": "Honda"}], "pagination": { "total": 150, "limit": 10, "page": 3, "pages": 15 }, "links": { "self": "https://api.fipex.com.br/v1/makes?page=3&limit=10", "next": "https://api.fipex.com.br/v1/makes?page=4&limit=10" } } ``` -------------------------------- ### GET /v1/prices Source: https://api.fipex.com.br/v1/docs Finds the specific price of a vehicle by providing model and fuel identifiers along with the year. ```APIDOC ## GET /v1/prices ### Description Finds the specific price of a vehicle by providing model and fuel identifiers along with the year. You can use either `model_id` + `fuel_id` or `model_slug` + `fuel_acronym`, along with the `year`. ### Method GET ### Endpoint /v1/prices ### Parameters #### Query Parameters - **model_id** (string) - Required (if `model_slug` is not provided) - UUID of the model. - **fuel_id** (string) - Required (if `model_id` is provided) - UUID of the fuel. - **model_slug** (string) - Required (if `model_id` is not provided) - Slug of the model. - **fuel_acronym** (string) - Required (if `model_slug` is provided) - Slug of the fuel. - **year** (integer or string) - Required - The year of the vehicle (e.g., 1980, 2023, or "zero" for 0km). - **ref_id** (string) - Optional - UUID of a specific reference period. - **ref_date** (string) - Optional - Reference date in YYYY-MM-DD format. ### Response #### Success Response (200) - **data** (object) - Contains detailed pricing information for the vehicle, including price, formatted price, year specifier, query date, make, model, fuel, and reference period. #### Response Example ```json { "data": { "price": 2, "formatted_price": "string", "year_specifier": { "model_year": 0, "is_zero_km": true }, "query_date": "2019-08-24T14:15:22Z", "make": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "slug": "string" }, "model": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "slug": "string", "make": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "slug": "string" }, "type": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "slug": "string" }, "year_fuels": [ { "year_specifier": { "model_year": 0, "is_zero_km": true }, "fuels": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "acronym": "string", "name": "string", "slug": "string" } ] } ] }, "fuel": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "acronym": "string", "name": "string", "slug": "string" }, "reference": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "month": 1, "month_name": "string", "year": 0 } } } ``` ``` -------------------------------- ### GET /v1/search/labels Source: https://api.fipex.com.br/v1/docs Retrieves labels for models or makes to support autocomplete functionality in the UI. ```APIDOC ## GET /v1/search/labels ### Description Searches for model or make labels to be used in autocomplete components. ### Method GET ### Endpoint https://api.fipex.com.br/v1/search/labels ### Parameters #### Query Parameters - **q** (string) - Required - Search term in JSON format. - **type** (string) - Required - Label type: "model" or "make". - **vehicle_type_id** (uuid) - Optional - Filter by vehicle type. - **make_id** (uuid) - Optional - Filter by make UUID (for model searches). - **page** (integer) - Optional - Page number. - **limit** (integer) - Optional - Items per page. ### Response #### Success Response (200) - **labels** (array) - List of matching labels. ``` -------------------------------- ### GET /v1/reference-periods Source: https://api.fipex.com.br/v1/docs Retrieves the list of reference periods available in the system, sorted by year and month by default. ```APIDOC ## GET /v1/reference-periods ### Description Retrieves the available reference periods for vehicle data. By default, results are sorted by year and month in descending order. ### Method GET ### Endpoint /v1/reference-periods ### Parameters #### Query Parameters - **year** (integer) - Optional - Sort by year (default: descending) - **month** (integer) - Optional - Sort by month (default: descending) ### Request Example GET /v1/reference-periods ### Response #### Success Response (200) - **data** (array) - List of reference period objects #### Response Example { "data": [ { "year": 2023, "month": 12 }, { "year": 2023, "month": 11 } ] } ``` -------------------------------- ### GET /brands Source: https://api.fipex.com.br/v1/docs Retrieves a paginated list of vehicle brands with support for advanced filtering, searching, and sorting. ```APIDOC ## GET /brands ### Description Recupera uma lista paginada de marcas de veículos com filtros e busca opcionais. ### Method GET ### Endpoint /brands ### Parameters #### Query Parameters - **page** (integer) - Optional - Número da página (mínimo 1). Default: 1 - **limit** (integer) - Optional - Número de itens por página (1-50). Default: 10 - **order_by** (string) - Optional - Especificação de ordenação (ex: name ou -name). - **type_id** (string) - Optional - Filtra pelo UUID do tipo de veículo. - **q** (string) - Optional - Termo de busca (1-255 caracteres). - **filters** (Array) - Optional - Filtragem avançada usando notação de array (field, op, value). ### Request Example GET /brands?page=1&limit=10&order_by=name ### Response #### Success Response (200) - **data** (Array) - Lista de marcas de veículos. - **meta** (Object) - Informações de paginação. #### Response Example { "data": [ { "id": "uuid-1", "name": "Toyota" }, { "id": "uuid-2", "name": "Honda" } ], "meta": { "total": 2, "page": 1 } } ``` -------------------------------- ### GET /v1/search Source: https://api.fipex.com.br/v1/docs Performs a full-text search for vehicles using Meilisearch with support for advanced filtering, sorting, and pagination. ```APIDOC ## GET /v1/search ### Description Performs a full-text search for vehicles using Meilisearch. Supports filtering by model, make, fuel, type, year, and price, with advanced sorting options. ### Method GET ### Endpoint https://api.fipex.com.br/v1/search ### Parameters #### Query Parameters - **page** (integer) - Optional - Page number (default: 1). - **limit** (integer) - Optional - Number of items per page (1-50, default: 10). - **order_by** (string/array) - Optional - Sorting specification (e.g., "name", "-price"). - **q** (string) - Optional - Search term. - **model_id** (uuid) - Optional - Filter by model UUID. - **make_id** (uuid) - Optional - Filter by make UUID. - **fuel_id** (uuid) - Optional - Filter by fuel UUID. - **type_id** (uuid) - Optional - Filter by vehicle type UUID. - **filters** (array) - Optional - Advanced filtering using field, op, and value. ### Response #### Success Response (200) - **data** (array) - List of vehicle objects. - **estimated_total_hits** (integer) - Total hits found. - **time_taken_ms** (integer) - Execution time in milliseconds. ### Response Example { "data": [{ "price_id": "5eff5d89-979e-4e4f-aa76-6cbbbf11362c", "model_name": "string", "latest_market_price_cents": 0 }], "estimated_total_hits": 100, "time_taken_ms": 50 } ``` -------------------------------- ### GET /v1/reference-periods Source: https://api.fipex.com.br/v1/docs Retrieves a paginated list of reference periods with optional filters for year and month, and supports custom sorting. ```APIDOC ## GET /v1/reference-periods ### Description Recupera uma lista paginada de períodos de referência com filtros opcionais. ### Method GET ### Endpoint /v1/reference-periods ### Parameters #### Query Parameters - **page** (integer) - Optional - Número da página (mínimo 1). Default: 1 - **limit** (integer) - Optional - Número de itens por página (1-50). Default: 10 - **order_by** (string or Array of strings) - Optional - Especificação de ordenação. Use o prefixo `-` para ordem descendente. - **year** (integer) - Optional - Filtra por ano (2001-ano atual). - **month** (integer) - Optional - Filtra por mês (1-12). - **filters** (Array of objects) - Optional - Filtragem avançada usando notação de array. Cada filtro requer: - `field`: O campo a ser filtrado. - `op`: O operador (ex: `=`, `!=`, `>`, `<`, `>=`, `<=`, `IN`, `NOT IN`, `TO`). - `value`: O valor para filtrar. ### Request Example ``` GET /v1/reference-periods?year=2023&month=10&limit=20 ``` ### Response #### Success Response (200) - **data** (array) - Lista de períodos de referência. - **id** (string) - Identificador único do período. - **month** (integer) - Número do mês. - **month_name** (string) - Nome do mês. - **year** (integer) - Ano. - **pagination** (object) - Informações de paginação. - **total** (integer) - Número total de itens. - **limit** (integer) - Limite de itens por página. - **offset** (integer) - Deslocamento atual. - **page** (integer) - Número da página atual. - **pages** (integer) - Número total de páginas. - **links** (object) - Links para navegação. - **self** (string) - Link para a requisição atual. - **next** (string) - Link para a próxima página. - **prev** (string) - Link para a página anterior. - **first** (string) - Link para a primeira página. - **last** (string) - Link para a última página. #### Response Example ```json { "data": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "month": 1, "month_name": "Janeiro", "year": 2023 } ], "pagination": { "total": 100, "limit": 10, "offset": 0, "page": 1, "pages": 10 }, "links": { "self": "/v1/reference-periods?page=1&limit=10", "next": "/v1/reference-periods?page=2&limit=10", "prev": null, "first": "/v1/reference-periods?page=1&limit=10", "last": "/v1/reference-periods?page=10&limit=10" } } ``` ```