Edit
[POST] .../v1/reportbuildertemplate/edit
Edits a current user's report builder template. Use this method to replace an existing report builder template owned by the current user. The request identifies the template by id and stores the full new domain, name, description, structure, filters and options payload. Templates owned by another user are treated as missing. This method requires billing db version 406 or later and an account tariff with report builder enabled; older account databases return ErrorResult 1008 and disabled tariff returns ErrorResult 7501. The caller must have report-builder permission 759; missing body, denied access, unavailable tariff, missing template, invalid fields, oversized template payload and persistent storage errors are returned as HTTP 200 ErrorResult.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| description | String | Optional | Optional template description. |
| domain | String | Required | Report builder domain code. |
| filters | Object | Optional | Saved report business filters. |
| id | Int64 | Required | Template ID. |
| name | String | Required | User-visible template name. |
| options | Object | Optional | Saved report rendering and calculation options keyed by codes returned in schema.options. |
| structure | ReportBuilderStructure | Required | Saved report table structure. |
Request Example
{
"id": 10,
"domain": "Nomenclature",
"name": "Stock by warehouse",
"description": "Current stock balance grouped by item and warehouse.",
"structure": {
"row_groups": [
"item_group.name",
"item.name"
],
"row_columns": [
"item.code",
"unit.name"
],
"column_groups": [
"stock.name"
],
"metrics": [
"stock_balance.current_quantity"
]
},
"filters": {
"firm_id": 1,
"stock_ids": [
1,
2
]
},
"options": {
"include_totals": true
}
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | Update | Update operation result. |
Response Example
{
"ok": true,
"result": {
"row_affected": 1
}
}