[API-706] Time Blocks and Timesheets not found

Posts about the simPRO API. Help/support/how-to etc.
Forum rules
  • Check the documentation first. Before posting questions, please check the documentation to ensure it doesn't already cover what you need.
  • No spam. All automated messages, advertisements, and links to competitor websites will be deleted immediately.
  • Post in relevant sub-forums only. Messages posted in the wrong topic area will be removed and placed in the correct sub-forum by moderators.
  • Respect other users. No flaming or abusing fellow forum members. Users who continue to post inflammatory, abusive comments will be deleted from the forum after two warnings are issued by moderators.
  • Harassment. No threats or harassment of other users will be tolerated. Any instance of threatening or harassing behavior is grounds for deletion from the forums.
  • Adult content. No profanity or pornography is allowed. Posts containing adult material will be deleted.
  • Bandwidth. All images and signatures must be 500 x 500 pixels or smaller. Posts containing over-sized images and signatures will be removed.
  • Illegal content. No re-posting of copyrighted materials or other illegal content is allowed. Any posts containing illegal content or copyrighted materials will be deleted.
Post Reply
Jupiter-Andrew
Posts: 5
Joined: Thu Oct 24, 2019 7:45 pm

[API-706] Time Blocks and Timesheets not found

Post by Jupiter-Andrew » Sat Oct 26, 2019 9:05 pm

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?
Attachments
where are my blocks?!?
where are my blocks?!?
Screenshot at 2019-10-26 16-04-34.png (91.65 KiB) Viewed 6207 times
Muqeet
Posts: 772
Joined: Mon Dec 03, 2018 3:24 am

Re: Time Blocks and Timesheets not found

Post by Muqeet » Mon Oct 28, 2019 12:38 am

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
Muqeet
API Developer | simPRO Software Group
SamD
Posts: 11
Joined: Thu Mar 14, 2019 11:48 pm

Re: Time Blocks and Timesheets not found

Post by SamD » Mon Oct 28, 2019 3:48 am

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
Muqeet
Posts: 772
Joined: Mon Dec 03, 2018 3:24 am

Re: Time Blocks and Timesheets not found

Post by Muqeet » Mon Oct 28, 2019 5:21 am

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
Muqeet
API Developer | simPRO Software Group
Jupiter-Andrew
Posts: 5
Joined: Thu Oct 24, 2019 7:45 pm

Re: [API-706] Time Blocks and Timesheets not found

Post by Jupiter-Andrew » Tue Oct 29, 2019 3:58 pm

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.
Muqeet
Posts: 772
Joined: Mon Dec 03, 2018 3:24 am

Re: [API-706] Time Blocks and Timesheets not found

Post by Muqeet » Wed Oct 30, 2019 12:53 am

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
Muqeet
API Developer | simPRO Software Group
Post Reply