Accepted values for every listing filter
const url = 'https://api.avtopodatki.si/v1/market/filter-values?lang=sl';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/market/filter-values?lang=sl' \ --header 'Authorization: Bearer <token>'Every value the filters of GET /v1/market/listings accept, each with a
label to show and a count of active listings.
Build every filter from this; don’t hard-code values or labels.
- Counts are active listings in
category(cars by default) onsite_id(or every marketplace you may see). They don’t follow the other filters, and are a few minutes old at most.nullwhere a count means nothing (status,sort). - Fixed lists (fuel, transmission, class) keep values with no
listings, at
count: 0, so a filter’s options don’t come and go. Makes and models list only those with listings, most first. - Makes and models are the same for every marketplace: each site’s
wording is mapped onto them when it is scraped. Send the
value(a slug) asmake=andmodel=.
Requires the market.read permission.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”The vehicle class the counts, makes and models are for: car (the default), lcv, hcv, … or all.
The vehicle class the counts, makes and models are for: car (the default), lcv, hcv, … or all.
The labels’ language: sl (the default), en or hr.
The labels’ language: sl (the default), en or hr.
Responses
Section titled “Responses”Successful Response
Accepted values for the market listing filters.
object
The vehicle class the counts are for, or all.
The labels’ language.
The accepted values for one filter.
object
Filter parameter name on GET /v1/market/listings.
canonical: the same values for every marketplace (every field now). market was a marketplace’s own values.
One accepted filter value.
object
What to send as the filter value.
Example
{ "category": "car", "lang": "sl"}Validation Error
object
object
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}