GetPrepared
[POST] .../v1/report/getprepared
Returns prepared REGOS reports and their metadata. Use this method to retrieve metadata for prepared report files and, when include_data=true, embed the prepared report payload for caller-side inspection or analysis. Use filters to select a prepared report by report_id, request_uuid or user_id. Report0033 builder report results are not returned by this method; use ReportBuilder/GetPrepared. If include_data=true, the data field contains the prepared report file bytes encoded as Base64. The report file is GZIP-compressed (.gz): decode Base64 first, then decompress GZIP to obtain the report payload. If include_data is false or omitted, data may be null and file_url contains the URL of the prepared GZIP (.gz) report file. The decompressed payload format depends on the report type; JSON reports should be parsed as UTF-8 JSON. The caller must have prepared-report read permission 350; missing body, denied access, unavailable CDN file, translation lookup errors or database failures are returned as HTTP 200 ErrorResult business errors.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| filters | Array of Filter | Optional | Optional filters by fields available for this API method. |
| include_data | Boolean | Optional | When true, embeds the prepared GZIP (.gz) report file in data as Base64-encoded bytes. When false or omitted, only report metadata and file_url are returned. |
Filterable Fields
| Field | Type | Description |
|---|---|---|
| report_id | int | Report IDs. |
| request_uuid | string | Report request UUID. |
| user_id | int | IDs of users for whom the report was prepared. |
Request Example
{
"filters": [
{
"Field": "request_uuid",
"Operator": "Equal",
"Value": "f20c8f37-8bcb-4f7c-8dc5-8b0b2f4f0c11"
},
{
"Field": "report_id",
"Operator": "Equal",
"Value": "5"
},
{
"Field": "user_id",
"Operator": "Equal",
"Value": "5"
}
],
"include_data": false
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | Array of ReportPrepared | Result object. |
Response Example
{
"ok": true,
"result": [
{
"user": {
"id": 5,
"name": "Manager"
},
"request_uuid": "f20c8f37-8bcb-4f7c-8dc5-8b0b2f4f0c11",
"file_url": "https://cdn.example.test/token/report_f20c8f37.json.gz",
"description": null,
"warnings": null,
"parameters": "{\u0022firm_id\u0022:2,\u0022stock_ids\u0022:[8]}",
"report": {
"id": 5,
"group": {
"id": 2,
"parent_id": 0,
"name": "Sales reports",
"name_var": "REPORT_GROUP_SALES",
"last_update": 1772527200
},
"name": "Retail sales by item",
"name_var": "REPORT_RETAIL_SALES_BY_ITEM",
"last_update": 1772527200
},
"data": null,
"saved": false,
"date": 1772527200
}
]
}