Hello Rivka,
Please try changing "Duration": "6h" to "Duration": {"unit": "Hours", "value": 6}
I hope this helps.
Roland
https://apie.clarizentb.com/V2.0/services/data/objects/timesheet
httpWebRequest.Method = "PUT"
{"workitem":"/Task/5l67u2atthj1gv5h1n3k8l4da2850","reportedby":"/User/304f42d5-97bd-4dd9-b917-30be9788dc93","duration":"6h","reportedDate":"2021-04-28","comment":"some comment"}
the timesheet is added
but the response is:
'The remote server returned an error: (500) Internal Server Error.'
Please sign in to leave a comment.
Hello Rivka,
Please try changing "Duration": "6h" to "Duration": {"unit": "Hours", "value": 6}
I hope this helps.
Roland
The same response also with this request
{"workitem":"/Task/28994vnrq0cn3vfb9m2v8ez993010","reportedby":"/User/7df36c82-41d4-445a-99a0-3851aee51149","duration":{"unit":"Hours","value":6},"reportedDate":"2021-05-04","comment":"some comment"}
Hi Rivka,
I've tested the following in my demo account and it worked:
Could you please also try using https://apie1.clarizentb.com/V2.0/services/data/objects/timesheet as the API endpoint?
Have you made sure the task is Active and Reportable?
If it still does not work, please create a support ticket.
Thank you,
Roland