Price and status history
const url = 'https://api.avtopodatki.si/v1/market/listings/1/history?chain=false&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/market/listings/1/history?chain=false&offset=0&with_total=true' \ --header 'Authorization: Bearer <token>'Price and status changes for one listing, newest first.
Only actual changes are recorded, not a daily snapshot. change_type says
what changed; the old_* fields hold the previous values.
Requires the market.history permission.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Listing id.
Listing id.
Query Parameters
Section titled “Query Parameters”true: the history of every ad in the car’s repost chain, each row with its listing_id. A repost row is where one ad hands over to the next.
true: the history of every ad in the car’s repost chain, each row with its listing_id. A repost row is where one ad hands over to the next.
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
object
The ad the row belongs to; differs within a chain (chain=true).
price (the price moved), discount (only the discount moved), status (listed, removed or back) or repost (this ad replaced an older ad for the same car: old_status and old_price are the older ad’s, status and price this one’s, dated when this ad was first seen). New values may be added: treat one you don’t know as a change to show without detail.
Example
{ "items": [ { "change_type": "price", "old_status": "active", "status": "active" } ]}Validation Error
object
object
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}