Search Loyalty Rewards API returns an empty response

Search Loyalty Rewards API does not return anything, it returns an empty dict {}.

I have a production square account with Loyalty Program enabled.
I have created a loyalty account for a customer, and have multiple events where the customer has redeemed rewards.

However, I only get an empty response (not even with a rewards key) with status code 200.
The results are same when I set status field to other values (ISSUED, DELETED)

result = client.loyalty.search_loyalty_rewards( body = { "query": { "loyalty_account_id": "<redacted>", "status": "REDEEMED" }, "limit": 20 } )

:waving_hand: I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:

Additional Documentation

Search for Loyalty Events
Retrieve Loyalty Program
Loyalty API

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.

What’s your application ID and is the account with the Loyalty program the same account that has the application ID? :slight_smile:

What’s your application ID

Application ID is sq0idp-lGWxZGmuu6PoIhuFUgLK9g

is the account with the Loyalty program the same account that has the application ID?

Yes, I am sure because other loyalty API endpoint ( Search loyalty events) return a valid response with event data, using the same loyalty account id. :+1:

Hi, any updates on this?