[POST] .../v1/target/gethistory
Returns target history. Use this method to inspect progress periods for a target selected from Target/Get. The response returns the target object and ordered history items with period bounds, target value, accumulated progress and calculated percentage; the OpenAPI filters metadata describes the supported target id selector for this history lookup. The caller must have select permission for the target owner scope; missing body, invalid id, missing target, denied permissions and storage errors 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. |
Filterable Fields
| Field | Type | Description |
|---|---|---|
| id | int | Record ID. |
Request Example
{
"filters": [
{
"Field": "id",
"Operator": "Equal",
"Value": "12"
}
]
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | TargetHistory | Result object. |
Response Example
{
"ok": true,
"result": {
"target": {
"id": 12,
"name": "Monthly sales amount",
"target_type": {
"id": 4,
"name": "Sales amount",
"name_key": "SALES_AMOUNT",
"description": "Sales amount target",
"last_update": 1712345600
},
"owner": "Firm",
"period_type": "Month",
"period": 1,
"value": 50000000.00,
"repeateable": true,
"finished": false,
"firm": {
"id": 2,
"name": "REGOS Retail"
},
"stock": {
"id": 8,
"name": "Main store"
},
"currency": null,
"user": null,
"last_update": 1712345600
},
"data": [
{
"start_date": 1711929600,
"end_date": 1714521599,
"value": 50000000.00,
"progress": 23500000.00,
"percent": 47
}
]
}
}