How to Handle Attachments in Invoice, Bill and Credit Memo
August 5, 2025
Unified.to provides a standardized way to read, upload, and manage attachments (e.g., invoices, receipts, contracts) across various integrations like accounting, CRM, and etc platforms. Here's everything you need to know to get started with attachments via the Storage File endpoint.
๐ How to Check If an Integration Supports Attachments
To check if a specific integration supports reading or writing attachments:
- Go to the Integration Page in the Unified.to dashboard.
- Navigate to Feature Support.
- Select the relevant endpoint (e.g.,
Accounting โ Invoice). - Look under Readable Fields โ if
attachmentsis listed, the endpoint supports reading attachments.
๐ ๏ธ Tip: You can also check support programmatically using the /storage endpoint.
๐ How to List All Attachments
To fetch all available attachments across an integration:
- Use the
GET /storage(Storage File List) endpoint.
โ ๏ธ Note: Most integrations do not support listing all attachments globally. Unified.to reflects this limitation. However, some integrations like Sage do support it.
๐ How to Fetch Attachments for a Specific Record (e.g., Invoice)
To get attachments for a specific entity like an invoice, bill, or candidate:
- Use the
GET /storageendpoint. - Pass the corresponding
parent_id(e.g.,invoice_id) in the query parameters.
Example:
http
CopyEdit
GET /storage-file?parent_id=inv_1234
๐งพ How to Get Details of a Specific Attachment
To retrieve metadata (name, file type, size, etc.) of a particular attachment:
- Use either:
GET /storage/:idโ to get a single attachmentGET /storageโ to filter and retrieve multiple files with query params
๐ฅ How to Download an Attachment
We return a secure download_url in the response when you fetch an attachment. You can use this URL to download the file directly.
โ ๏ธ Note: The download_url is time-limited and expires after a few minutes for security reasons. Always use the URL shortly after fetching.
๐ค How to Upload or Create an Attachment
To upload a new attachment:
- Go to the Integration Page and confirm the
storage-fileendpoint is supported under Feature Support. - Use the
POST /storage-fileendpoint with required fields.
Key fields:
namedata(base64 encoded) |download_urlparent_id(e.g.,invoice_id,bill_id,employee_id)
Unified.to will automatically associate the attachment with the parent entity.
Example payload:
json
CopyEdit
{
"file_name": "invoice-august.pdf",
"file_data": "base64-encoded-data",
"parent_id": "inv_1234"
}
๐งท How to Associate an Attachment with an Entity
When uploading a file, simply set the parent_id to the ID of the resource (invoice, bill, employee, etc.). Unified.to handles the rest โ no extra linking needed.
๐ฌ Questions or Requests?
- If you're unsure whether an integration supports attachments for a specific resource type, reach out to our support team.
- If a feature isn't currently supported, let us know! We're always looking to expand support where possible.