I'm trying to use the API to retrieve only billable hours.
If "billable" is set to anything other than "BOTH", the API responds with an error.
I'm using the following endpoint:
https://api.clockify.me/api/workspaces/[workspace id]/reports/summary/
This is my request body:
{
"archived": "Active",
"billable": "true",
"clientIds": [],
"description": "",
"endDate": "2019-05-31T23:59:59.999Z",
"firstTime": "true",
"includeTimeEntries": "true",
"me": "true",
"name": "",
"projectIds": [],
"startDate": "2019-01-01T00:00:00.000Z",
"tagIds": [],
"taskIds": [],
"userGroupIds": [],
"userIds": [],
"zoomLevel": "week"
}
The error message I receive if I set "billable" to "true" (or "false" for that matter..) is:
{
"message": "No enum constant com.clockify.domain.model.Billable.true",
"code": 501
}
From the official docs, the available values for the property "billable" are:
"BOTH", "BILLABLE", "NOT_BILLABLE"