Filter values
const url = 'https://api.avtopodatki.si/v1/catalog/facets?lang=sl&available=true';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.avtopodatki.si/v1/catalog/facets?lang=sl&available=true' \ --header 'Authorization: Bearer <token>'Filter values with counts and labels, for building filters.
Takes the same filters as GET /v1/catalog/variants. Each group’s counts
apply every filter except its own: with fuel_type=diesel chosen, the fuel
group still shows how many petrol cars the other filters leave, while every
other group counts diesels only. variants and models count what the
whole filter set matches.
The values are the market API’s, labelled as GET /v1/market/filter-values
labels them.
Requires the catalog.read permission.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”The labels’ language: sl (the default), en or hr.
The labels’ language: sl (the default), en or hr.
Repeat to match several.
Repeat to match several.
Repeat to match several.
Repeat to match several.
Brand name, case-insensitive. Repeat to match several; combines with brand_id (both must hold).
Brand name, case-insensitive. Repeat to match several; combines with brand_id (both must hold).
Make, as on the market API: a slug (mercedes-benz) or a name in any spelling (Mercedes Benz, VW). An unknown make is a 422 naming the nearest.
Make, as on the market API: a slug (mercedes-benz) or a name in any spelling (Mercedes Benz, VW). An unknown make is a 422 naming the nearest.
Fuel, the market API’s values (petrol, diesel, electric, plugin_hybrid, …); repeat to match several. A mild hybrid is its fuel: find mild hybrids with powertrain=mhev.
Fuel, the market API’s values (petrol, diesel, electric, plugin_hybrid, …); repeat to match several. A mild hybrid is its fuel: find mild hybrids with powertrain=mhev.
manual, automatic, semi_automatic or cvt. Repeatable.
manual, automatic, semi_automatic or cvt. Repeatable.
fwd, rwd or awd. Repeatable.
fwd, rwd or awd. Repeatable.
ice, mhev, hev, phev, erev, bev or fcev. Repeatable.
ice, mhev, hev, phev, erev, bev or fcev. Repeatable.
Body, the market API’s car bodies (suv, hatchback, …). Repeatable.
Body, the market API’s car bodies (suv, hatchback, …). Repeatable.
Emission class (euro_6d, euro_6e, …). Repeatable.
Emission class (euro_6d, euro_6e, …). Repeatable.
This emission class or a later one: euro_6d takes euro_6e too.
European emission standard (Euro 1 … Euro 7).
EURO_6 is Euro 6 with its stage not stated. Rank with
:data:avtopodatki_shared.values.EMISSION_ORDER, never by the value string.
This emission class or a later one: euro_6d takes euro_6e too.
true (default): currently on sale; false: no longer on sale; any: both.
true (default): currently on sale; false: no longer on sale; any: both.
Responses
Section titled “Responses”Successful Response
Filter values with counts.
object
Variants matching every filter.
Models with at least one of them.
Example
{ "variants": 0, "models": 0}Validation Error
object
object
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}