- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Hi All
I am working on Square Java API and when I am trying to call the listCustomers method, its throwing the following exception , Please help.
com.squareup.connect.ApiException: {"errors":[{"category":"INVALID_REQUEST_ERROR","code":"INVALID_VALUE","detail":"Pagination cursor is not compatible with this request.","field":"cursor"}]}
Here is my code :
ListCustomersResponse result = apiInstance.listCustomers(cursor);
List<Customer> customers = result1.getCustomers();
for(Customer customer : customers){
//System.out.println(customer.getGivenName() + " = " + customer.getId() );
List<Card> customerCards = customer.getCards();
for(Card card : customerCards){
System.out.println(customer.getEmailAddress() + "," + customer.getId() + "," + card.getId());
}
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
Hey @joshyuster, thanks for reaching out here and sorry to hear about the trouble. I don't have the answer on hand right now but I'll surface your post with our API Team. We'll be back a soon as we have any additional insight.
Also, in the future—feel free to check out Square Connect's Stack Overflow page. It's been a great resource for our developer community, and there's already a ton of questions that have been answered there.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
Circling back here—it looks like you were able to get in touch with our API Team by the time we got tor your post. Hopefully you were able to get everything sorted out. Our Engineering Team will be working to address the cursor issues. If anything else comes up, feel free to reply here or follow up with the team member assisting with your case.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report