Time off api returning only pending status types

Using javascript i’ve tried the following:
const url = https://api.clockify.me/api/v1/workspaces/${workspaceId}/time-off/requests;
const response = await $.http.post(url, {
headers: {
‘X-Api-Key’: $.auth.data.apiKey,
‘Content-Type’: ‘application/json’,
},
data: {
start,
end,
statuses: [‘ALL’],
page,
pageSize: 50,
},
});

note that the statuses is ALL (I’ve also tried APPROVED & the same structure as the sample payload from the api documentations relating to checking all time off requests from a workspace.

What’s been happening is that no matter what I do with the statuses syntax wise or removing it as well, the response always only shows statuses that have the type PENDING. I’ve added test cases with rejected and approved but they never show up. I’ve even tried just approved thinking maybe then, the response would be null but that’s not the case, I still only see pending status types. Could someone please point out what’s wrong with what I’ve done?

Side note, I’ve ensured to make the start and end dates align to when I created the rejected/approved requests too so I don’t think the issue lies within the time window. Also, i’ve tried talking marks “” instead of quotes ‘’ surrounding ALL and it still leads to the same issue.

Hi @Peter,

Appreciate you bringing this to our attention! It certainly looks like something we should investigate.

For the most efficient support, could you drop an email to support@clockify.me? Our API specialists are best equipped to look into this thoroughly. When you do, please include the API call link and its body - this would be useful to them for the investigation.

Thank you in advance!