How to fetch All contacts, in result api it will return only 25

Dear Support Team,

I am using Contacts API for fetch all records from Freeagent but currently
It is fetching only 25 records. Can you please suggest me how to fetch all
contacts records?

I have tried all params which mentioned on freeagent api section but still
getting only 25 records.

I have more than 100 contacts.

Hi Sunil,

Peter here from FreeAgent. Sorry to hear you’ve had some trouble, I’m sure
I can help!

When the FreeAgent API returns multiple items, they will be paginated and
by default we return 25 items per page. I believe what you are seeing is
just the first page of returns.
If you would like more items to be included in each page you can set the
‘per_page’ param in the request, although this is limited to 100 items per
page.

To see further items, you will need to navigate the pagination and make
your requests accordingly. To make this easier you could also use the
relative links contained in the Link header to navigate between pages.

This link to the docs explains further how you can make requests to
different pages of results. Specifically, have a look under the
‘Pagination’ header at the bottom:
https://dev.freeagent.com/docs/introduction

Hope this helps,
Peter

Thanks Peter for reply.

One more thing, for projects api, api result will come into pagination
also?On Wednesday, 27 July 2016 14:30:27 UTC+1, Peter Singh wrote:

Hi Sunil,

I have had a look and it appears you are indeed correct here.

Results from categories are not paginated and will return all records in
one request. This appears to be an oversight and you should expect that
other API responses should be paginated.

I apologise for the confusion however I hope that this at least you are
now able to fetch all your contact records.

Kind Regards,
Peter

On Wednesday, 27 July 2016 11:01:13 UTC+1, su...@webequator.com wrote:

Thanks Peter.

But in all other APIs like categories, this API is retuning all records
(239 items) in single call. APIs Responses are different for different
API?

On Wednesday, July 27, 2016 at 9:50:12 AM UTC+1, Peter Singh wrote:

Hi Sunil,

Peter here from FreeAgent. Sorry to hear you’ve had some trouble, I’m
sure I can help!

When the FreeAgent API returns multiple items, they will be paginated
and by default we return 25 items per page. I believe what you are seeing
is just the first page of returns.
If you would like more items to be included in each page you can set the
‘per_page’ param in the request, although this is limited to 100 items per
page.

To see further items, you will need to navigate the pagination and make
your requests accordingly. To make this easier you could also use the
relative links contained in the Link header to navigate between pages.

This link to the docs explains further how you can make requests to
different pages of results. Specifically, have a look under the
‘Pagination’ header at the bottom:
FreeAgent Developer Dashboard

Hope this helps,
Peter

Thanks Peter.

But in all other APIs like categories, this API is retuning all records
(239 items) in single call. APIs Responses are different for different
API?On Wednesday, July 27, 2016 at 9:50:12 AM UTC+1, Peter Singh wrote:

Hi Sunil,

Peter here from FreeAgent. Sorry to hear you’ve had some trouble, I’m sure
I can help!

When the FreeAgent API returns multiple items, they will be paginated and
by default we return 25 items per page. I believe what you are seeing is
just the first page of returns.
If you would like more items to be included in each page you can set the
‘per_page’ param in the request, although this is limited to 100 items per
page.

To see further items, you will need to navigate the pagination and make
your requests accordingly. To make this easier you could also use the
relative links contained in the Link header to navigate between pages.

This link to the docs explains further how you can make requests to
different pages of results. Specifically, have a look under the
‘Pagination’ header at the bottom:
FreeAgent Developer Dashboard

Hope this helps,
Peter

Hi Sunil,

I have had a look and it appears you are indeed correct here.

Results from categories are not paginated and will return all records in
one request. This appears to be an oversight and you should expect that
other API responses should be paginated.

I apologise for the confusion however I hope that this at least you are now
able to fetch all your contact records.

Kind Regards,
PeterOn Wednesday, 27 July 2016 11:01:13 UTC+1, su...@webequator.com wrote:

Thanks Peter.

But in all other APIs like categories, this API is retuning all records
(239 items) in single call. APIs Responses are different for different
API?

On Wednesday, July 27, 2016 at 9:50:12 AM UTC+1, Peter Singh wrote:

Hi Sunil,

Peter here from FreeAgent. Sorry to hear you’ve had some trouble, I’m
sure I can help!

When the FreeAgent API returns multiple items, they will be paginated and
by default we return 25 items per page. I believe what you are seeing is
just the first page of returns.
If you would like more items to be included in each page you can set the
‘per_page’ param in the request, although this is limited to 100 items per
page.

To see further items, you will need to navigate the pagination and make
your requests accordingly. To make this easier you could also use the
relative links contained in the Link header to navigate between pages.

This link to the docs explains further how you can make requests to
different pages of results. Specifically, have a look under the
‘Pagination’ header at the bottom:
FreeAgent Developer Dashboard

Hope this helps,
Peter

Hi again Sunil,

Yes, I believe that results from the projects endpoint will be paginated.

Also, I think you may find the Google OAuth Playground an easy way to
further explore the API:

All the best,
PeterOn Thursday, 28 July 2016 22:36:32 UTC+1, sunil kansodiya wrote:

Thanks Peter for reply.

One more thing, for projects api, api result will come into pagination
also?

On Wednesday, 27 July 2016 14:30:27 UTC+1, Peter Singh wrote:

Hi Sunil,

I have had a look and it appears you are indeed correct here.

Results from categories are not paginated and will return all records in
one request. This appears to be an oversight and you should expect that
other API responses should be paginated.

I apologise for the confusion however I hope that this at least you are
now able to fetch all your contact records.

Kind Regards,
Peter

On Wednesday, 27 July 2016 11:01:13 UTC+1, su...@webequator.com wrote:

Thanks Peter.

But in all other APIs like categories, this API is retuning all records
(239 items) in single call. APIs Responses are different for different
API?

On Wednesday, July 27, 2016 at 9:50:12 AM UTC+1, Peter Singh wrote:

Hi Sunil,

Peter here from FreeAgent. Sorry to hear you’ve had some trouble, I’m
sure I can help!

When the FreeAgent API returns multiple items, they will be paginated
and by default we return 25 items per page. I believe what you are seeing
is just the first page of returns.
If you would like more items to be included in each page you can set
the ‘per_page’ param in the request, although this is limited to 100 items
per page.

To see further items, you will need to navigate the pagination and make
your requests accordingly. To make this easier you could also use the
relative links contained in the Link header to navigate between pages.

This link to the docs explains further how you can make requests to
different pages of results. Specifically, have a look under the
‘Pagination’ header at the bottom:
FreeAgent Developer Dashboard

Hope this helps,
Peter