What changed between two moments
const url = 'https://api.avtopodatki.si/v1/catalog/compare?steps=false&sort=change&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/catalog/compare?steps=false&sort=change&offset=0&with_total=true' \ --header 'Authorization: Bearer <token>'The net change of every variant between two updates, or over a period.
Each variant is compared as it stood at the start (from, or period
before the end) and at the end (to, or now), so a price that went up and
back is no change. An update stands for the moment it finished.
counts and the two averages apply every filter except kind, so tabs
per kind can show their numbers while one is open.
Requires the catalog.changes permission.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”true: add every logged change in between to each row.
true: add every logged change in between to each row.
Repeat to match several.
Repeat to match several.
Brand name, case-insensitive. Repeat to match several.
Brand name, case-insensitive. Repeat to match several.
added, withdrawn, price_up, price_down. Repeatable.
added, withdrawn, price_up, price_down. Repeatable.
Body, the market API’s values (suv, …). Repeatable.
Body, the market API’s values (suv, …). Repeatable.
Fuel, the market API’s values (petrol, …). Repeatable.
Fuel, the market API’s values (petrol, …). Repeatable.
change (default: largest % first, either way), or pct, delta, price, name, with - for descending.
change (default: largest % first, either way), or pct, delta, price, name, with - for descending.
Results to skip.
Results to skip.
Include the total count. Set false for faster responses.
Include the total count. Set false for faster responses.
Responses
Section titled “Responses”Successful Response
object
One variant’s net change between the two ends.
object
added (on sale at the end, not at the start), withdrawn (the reverse), price_up or price_down (on sale at both ends).
Every logged change in between, with steps=true.
One logged change between the two ends.
object
What changed: price or availability.
The start: the catalogue as it stood then.
The end.
Rows per kind, under every filter except kind, for the tabs.
object
Variants that went on sale: new ones and ones back on sale.
Variants no longer on sale.
Price rises.
Price reductions.
Example
{ "items": [ { "kind": "added", "steps": [ { "change_type": "price" } ] } ], "counts": { "added": 0, "withdrawn": 0, "price_up": 0, "price_down": 0 }}Validation Error
object
object
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}