Discussions

Ask a Question
Back to All

Occasional 400 Error on Posting Attendance [REOPEN]

Original Text: "Hi,

I am getting an issue with the POST attendance endpoint, occasionally on some requests I am getting a 400 "Overlapping Attendance Period" error even though there were no attendance period that I am writing too. Even more confusing with this error it is still writing the Attendance period however I lose the 'context' of the attendance as I need to write the AttendanceId to an external system for future editing.

Any help with this would but very much appreciated.

Thank You."

Took a while to get the requested data, but I have managed, which is located below.

23-Jul-2023 05:48:27 UTC

Request:

{"attendances":[{"employee":"11559317","date":"2023-07-19","start_time":"07:45","end_time":"11:00","break":"30","comment":"Work Time Recording"}],"skip_approval":false}

Response:

{"success":false,"error":{"code":400,"message":"Error when trying to insert Attendances periods rows","detailed_message":[{"success":false,"error_msg":"Existing overlapping attendances periods","id":null,"employee":11559317,"date":"2023-07-19","start_time":"07:45","end_time":"11:00","break":30,"comment":"Work Time Recording","project_id":null}]}}

16-Jul-2023 15:02:56 UTC

Request:

{"attendances":[{"employee":"6671159","date":"2023-07-12","start_time":"06:30","end_time":"17:30","break":"45","comment":"Work Time Recording"}],"skip_approval":false}

Response:

{"success":false,"error":{"code":400,"message":"Error when trying to insert Attendances periods rows","detailed_message":[{"success":false,"error_msg":"Existing overlapping attendances periods","id":null,"employee":6671159,"date":"2023-07-13","start_time":"06:30","end_time":"16:30","break":45,"comment":"Work Time Recording","project_id":null}]}}

15-Jul-2023 11:07:00 UTC

Request:

{"attendances":[{"employee":"13603707","date":"2023-07-11","start_time":"08:00","end_time":"16:30","break":"30","comment":"Work Time Recording"}],"skip_approval":false}

Response:

{"success":false,"error":{"code":400,"message":"Error when trying to insert Attendances periods rows","detailed_message":[{"success":false,"error_msg":"Existing overlapping attendances periods","id":null,"employee":13603707,"date":"2023-07-10","start_time":"08:00","end_time":"18:00","break":45,"comment":"Work Time Recording","project_id":null}]}}

15-Jul-2023 11:07:01 UTC

Request:

{"attendances":[{"employee":"13603707","date":"2023-07-12","start_time":"14:00","end_time":"17:30","break":"0","comment":"Work Time Recording"}],"skip_approval":false}

Response:

{"success":false,"error":{"code":400,"message":"Error when trying to insert Attendances periods rows","detailed_message":[{"success":false,"error_msg":"Existing overlapping attendances periods","id":null,"employee":13603707,"date":"2023-07-12","start_time":"14:00","end_time":"17:30","break":0,"comment":"Work Time Recording","project_id":null}]}}

15-Jul-2023 11:07:02 UTC

Request:

 {"attendances":[{"employee":"13603707","date":"2023-07-12","start_time":"08:00","end_time":"14:00","break":"30","comment":"Work Time Recording"}],"skip_approval":false}

Response:

{"success":false,"error":{"code":400,"message":"Error when trying to insert Attendances periods rows","detailed_message":[{"success":false,"error_msg":"Existing overlapping attendances periods","id":null,"employee":13603707,"date":"2023-07-12","start_time":"08:00","end_time":"14:00","break":30,"comment":"Work Time Recording","project_id":null}]}}