siigo_get_payment_receipt
Retrieve a specific payment receipt from Siigo accounting software using its unique ID to access payment details and records.
Instructions
Get a specific payment receipt by ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Payment receipt ID |
Implementation Reference
- src/siigo-client.ts:180-182 (handler)Core handler function that makes the GET request to Siigo API /v1/payment-receipts/{id}async getPaymentReceipt(id: string): Promise<SiigoApiResponse<any>> { return this.makeRequest<any>('GET', `/v1/payment-receipts/${id}`); }
- src/index.ts:1036-1039 (handler)MCP server handler that invokes SiigoClient.getPaymentReceipt and formats response as JSON textprivate async handleGetPaymentReceipt(args: any) { const result = await this.siigoClient.getPaymentReceipt(args.id); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
- src/index.ts:589-595 (schema)Input schema validation requiring 'id' string parametertype: 'object', properties: { id: { type: 'string', description: 'Payment receipt ID' }, }, required: ['id'], }, },
- src/index.ts:129-130 (registration)Tool registration in the switch statement dispatching to handlercase 'siigo_get_payment_receipt': return await this.handleGetPaymentReceipt(args);
- src/siigo-client.ts:41-59 (helper)Helper function that handles authentication and makes authenticated HTTP requests to Siigo API using axiosprivate 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}`); } }