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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

Using pagination on Business Central API

(1) ShareShare
ReportReport
Posted on by 37

Hi 

I am on Business Central Online.

I have a GET API that retrieves the number of Contacts in Business Central.

It works but there is a hard 20,000 limit for the number of contacts in the system.

I believe that there should be some pagination logic that I can use on the API to get the remaining records after the 20,000.  

Any assistance or URL will be greatly appreciated. 

Eng Siong Tan

I have the same question (4)
  • Suggested answer
    Nitin Verma Profile Picture
    21,794 Moderator on at

    Hi Predator75 ,

    Can you try with the filter in the API so that you can get all your records partially?

    Thanks.

  • Predator75 Profile Picture
    37 on at

    Hi Nitin

    Great idea for things with sequential numbers.

    EC0*

    EC1*

    EC2*

    However, this does not solve the issue for master records without a sequential primary no.

    May I know if you are aware of pagination or batching solutions?

    Thanks

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

    Hi Predator75 ,

    Did you try below filters in your api?

    ?$filter=No_ ='@*EC0*'

  • Suggested answer
    Predator75 Profile Picture
    37 on at

    Thank you. And Yes. It works for the EC0*, EC1*, EC2*.

    This solves my current Contact issue.

    The reason why I asked is that I have an Item Master with records more than 10K.

    Which I also need to export out.

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

    Hi Predator75 ,

    If you can use Configuration package, it will also export the data out.

    See if that works for you.

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at

    Business Central API follows the odata standard for paging, and when there are more pages of data to retrieve the @odata.nextlink property is included in the response which you can use to create another request to get the next page of information. This pattern can be repeated until the @odata.nextlink is null or missing to get to the end of the dataset.

  • Suggested answer
    Predator75 Profile Picture
    37 on at

    Yes. Thank you very much.

    The odata.nextlink works and it is alot more user friendly. Or at least it is more what we would expect from Microsoft.

  • BS-30120640-0 Profile Picture
    2 on at
    @Stefano Demiliani hey stefano, pagination with skipToken is not working for documentAttachments resource and also companies. Can you help here? I tried same for invoice and customers, and they are working fine.
    This is the error: 
    {
    "error": {
    "code": "SkipTokenIsNoLongerValid",
    "message": "Skip token is no longer valid: Attachment Entity Buffer: {00000000-0000-0000-0000-000000000000}. CorrelationId: 4622526f-b5be-482f-b2fe-134fb8e2cb04."
    }
    }
     
    and url:
    {{rest_base_url}}/documentAttachments?$orderby=id&$schemaVersion=2.1&$tenantId={{source_account_id}}&$skipToken=24344c33-b4df-f011-8542-002248d4fba7&aid=FIN

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,933 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,055 Super User 2026 Season 1

#3
Teagen Boll Profile Picture

Teagen Boll 640 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans