Skip to content

Reports ​

Retrieve Report Files ​

Description ​

Retrievell all report files

Request Config ​

ConfigDefinition
URL/report/file?partition_by=day&partition_start=20250218&partition_end=20250218&type=store-daily-report
MethodGET

Param ​

NameTypeDescriptionRequired
partition_bystringReport cycle partition type:
day: day
week:week
month:month
quarter:quarter
year:year
Yes
partition_startint64Report cycle partition start,Refer [Report Cycle Partition](#Report Cycle Partition) sectionYes
partition_endint64Report cycle partition end,Refer [Report Cycle Partition](#Report Cycle Partition) sectionYes
typestringReport typeNo

Notice: The API supports returning a maximum of 2000 data entries. If it exceeds 2000 entries, please shorten the report cycle partition range.

Report Cycle Partition ​

The report cycle partition format varies depending on the report cycle partition type defined by "partition_by." The specific supported formats are as shown in the table below:

Report cycle partition typeReport cycle partition formatSampleNote
dayyyyyMMdd20250218
weekyyyyww20255001 - 52week
monthyyyyMM20250201 - 12montth
quarteryyyyq202511 - 4quarter
yearyyyy2025

Response ​

Schema of data ​

NameTypeDescription
results[]objectresult objects
+ idint64report id
+ typestringreport type
+ partition_bystringreport cycle partition type
+ partitionint64report cycle partition,maybe some day or some month
+ urlstringreport file url
+ md5stringmd5 value of report file url
+ update_timeint64report update time(in ms)

Notice: When the report data is updated, the latest report file link will be returned. Please note whether the report file's MD5 value or update_time has changed. If there is a change, please download it again.

Response Body Sample ​

json

{
  "code": 0,
  "message": "",
  "data": {
    "results": [
      {
        "id": 1,
        "type": "store-daily-report",
        "partition_by": "day",
        "partition": 20250218,
        "url": "https://f-dev.clobotics.cn/4/0040ca4d85f5e5ef7354102f486ef877.csv",
        "md5": "15e2bbd5a19437ffe3b29e5661ed36aa",
        "update_time": 1668478888000
      }
    ]
  }
}

Retrieve Report Config ​

Description ​

Retrieve the report configuration

Request Config ​

ConfigDefinition
URL/report/config
MethodGET

Response ​


Schema of data ​

NameTypeDescription
results[]objectresults objects
+ typestringreport type
+ namestringreport name
+ partition_bystringreport cycle partition type
day:day
week:week
month:month
quarter:quarter
year:year
+ outputstringoutput type:
file: return the report file link;

Response Body Sample ​

json

{
  "code": 0,
  "message": "",
  "data": {
    "results": [
      {
        "type": "store-daily-report",
        "name": "Store daily report",
        "partition_by": "day",
        "output": "file"
      }
    ]
  }
}

Powered by Clobotics Retail Team.