Import a supplier invoice

Upload a supplier invoice PDF with its date, due date and amounts.

POST https://cotlet.dev/api/v1/pennylane/suppliers/{supplier_id}/invoice

write Confirm

Uploads the PDF and creates the supplier invoice, which then appears under Invoicing > Supplier Invoices and posts entries to the Purchases journal. Only PDF files work, up to 100 MB. Pennylane rejects a PDF that already exists in the account, so importing the same file twice fails. Amounts are strings and the lines must add up to the total. It books an expense in your accounts, so it asks for your OK. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: import_supplier_invoice
NameTypeDescription
file_url string required string HTTPS link to the PDF, or a PDF sent with the request.
supplier_id integer required integer Supplier ID from list_suppliers.
date date required date Invoice date printed on the PDF.
deadline date required date Payment due date.
amount_before_tax string required string Total before tax, e.g. 62.00.
tax string required string Total tax, e.g. 12.40.
amount string required string Total including tax; must equal amount_before_tax plus tax.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/pennylane/suppliers/1/invoice \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"file_url":"https://example.com","date":"2026-10-01","deadline":"2026-10-01","amount_before_tax":"amount before tax","tax":"tax","amount":"amount"}'
Python
result = client.call("pennylane", "import_supplier_invoice", {"file_url":"https://example.com","supplier_id":1,"date":"2026-10-01","deadline":"2026-10-01","amount_before_tax":"amount before tax","tax":"tax","amount":"amount"})
Node.js
const result = await cotlet.call('pennylane', 'import_supplier_invoice', {"file_url":"https://example.com","supplier_id":1,"date":"2026-10-01","deadline":"2026-10-01","amount_before_tax":"amount before tax","tax":"tax","amount":"amount"});
CLI
cotlet call pennylane import_supplier_invoice --data '{"file_url":"https://example.com","supplier_id":1,"date":"2026-10-01","deadline":"2026-10-01","amount_before_tax":"amount before tax","tax":"tax","amount":"amount"}'

Example response

JSON

{
  "invoice_id": 90455,
  "supplier": {
    "supplier_id": 612,
    "name": "OVH SAS"
  },
  "date": "2026-10-01",
  "deadline": "2026-10-31",
  "amount_before_tax": "62.00",
  "tax": "12.40",
  "amount": "74.40",
  "currency": "EUR"
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.