Skip to content

Values for your filters

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

lang
Lang

The labels’ language: sl (the default), en or hr.

string
default: sl
Allowed values: sl en hr

The labels’ language: sl (the default), en or hr.

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
StockFilterValues

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
total
required
Total

Vehicles matching every filter given.

integer
lang
required
Lang
string
category
required
Category

Send as category=.

Array<object>
FacetValue
object
value
required
Value

What to send as the filter.

string
label
required
Label

How to show it, in lang; a make’s or model’s name.

Any of:
string
count
required
Count

Vehicles with it, under every other filter given.

integer
make
required
Make

Send as make=.

Array<object>
FacetValue
object
value
required
Value

What to send as the filter.

string
label
required
Label

How to show it, in lang; a make’s or model’s name.

Any of:
string
count
required
Count

Vehicles with it, under every other filter given.

integer
model
required
Model

Send as model= with its make=.

Array<object>
ModelValue
object
value
required
Value

What to send as the filter.

string
label
required
Label

How to show it, in lang; a make’s or model’s name.

Any of:
string
count
required
Count

Vehicles with it, under every other filter given.

integer
make
required
Make

The model’s make: send it as make= with model=.

string
fuel_type
required
Fuel Type

Send as fuel_type=.

Array<object>
FacetValue
object
value
required
Value

What to send as the filter.

string
label
required
Label

How to show it, in lang; a make’s or model’s name.

Any of:
string
count
required
Count

Vehicles with it, under every other filter given.

integer
transmission
required
Transmission

Send as transmission=.

Array<object>
FacetValue
object
value
required
Value

What to send as the filter.

string
label
required
Label

How to show it, in lang; a make’s or model’s name.

Any of:
string
count
required
Count

Vehicles with it, under every other filter given.

integer
body_style
required
Body Style

Send as body_style=.

Array<object>
FacetValue
object
value
required
Value

What to send as the filter.

string
label
required
Label

How to show it, in lang; a make’s or model’s name.

Any of:
string
count
required
Count

Vehicles with it, under every other filter given.

integer
color
required
Color

Send as color=.

Array<object>
FacetValue
object
value
required
Value

What to send as the filter.

string
label
required
Label

How to show it, in lang; a make’s or model’s name.

Any of:
string
count
required
Count

Vehicles with it, under every other filter given.

integer
drive
required
Drive

Send as drive=.

Array<object>
FacetValue
object
value
required
Value

What to send as the filter.

string
label
required
Label

How to show it, in lang; a make’s or model’s name.

Any of:
string
count
required
Count

Vehicles with it, under every other filter given.

integer
powertrain
required
Powertrain

Send as powertrain=.

Array<object>
FacetValue
object
value
required
Value

What to send as the filter.

string
label
required
Label

How to show it, in lang; a make’s or model’s name.

Any of:
string
count
required
Count

Vehicles with it, under every other filter given.

integer
emission_class
required
Emission Class

Send as emission_class=.

Array<object>
FacetValue
object
value
required
Value

What to send as the filter.

string
label
required
Label

How to show it, in lang; a make’s or model’s name.

Any of:
string
count
required
Count

Vehicles with it, under every other filter given.

integer
condition
required
Condition

Send as condition=.

Array<object>
FacetValue
object
value
required
Value

What to send as the filter.

string
label
required
Label

How to show it, in lang; a make’s or model’s name.

Any of:
string
count
required
Count

Vehicles with it, under every other filter given.

integer
year
required
Bounds

For year_min= and year_max=.

object
min
required
Min
Any of:
string
max
required
Max
Any of:
string
price
required
Bounds

For price_min= and price_max= (the advertised price).

object
min
required
Min
Any of:
string
max
required
Max
Any of:
string
mileage_km
required
Bounds

For mileage_max=.

object
min
required
Min
Any of:
string
max
required
Max
Any of:
string

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"
}
}
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"
}
}