Date time reference in attendance API

Hi all,

I am looking at the attendance API API Reference - SKY API. I am looking to pass along the date and the time back to a student attendance record. Does anyone know if I need to use the begin_date and end_date which is listed as a date time data type and start_time and end_time is listed as a string. In the example below however, the begin and end dates seem to have time listed but the begin and end times do not have a time listed.

"begin_date": "2021-09-30T12:00:00Z",    "end_date": "2021-09-30T12:00:00Z",    "start_time": "2026-01-16",    "end_time": "2026-01-16",

This seems contradictory. Can someone share if I need to use both or just one or the other? All four fields are listed as not required.

Thanks,

Bipin

Best Answer

  • @Bipin Prakash we used this API for about a year before we ended up switching to a different process. It did work fine (no API issues). Here is an example I found from Postman on how we sent the data over for a specific student:

    {  "student_user_id": 111111111
    ,  "begin_date": "2024-05-30T00:00:00+00:00"
    ,  "end_date": "2024-05-30T00:00:00+00:00"
    ,   "start_time": "09:15:00"
    ,  "end_time": "10:00:00"
    ,  "excuse_type_id": 6126
    ,  "excuse_comment": ""}

    If I remember right, if you don't include a start and end time, it will update attendance for anything that falls on that date range. Same if you don't include an end_time. it will update everything from the start_time provided for the rest of the day. I hope that helps.

Answers

  • Adding detail to this issue. When I add the start_time and end_time as date functions (like in the sample), the flow loops endlessly. It functions normally as soon as I take it out and just have begin and end date.

    Thanks,

    Bipin

  • @Lindsey Bryant Thank you so much. I ended up with the same realization as well. The documentation is incorrect with the sample json so thank you for validating it. I appreciate the tip about not including the end time. In this instance actually not including end time works better for me because it will mark the student absent until they come back to class and is marked as present (or not absent).

    Best,

    Bipin

Categories