updateLoyaltyTiers
Modify loyalty program tiers in Mews hospitality platform by updating names, descriptions, levels, point requirements, benefits, and activation status.
Instructions
Updates information about the specified loyalty tiers
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ChainId | No | Unique identifier of the chain. Required when using Portfolio Access Tokens, ignored otherwise. | |
| LoyaltyTierUpdates | Yes | Loyalty tiers to be updated |
Implementation Reference
- The main handler function that sends the update request to the Mews loyalty tiers API endpoint using the mewsRequest utility.async execute(config: MewsAuthConfig, args: unknown): Promise<ToolResult> { const result = await mewsRequest(config, '/api/connector/v1/loyaltyTiers/update', args); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
- Input schema defining the parameters for updating loyalty tiers, including optional ChainId and array of tier updates.inputSchema: { type: 'object', properties: { ChainId: { type: 'string', description: 'Unique identifier of the chain. Required when using Portfolio Access Tokens, ignored otherwise.' }, LoyaltyTierUpdates: { type: 'array', items: { type: 'object', properties: { LoyaltyTierId: { type: 'string', description: 'Unique identifier of the loyalty tier' }, Name: { type: 'object', properties: { Value: { type: 'string', description: 'Name of the loyalty tier' } }, description: 'Name of the loyalty tier (or null if the name should not be updated)' }, Description: { type: 'object', properties: { Value: { type: 'string', description: 'Description of the loyalty tier' } }, description: 'Description of the loyalty tier (or null if the description should not be updated)' }, Level: { type: 'object', properties: { Value: { type: 'number', description: 'Level of the loyalty tier' } }, description: 'Level of the loyalty tier (or null if the level should not be updated)' }, MinimumPointsRequired: { type: 'object', properties: { Value: { type: 'number', description: 'Minimum points required to reach this tier' } }, description: 'Minimum points required to reach this tier (or null if the points should not be updated)' }, BenefitDescription: { type: 'object', properties: { Value: { type: 'string', description: 'Description of the benefits for this tier' } }, description: 'Description of the benefits for this tier (or null if the description should not be updated)' }, IsActive: { type: 'object', properties: { Value: { type: 'boolean', description: 'Whether the loyalty tier is active' } }, description: 'Whether the loyalty tier is active (or null if the status should not be updated)' } }, required: ['LoyaltyTierId'], additionalProperties: false }, description: 'Loyalty tiers to be updated', maxItems: 1000 } }, required: ['LoyaltyTierUpdates'], additionalProperties: false },
- src/tools/index.ts:83-83 (registration)Import statement bringing in the tool definition.import { updateLoyaltyTiersTool } from './loyalty/updateLoyaltyTiers.js';
- src/tools/index.ts:168-168 (registration)Adds the tool to the central allTools array used for tool registry and lookup.updateLoyaltyTiersTool,