Retrieves a reward.
function getReward(_id: string): Promise<Reward>;
ID of the reward to retrieve.
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
}
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.