Adding a new timesheet by day

serginho
serginho Member Posts: 8 Reckoner Reckoner

Hi, I am attempting to add a new timesheet via the API (using Postman)

https://api.reckon.com/r1/{{book}}/timesheets

But I am getting a 401 unauthorized. the scope that I am getting when connecting is

openid read write offline_access

Is there anything else I should be requesting to be able to CRUD the timesheet entries?


Just in case the API is behaving weirdly, this is what I am passing as the json body. I would assume if this was a problem the API would throw a bad data/request error of some sort.

{

"EmployeeId": "employeeid_guid",

"Date": "2020-09-21",

"Entries": [

{

"Date": "2020-09-21T00:00:00",

"CustomerId": "customerid_guid",

"ItemId": "itemid_guid",

"Notes": "Mon 21/09/2020",

"Time": "09:00",

"Billable": true,

"Status": 2,

"EmployeeId": "employeeid_guid",

"CashbookId": "bookid",

"PayrollPayItemId": "payrollpayitem_guid"

}

]

}


Thanks again for your help.

Comments

  • serginho
    serginho Member Posts: 8 Reckoner Reckoner

    I created the POST request in Postman (it wasn't in the collection of requests that Reckon supply us).

    and after a few attempts I realized that I was missing the header for Ocp-Apim-Subscription-Key

    this was the key. it is now working

  • Ifti
    Ifti Reckon Staff Posts: 258 Reckon Staff

    Thanks for confirming that it's working for you.