Search Loyalty Account - loyalty_accounts Question

I am looking for some clarification on the loyalty_accounts response from a search. The fact there’s an Array makes me believe if a customer has multiple loyalty accounts from different loyalty programs they all show up when searched? Or does the fact you’re making the request through the store’s access token restrict it to the one already?

If the former is a case could I put a request to add query mappings of program and/or the customer’s loyalty ID. I can manually make a search on my backend for the time being.

You will not be able to see their loyalty accounts from other merchants, no. It returns an array because you can do very broad searches and it can return multiple (or even all) loyalty accounts for the given Square account. For instance, you can call SearchLoyaltyAccounts with literally no parameters at all to return all loyalty accounts for the Square merchant account tied to the access token being used.

Perfect thank you for clarifying that!