Reports

One data widget of the Situazione report (deprecated)

Deprecated since revision 2026-10-19 — use GET /v1/reports/{widget} (Report v2: the same cards and data as the web Report page). Responses carry Deprecation and a Link: </v1/reports/{widget}>; rel="successor-version" header; a client declaring X-API-Version: 2026-10-19 or later gets 410 endpoint_retired. The endpoint is removed when the minimum supported revision passes 2026-10-19.

Returns the data behind one widget of the mobile Situazione screen, wrapped in a report_widget envelope that echoes the applied period. Backed by the same report services as the web report page; requires the reports.read permission (403 otherwise).

The period uses the same date filter as the list endpoints: no date params means the last 12 months, and an explicit preset/from/to applies to that request only. preset: all spans from the company's creation to today.

Chart widgets bucket by day for periods up to 31 days and by month otherwise — x_axis entries are always YYYY-MM-DD, so clients re-bucket freely (the mobile app aggregates daily axes into weeks).

get/v1/report/{widget}

Request

  • Base URL: https://api.officina.it
  • URL: https://api.officina.it/v1/report/{widget}
  • Auth: HTTP bearer

Query parameters

preset'rel30' | 'rel90' | 'rel365' | 'year' | 'Q1' | 'Q2' | 'Q3' | 'Q4' | 'month' | 'custom' | 'all'

Date filter preset. Relative presets (rel30/rel90/rel365) are resolved server-side from "now" and ignore from/to. Absolute presets (year, Q1-Q4, month, custom) require both from and to. all returns everything (no time bound). Unknown values are rejected with 422.

Omitting from/to/preset gives the default window, the last 12 months. This tier is stateless: a selection applies to the request that carries it and is never stored, so the same request always covers the same range. The effective range is echoed back in date_filter.

fromstring date

Period start (default: 12 months ago).

tostring date

Period end, inclusive (default: today).

limitinteger

List widgets only — rows returned. Default 5, max 50 (the repository cap; raise both to go beyond).

metric'eur' | 'pct'

worksheet-margins only — ranking metric.

direction'best' | 'worst'

worksheet-margins only.

Response

Widget data.

object'report_widget' required
widgetstring required
presetstring required
fromstring date required
tostring date required

Changes

No recorded changes to this operation across all 1 revision of this API.