Hello there, I am trying to receive a list of loyalty rewards, but for some reason, it only gives me accounts rather than the rewards themselves. How would I go around fixing it? Thank you.
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:
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.
The code you’ve shared is correct for retrieving a list of loyalty rewards using the Square Loyalty API. If you’re receiving a list of accounts instead of rewards, it’s possible that you might be calling the wrong function.
Ensure that you’re calling the listLoyaltyRewards() function to retrieve a list of loyalty rewards. If you’re trying to retrieve a list of loyalty accounts, you should be using the searchLoyaltyAccounts() function instead.
If you’re still facing issues, it might be helpful to check the response you’re getting from the API for any error messages or unexpected data.