Post

3 followers Follow
0
Avatar

Updating Timesheet Duration via API

We are attempting to update Timesheet durations via the API by POSTing the following JSON to https://api.clarizentb.com/v2.0/services/data/objects/Timesheet/5un2xduvus1yygwms9j7mbpqi218 :

{
"Duration": "0.00h"
}

We then receive the following error: Clarizen Admin is not allowed to Update '05/28/21' Timesheet.

The timesheets are approved, however we are able to update this same duration field via a Workflow, is this possible to do via API? Do we have to change the state first even if its not required by the Workflow?

Croft, Rebecca Answered

Please sign in to leave a comment.

2 comments

0
Avatar

Hi Rebecca,

Please try using the following instead and let me know if it works:

{
  "Duration": {"value": 0, "unit": "Hours"}
}

Thank you,

Roland

Roland Pumputis 0 votes
Comment actions Permalink
0
Avatar

Thanks Roland, I gave that a try and received the same error.  It looks like if I use the API to first change the state back to Un Submitted, then it will allow me to update the Duration.  This could be a bit tricky for us to manage because we have workflows that automatically submit and approve anything coming from the API.  I had to disable them in order to test this scenario.  

Croft, Rebecca 0 votes
Comment actions Permalink