Retrieving all the company details

I noticed that when I run the API call " /api/v2/companies " it only returns 30 records. This is due to Pagination where the API responses are paginated.

I have tried to adjust this value by using the per_page parameter, however, this could not resolve the issue. (The maximum number of objects that can be retrieved per page is 100. We have more than 100 companies. Invalid values and values greater than 100 will result in an error.)
Is there a possibility to retrieve all the company details at once?

Hi Chathuranga,

You need to add the page=2 (and so on till you get less than 100 returned) as a query parameter of the URL. The next URL you need is also in the returned header under a filed called link.

3 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.