> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: queryRewards(query: CursorQuery) # Method package: wixLoyaltyV2 # Method menu location: wixLoyaltyV2 --> rewards --> queryRewards # Method Link: https://dev.wix.com/docs/velo/apis/wix-loyalty-v2/rewards/query-rewards.md # Method Description: Retrieves a list of rewards with the specified 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](https://dev.wix.com/docs/rest/articles/get-started/api-query-language.md),[Sorting and Paging](https://dev.wix.com/docs/rest/articles/get-started/sorting-and-paging.md),and [Field Projection](https://dev.wix.com/docs/rest/articles/get-started/field-projection.md). # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## queryRewards example for dashboard page code ```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 } } ``` ## queryRewards example for exporting from backend code ```javascript import { rewards } from 'wix-loyalty.v2'; import { webMethod, Permissions } from 'wix-web-module'; import { elevate } from 'wix-auth'; const elevatedQueryRewards = elevate(rewards.queryRewards); export const queryRewards = webMethod( Permissions.Anyone, async (query) => { try { const result = await elevatedQueryRewards(query); return result; } catch (error) { console.error(error); // Handle the error } } ); ``` ---