Import an invoice with file attached

This endpoint allows you to import an invoice.

ℹ️ To ensure consistency, we will apply validations on amounts in accordance with our rounding policy. We allow a difference up to 1 cent per invoice_line between the total amounts and the sum of invoice lines. For further details, please refer to our article on rounding policy.

ℹ️

This endpoint requires the following scope: customer_invoices:all

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
int64
required

File attachment id

boolean
Defaults to false

This will set the invoice to Incomplete status

date
required

Invoice date (ISO 8601)

date
required

Invoice payment deadline (ISO 8601)

int64
required

Customer identifier

string

Invoice number. When convert_to_e_invoice is true, must be at most 35
characters and only contain alphanumeric characters and -+_/.

string
enum
Defaults to EUR
string
required
length ≥ 1
^(-?\d+(\.\d+)?)?$

Invoice currency amount before tax (total value before tax of the invoice in the currency of the invoice)

string
required
length ≥ 1
^(-?\d+(\.\d+)?)?$

Invoice currency amount (total value of the invoice in the currency of the invoice)

string
^(-?\d+(\.\d+)?)?$

Invoice amount in euros (total value of the invoice in euros). If the currency is euro, currency_amount and amount are identical.

string
required
length ≥ 1
^(-?\d+(\.\d+)?)?$

Invoice taxable amount (in invoice currency)

string
^(-?\d+(\.\d+)?)?$

Invoice taxable amount (in euros). If the currency is euro, currency_tax and tax are identical.

string | null

Custom label for the invoice used on accounting (ledger) entries. If not provided, Pennylane generates a label automatically.

transaction_reference
object

By adding this field you can automatically reconcile the newly imported invoice with a transaction. See documentation about automatic payment matching.

invoice_lines
array of objects
required
length ≥ 1
invoice_lines*
string
required
length ≥ 1
^(-?\d+(\.\d+)?)?$

Invoice line total amount in the currency of the invoice.

string
^(-?\d+(\.\d+)?)?$

Invoice line amount in euros. If the currency is euro, currency_amount and amount are identical.

string
required
length ≥ 1
^(-?\d+(\.\d+)?)?$

Invoice line taxable amount (in invoice currency)

string
^(-?\d+(\.\d+)?)?$

Invoice line taxable amount (in euros). If the currency is euro, currency_tax and tax are identical.

string

Line item label. Required when convert_to_e_invoice is true.

number
required

Line item quantity (number of items)

int64

The ledger account ID

string
enum

Resolves the line's ledger account to the company's goods or services account.

Unlike customer invoice create, import does not auto-fill fields from product_id, and product_id is not checked against substance.

When provided together with ledger_account_id, both must refer to the same account. If they do not match, the request returns 422.

Allowed:
string
required

The unit price excluding taxes. Can be set up to 6 decimals.

string
required

Line item unit (type of unit)

string
enum
required

Product VAT rate. A 20% VAT in France is FR_200.

string | null
deprecated

The description of the invoice line

⚠️

This attribute is deprecated and will be removed soon.

int64

The product ID

imputation_dates
object | null
ledger_entry_line
object
discount
object

Line-level discount. Only allowed when convert_to_e_invoice is true — sending this field without conversion enabled is an error. All amounts must be provided after discount — no recomputation is performed. Use relative for a percentage discount and absolute for a fixed amount discount.

boolean
Defaults to false

When set to true, Pennylane will asynchronously convert the imported invoice
into a Factur-X e-invoice (PDF/A-3) by embedding a structured XML into the
provided PDF. The invoice is returned immediately in the response; the
conversion happens in the background shortly after.
Requires file_attachment_id to reference a PDF file, all invoice lines to
have a label, and invoice_number to not exceed 35 characters and only
contain alphanumeric characters and -+_/.

discount
object

Invoice-level discount. Only allowed when convert_to_e_invoice is true — sending this field without conversion enabled is an error. All amounts must be provided after discount — no recomputation is performed. Use relative for a percentage discount and absolute for a fixed amount discount.

string

A unique external reference you can provide to track this customer invoice. If not provided, Pennylane will generate an identifier for you.

Responses

Language
Credentials
OAuth2
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json