Search.../

updateTier( )

Developer Preview

Updates a loyalty tier.

Description

Use this endpoint to update tier-specific settings, such as the name and the required points threshold of an individual loyalty tier. To update global settings that apply to all of a site's loyalty tiers, use updateTiersProgramSettings().

Admin Method

This function requires elevated permissions to run. This function is not universal and runs only on the backend.

Syntax

function updateTier(_id: string, tier: UpdateTier): Promise<UpdateTierResponse>

updateTier Parameters

NAME
TYPE
DESCRIPTION
_id
string

Tier ID.

tier
UpdateTier

Tier info to update.

Returns

Return Type:

Promise<
UpdateTierResponse
>
NAME
TYPE
DESCRIPTION
tier
Tier

Updated loyalty tier.

Was this helpful?

updateTier example

Copy Code
1import { tiers } from 'wix-loyalty.v2';
2
3 async function updateTier(id, tier) {
4 try {
5 const result = await tiers.updateTier(id, tier);
6
7 return result;
8 } catch (error) {
9 console.error(error);
10 // Handle the error
11 }
12 }
13