> 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: updateReward(_id: string, reward: UpdateReward) # Method package: wixLoyaltyV2 # Method menu location: wixLoyaltyV2 --> rewards --> updateReward # Method Link: https://dev.wix.com/docs/velo/apis/wix-loyalty-v2/rewards/update-reward.md # Method Description: Updates a loyalty reward. Call this method to update details of a reward, such as the name, whether a reward is active, or the amount of points it costs to redeem. Also call this method to add new tiers that are eligible to redeem a reward. You may not change the `type` of a reward. That's set upon creation and can't be updated. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## updateReward example for dashboard page code ```javascript import { rewards } from 'wix-loyalty.v2'; async function updateReward(id, reward) { try { const result = await rewards.updateReward(id, reward); return result; } catch (error) { console.error(error); // Handle the error } } ``` ## updateReward 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 elevatedUpdateReward = elevate(rewards.updateReward); export const updateReward = webMethod( Permissions.Anyone, async (id, reward) => { try { const result = await elevatedUpdateReward(id, reward); return result; } catch (error) { console.error(error); // Handle the error } } ); ``` ---