How many vehicles
const url = 'https://api.avtopodatki.si/v1/integrations/stock/count';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/count \ --header 'Authorization: Bearer <token>'How many of your vehicles match the filters of GET /vehicles.
Requires the integration.stock permission.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”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
object
Vehicles matching the filters.
Example generated
{ "count": 1}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" }}