queryRewards( )


Retrieves a list of rewards, given the provided paging, filtering, and sorting.

Query Rewards runs with these defaults, which you can override: cursorPaging.limit is 50.

To learn about working with Query endpoints, see API Query Language,Sorting and Paging,and Field Projection.

Permissions
Manage Loyalty
Read Loyalty
Learn more about app permissions.
Method Declaration
Copy
function queryRewards(query: CursorQuery): Promise<QueryRewardsResponse>;
Method Parameters
queryCursorQueryRequired

Query parameters.

Returns
Return Type:Promise<QueryRewardsResponse>
JavaScript
import { rewards } from "wix-loyalty.v2"; async function queryRewards(query) { try { const result = await rewards.queryRewards(query); return result; } catch (error) { console.error(error); // Handle the error } }
Errors

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

Did this help?