Variant price history
GET
/v1/catalog/variants/{variant_id}/history
const url = 'https://api.avtopodatki.si/v1/catalog/variants/1/history?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/variants/1/history?offset=0&with_total=true' \ --header 'Authorization: Bearer <token>'Price changes and on-sale/withdrawn changes for one variant, newest first. Only actual changes are recorded.
Requires the catalog.read permission.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”variant_id
required
Variant Id
Variant id.
integer
Variant id.
Query Parameters
Section titled “Query Parameters”Responses
Section titled “Responses”Successful Response
Media typeapplication/json
Page[PriceHistoryOut]
object
items
required
Items
Array<object>
PriceHistoryOutOne recorded change.
object
id
required
Id
integer
variant_id
required
Variant Id
integer
change_type
required
CatalogChangeType
price, or availability for added or withdrawn.
string
currency
required
Currency
string
recorded_at
required
Recorded At
string format: date-time
limit
required
Limit
integer
offset
required
Offset
integer
Example
{ "items": [ { "change_type": "price" } ]}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}