[Beta] Attach a file to an invoice

When should I use file upload?

  • You already have a finished PDF invoice produced by your platform system.
  • You only need Adfin to distribute it and handle payment collection—no AI text/line-item extraction is required.

How to attach a file to an invoice

Create an invoice with attachment

Endpoint: POST /invoices

  1. The header should be a multipart request
  2. Include the required invoice information in the form
  3. Attach the file invoice and declare it as a pdf.

Example request:

curl -X POST https://api.staging.adfin.com/api/invoices \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: multipart/form-data" \
  -F 'metadata={
        "invoiceNo": "INV-202508",
        "customer": "d5a11475-2e09-49ff-85b6-9b8d34b8ed06"
        "description": "August 2025 subscription",
        "dueDate": "2025-09-01T23:59:59Z",
				"fileSource": "FILE_UPLOAD,
				"source": "MANUAL"
      };type=application/json' 
  -F "[email protected];type=application/pdf"

Update an attachment to an invoice

Endpoint: PUT /invoices

  1. This will remove the previously attached file and upload the new version in its place
  2. It will return a 200 on successful operation
curl -X PUT https://api.staging.adfin.com/api/invoices/d5a11475-2e09-49ff-85b6-9b8d34b8ed06 \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: multipart/form-data" \
  -F "[email protected];type=application/pdf"

Full API specification will be released shortly.

For questions please contact [email protected]