API

Get sales channel statistics

GET/api/crm/v2/sales_channelsv2
operationId: salesChannels.default

Returns revenue, order count, and average receipt per sales channel. Up to two periods can be returned in a single request to compare, for example, month over month. Period totals are pre-calculated, and for charts, only non-empty hours in UTC are returned. Convert these to the user's time zone and aggregate by day or month. Revenue includes only completed orders.

Authorization

api-token + language + role

Query parameters

date_creation_fromstring

Example: 01/08/2026

date_creation_tostring

Example: 31/08/2026

date_comparison_fromstring

Second period; empty if there is nothing to compare with

Example: 01/07/2026

date_comparison_tostring

Example: 31/07/2026

chain_idinteger
branch_idinteger
delivery_methodstring (OrderDelivery)

Delivery method: courier or pickup

Values:courierpickup

payment_statusstring (OrderPayment)

Payment status: unpaid, pending, paid

Values:not_paidwaitingpaid

operator_idinteger
downloadstring

Returns a summary table for period A in CSV format instead of JSON

Values:yes

Example: yes

Responses

OK

object
statusstringrequired

Values:successerror

Example: success

dataobject
filtersobject
date_creation_fromobject (FilterDateFrom)
valuestringcan be null

Example: 2026-08-01 00:00:00

typestringrequired

Example: date

modestring (FilterMode)

How the interface handles the filter; a regular filter does not have mode.
force_shown — always displayed, cannot be hidden.
value_required — entry point to the section: always displayed, cannot have an empty value (until a value is selected, the list is empty; there is no "all" option), global reset does not clear it.

Values:force_shownvalue_required

Example: value_required

date_creation_toobject (FilterDateTo)
valuestringcan be null

Example: 2026-08-31 23:59:59

typestringrequired

Example: date

modestring (FilterMode)

How the interface handles the filter; a regular filter does not have mode.
force_shown — always displayed, cannot be hidden.
value_required — entry point to the section: always displayed, cannot have an empty value (until a value is selected, the list is empty; there is no "all" option), global reset does not clear it.

Values:force_shownvalue_required

Example: value_required

date_creation_rangeobject (FilterDateRange)

Predefined date filter ranges; the lower boundary is calculated in the user's timezone. value is the range corresponding to the current *_from and *_to; null means a custom range. default is the range the server uses when a request has no dates: it is also applied on the first section load and when resetting. The upper boundary of the range always matches the user's current day, so option does not include it: you do not need to send *_to for a predefined range, the server sets it automatically. Ranges longer than one year are trimmed from the most recent boundary.

valuestring (DateRange) can be null

Predefined date filter range. It does not have its own query parameter: the lower boundary is pre-calculated in option and is used as *_from. The upper boundary is neither returned in the response nor sent in the request—it is always set to the user's current day by the server.

Values:todaythree_daysweektwo_weeksmonthquarterhalf_yearyear

Example: today

defaultstring (DateRange) required

Predefined date filter range. It does not have its own query parameter: the lower boundary is pre-calculated in option and is used as *_from. The upper boundary is neither returned in the response nor sent in the request—it is always set to the user's current day by the server.

Values:todaythree_daysweektwo_weeksmonthquarterhalf_yearyear

Example: today

typestringrequired

Example: select

modestring (FilterMode)

How the interface handles the filter; a regular filter does not have mode.
force_shown — always displayed, cannot be hidden.
value_required — entry point to the section: always displayed, cannot have an empty value (until a value is selected, the list is empty; there is no "all" option), global reset does not clear it.

Values:force_shownvalue_required

Example: value_required

optionarray of objectrequired
valuestring (DateRange) required

Predefined date filter range. It does not have its own query parameter: the lower boundary is pre-calculated in option and is used as *_from. The upper boundary is neither returned in the response nor sent in the request—it is always set to the user's current day by the server.

Values:todaythree_daysweektwo_weeksmonthquarterhalf_yearyear

Example: today

date_fromstringrequired

Example: 25/08/2026

date_comparison_fromobject (FilterDateFrom)
valuestringcan be null

Example: 2026-08-01 00:00:00

typestringrequired

Example: date

modestring (FilterMode)

How the interface handles the filter; a regular filter does not have mode.
force_shown — always displayed, cannot be hidden.
value_required — entry point to the section: always displayed, cannot have an empty value (until a value is selected, the list is empty; there is no "all" option), global reset does not clear it.

Values:force_shownvalue_required

Example: value_required

date_comparison_toobject (FilterDateTo)
valuestringcan be null

Example: 2026-08-31 23:59:59

typestringrequired

Example: date

modestring (FilterMode)

How the interface handles the filter; a regular filter does not have mode.
force_shown — always displayed, cannot be hidden.
value_required — entry point to the section: always displayed, cannot have an empty value (until a value is selected, the list is empty; there is no "all" option), global reset does not clear it.

Values:force_shownvalue_required

Example: value_required

date_comparison_rangeobject (FilterDateRangeOptional)

Predefined date filter ranges with no default value: default is always null.

valuestring (DateRange) can be null

Predefined date filter range. It does not have its own query parameter: the lower boundary is pre-calculated in option and is used as *_from. The upper boundary is neither returned in the response nor sent in the request—it is always set to the user's current day by the server.

Values:todaythree_daysweektwo_weeksmonthquarterhalf_yearyear

Example: today

defaultstring (DateRange) can be null

Predefined date filter range. It does not have its own query parameter: the lower boundary is pre-calculated in option and is used as *_from. The upper boundary is neither returned in the response nor sent in the request—it is always set to the user's current day by the server.

Values:todaythree_daysweektwo_weeksmonthquarterhalf_yearyear

Example: today

typestringrequired

Example: select

optionarray of objectrequired
valuestring (DateRange) required

Predefined date filter range. It does not have its own query parameter: the lower boundary is pre-calculated in option and is used as *_from. The upper boundary is neither returned in the response nor sent in the request—it is always set to the user's current day by the server.

Values:todaythree_daysweektwo_weeksmonthquarterhalf_yearyear

Example: today

date_fromstringrequired

Example: 25/08/2026

chain_idobject (FilterSelectInteger)
valueinteger

Example: 8920

typestringrequired

Example: select

optionarray of object
valueintegerrequired

Example: 8920

namestringrequired

Example: Green Basket | Kaliningrad

modestring (FilterMode)

How the interface handles the filter; a regular filter does not have mode.
force_shown — always displayed, cannot be hidden.
value_required — entry point to the section: always displayed, cannot have an empty value (until a value is selected, the list is empty; there is no "all" option), global reset does not clear it.

Values:force_shownvalue_required

Example: value_required

branch_idobject (FilterSelectInteger)
valueinteger

Example: 8920

typestringrequired

Example: select

optionarray of object
valueintegerrequired

Example: 8920

namestringrequired

Example: Green Basket | Kaliningrad

modestring (FilterMode)

How the interface handles the filter; a regular filter does not have mode.
force_shown — always displayed, cannot be hidden.
value_required — entry point to the section: always displayed, cannot have an empty value (until a value is selected, the list is empty; there is no "all" option), global reset does not clear it.

Values:force_shownvalue_required

Example: value_required

delivery_methodobject (FilterEnum)

Filter enumeration — a flat list of enumeration values

valuestring

Example: example

typestringrequired

Example: select

optionarray of string
modestring (FilterMode)

How the interface handles the filter; a regular filter does not have mode.
force_shown — always displayed, cannot be hidden.
value_required — entry point to the section: always displayed, cannot have an empty value (until a value is selected, the list is empty; there is no "all" option), global reset does not clear it.

Values:force_shownvalue_required

Example: value_required

payment_statusobject (FilterEnum)

Filter enumeration — a flat list of enumeration values

valuestring

Example: example

typestringrequired

Example: select

optionarray of string
modestring (FilterMode)

How the interface handles the filter; a regular filter does not have mode.
force_shown — always displayed, cannot be hidden.
value_required — entry point to the section: always displayed, cannot have an empty value (until a value is selected, the list is empty; there is no "all" option), global reset does not clear it.

Values:force_shownvalue_required

Example: value_required

operator_idobject (FilterSelectInteger)
valueinteger

Example: 8920

typestringrequired

Example: select

optionarray of object
valueintegerrequired

Example: 8920

namestringrequired

Example: Green Basket | Kaliningrad

modestring (FilterMode)

How the interface handles the filter; a regular filter does not have mode.
force_shown — always displayed, cannot be hidden.
value_required — entry point to the section: always displayed, cannot have an empty value (until a value is selected, the list is empty; there is no "all" option), global reset does not clear it.

Values:force_shownvalue_required

Example: value_required

downloadobject (FilterButtonDownloadCsv)

Download selection button: on click, pass download=yes

valuestring

Example: Download

typestringrequired

Example: button_download_csv

periodsarray of object

One item per period; the second one is present only if a comparison period is specified

keystringrequired

a — main period, b — comparison period

Values:ab

Example: a

date_fromstringrequired

Example: 01/08/2026

date_tostringrequired

Example: 31/08/2026

totalobject (SalesChannelsTotal) required

Period totals for all channels

orders_countintegerrequired

Example: 4120

completed_countintegerrequired

Example: 3894

completed_percentnumberrequired

Example: 94.51

revenuenumberrequired

Example: 4361280

averagenumberrequired

Example: 1120

channelsarray of objectrequired

One item per sales channel with orders, in a fixed order. There is no "all channels" item; use total for this purpose.

platformstring (OrderPlatform) required

Order platform

Values:androidapifbiosvksite

orders_countintegerrequired

Example: 1810

orders_sharenumberrequired

Percentage of orders for the period

Example: 43.93

completed_countintegerrequired

Example: 1702

completed_percentnumberrequired

Example: 94.03

revenuenumberrequired

Example: 1855180

revenue_sharenumberrequired

Revenue share percentage for the period

Example: 42.54

averagenumberrequired

Revenue divided by the number of completed orders

Example: 1090

deltaobject (SalesChannelsDelta) requiredcan be null

Comparison of the channel with the same channel in period B. null if period B is not specified.

revenue_absolutenumberrequired

Example: -120400

revenue_percentnumberrequiredcan be null

null if the channel had no revenue in period B: percentage growth from zero is not defined

Example: -6.09

bucketsarray of objectrequired

Orders grouped by hour; only non-empty hours are included. Convert the time to the user's time zone, then aggregate hours into chart points: use a line chart for days or months, a bar chart for calendar months. Sum count, completed_count, and revenue; do not average mean values.

datetimestringrequired

The hour to which the orders refer, in UTC

Example: 2026-08-01 09:00:00

countintegerrequired

Example: 12

completed_countintegerrequired

Example: 11

revenuenumberrequired

Example: 12100