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.
function queryRewards(query: CursorQuery): Promise<QueryRewardsResponse>;
Query parameters.
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
}
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.