# Pagination request fails: INVALID\_REQUEST\_ERROR - Pagination cursor is not compatible with this request

**URL:** <https://developer.squareup.com/forums/t/pagination-request-fails-invalid-request-error-pagination-cursor-is-not-compatible-with-this-request/1270>\
**Category:** Questions\
**Tags:** customers-api\
**Created:** [November 18, 2020, 9:22pm UTC](https://developer.squareup.com/forums/t/pagination-request-fails-invalid-request-error-pagination-cursor-is-not-compatible-with-this-request/1270 "2020-11-18T21:22:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![satish](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@satish](https://developer.squareup.com/forums/u/satish)\
**Post date:** [November 18, 2020, 9:22pm UTC](https://developer.squareup.com/forums/t/pagination-request-fails-invalid-request-error-pagination-cursor-is-not-compatible-with-this-request/1270/1 "2020-11-18T21:22:27Z")

</div>

I can retrieve customers in my Python application using Square SDK call customers.search\_customers() if I retrieve all of them in one call. But when I set “limit” parameter to any value that causes pagination and I use the cursor value in the previous response to send the request again to retrieve more customers, I get the following error.

[{‘category’: ‘INVALID\_REQUEST\_ERROR’, ‘code’: ‘INVALID\_VALUE’, ‘detail’: ‘Pagination cursor is not compatible with this request.’, ‘field’: ‘cursor’}]

I have tried many variations on setting the “cursor” value, have verified that I am sending the same cursor value that was received in previous response, and have verified that my requests don’t change at all except the addition of the cursor parameter. Can you please help me figure out what might be wrong with my API requests?

Additional info: I am using V2 API on sandbox with application ID: sandbox-sq0idb-ewExpZ\_WdzmzDqHP0cZU6Q In case you want to check the logs, one (of many) requests failed on November 18 1:22pm Pacific Time.

My request parameters are  
{‘limit’: 1, ‘query’: {‘filter’: {‘updated\_at’: {‘start\_at’: ‘2020-01-01T00:00:00Z’, ‘end\_at’: ‘2020-11-18T13:04:49’}}, ‘sort’: {‘field’: ‘CREATED\_AT’, ‘order’: ‘ASC’}}}

---

<div class="post-metadata">

**Author:** ![sjosey](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/sjosey/32/40_2.png) [@sjosey](https://developer.squareup.com/forums/u/sjosey)\
**Post date:** [November 19, 2020, 5:04pm UTC](https://developer.squareup.com/forums/t/pagination-request-fails-invalid-request-error-pagination-cursor-is-not-compatible-with-this-request/1270/2 "2020-11-19T17:04:19Z")

</div>

It looks like you’re setting the `end_at` at the current time or something. The initial request (in one example) used `end_at: "2020-11-18T13:22:01"`. However, the next request including the cursor used `end_at: "2020-11-18T13:22:03"`, which is not the same, which means it’s a different request. All the request parameters must be the same or the cursor will not work.

---

<div class="post-metadata">

**Author:** ![satish](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@satish](https://developer.squareup.com/forums/u/satish)\
**Post date:** [November 19, 2020, 5:09pm UTC](https://developer.squareup.com/forums/t/pagination-request-fails-invalid-request-error-pagination-cursor-is-not-compatible-with-this-request/1270/3 "2020-11-19T17:09:53Z")

</div>

Oh yes, that worked. I thought of end\_at as current time but the backend system sees this as just another time. Thanks for the clarification. Much appreciated.
