Skip to main content
Many DualEntry records support file attachments, such as scanned invoices, receipts, and supporting documents. This guide explains the attachment schema, how to add attachments through the V2 API, and which attachment operations are and are not available. The same pattern applies to every record type that exposes an attachments sub-resource. These include invoices, bills, journal entries, sales orders, purchase orders, customer prepayments, customer deposits, customer refunds, cash sales, vendor refunds, and direct expenses.

The attachment schema

Each attachment is represented by an AttachmentSchemaOut object. The attachments field on a record’s create and read payloads is an array of these objects.
FieldTypeRequiredNotes
idintegerYesThe attachment’s unique identifier.
file_namestringYesThe display file name.
file_sizeintegerYesFile size in bytes.
download_urlstring or nullNoURL to download the file.
upload_urlstring or nullNoURL to upload the file content.
categorystringNoDefaults to default.

Add attachments when you create a record

You can include attachments in the attachments array when you create a record. For example, a POST to /public/v2/invoices/ accepts an attachments array alongside the rest of the invoice payload, where each element follows the AttachmentSchemaOut shape above. The following example creates an invoice with one attachment reference:
{
  "attachments": [
    {
      "id": 4821,
      "file_name": "march-invoice.pdf",
      "file_size": 102400,
      "category": "default"
    }
  ]
}

Add attachments to an existing record

To attach files to a record that already exists, send a POST to that record’s attachments sub-resource. For an invoice, the endpoint is /public/v2/invoices/{record_number}/attachments/. Every record type listed above exposes the same {record_number}/attachments/ pattern, so the call shape is consistent across resources.
POST /public/v2/invoices/{record_number}/attachments/

Replacing or deleting attachments

The V2 API does not provide a dedicated endpoint to delete or replace an attachment. The attachments sub-resource supports adding attachments only; there is no delete or replace operation on it.
Because there is no delete-attachment endpoint, plan your integration to add attachments correctly the first time rather than relying on later removal. If your workflow requires removing an attachment from a posted record, raise it with your DualEntry contact so the supported path can be confirmed for your case.
For the full request and response shapes, see the V2 API Reference. For broader guidance on syncing files as part of an integration, see Building a Custom Integration.
Last modified on June 29, 2026