The dealer's vehicles
const url = 'https://api.avtopodatki.si/v1/integrations/stock/vehicles?sort=first_seen_at&order=desc&offset=0&with_total=true';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/vehicles?sort=first_seen_at&order=desc&offset=0&with_total=true' \ --header 'Authorization: Bearer <token>'The vehicles you are selling: the active adverts of your seller
profiles, every vehicle class unless you pass category.
The filters are those of GET /v1/market/listings and mean the same, but
they only ever narrow your own stock. Only active adverts: status other
than active is a 422. Newest first unless you sort.
Requires the integration.stock permission.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”One of: first_seen_at, price, year, mileage_km.
One of: first_seen_at, price, year, mileage_km.
asc or desc.
asc or desc.
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.
Results to skip.
Results to skip.
Include the total count. Set false for faster responses.
Include the total count. Set false for faster responses.
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
One vehicle the dealer is selling: one of their active adverts, with
the fields of GET /v1/market/listings/{id} a website shows.
Closed values are codes, the same on every marketplace: category,
fuel_type, transmission, body_style, color, drive, powertrain,
emission_class and condition. Show them with the labels
GET /filter-values gives (lang=sl, en or hr): called without
filters, it lists every value your stock has, with its label. null
means the advert does not say.
object
The advert’s own id. It changes when you take the advert down and post the car again: link with vehicle_id.
The vehicle’s id: it stays when you take the advert down and post the car again, so a link to it keeps working. GET /vehicles/{vehicle_id} takes it.
The advert on the marketplace.
Vehicle class: car, lcv (van), hcv (truck), bus, moto, other.
The canonical make. null: the marketplace named no make, or something that is none (“Ostale marke”, an ATV). Can differ from site_make: Mitsubishi’s “Canter” is a FUSO.
A canonical make: the same for every marketplace.
object
What make= takes: mercedes-benz.
How to show it: Mercedes-Benz.
The canonical model. null: no model was found. Today cars and vans, and trucks and buses where the advert names one (Atego, TGL); motorbikes have none yet.
A canonical model line, the same for every marketplace. Bodies are
folded in (a Golf Variant is a golf); a separate product is a model of
its own (golf-sportsvan, m3).
object
What model= takes, with make=.
The maker’s international name: 3 Series, C-Class.
ISO 4217 code of the prices: EUR.
Whether the seller declares unrepaired damage or a defect: on Avto.net the boxes poškodovano (damaged), v okvari (faulty) or ni vozno (not drivable), on mobile.de the Damaged flag. false means the advert declares none, which is how both marketplaces’ own searches treat it; null means the full advert has not been read yet. Declared by the seller, not inspected. A car can be damaged and accident-free at once (hail, a mechanical fault).
false when the seller states the car is not roadworthy (Avto.net ni vozno, mobile.de Not roadworthy). true only where mobile.de states it is ready to drive; Avto.net never states it, so there it is false or null. Avto.net counts a car that is not roadworthy as damaged; mobile.de keeps the two apart.
Its photos and videos, in the advert’s order, as the marketplace shows them. A video is a YouTube link (youtube.com, youtu.be): embed it rather than show it as an image. For now the photos are the marketplace’s own addresses; they will move to ours.
One of the listing’s current photos.
object
The photo at the marketplace’s own address.
Its place on the listing’s page, from 0.
Always false: only the listing’s current photos are kept. Deprecated; it will be removed.
When the advert was first seen.
Example
{ "items": [ { "category": "car", "price_note": "call_for_price", "images": [ { "removed": false } ] } ]}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. Or the month’s credits are spent (quota_exceeded).
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" }}