Skip to main content

Upload Purchase Invoice Attachment

POST 

/api/purchase-invoices/:purchaseInvoice/attachments

Upload a file attachment to a purchase invoice. Send as multipart/form-data with a file field and an optional category field.

Required scope: purchase-orders:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Accepted types: PDF, DOC, DOCX, PNG, JPG/JPEG. Maximum size 20 MB. Uploading to an archived invoice returns 422.

Fields:

  • file (required): The file to attach.
  • category (optional): Document category — one of invoice, payment_proof, or other. Defaults to other.

Side effects:

  • If the invoice is already synced to a connected accounting provider (QuickBooks Online / Xero), the file is forwarded to the remote document asynchronously.
  • If Invoice OCR is enabled with auto-scan on upload and the file is a PDF, an OCR scan is queued automatically in the background — the returned attachment will show ocr_status: "processing".

Requires the purchase-orders:write token scope.

Request

Responses

Created

Response Headers
    Content-Type