web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

API call to get time sheets returns no result with status 200 OK

(0) ShareShare
ReportReport
Posted on by 5

I have an issue I hope you can help me with. I have an API call to get the list of time sheets in Business Central using an OAUTH2 token.

GET REQUEST from Postman: api.businesscentral.dynamics.com/.../timeRegistrationEntries ge 2022-04-04 and date le 2022-06-06

When I send this request in Postman, I get a 200 OK response, but there are no time sheet values (the response reads "Value": [])

I expected to see below time sheets:

pastedimage1654201768035v1.png

 

I have other requests to the same company that work e.g., get list of accounts
GET REQUEST from Postman: api.businesscentral.dynamics.com/.../accounts

If you can point me in the direction of the problem it would be much appreciated.

Thank you,

Lisa

I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    95,329 Super User 2025 Season 2 on at

    Hi, It looks like there is a problem with your filtering.

    The following is a simple example, I have not used timeRegistrationEntries api, so I publish Time Sheets to the Web Service, and then filter the date in PostMan.

    pastedimage1654216417540v2.png

    pastedimage1654216481547v3.png

    My Data:

    pastedimage1654217038541v4.png

    In Post man

    api.businesscentral.dynamics.com/.../TimeSheets ge 2022-05-09 and Starting_Date le 2022-05-16

    pastedimage1654217228776v5.png

    More details about filter in APIs: https://yzhums.com/6117/#toc8

    Hope this helps.

    Thanks.

    ZHU

  • Suggested answer
    Nitin Verma Profile Picture
    21,698 Moderator on at

    Hi LisaH,

    As yzhums mentioned, looks like its filtering problem, I would suggest put the same date filters on time sheet page before calling the API, and check what result you are getting in Page, and then same filters you can try with API

    Thanks.

  • Suggested answer
    LisaSH Profile Picture
    5 on at

    Hi YUN ZHU,

    I have followed your advice and wrote API Query to get time sheets instead of using timeRegistrationEntries. It works with the same filters that I could not make work with timeRegistrationEntries.

    Thank you

    Lisa

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,229

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,867 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,153 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans