siigo_get_payment_receipts
Retrieve payment receipt records from Siigo accounting software. Use this tool to access and manage payment documentation for invoices and transactions.
Instructions
Get list of payment receipts from Siigo
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number | |
| page_size | No | Number of items per page |
Implementation Reference
- src/index.ts:1031-1034 (handler)MCP tool handler that delegates to SiigoClient.getPaymentReceipts and formats the response as MCP content.private async handleGetPaymentReceipts(args: any) { const result = await this.siigoClient.getPaymentReceipts(args); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
- src/siigo-client.ts:176-178 (handler)Core implementation in SiigoClient that makes the authenticated GET request to Siigo API endpoint /v1/payment-receipts.async getPaymentReceipts(params?: { page?: number; page_size?: number }): Promise<SiigoApiResponse<any>> { return this.makeRequest<any>('GET', '/v1/payment-receipts', undefined, params); }
- src/index.ts:577-583 (schema)Input schema definition for the tool, defining optional pagination parameters.inputSchema: { type: 'object', properties: { page: { type: 'number', description: 'Page number' }, page_size: { type: 'number', description: 'Number of items per page' }, }, },
- src/index.ts:574-584 (registration)Tool registration in the list returned by getTools() for ListToolsRequest.{ name: 'siigo_get_payment_receipts', description: 'Get list of payment receipts from Siigo', inputSchema: { type: 'object', properties: { page: { type: 'number', description: 'Page number' }, page_size: { type: 'number', description: 'Number of items per page' }, }, }, },
- src/siigo-client.ts:41-59 (helper)Generic helper method used by all API calls, handling authentication and request execution.private async makeRequest<T>(method: string, endpoint: string, data?: any, params?: any): Promise<SiigoApiResponse<T>> { await this.authenticate(); try { const response: AxiosResponse<SiigoApiResponse<T>> = await this.httpClient.request({ method, url: endpoint, data, params, }); return response.data; } catch (error: any) { if (error.response?.data) { return error.response.data; } throw new Error(`API request failed: ${error.message}`); } }