Page 1 of 1
[API-706] Time Blocks and Timesheets not found
Posted: Sat Oct 26, 2019 9:05 pm
by Jupiter-Andrew
I'm trying to build a labor report and I need hours from the workOrders. Per the documentation this should be easy:
cURL this:
https://jmt.simprosuite.com/api/v1.0/co ... rders/1797
and I get an empty array for
Blocks on all of my workorders. Appending
?display=all does not help. The Blocks array remains empty despite there being timeblocks viewable on the work order in SimPRO Enterprise.
So then I try timesheets...
cURL this:
https://jmt.simprosuite.com/api/v1.0/co ... imesheets/
and I get a completely empty array on the return despite that being a valid employeeID.
What's going on? Do these features actually work for anyone else?
Re: Time Blocks and Timesheets not found
Posted: Mon Oct 28, 2019 12:38 am
by Muqeet
Hey Andrew,
We are looking into this issue, and will release a patch to fix it. In the meantime you can use schedules endpoint to get time blocks while we fix blocks within work orders.
/api/v1.0/companies/{companyID}/jobs/{jobID}/sections/{sectionID}/costCenters/{costCenterID}/schedules/
Regarding seeing no response within timesheets for a valid employee... Timesheet endpoint for an employee returns schedule for a day. You can change that by providing a range of dates through StartDate and EndDate parameters. When a parameter is not provided, the value is defaulted to system's current date.
/api/v1.0/companies/{companyID}/employees/{employeeID}/timesheets/?StartDate=2019-10-21&EndDate=2019-10-28
Thanks
Muqeet
Re: Time Blocks and Timesheets not found
Posted: Mon Oct 28, 2019 3:48 am
by SamD
Hi Muqeet ,
I am also facing the same problem , missing time blocks in the timesheets. It shows in the Simpro front end , but in API time blocks are missing. Hence numbers are not tallying as per the front end timesheets.
I am using below API call to get the schedules of the employee as per the documentation.
"https://Company.simprosuite.com/api/v1 ... eSize=250"
As per your suggestion if I try to use TimeSheets under employee . Return value does not provide the type of Schedule i.e Normal / OT / DT/…
So unable to use the Timesheet api since I need to get individual Schedule type.
Pls kindly advise.
Thank you.
Best,
Sam
Re: Time Blocks and Timesheets not found
Posted: Mon Oct 28, 2019 5:21 am
by Muqeet
Hi Sam,
I think you are referring to ScheduleRate within WorkOrders endpoint. We are working on the fix for that issue.
If you are looking for ScheduleRate, you can get it through Job cost center schedule endpoint
http://developer.simprogroup.com/apidoc ... 71d4b48ce2
Timesheets under employees endpoint, you will get a _href field which you can use to get ScheduleRate as well.
Thanks
Muqeet
Re: [API-706] Time Blocks and Timesheets not found
Posted: Tue Oct 29, 2019 3:58 pm
by Jupiter-Andrew
Dear Muqeet,
Thank you for confirming my problem.
When is the patch expected to be live? and will there be any announcement?
We need this API bug fixed in order to generate some reports. Using schedules is too time-consuming because you must cURL every schedule twice to get the IsLocked value and we rely on that to discriminate between completed / scheduled but unused / future schedules.
Re: [API-706] Time Blocks and Timesheets not found
Posted: Wed Oct 30, 2019 12:53 am
by Muqeet
Hey Andrew,
The patch for this issue is due to be released with upcoming standard simpro release. It should be out by next friday, I will also update this thread when its out.
Thanks
Muqeet