getReward( )


Retrieves a reward.

Permissions
Manage Loyalty
Read Loyalty
Learn more about app permissions.
Method Declaration
Copy
function getReward(_id: string): Promise<Reward>;
Method Parameters
_idstringRequired

ID of the reward to retrieve.

Returns
Return Type:Promise<Reward>
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 } }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?