> 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: getReward(_id: string) # Method package: wixLoyaltyV2 # Method menu location: wixLoyaltyV2 --> rewards --> getReward # Method Link: https://dev.wix.com/docs/velo/apis/wix-loyalty-v2/rewards/get-reward.md # Method Description: Retrieves a reward. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## getReward example for dashboard page code ```javascript import { rewards } from 'wix-loyalty.v2'; async function getReward(id) { try { const result = await rewards.getReward(id); return result; } catch (error) { console.error(error); // Handle the error } } ``` ## getReward 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 elevatedGetReward = elevate(rewards.getReward); export const getReward = webMethod( Permissions.Anyone, async (id) => { try { const result = await elevatedGetReward(id); return result; } catch (error) { console.error(error); // Handle the error } } ); ``` ---