Nakupy|Statistics

Create a new request for item statistics report grouped by categories.

Create a new request for shop item statistics report grouped by categories.

Can be listed as shopCategory report type.

Report can be downloaded using GET method for all reports on /sklik/reports endpoint.

post/nakupy/statistics/category

Request

  • Base URL: https://api.sklik.cz/v1
  • URL: https://api.sklik.cz/v1/nakupy/statistics/category
  • Auth: OAuth 2 (authorization code, authorization URL https://www.sklik.cz/oauth/api, token URL /user/token; client credentials, token URL /user/token)

Query parameters

premiseIdinteger required

ID of the shop on whose behalf the request is made.

Request body

fromstring date-time required

Start of requested statistics period as datetime.

tostring date-time required

End of requested statistics period as datetime.

formatReportFileFormat[]

Chosen data formats for generated statistics.

splitStatsReportStatisticsSplit[]

Statistical split options for the report. No split is applied if not provided. It's possible to combine multiple split options. The 'conversionId' split is only available for periods starting on or after 2026-01-01.

conversionIdsinteger[] nullable

Restrict statistics to the given conversion IDs. All conversions are included if not provided.

granularity'daily' | 'weekly' | 'monthly' | 'quarterly' | 'yearly' | 'none'

Supported granularity of statistics in reports.

Example request

{
  "from": "2023-03-09T11:20:17Z",
  "to": "2023-03-21T17:42:31Z",
  "splitStats": [
    "deviceType",
    "webType",
    "productType",
    "conversionId"
  ],
  "conversionIds": [
    100113933,
    100115363
  ]
}

Response

Successful Response

idinteger required

Id of requested report. Generated report can be obtained by querying /sklik/reports endpoint with report id.

Example response

{
  "id": 123456,
  "meta": {
    "from": "2023-03-09T11:20:17Z",
    "to": "2023-03-21T17:42:31Z",
    "splitStats": [
      "deviceType",
      "webType",
      "productType",
      "conversionId"
    ],
    "conversionIds": [
      100113933,
      100115363
    ]
  }
}

Changes

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