getAllRates
Retrieve all enterprise pricing rates from the Mews hospitality platform. Filter results by rate IDs, service IDs, rate groups, or update dates to access current pricing data.
Instructions
Returns all rates (pricing) of the enterprise
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| RateIds | No | Filter by specific rate IDs | |
| ServiceIds | No | Filter by service IDs | |
| RateGroupIds | No | Filter by rate group IDs | |
| UpdatedUtc | No | Date range filter for rate updates |
Implementation Reference
- src/tools/rates/getAllRates.ts:41-54 (handler)The main handler function for the getAllRates tool. It processes input arguments and makes an HTTP request to the Mews API endpoint '/api/connector/v1/rates/getAll' to retrieve all rates.async execute(config: MewsAuthConfig, args: unknown): Promise<ToolResult> { const inputArgs = args as Record<string, unknown>; const requestData = { ...inputArgs }; const result = await mewsRequest(config, '/api/connector/v1/rates/getAll', requestData); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
- src/tools/rates/getAllRates.ts:8-39 (schema)Input schema defining the parameters for filtering rates: RateIds, ServiceIds, RateGroupIds, and UpdatedUtc range.inputSchema: { type: 'object', properties: { RateIds: { type: 'array', items: { type: 'string' }, description: 'Filter by specific rate IDs', maxItems: 1000 }, ServiceIds: { type: 'array', items: { type: 'string' }, description: 'Filter by service IDs', maxItems: 1000 }, RateGroupIds: { type: 'array', items: { type: 'string' }, description: 'Filter by rate group IDs', maxItems: 1000 }, UpdatedUtc: { type: 'object', properties: { StartUtc: { type: 'string', description: 'Start of update date range (ISO 8601)' }, EndUtc: { type: 'string', description: 'End of update date range (ISO 8601)' } }, description: 'Date range filter for rate updates' } }, additionalProperties: false },
- src/tools/index.ts:55-55 (registration)Import statement for the getAllRatesTool.import { getAllRatesTool } from './rates/getAllRates.js';
- src/tools/index.ts:139-142 (registration)Registration of getAllRatesTool (and related) in the allTools array used for tool registry and lookup.// Rates tools getAllRatesTool, getRatePricingTool,