Attachments
Learn how to upload files (receipts, invoices, documents) to synced transactions.
Overview
Attachments allow you to link files to expenses, bills, invoices, and other transactions that have been synced to your accounting system. This is useful for:
Receipts - Attach receipt images to expenses
Invoices - Link invoice PDFs to bills
Supporting Documents - Add contracts, agreements, or other files
Prerequisites
Before uploading an attachment, ensure:
✅ The transaction has been synced successfully to the accounting system
✅ You have the
syncIdandtransactionIdfrom the sync response✅ The file is in a supported format (see below)
Supported File Types
Images: JPG, JPEG, PNG, GIF
Documents: PDF, DOC, DOCX, XLS, XLSX, TXT, CSV
Max File Size: 10 MB
Uploading an Attachment
Endpoint
Path Parameters
connectionId
string (UUID)
The connection ID for the accounting system
syncId
string (UUID)
The sync batch ID from when you created the transaction
transactionId
string (UUID)
The transaction ID (expense ID, bill ID, etc.)
Request
The request must be sent as multipart/form-data:
Form Fields
file
file (binary)
✅
The file to upload
note
string
❌
Optional note/description for the attachment
includeOnSend
boolean
❌
If true, attachment is included when sending the transaction via email (default: false)
lineInfo
string
❌
For line-item specific attachments (advanced)
Example: Upload Receipt to Expense
Example: JavaScript/TypeScript
Example: Python
Response
Success Response (201 Created)
Error Responses
400 Bad Request
404 Not Found
413 Payload Too Large
Getting Transaction IDs
After creating an expense, bill, or invoice, you'll receive a syncBatchId. Use this to get the transaction details:
The response includes sync items with entityId (your transaction ID) and integrationResponse (accounting system ID).
Attachment Categories
Attachments are automatically categorized based on the transaction type:
Expense- Attached to expensesBill- Attached to billsInvoice- Attached to invoicesQuote- Attached to quotes
Best Practices
Wait for sync completion - Only upload attachments after the transaction has synced successfully
Use appropriate file sizes - Compress images before uploading
Include descriptive notes - Help users understand what the attachment is
Handle errors gracefully - Implement retry logic for network failures
Validate file types - Check file type before uploading
Limitations
Max file size: 10 MB per file
Supported formats: Images (JPG, PNG, GIF) and documents (PDF, DOC, DOCX, XLS, XLSX, TXT, CSV)
One file per request: Upload multiple files with separate requests
Transaction must be synced: Cannot attach to pending transactions
Next Steps
Expense Management - Create and sync expenses
Sync & Monitoring - Track sync status
Link Integration - Connect accounting systems
Last updated