5 years ago
Unable to get previous timesheets, only current timesheet can be retrieved
Hi, I am trying to query for past timesheets using Postman and am able to only get the current week's timesheet data (while no filter is used). This query does not work: (see screenshot bel...
- 5 years ago
Hi there.
Thank you for reaching out and apologise for the delayed response.
The /{cf_uri}/Payroll/Timesheet endpoint contains a query/filter by default in the URI response of your standard request.
This query is compulsory and is what enables this area to display the timesheets in the current period without needing to have your own query to do so.
What I recommend is copy this URI from your response and use it as a template to create the query.
You will notice that this query isn't quite formatted like our typical Odata filters.
Here is what it will look like:https://ar1.api.myob.com/accountright/36c69572-d2a7-4539-86df-5d47256d098c/Payroll/Timesheet/d6a5a299-0c4e-40f1-9a98-df1575cdf9d1?StartDate=2020-10-21T00:00:00&EndDate=2020-10-27T00:00:00"
Edit the details/date and run your GET request using this and you will be able to display the timesheets within the date range.
If you have any difficulty with this let me know.
Kind regards