deleteLoyaltyPrograms
Remove loyalty programs from the Mews hospitality platform by specifying their unique identifiers. This tool helps manage customer loyalty offerings by deleting outdated or inactive programs.
Instructions
Deletes loyalty programs
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| LoyaltyProgramIds | Yes | Unique identifier of the loyalty programs to be deleted |
Implementation Reference
- The execute function that handles the tool logic by making an HTTP request to the Mews API endpoint '/api/connector/v1/loyaltyPrograms/delete' and returning the result as JSON.async execute(config: MewsAuthConfig, args: unknown): Promise<ToolResult> { const result = await mewsRequest(config, '/api/connector/v1/loyaltyPrograms/delete', args); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
- Input schema defining the required 'LoyaltyProgramIds' as an array of strings (up to 1000 items).inputSchema: { type: 'object', properties: { LoyaltyProgramIds: { type: 'array', items: { type: 'string' }, description: 'Unique identifier of the loyalty programs to be deleted', maxItems: 1000 } }, required: ['LoyaltyProgramIds'], additionalProperties: false },
- src/tools/index.ts:164-165 (registration)Registers deleteLoyaltyProgramsTool in the allTools array alongside other loyalty tools.updateLoyaltyProgramsTool, deleteLoyaltyProgramsTool,
- src/tools/index.ts:80-80 (registration)Imports the deleteLoyaltyProgramsTool for registration.import { deleteLoyaltyProgramsTool } from './loyalty/deleteLoyaltyPrograms.js';