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.

The maximum allowed range is one year. If this limit is exceeded, the request will return a 400 Bad Request error, indicating Data range is too big in the message.

If the employee identifier does not exist in the business, the request will return a 400 Bad Request error indicating Employee not found in the message.

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

What is a counter?