← All articles

How to find and download invoice attachments in Oracle Fusion Payables

Find Oracle Fusion Payables invoice attachments, inspect file metadata and download the intended document. Resolve invoice keys and diagnose missing files.

Finding an Oracle Fusion invoice attachment requires the right invoice resource and the right document within it. An invoice can have several attachments with different purposes. Downloading the first available file can return a supporting document rather than the invoice image.

Resolve the invoice using its number together with supplier and business-unit context. A synthetic first read is GET /fscmRestApi/resources/11.13.18.05/invoices?q=InvoiceNumber='DEMO-INV-1042'&limit=5. Confirm one intended invoice and retain the item link returned by Oracle.

Use the resolved invoice key in GET /fscmRestApi/resources/11.13.18.05/invoices/{invoiceKey}/child/attachments. Oracle's invoice-attachment reference explains the composite parent key. Do not create that key by concatenating invoice fields or replacing it with the displayed invoice number.

Inspect the attachment identifier and metadata before downloading content. A file name, document category and content type can help select the intended document. File, URL and text attachments require different handling. Metadata alone does not prove that a downloadable PDF exists.

This Oracle-documented SQL example checks metadata for an attachment selected from the invoice's attachment collection. Replace the synthetic attachment ID with its returned AttachedDocumentId. Oracle documents attachment associations and translated document metadata separately.

SELECT a.enterprise_id,
       a.entity_name,
       a.pk1_value,
       a.attached_document_id,
       a.document_id,
       d.title,
       d.file_name
FROM fnd_attached_documents a
LEFT JOIN fnd_documents_tl d
  ON d.document_id = a.document_id
 AND d.enterprise_id = a.enterprise_id
 AND d.language = USERENV('LANG')
WHERE a.attached_document_id = 300100000000084
ORDER BY a.enterprise_id, a.attached_document_id;

Confirm that the returned entity and key belong to the selected invoice. The join includes enterprise and language to avoid mixing translations or enterprises. A missing title can reflect a missing translation. This query returns metadata; download the bytes through the supported content resource below.

Use the supported content link or binary resource for the selected file. Keep authenticated requests within the configured Oracle origin. If a returned link points elsewhere or redirects to another system, stop and use that system's approved access procedure. Do not forward Oracle credentials to an arbitrary attachment URL.

Save the download to a protected working directory and check the received bytes before passing it to another program. An HTML sign-in or error page saved with a PDF extension is not an invoice document. Keep the document identifier and checksum with the diagnostic result when content integrity matters.

If the attachment collection is empty, distinguish missing documents from account visibility. If metadata is present but the download fails, inspect the selected content route and access rights. Check child pagination when several documents exist. The pagination guide explains why one page cannot prove completeness.

Fusion Toolkit's invoice-full-investigation recipe can retrieve attachments alongside invoice holds and flexfields. Its supported attachment download operation handles the selected document. For Swiss QR-bills, review the QR processing workflow before treating any downloaded PDF as a payment-data source. This guide was reviewed on 8 November 2026.

You can use an LLM with the Fusion Toolkit AI Administrator skill and ask, "Find the PDF attachments for invoice DEMO-INV-1042 from this supplier and identify the invoice image." It can retrieve supported metadata and documents without requiring you to write the queries. Specify the business unit and the document you need.