getAccountBySecondaryId( )


Retrieves the account belonging to the specified contact or member.

This method retrieves loyalty accounts using either a customer's contact ID or member ID. You can also retrieve an account using the loyalty account ID with Get Account.

Authentication

This function requires elevated permissions and runs only on the backend and on dashboard pages.

Permissions
Read Loyalty
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
optionsGetAccountBySecondaryIdOptionsRequired

ID of the customer to retrieve loyalty account for.

Returns
Return Type:Promise<GetAccountBySecondaryIdResponse>
Errors

This method doesn't return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?