# AirCall - Retrieving More than 10,000 Calls

**URL:** <https://connective.celigo.com/t/aircall-retrieving-more-than-10-000-calls/1000>\
**Category:** Integrator.io\
**Tags:** pagination, aircall\
**Created:** [November 27, 2024, 4:35pm UTC](https://connective.celigo.com/t/aircall-retrieving-more-than-10-000-calls/1000 "2024-11-27T16:35:30Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![daveguderian](https://avatars.discourse-cdn.com/v4/letter/d/ce7236/32.png) [@daveguderian](https://connective.celigo.com/u/daveguderian)\
**Post date:** [November 27, 2024, 4:35pm UTC](https://connective.celigo.com/t/aircall-retrieving-more-than-10-000-calls/1000/1 "2024-11-27T16:35:30Z")

</div>

I am needing to retrieve more than 10,000 calls from the AirCall API, but even using the “from” parameter it is still only retrieving 10,000 calls. Reading through the API documentation it seems that over 10,000 calls is possible, but I am wondering if this is a flow where I would need to a custom paging method in order to do so.

[https://developer.aircall.io/api-references/#list-all-calls](https://developer.aircall.io/api-references/#list-all-calls)

Current setup

 ![5301043caa20740200000001-c295eadda16c4cb184fb9bc859dd5418.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/a/af0be4dc04b387ed912aafbea4928c1b0252a187.png)

 ![5301043caa20740200000001-fc5efa013698433c9e4ae7e847982c83.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/4/4f1e09218da169a702c3af285164bfef75beeb7a.png)

---

<div class="post-metadata">

**Author:** ![sreevaniamara](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/sreevaniamara/32/6926_2.png) [@sreevaniamara](https://connective.celigo.com/u/sreevaniamara)\
**Post date:** [November 27, 2024, 5:54pm UTC](https://connective.celigo.com/t/aircall-retrieving-more-than-10-000-calls/1000/2 "2024-11-27T17:54:31Z")

</div>

@daveguderian ,

Try setting the “Paging method” field to “Custom relative URI” and

“Override relative URI for subsequent page requests” field to   
`{{{replace (replace previous_page.full_response.meta.next_page_link 'https://api.aircall.io/v1' '') 'https://api.aircall.io/v1' ''}}}`

---

<div class="post-metadata">

**Author:** ![tylerlamparter](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/tylerlamparter/32/9204_2.png) [@tylerlamparter](https://connective.celigo.com/u/tylerlamparter)\
**Post date:** [November 27, 2024, 6:15pm UTC](https://connective.celigo.com/t/aircall-retrieving-more-than-10-000-calls/1000/3 "2024-11-27T18:15:59Z")

</div>

@daveguderian it looks like 10,000 is the limit when using paging. You should instead just keep passing the `from` variable:

 ![5301043caa20740200000001-9d4693a9ceea4469a079ebe8437aa51a.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/b/b0d98ec12f3d193e1210c89bb4e34296ce3f6c4f.png)

You won't be able to use the “export type = all”, you'll need to use “export type = delta”, then set it up like this:

 ![5301043caa20740200000001-eec8c3d9c47e498b8e67336513505740.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/0/00c9511fc0898704e6905e9367be96f05cf6108a.png)

Then for paging, do this:

`?from={{{previous_page.last_record.started_at}}}`

 ![5301043caa20740200000001-9e480126d95f47e2bb0e789063cc7030.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/0/0f6fbb7c6c772ba8d404726b12e59420b49e14fb.png)

---

<div class="post-metadata">

**Author:** ![daveguderian](https://avatars.discourse-cdn.com/v4/letter/d/ce7236/32.png) [@daveguderian](https://connective.celigo.com/u/daveguderian)\
**Post date:** [November 27, 2024, 8:43pm UTC](https://connective.celigo.com/t/aircall-retrieving-more-than-10-000-calls/1000/4 "2024-11-27T20:43:52Z")

</div>

Thank you both @sreevaniamara and @tylerlamparter !

I tied to use Tyler's method but am receiving an error. I couldn't see the HTTP Method, but tried both POST and PUT and both had errors. I mirrored what was in the screenshots, but it doesnt seem to be working for me.

 ![5301043caa20740200000001-0784399269b640cea501ebd9b4b94357.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/a/a49dbbf9f6e6cfa36b827f72c43d63c21592d1ab.png)

 ![5301043caa20740200000001-be5b5105f4bf40848ea906abfc2bdbb7.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/a/afdd6f5f6620eaf9c05f657c843f049508c72372.png)

POST Body:

```
{
 "meta": {
   "count": 20,
   "total": 2234,
   "current_page": 1,
   "per_page": 20,
   "next_page_link": "https://api.aircall.io/v1/calls?order=asc&page=2&per_page=20",
   "previous_page_link": null
 }
}
```

---

<div class="post-metadata">

**Author:** ![tylerlamparter](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/tylerlamparter/32/9204_2.png) [@tylerlamparter](https://connective.celigo.com/u/tylerlamparter)\
**Post date:** [November 27, 2024, 8:45pm UTC](https://connective.celigo.com/t/aircall-retrieving-more-than-10-000-calls/1000/5 "2024-11-27T20:45:19Z")

</div>

@daveguderian the /mirror is just a dummy endpoint. You would use your actual endpoint which is /calls.

---

<div class="post-metadata">

**Author:** ![daveguderian](https://avatars.discourse-cdn.com/v4/letter/d/ce7236/32.png) [@daveguderian](https://connective.celigo.com/u/daveguderian)\
**Post date:** [November 27, 2024, 8:53pm UTC](https://connective.celigo.com/t/aircall-retrieving-more-than-10-000-calls/1000/6 "2024-11-27T20:53:59Z")

</div>

Thanks @tylerlamparter . I had actually tried that thinking that the /mirror was a dummy endpoint, but still receive the same error even with /calls.

 ![5301043caa20740200000001-9bf094470f07489b96353733f1cd8e71.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/3/313a9fef838bd02cc55b8ae7f019608f7074f80b.png)

I am thinking something might need to be adjusted in the relative URI, perhaps?

 ![5301043caa20740200000001-e4f4c5b50d174f74ad0d60b9e423cd99.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/e/eb9d5f4644cfdda4022648c1209a8720816ccf68.png)

---

<div class="post-metadata">

**Author:** ![tylerlamparter](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/tylerlamparter/32/9204_2.png) [@tylerlamparter](https://connective.celigo.com/u/tylerlamparter)\
**Post date:** [November 27, 2024, 9:10pm UTC](https://connective.celigo.com/t/aircall-retrieving-more-than-10-000-calls/1000/7 "2024-11-27T21:10:52Z")

</div>

@daveguderian tough to tell, but I'm guessing there are no results, then it tries to reference the field in handlebars even though there are no results. Can you enable the debug log in the top right and see what the api calls are? Would need to see what the status code, response is, etc. There may be 2 requests, one that works and one that doesn't. Maybe also try hardcoding in some unix timestamps to see.

---

<div class="post-metadata">

**Author:** ![daveguderian](https://avatars.discourse-cdn.com/v4/letter/d/ce7236/32.png) [@daveguderian](https://connective.celigo.com/u/daveguderian)\
**Post date:** [November 27, 2024, 9:40pm UTC](https://connective.celigo.com/t/aircall-retrieving-more-than-10-000-calls/1000/8 "2024-11-27T21:40:17Z")

</div>

I am only seeing one request with each run. Below is the request and response I am seeing.

 ![5301043caa20740200000001-4ef1a0e97ca544ed94c21433385d3226.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/9/9886762aa8a7a90a27fd154468b3d20a86759b57.png)

 ![5301043caa20740200000001-eda5cf9ac34540bf8d7cc3e6717586ee.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/a/a8de2679dd4006d70135ba04736ab43c3685f2db.png)

---

<div class="post-metadata">

**Author:** ![tylerlamparter](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/tylerlamparter/32/9204_2.png) [@tylerlamparter](https://connective.celigo.com/u/tylerlamparter)\
**Post date:** [November 27, 2024, 9:53pm UTC](https://connective.celigo.com/t/aircall-retrieving-more-than-10-000-calls/1000/9 "2024-11-27T21:53:30Z")

</div>

@daveguderian my bad, the page relative url field would be `/calls?from={{{previous_page.last_record.started_at}}}`. I missed ading the /calls.

---

<div class="post-metadata">

**Author:** ![daveguderian](https://avatars.discourse-cdn.com/v4/letter/d/ce7236/32.png) [@daveguderian](https://connective.celigo.com/u/daveguderian)\
**Post date:** [November 27, 2024, 10:12pm UTC](https://connective.celigo.com/t/aircall-retrieving-more-than-10-000-calls/1000/10 "2024-11-27T22:12:53Z")

</div>

Hmmm, Im still running into the same error upon execution. I'm just not even sure where to look. My POST body is right off the developer page. Would that need to be changed potentially?

 ![5301043caa20740200000001-ac5eb7d53d9c4944ae05baf86568d38b.png](https://us1.discourse-cdn.com/flex001/uploads/celigo/original/2X/0/0cd47fe3137a3efd14a287847672c9bbb9382a60.png)

---

<div class="post-metadata">

**Author:** ![tylerlamparter](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/tylerlamparter/32/9204_2.png) [@tylerlamparter](https://connective.celigo.com/u/tylerlamparter)\
**Post date:** [November 27, 2024, 10:14pm UTC](https://connective.celigo.com/t/aircall-retrieving-more-than-10-000-calls/1000/11 "2024-11-27T22:14:16Z")

</div>

@daveguderian it's a GET call, not POST.

---

<div class="post-metadata">

**Author:** ![daveguderian](https://avatars.discourse-cdn.com/v4/letter/d/ce7236/32.png) [@daveguderian](https://connective.celigo.com/u/daveguderian)\
**Post date:** [November 27, 2024, 10:22pm UTC](https://connective.celigo.com/t/aircall-retrieving-more-than-10-000-calls/1000/12 "2024-11-27T22:22:16Z")

</div>

That was my point of confusion! I wasn't clear why you had the request body populated so thought it must have been a POST or PUT request even though GET is what made sense!

Thanks for working through this with me @tylerlamparter . Really appreciate your help today getting this working!

---

<div class="post-metadata">

**Author:** ![tylerlamparter](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/tylerlamparter/32/9204_2.png) [@tylerlamparter](https://connective.celigo.com/u/tylerlamparter)\
**Post date:** [November 27, 2024, 10:23pm UTC](https://connective.celigo.com/t/aircall-retrieving-more-than-10-000-calls/1000/13 "2024-11-27T22:23:33Z")

</div>

@daveguderian yeah I was just using our own /v1/mirror api to mimic the response your api was giving: [https://connective.celigo.com/t/post-and-receive-sample-data-with-the-mirror-api-endpoint/314](https://connective.celigo.com/t/post-and-receive-sample-data-with-the-mirror-api-endpoint/314)
