Values for your filters
const url = 'https://api.avtopodatki.si/v1/integrations/stock/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/integrations/stock/filter-values?lang=sl' \ --header 'Authorization: Bearer <token>'The values your stock has for each filter of GET /vehicles, with
counts, and the year, price and mileage ranges: everything a website’s
filters need, without the market API.
Takes the same filters. Each field’s counts follow every filter given but
its own, so after make=volkswagen the other makes keep their counts.
Requires the integration.stock 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.
Vehicle class: car, lcv (vans), hcv (trucks), bus, moto, other. Every class when left out. Values with counts: GET /filter-values (category).
Vehicle class: car, lcv (vans), hcv (trucks), bus, moto, other. Every class when left out. Values with counts: GET /filter-values (category).
Make: a slug from GET /filter-values (make), such as volkswagen, or a name in any spelling (VW). An unknown make is a 422 naming the nearest ones.
Make: a slug from GET /filter-values (make), such as volkswagen, or a name in any spelling (VW). An unknown make is a 422 naming the nearest ones.
With make: a model slug from GET /filter-values (model, with its make), such as golf, or a name. Bodies are included (golf takes the Golf Variant).
With make: a model slug from GET /filter-values (model, with its make), such as golf, or a name. Bodies are included (golf takes the Golf Variant).
Fuel type: petrol, diesel, electric, hybrid, plugin_hybrid, lpg, cng, hydrogen, other.
How the vehicle is powered.
HYBRID is a full hybrid. A mild hybrid is its fuel (PETROL or
DIESEL) with Powertrain.MHEV; a range extender is PLUGIN_HYBRID.
Fuel type: petrol, diesel, electric, hybrid, plugin_hybrid, lpg, cng, hydrogen, other.
Transmission: manual, automatic, semi_automatic, cvt, other.
Gearbox type.
Transmission: manual, automatic, semi_automatic, cvt, other.
Body, any of these (repeat the parameter). Each class has its own bodies; with category, a body outside its list is a 422.
Body, any of these (repeat the parameter). Each class has its own bodies; with category, a body outside its list is a 422.
Colour, any of these (repeat the parameter).
Colour, any of these (repeat the parameter).
Drive, any of these, as the advert states it. avto.net cars state only four-wheel drive (awd).
Drive, any of these, as the advert states it. avto.net cars state only four-wheel drive (awd).
Powertrain, any of these: ice (combustion only), mhev, hev, phev, erev, bev, fcev.
Powertrain, any of these: ice (combustion only), mhev, hev, phev, erev, bev, fcev.
Emission class, any of these (repeat the parameter).
Emission class, any of these (repeat the parameter).
This emission class or a later one: euro_6d takes euro_6d, euro_6e and euro_7.
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_6d, euro_6e and euro_7.
new, used, demo or pre_registered, any of these.
new, used, demo or pre_registered, any of these.
Header Parameters
Section titled “Header Parameters”The ETag of the answer you have: if nothing changed, the answer is an empty 304.
Responses
Section titled “Responses”Successful Response
What the website’s filters can offer: only values the stock has, most vehicles first. Each field’s counts follow every filter given but its own, so its other options stay selectable once one is picked.
The labels are also how to show a vehicle’s own values: a vehicle with
color: black shows the color entry black’s label.
object
Vehicles matching every filter given.
Send as model= with its make=.
Example generated
{ "total": 1, "lang": "example", "category": [ { "value": "example", "label": "example", "count": 1 } ], "make": [ { "value": "example", "label": "example", "count": 1 } ], "model": [ { "value": "example", "label": "example", "count": 1, "make": "example" } ], "fuel_type": [ { "value": "example", "label": "example", "count": 1 } ], "transmission": [ { "value": "example", "label": "example", "count": 1 } ], "body_style": [ { "value": "example", "label": "example", "count": 1 } ], "color": [ { "value": "example", "label": "example", "count": 1 } ], "drive": [ { "value": "example", "label": "example", "count": 1 } ], "powertrain": [ { "value": "example", "label": "example", "count": 1 } ], "emission_class": [ { "value": "example", "label": "example", "count": 1 } ], "condition": [ { "value": "example", "label": "example", "count": 1 } ], "year": { "min": "example", "max": "example" }, "price": { "min": "example", "max": "example" }, "mileage_km": { "min": "example", "max": "example" }}Headers
Section titled “Headers”The answer’s fingerprint: send it back as If-None-Match.
private, max-age=300: keep the answer five minutes on your server.
Not Modified: nothing changed since the ETag you sent in If-None-Match. No body; keep your copy. Costs nothing.
Headers
Section titled “Headers”The answer’s fingerprint: send it back as If-None-Match.
private, max-age=300: keep the answer five minutes on your server.
No key, or not a valid one (unauthorized).
Every error has this shape.
object
object
Stable, for your code: unauthorized, forbidden, not_found, validation_error, rate_limited, quota_exceeded, …
Readable text.
More about it, depending on code.
Example generated
{ "error": { "code": "example", "message": "example", "detail": "example" }}The key lacks integration.stock, or the request came from an address the key does not allow (forbidden, ip_not_allowed).
Every error has this shape.
object
object
Stable, for your code: unauthorized, forbidden, not_found, validation_error, rate_limited, quota_exceeded, …
Readable text.
More about it, depending on code.
Example generated
{ "error": { "code": "example", "message": "example", "detail": "example" }}A parameter is not valid (validation_error); detail lists each one. An unknown make names the nearest ones.
Every error has this shape.
object
object
Stable, for your code: unauthorized, forbidden, not_found, validation_error, rate_limited, quota_exceeded, …
Readable text.
More about it, depending on code.
Example generated
{ "error": { "code": "example", "message": "example", "detail": "example" }}Too many calls: 120 a minute per key (rate_limited); wait Retry-After seconds.
Every error has this shape.
object
object
Stable, for your code: unauthorized, forbidden, not_found, validation_error, rate_limited, quota_exceeded, …
Readable text.
More about it, depending on code.
Example generated
{ "error": { "code": "example", "message": "example", "detail": "example" }}