Page 1 of 1

Endpoint for Timesheets as per Jobcard not Schedule ?

Posted: Wed Jun 01, 2022 7:54 am
by JohnSemmens
Hi Guys,
We're using the API to retrieve timesheets for a payroll system.
We are using the /employee - /timesheets GET query to retrieve timesheets for each employee:

Code: Select all

/api/v1.0/companies/2/employees/735/timesheets/?StartDate=2022-06-01&EndDate=2022-06-01
The results returned appear to be scheduled times for the employee.
Is it possible to retrieve the actual times recorded on the job card via the API ?

Re: Endpoint for Timesheets as per Jobcard not Schedule ?

Posted: Thu Jun 02, 2022 12:40 am
by Sindre
Hi,
I think this should help you get what you are after.

This endpoint includes the job cards for each employee.

Code: Select all

/api/v1.0/companies/{companyID}/jobWorkOrders/


You can search for a specific employee and choose to include information about the time blocks they are assigned. Try this:

Code: Select all

/api/v1.0/companies/{companyID}/jobWorkOrders/?Staff={staffID}&columns=ID,Staff,Blocks
Please see the documentation here
https://developer.simprogroup.com/apido ... 24ed48d99a

Re: Endpoint for Timesheets as per Jobcard not Schedule ?

Posted: Thu Jun 02, 2022 2:37 am
by JohnSemmens
Thanks Sindre,

I've tested and reconciled the results from the query:

Code: Select all

/api/v1.0/companies/{companyID}/jobWorkOrders/?Staff={staffID}&columns=ID,Staff,Blocks
Unfortunately, it also returns Scheduled time and not Actual time worked from Job Cards.

I don't think the API has an endpoint to return what we need, so we will use a different approach.
Thanks.

Re: Endpoint for Timesheets as per Jobcard not Schedule ?

Posted: Thu Jun 02, 2022 2:59 am
by Sindre
Hi,
We will move this to feature request and will give you an update when it has been implemented.