Skip to content

Variant price history

GET
/v1/catalog/variants/{variant_id}/history
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.

variant_id
required
Variant Id

Variant id.

integer
>= 1

Variant id.

limit
Limit

Results per page.

Any of:
integer
>= 1

Results per page.

offset
Offset

Results to skip.

integer
0

Results to skip.

with_total
With Total

Include the total count. Set false for faster responses.

boolean
default: true

Include the total count. Set false for faster responses.

Successful Response

Media typeapplication/json
Page[PriceHistoryOut]
object
items
required
Items
Array<object>
PriceHistoryOut

One 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
Allowed values: price availability
old_price
Old Price
Any of:
string
price
Price
Any of:
string
currency
required
Currency
string
price_delta
Price Delta

Price change in EUR; negative is a reduction.

Any of:
string
old_available
Old Available
Any of:
boolean
available
Available
Any of:
boolean
recorded_at
required
Recorded At
string format: date-time
total
Total

Total number of results, or null when with_total=false.

Any of:
integer
limit
required
Limit
integer
offset
required
Offset
integer

Example

{
"items": [
{
"change_type": "price"
}
]
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
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": {}
}
]
}