Figures per brand
const url = 'https://api.avtopodatki.si/v1/catalog/brands/stats?sort=name';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/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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Repeat to match several.
Repeat to match several.
Brand name, case-insensitive. Repeat to match several.
Brand name, case-insensitive. Repeat to match several.
name (default), -variants or -changes_30d (most changes first).
name (default), -variants or -changes_30d (most changes first).
Responses
Section titled “Responses”Successful Response
object
object
Models on sale now.
Variants on sale now.
Net changes over the last 7d, 30d and 90d.
object
Net changes over one window ending now, as GET /v1/catalog/compare counts them.
object
Variants that went on sale: new ones and ones back on sale.
Variants no longer on sale.
Price rises.
Price reductions.
The brand’s price index over 90 days, at the last complete update of each week.
Example
{ "items": [ { "changes": { "additionalProperty": { "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": {} } ]}