getAccountBySecondaryId( )

Retrieves the loyalty account of the specified site contact or member.

The getAccountBySecondaryId() function returns a Promise that resolves to the specified loyalty account when it is retrieved.

This function gets a loyalty account using either a customer's contact ID or member ID. You can also get an account using the loyalty account ID with the getAccount() function.

Note: Only visitors with Manage Loyalty permissions can retrieve a loyalty account.

Admin Method

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

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Loyalty
Manage Loyalty
Learn more about permission scopes.
Method Declaration
Method Parameters

ID of the customer to retrieve loyalty account for.

Return Type:Promise<GetAccountBySecondaryIdResponse>
Was this helpful?