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
Request
The request must be sent asmultipart/form-data:
Form Fields
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 asyncBatchId. Use this to get the transaction details:
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