Skip to content

Reports models

Models of the reporting endpoints.

Generated by python -m codegen from the iikoCloud OpenAPI specification. Do not edit by hand.

GetIncomePlanRequest

Bases: IikoModel

GetIncomePlanRequest.

date_from instance-attribute

date_from: date

Period start date (inclusive)

date_to instance-attribute

date_to: date

Period end date (inclusive)

organization_id instance-attribute

organization_id: str

Organization (department) identifier; used to resolve the plan

GetIncomePlanResponse

Bases: IikoModel

GetIncomePlanResponse.

items class-attribute instance-attribute

items: list[IncomePlanItem] | None = None

Daily planned values

GetOlapColumnsRequest

Bases: IikoModel

GetOlapColumnsRequest.

report_type instance-attribute

report_type: str

Report type: SALES — sales, TRANSACTIONS — transactions, DELIVERIES — deliveries

GetOlapReportRequest

Bases: IikoModel

GetOlapReportRequest.

aggregate_fields instance-attribute

aggregate_fields: list[str]

Non-empty list of fields to aggregate by (FieldName names from columns/get)

build_summary class-attribute instance-attribute

build_summary: bool | None = None

Whether to build totals

filters instance-attribute

filters: list[OlapFilterDoc]

Report filters: an array of filter structures; each contains name (FieldName from columns/get) and filterType, remaining fields depend on filterType (see filter models); at least one DateRange filter by the OpenDate.Typed field is required. For periodType = CUSTOM the period is limited to 31 days inclusive.

group_by_col_fields class-attribute instance-attribute

group_by_col_fields: list[str] | None = None

Fields to group columns by (FieldName names from columns/get)

group_by_row_fields class-attribute instance-attribute

group_by_row_fields: list[str] | None = None

Fields to group rows by (FieldName names from columns/get)

report_type instance-attribute

report_type: str

Report type: SALES — sales, TRANSACTIONS — transactions, DELIVERIES — deliveries

GetOlapReportResponse

Bases: IikoModel

GetOlapReportResponse.

data class-attribute instance-attribute

data: list[dict[str, Any]] | None = None

Linear report data (row by row)

summary class-attribute instance-attribute

summary: list[Any] | None = None

Intermediate and grand totals of the report

IncomePlanItem

Bases: IikoModel

IncomePlanItem.

date class-attribute instance-attribute

date: date | None = None

Date for which the plan is set

plan_value class-attribute instance-attribute

plan_value: Decimal | None = None

Planned value: amount for ABSOLUTE, percentage for PERCENT, or automatically calculated value for AUTOMATIC

value_type class-attribute instance-attribute

value_type: str | None = None

Value type: ABSOLUTE — amount, PERCENT — percentage, AUTOMATIC — automatic calculation

OlapColumn

Bases: IikoModel

OlapColumn.

can_aggregate class-attribute instance-attribute

can_aggregate: bool | None = None

Whether aggregation is allowed for the column

can_filter class-attribute instance-attribute

can_filter: bool | None = None

Whether filtering is allowed for the column

can_group class-attribute instance-attribute

can_group: bool | None = None

Whether grouping is allowed for the column

display_name class-attribute instance-attribute

display_name: str | None = None

Report column name

name class-attribute instance-attribute

name: str | None = None

Field name (FieldName): used in groupByRowFields/groupByColFields/aggregateFields, grouping and filters

tags class-attribute instance-attribute

tags: list[str] | None = None

Report categories the field belongs to

type class-attribute instance-attribute

type: str | None = None

Field type (ENUM, STRING, ID, DATETIME, INTEGER, PERCENT, DURATION_IN_SECONDS, etc.)

OlapFilterDoc

Bases: IikoModel

One item of the filters array. Which fields are actually present depends on filterType: name and filterType are always present; values — for IncludeValues/ExcludeValues; from/to — a number for Range or a date string in yyyy-MM-dd format for DateRange; periodType — for DateRange; includeLow/includeHigh — for Range and DateRange

filter_type instance-attribute

filter_type: str

Filter type: IncludeValues/ExcludeValues — by values, Range — by numeric range, DateRange — by date range

from_ class-attribute instance-attribute

from_: Any | None = Field(default=None, alias='from')

Lower range bound: a number (Range) or a date (DateRange) in yyyy-MM-dd format. For periodType = CUSTOM the period is limited to 31 days inclusive.

include_high class-attribute instance-attribute

include_high: bool | None = None

Whether to include the upper range bound; defaults to false

include_low class-attribute instance-attribute

include_low: bool | None = None

Whether to include the lower range bound; defaults to true

name instance-attribute

name: str

Field name to filter by (FieldName from columns/get)

period_type class-attribute instance-attribute

period_type: str | None = None

Period type (for DateRange): CUSTOM, OPEN_PERIOD, TODAY, YESTERDAY, CURRENT_WEEK, CURRENT_MONTH, CURRENT_YEAR, LAST_WEEK, LAST_MONTH, LAST_YEAR

to class-attribute instance-attribute

to: Any | None = None

Upper range bound: a number (Range) or a date (DateRange) in yyyy-MM-dd format; required for Range and for DateRange with periodType=CUSTOM. For periodType = CUSTOM the period is limited to 31 days inclusive.

values class-attribute instance-attribute

values: list[str] | None = None

Field values to filter by; required for IncludeValues/ExcludeValues filterType

OlapPreset

Bases: IikoModel

OlapPreset.

name class-attribute instance-attribute

name: str | None = None

Name of the saved OLAP preset set by the restaurant owner

preset_id class-attribute instance-attribute

preset_id: str | None = None

Identifier of the saved OLAP preset; used in the olap/presets/get method to retrieve its data

OlapPresetReportRequest

Bases: IikoModel

OlapPresetReportRequest.

date_from instance-attribute

date_from: str

Start of the report period (inclusive) in yyyy-MM-dd format

date_to instance-attribute

date_to: str

End of the report period (exclusive) in yyyy-MM-dd format

preset_id instance-attribute

preset_id: str

Identifier of the saved OLAP preset (from olap/presets/list)

OlapPresetsListRequest

Bases: IikoModel

OlapPresetsListRequest.