API Request/Help - Time Cards

For requests or help with our API
Post Reply
Strettz
Posts: 3
Joined: Tue Nov 28, 2023 11:33 am

API Request/Help - Time Cards

Post by Strettz » Tue Nov 28, 2023 1:23 pm

Hello Open Dental team,

I was looking through the API documentation and noticed there doesn't seem to be an endpoint to access Time Card information. Would it be possible to create one? The only work around I have been able to think of would be to create a query and send the request using the queries API, however, I currently only have GET permissions and it would be much more convenient if I was able to create a simple GET request to a specific end point instead.

I was thinking something along the lines of:

Example Request:
GET /timecards?enddate=2023-12-03

Example Response:
[
{
"StartDate": "25888",
"EndDate": "2022-03-11",
"RegularTime": "00:00:00",
"Overtime": "00:00:00",
"Note": "",
"EmployeeFName": "",
"EmployeeLName": "",
"EmployeeNum": "0",
},

Or something like that. Please let me know! I am also willing to help with any of the development if necessary.

Thank you!

SLeon
Posts: 482
Joined: Mon Mar 01, 2021 10:00 am

Re: API Request/Help - Time Cards

Post by SLeon » Tue Nov 28, 2023 1:33 pm

Good afternoon,

Most of the data you are after is stored in the ClockEvent table. I would recommend referencing our schema here. We can add a ClockEvents GET endpoint to our development list. You will also need to obtain employee information from the Employee table, since the ClockEvent table only contains the EmployeeNum. We will add Employees GET to our development list as well.

Depending on your application, you may consider utilizing our Queries resource so your customers would've have to update to the version these methods get released in.

Strettz
Posts: 3
Joined: Tue Nov 28, 2023 11:33 am

Re: API Request/Help - Time Cards

Post by Strettz » Tue Nov 28, 2023 1:53 pm

Really appreciate the quick reply SLeon! That schema was very useful! I think the ClockEvents and Employees GET endpoints would be very useful to me as well so thank you for adding them to the list for me. Is there a typical timeframe I could expect for this update to roll out? I'm in no way asking for a rush on this as I'm sure you all are already very busy, but it would help to organize my calendar haha

I will probably subscribe to access the queries API in order to get something rolled out in the meantime. This is also an internal project so I won't have to worry about rolling this out to other customers.

Again, thank you for your response!

SLeon
Posts: 482
Joined: Mon Mar 01, 2021 10:00 am

Re: API Request/Help - Time Cards

Post by SLeon » Tue Nov 28, 2023 1:59 pm

API feature requests are started in the order in which they are received. I would estimate these to be completed in 6-8 weeks, and we will update this thread with our progress. :)

Strettz
Posts: 3
Joined: Tue Nov 28, 2023 11:33 am

Re: API Request/Help - Time Cards

Post by Strettz » Tue Nov 28, 2023 5:03 pm

Hey SLeon,
I've gotten access to the queries API and have created some queries in order to calculate the total time(Regular Time since we do not have any OT here) for each of my employees. While some are spot on, I seem to be running into some rounding logic errors and getting a slightly different total than what is shown in the TimeCard for the employee during that pay period. Could you provide me with some insight to how you are calculating the total regular time for an employee during the pay period (e.g., rounding to the nearest minute, rounding up/down at certain thresholds)?


Edit:
I was able to figure it out :lol:

SLeon
Posts: 482
Joined: Mon Mar 01, 2021 10:00 am

Re: API Request/Help - Time Cards

Post by SLeon » Wed Jan 10, 2024 8:41 am

Good morning,

We have completed the first part of your Feature Request. Employees GET has been added with GET (single) and GET (multiple) endpoints. This is available in our latest beta, version 23.3.22.

Development on ClockEvents GET will start soon, and we will update this thread once it is complete.

DerekR
Posts: 81
Joined: Wed Aug 31, 2022 1:13 pm

Re: API Request/Help - Time Cards

Post by DerekR » Wed Mar 20, 2024 8:08 am

We have completed the second part of your Feature Request. ClockEvents GET has been added with GET (single) and GET (multiple) endpoints. This is available in our latest beta, version 24.1.11.

Post Reply