One vehicle
const url = 'https://api.avtopodatki.si/v1/integrations/stock/vehicles/1';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/1 \ --header 'Authorization: Bearer <token>'One of your vehicles on sale, with its description as safe HTML.
Link with its vehicle_id from GET /vehicles: it stays when you take
an advert down and post the car again. An advert’s id, also an older
one, finds the car too, and the answer is its advert on sale now. A sold
or withdrawn vehicle is a 404, as is an id that is not yours.
Requires the integration.stock permission.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The vehicle’s vehicle_id, or an id of its adverts.
The vehicle’s vehicle_id, or an id of its adverts.
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
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.
The equipment the advert lists, by group, groups by name. The marketplace’s own words, in its language (Slovenian on avto.net): lang does not translate them. null when the advert has no list, [] when it lists nothing.
One group of the advert’s equipment list.
Example
{ "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" }}Sold or withdrawn, or not one of yours (not_found): “no longer available”.
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" }}