Skip to content

Add attachment read functionality for invoices and manual journals#109

Open
kitebuggy wants to merge 1 commit intoXeroAPI:mainfrom
kitebuggy:feature/attachment-read
Open

Add attachment read functionality for invoices and manual journals#109
kitebuggy wants to merge 1 commit intoXeroAPI:mainfrom
kitebuggy:feature/attachment-read

Conversation

@kitebuggy
Copy link
Copy Markdown
Contributor

Adds tools to list and download file attachments from Xero invoices and manual journals.

Features

  • List attachments for invoices/bills
  • List attachments for manual journals
  • Download attachment content as base64
  • Generic handler pattern for code reusability

Use Cases

  • Audit trail verification
  • Document processing
  • Compliance checking
  • Source document retrieval

Implementation

  • Generic handlers support any entity type
  • Consistent response formatting
  • Error handling

Files Changed

  • New: 7 tool files (2 handlers, 4 tools, 1 formatter)

Testing

  • Tested with PDF, JPEG, PNG attachments
  • Verified base64 encoding/decoding
  • Tested error scenarios
  • Confirmed empty attachment lists handled correctly

Implements tools to list and download attachments from Xero records:
- list-invoice-attachments: List files on invoices/bills
- list-manual-journal-attachments: List files on manual journals
- get-invoice-attachment: Download invoice attachment content
- get-manual-journal-attachment: Download manual journal attachment

Uses generic handler pattern for code reusability and consistency.
Attachments are returned as base64-encoded content for processing.

Use cases:
- Audit trail verification (match source documents to bills)
- Document processing (extract data from receipts/invoices)
- Compliance checking (verify documentation exists)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant