Reports¶
Endpoints of the Reports section of the iikoCloud API documentation.
Reporting.Olap¶
iiko.reporting.olap.columns.get()
async
¶
get(
*, report_type: str, timeout: float | None = None
) -> list[OlapColumn]
Get OLAP report columns.
POST /api/reporting/v1/olap/columns/get
Returns the list of columns available in the OLAP report of the given type (reportType)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
report_type
|
str
|
Report type: |
required |
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
list[OlapColumn]
|
The |
iiko.reporting.olap.get()
async
¶
get(
*,
aggregate_fields: Sequence[str],
filters: Sequence[OlapFilterDoc | Mapping[str, Any]],
report_type: str,
build_summary: bool | None = None,
group_by_col_fields: Sequence[str] | None = None,
group_by_row_fields: Sequence[str] | None = None,
timeout: float | None = None,
) -> GetOlapReportResponse
Run OLAP report.
POST /api/reporting/v1/olap/get
Builds an OLAP report on sales, transactions or deliveries with an arbitrary configuration and returns its data (data) and totals (summary). This is the main way for an integrator to build analytical data marts and management reporting: the client defines the row and column grouping fields, aggregate fields and filters.
Field names (groupByRowFields, groupByColFields, aggregateFields, filters) are taken from the metadata of the olap/columns/get method. The set of available fields changes between versions of the server's internal API, so request the current metadata before building a report.
Every request must contain a date filter. Dates must use the yyyy-MM-dd format. Recommended date fields: OpenDate.Typed for SALES and DELIVERIES, DateTime.DateTyped (or DateTime.Typed) for TRANSACTIONS.
**Caution!</> A query that is too broad: a long period, a large number of restaurants or fields/groupings, as well as balance fields (StartBalance.*, FinalBalance.*), which are calculated over the entire transaction history, may take a long time to run or return no result. Split large queries into smaller sequential queries with a narrow period. To get balances, use specialized methods instead of OLAP.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
aggregate_fields
|
Sequence[str]
|
Non-empty list of fields to aggregate by ( |
required |
filters
|
Sequence[OlapFilterDoc | Mapping[str, Any]]
|
Report filters: an array of filter structures; each contains name ( |
required |
report_type
|
str
|
Report type: |
required |
build_summary
|
bool | None
|
Whether to build totals |
None
|
group_by_col_fields
|
Sequence[str] | None
|
Fields to group columns by ( |
None
|
group_by_row_fields
|
Sequence[str] | None
|
Fields to group rows by ( |
None
|
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
GetOlapReportResponse
|
The |
iiko.reporting.olap.presets.get()
async
¶
get(
*,
date_from: str,
date_to: str,
preset_id: str,
timeout: float | None = None,
) -> GetOlapReportResponse
Get saved OLAP preset data.
POST /api/reporting/v1/olap/presets/get
Returns the data of a saved OLAP preset by its identifier (presetId) for a given period (dateFrom — start, dateTo — end). A preset is a ready-made report configuration (groupings, aggregates, filters) saved by the restaurant owner; the method lets retrieve a report by that configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
date_from
|
str
|
Start of the report period (inclusive) in |
required |
date_to
|
str
|
End of the report period (exclusive) in |
required |
preset_id
|
str
|
Identifier of the saved OLAP preset (from |
required |
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
GetOlapReportResponse
|
The |
iiko.reporting.olap.presets.list()
async
¶
list(*, timeout: float | None = None) -> list[OlapPreset]
Get saved OLAP presets.
POST /api/reporting/v1/olap/presets/list
Returns the list of OLAP presets saved in iikoOffice — ready-made report configurations set up by the restaurant owner. Each item contains an identifier (presetId) and the preset name. The method returns all saved presets.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
list[OlapPreset]
|
The |
Reporting.IncomePlan¶
iiko.reporting.income_plan.list()
async
¶
list(
*,
date_from: date | str,
date_to: date | str,
organization_id: str,
timeout: float | None = None,
) -> GetIncomePlanResponse
Get income plan.
POST /api/reporting/v1/income-plan/list
Returns daily planned income values for an organization over the requested period.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
date_from
|
date | str
|
Period start date (inclusive) |
required |
date_to
|
date | str
|
Period end date (inclusive) |
required |
organization_id
|
str
|
Organization (department) identifier; used to resolve the plan |
required |
timeout
|
float | None
|
Server-side timeout in seconds ( |
None
|
Returns:
| Type | Description |
|---|---|
GetIncomePlanResponse
|
The |