Skip to content

Figures per brand

GET
/v1/catalog/brands/stats
curl --request GET \
--url 'https://api.avtopodatki.si/v1/catalog/brands/stats?sort=name' \
--header 'Authorization: Bearer <token>'

Per brand: what is on sale, how it changed over 7, 30 and 90 days, and a trend.

changes are net, exactly as GET /v1/catalog/compare?period=…&brand_id=… counts them. trend is the brand’s price index at the last complete update of each week over 90 days, as GET /v1/catalog/index computes it. It starts (= 100) 90 days ago, or at the first point the brand had anything on sale; points before that are null. A brand is listed while it has a variant on sale or a change in the last 90 days.

Requires the catalog.changes permission.

brand_id
Brand Id

Repeat to match several.

Any of:
Array<integer>

Repeat to match several.

brand
Brand

Brand name, case-insensitive. Repeat to match several.

Any of:
Array<string>

Brand name, case-insensitive. Repeat to match several.

sort
Sort

name (default), -variants or -changes_30d (most changes first).

string
default: name

name (default), -variants or -changes_30d (most changes first).

Successful Response

Media typeapplication/json
BrandStatsOut
object
items
required
Items
Array<object>
BrandStats
object
brand_id
required
Brand Id
integer
brand_name
required
Brand Name
string
models
required
Models

Models on sale now.

integer
variants
required
Variants

Variants on sale now.

integer
price_min
Price Min

The cheapest variant on sale.

Any of:
string
price_median
Price Median

The median list price.

Any of:
string
changes
required
Changes

Net changes over the last 7d, 30d and 90d.

object
key
additional properties
WindowCounts

Net changes over one window ending now, as GET /v1/catalog/compare counts them.

object
added
Added

Variants that went on sale: new ones and ones back on sale.

integer
0
withdrawn
Withdrawn

Variants no longer on sale.

integer
0
price_up
Price Up

Price rises.

integer
0
price_down
Price Down

Price reductions.

integer
0
avg_up_pct
Avg Up Pct
Any of:
string
avg_down_pct
Avg Down Pct
Any of:
string
trend
required
Trend

The brand’s price index over 90 days, at the last complete update of each week.

Array<object>
TrendPoint
object
update_id
Update Id

Null for 90 days ago.

Any of:
integer
at
required
At
string format: date-time
value
Value

Price index, start = 100, as GET /v1/catalog/index; null before the brand had anything on sale.

Any of:
string

Example

{
"items": [
{
"changes": {
"additionalProperty": {
"added": 0,
"withdrawn": 0,
"price_up": 0,
"price_down": 0
}
}
}
]
}

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": {}
}
]
}