Get counter historical values by employee

This endpoint returns a list of counter historical values recorded for an employee within a specified time range.

GET /api/v1/businesses/{businessId}/employees/{employeeId}/counter-historical-values?from={yyyy-MM-dd}&to={yyyy-MM-dd}

If the data included in the request is correct —both the businessId and the employeeId— the response will contain the list of counter historical values for the employee within the defined time range.

Response example

[
    {
        "day": "2026-02-08",
        "counterShortName": "THS-C",
        "key": "counter.weekly_total_hours",
        "value": 240.0
    },
    {
        "day": "2026-02-15",
        "counterShortName": "THM",
        "key": "counter.monthly_total_hours",
        "value": 120.0
    }
]
Details
  • day: date of the historical value in yyyy-MM-dd format.

  • counterShortName: short name of the counter the historical value belongs to. The custom version will be returned if it has been modified; otherwise, the default short name will be used.

  • key: internal key of the counter associated with the historical value.

  • value: value recorded in the counter for the specified day.

Considerations

The from and to parameters are not mandatory. If they are not included in the request, the queried range will default to the last year.

If no historical values are recorded for the employee within the queried range, the request will return an empty array [].

Error codes

In addition to the common errors, this endpoint can return the following codes:

Code Message Description

400 Bad Request

Employee not found

The provided employee identifier does not exist in the business. Unlike other endpoints, this error is returned as a 400, not as a 404. It is recommended to verify the identifier through Get employee information.

Data range is too big

The range between from and to exceeds the maximum allowed of 367 days (approximately one year). It is recommended to narrow the queried date range.

From date cannot be after to date

The from date is later than to. It is recommended to check the order of the parameters before sending them.

What is a counter?