Skip to content

How many vehicles

GET
/v1/integrations/stock/count
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.

category
Category

Vehicle class: car, lcv (vans), hcv (trucks), bus, moto, other. Every class when left out. Values with counts: GET /filter-values (category).

Any of:
CategoryFilter
string
Allowed values: car lcv hcv bus moto other all

Vehicle class: car, lcv (vans), hcv (trucks), bus, moto, other. Every class when left out. Values with counts: GET /filter-values (category).

make
Make

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.

Any of:
string
<= 120 characters

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.

model
Model

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).

Any of:
string
<= 200 characters

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).

family
Family

With make: a model and every model under it (3-series takes the M3).

Any of:
string
<= 200 characters

With make: a model and every model under it (3-series takes the M3).

year_min
Year Min

Earliest model year, inclusive.

Any of:
integer
>= 1900 <= 2100

Earliest model year, inclusive.

year_max
Year Max

Latest model year, inclusive.

Any of:
integer
>= 1900 <= 2100

Latest model year, inclusive.

price_min
Price Min

Minimum advertised price in EUR, inclusive.

Any of:
number

Minimum advertised price in EUR, inclusive.

price_max
Price Max

Maximum advertised price in EUR, inclusive.

Any of:
number

Maximum advertised price in EUR, inclusive.

mileage_max
Mileage Max

Maximum odometer reading in kilometres.

Any of:
integer

Maximum odometer reading in kilometres.

fuel_type
Fuel Type

Fuel type: petrol, diesel, electric, hybrid, plugin_hybrid, lpg, cng, hydrogen, other.

Any of:
FuelType

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.

string
Allowed values: petrol diesel electric hybrid plugin_hybrid lpg cng hydrogen other

Fuel type: petrol, diesel, electric, hybrid, plugin_hybrid, lpg, cng, hydrogen, other.

transmission
Transmission

Transmission: manual, automatic, semi_automatic, cvt, other.

Any of:
Transmission

Gearbox type.

string
Allowed values: manual automatic semi_automatic cvt other

Transmission: manual, automatic, semi_automatic, cvt, other.

body_style
Body Style

Body, any of these (repeat the parameter). Each class has its own bodies; with category, a body outside its list is a 422.

Any of:
Array<string>
Allowed values: sedan hatchback wagon suv coupe convertible van minivan pickup microcar panel_van minibus chassis_cab dropside curtainsider box refrigerated tipper hooklift swap_body tractor_unit car_transporter tow_truck crane platform tanker concrete_mixer refuse timber livestock special city_bus intercity_bus coach scooter maxi_scooter naked touring sport enduro motocross supermoto trial cruiser moped minibike quad utv three_wheeler snowmobile ebike kick_scooter other

Body, any of these (repeat the parameter). Each class has its own bodies; with category, a body outside its list is a 422.

color
Color

Colour, any of these (repeat the parameter).

Any of:
Array<string>
Allowed values: white black grey silver blue red green brown beige yellow orange gold purple other

Colour, any of these (repeat the parameter).

metallic
Metallic

true: metallic paint only. false: paint the advert states is not metallic (only avto.net states it).

Any of:
boolean

true: metallic paint only. false: paint the advert states is not metallic (only avto.net states it).

drive
Drive

Drive, any of these, as the advert states it. avto.net cars state only four-wheel drive (awd).

Any of:
Array<string>
Allowed values: fwd rwd awd chain belt shaft other

Drive, any of these, as the advert states it. avto.net cars state only four-wheel drive (awd).

powertrain
Powertrain

Powertrain, any of these: ice (combustion only), mhev, hev, phev, erev, bev, fcev.

Any of:
Array<string>
Allowed values: ice mhev hev phev erev bev fcev

Powertrain, any of these: ice (combustion only), mhev, hev, phev, erev, bev, fcev.

emission_class
Emission Class

Emission class, any of these (repeat the parameter).

Any of:
Array<string>
Allowed values: euro_1 euro_2 euro_3 euro_4 euro_5 euro_6 euro_6c euro_6d_temp euro_6d euro_6e euro_7 other

Emission class, any of these (repeat the parameter).

emission_class_min
Emission Class Min

This emission class or a later one: euro_6d takes euro_6d, euro_6e and euro_7.

Any of:
EmissionClass

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.

string
Allowed values: euro_1 euro_2 euro_3 euro_4 euro_5 euro_6 euro_6c euro_6d_temp euro_6d euro_6e euro_7 other

This emission class or a later one: euro_6d takes euro_6d, euro_6e and euro_7.

condition
Condition

new, used, demo or pre_registered, any of these.

Any of:
Array<string>
Allowed values: new used demo pre_registered

new, used, demo or pre_registered, any of these.

has_price
Has Price

true: only vehicles with a price; false: only those without (see price_note). Omit for both.

Any of:
boolean

true: only vehicles with a price; false: only those without (see price_note). Omit for both.

q
Q

The advert’s title starts with this text, case-insensitive: Volkswagen matches »Volkswagen Golf«, Golf does not.

Any of:
string
>= 2 characters <= 100 characters

The advert’s title starts with this text, case-insensitive: Volkswagen matches »Volkswagen Golf«, Golf does not.

vin
Vin

Exactly this VIN, where the advert has one.

Any of:
string
>= 11 characters <= 17 characters

Exactly this VIN, where the advert has one.

If-None-Match
string

The ETag of the answer you have: if nothing changed, the answer is an empty 304.

Successful Response

Media typeapplication/json
StockCount
object
count
required
Count

Vehicles matching the filters.

integer

Example generated

{
"count": 1
}
ETag
string

The answer’s fingerprint: send it back as If-None-Match.

Cache-Control
string

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.

ETag
string

The answer’s fingerprint: send it back as If-None-Match.

Cache-Control
string

private, max-age=300: keep the answer five minutes on your server.

No key, or not a valid one (unauthorized).

Media typeapplication/json
ErrorOut

Every error has this shape.

object
error
required
ErrorInfo
object
code
required
Code

Stable, for your code: unauthorized, forbidden, not_found, validation_error, rate_limited, quota_exceeded, …

string
message
required
Message

Readable text.

string
detail
Detail

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).

Media typeapplication/json
ErrorOut

Every error has this shape.

object
error
required
ErrorInfo
object
code
required
Code

Stable, for your code: unauthorized, forbidden, not_found, validation_error, rate_limited, quota_exceeded, …

string
message
required
Message

Readable text.

string
detail
Detail

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.

Media typeapplication/json
ErrorOut

Every error has this shape.

object
error
required
ErrorInfo
object
code
required
Code

Stable, for your code: unauthorized, forbidden, not_found, validation_error, rate_limited, quota_exceeded, …

string
message
required
Message

Readable text.

string
detail
Detail

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.

Media typeapplication/json
ErrorOut

Every error has this shape.

object
error
required
ErrorInfo
object
code
required
Code

Stable, for your code: unauthorized, forbidden, not_found, validation_error, rate_limited, quota_exceeded, …

string
message
required
Message

Readable text.

string
detail
Detail

More about it, depending on code.

Example generated

{
"error": {
"code": "example",
"message": "example",
"detail": "example"
}
}