Absences API - mixed up attribute values

  • 22 September 2022
  • 1 reply

Userlevel 1
Badge +2

Hi Personians,

Did anyone face the problem with mixed up values returned by Absence API?

The endpoint we are using is: /company/time-offs

let responseAbsences = UrlFetchApp.fetch('' + reportStartDate + '&updated_to=' + reportEndDate, getAuthOptions());

Code used for packaging up the rows is similar to this:

requestedFields.forEach(function (field) {

switch (field) {

case 'created_at':

return row.push(absence.attributes.created_at.substring(0,10));

case 'start_date':

return row.push(absence.attributes.start_date.substring(0,10));

case 'end_date':

return row.push(absence.attributes.end_date.substring(0,10));

case 'days_count':

return row.push(absence.attributes.days_count);

case 'time_off_type':

return row.push(;

case 'comment':

return row.push(absence.attributes.comment);

case 'time_off_category':

return row.push(absence.attributes.time_off_type.attributes.category);

case 'employee':

return row.push(absence.attributes.employee.attributes.first_name.value + " " + absence.attributes.employee.attributes.last_name.value);

case 'email':

return row.push(;

case 'status':

return row.push(absence.attributes.status);

case 'created_by':

return row.push(absence.attributes.created_by);


return row.push('');


The issue we are facing is that created_by is in majority of the cases the name of some other employee (who didn't have anything to do with reporting this person's absence). Typically, it's a mix up of people who did report absences during the same day, but as if it's shifted by 1 or two rows (e.g. out of 6 people that reported absence by 9 AM this morning, for 5 of them Created By filed had value which was pointing to name of the other person that reported the absence that morning too, but not themselves).

Also, Days Count is sometimes exact and sometimes much bigger than it should be (e.g. person is taking one day off, and days count shows 4).


Any idea what might be going on here?


Thank you and have a great day,


1 reply

Userlevel 4
Badge +10

Dear @Vida,

Thank you for sharing this issue with us! 

As you also mentioned, this mixed up information in the absence API is most probably due to a system error. I cannot certify this, since I don’t have access to your account, but we have not had any general issue in the absence API that would signify that several users have been affected by this. 

In this case, I would suggest you to contact my colleagues for the support team via Find Answers. My colleagues will be able to log in into your account and check the settings together with you.

Please let me know if there is anything else I can support you with.

I wish you a lovely weekend.



Your reply