Validate
[POST] .../v1/reportbuilder/validate
Validates a report builder draft. Check a draft before creating a queued builder report. The method does not create a report request or processing task. Submit filters as an array of Field, Operator and string Value. Use only fields and operators returned by GetSchema, specify each field once and separate In values with commas. Empty lists are represented by omitting the filter. IDs must be positive; dates use Unix seconds and start_date must not exceed end_date. Field-reference placeholders are not supported. Send the current draft after structure, filter or option changes, even before required filters are filled. Availability contains every filter and option keyed by its schema identifier; enabled controls are shown, required filters must be filled and reason_code explains disabled controls. Effective_parameters contains only normalized active filters and options with schema defaults applied. Inactive values are removed with warnings; unsupported options are disabled. Options with scope=presentation are returned in prepared report options for the frontend renderer. The API checks company and warehouse access for semantically valid drafts when the domain schema declares firm_id and stock_id. Crm and WorkTime do not require company scope. An incomplete or semantically invalid draft, including invalid filter or option values, is returned as ok=true with result.valid=false, errors, availability and effective_parameters so the client can update the panel. The caller must have report-builder permission 759 and an account tariff with report builder enabled; missing body, denied access, unavailable tariff, company/warehouse access failures, builder service connectivity errors and malformed builder responses are returned as HTTP 200 ErrorResult.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| domain | String | Required | Report builder domain code, for example Nomenclature. |
| filters | Array of Filter | Optional | Report filters using Field, Operator and string Value. Allowed fields and operators come from GetSchema. In values are comma-separated; dates use Unix seconds. Specify each field once. |
| name | String | Optional | User-visible report name. |
| options | Object | Optional | Options keyed by schema.options codes. Use JSON booleans, numbers or allowed enum strings. Omitted active values use schema defaults; inactive values are ignored. Validate returns availability and effective_parameters. |
| structure | ReportBuilderStructure | Required | Selected report table structure. |
Filterable Fields
Load the available filter fields and operators from POST /reportbuilder/getschema using the same domain value. Read the returned result.filters metadata.
Request Example
{
"domain": "Nomenclature",
"name": "Stock by warehouse",
"structure": {
"row_groups": [
"item_group.name",
"item.name"
],
"row_columns": [
"item.code",
"unit.name"
],
"column_groups": [
"stock.name"
],
"metrics": [
"stock_balance.current_quantity",
"stock_balance.stock_cost_amount"
]
},
"filters": [
{
"Field": "firm_id",
"Operator": "Equal",
"Value": "1"
},
{
"Field": "stock_id",
"Operator": "In",
"Value": "1,2"
},
{
"Field": "date",
"Operator": "Equal",
"Value": "1798732800"
},
{
"Field": "currency_id",
"Operator": "Equal",
"Value": "1"
}
],
"options": {
"include_totals": true
}
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | ReportBuilderValidationResult | Result object. |
Response Example
{
"ok": true,
"result": {
"valid": true,
"errors": [],
"warnings": [],
"required_filters": [
"firm_id",
"date",
"currency_id"
],
"resolved_data_plan": {
"result_grain": [
"item.id",
"stock.id"
],
"metric_sources": [
"StockBalance"
],
"source_grains": {
"StockBalance": [
"item.id",
"stock.id",
"date"
]
},
"column_group": {
"field": "stock.name",
"group_key": "stock.id",
"compatible_sources": [
"StockBalance"
]
},
"lookups": [
"item",
"stock"
],
"notes": []
}
}
}