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’}}}