Import a customer e-invoice

Import a customer invoice from an e-invoice file.
The file must be a Factur-X PDF, a standalone UBL XML invoice, or a standalone CII XML invoice.
Optionally provide invoice_options to pre-fill customer and line-level data.
Invoice line e_invoice_line_id must match Factur-X BT-126 (LineID) or the UBL/CII line identifier.

⚠️

UBL and CII XML support is in alpha.

A 201 response confirms the file was accepted and parsed, but invoices imported via
standalone UBL or CII XML have two known limitations:

  • The uploaded file is not displayed in the app — no document preview is generated yet for these formats.
  • The invoice is not recognized as an electronic invoice within Pennylane.

Factur-X PDF remains the recommended format for production use.

ℹ️

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
file
required

The customer invoice file to be imported.
Must be a Factur-X PDF, a UBL XML invoice, or a CII XML invoice.

boolean

If true, the invoice will be automatically sent to the PA after parsing.
The send is optimistic: it happens without waiting for schematron validation.
If the invoice is invalid, the PA may reject it later (visible via e_invoicing.status).

invoice_options
object

Optional JSON payload to enrich the imported customer invoice.
Invoice line e_invoice_line_id must match Factur-X BT-126 (LineID).

override_invoice_lines
array of objects
length between 1 and 500

Complete set of accounting lines that replaces the ones produced by the
Factur-X parser. When provided, the parser's lines are discarded and the invoice is
built from these lines instead; the document total is still read from the file for a
coherence check. If the lines do not reconcile with the Factur-X total, the override
is ignored and the parsed Factur-X lines are kept.

Mutually exclusive with invoice_options.invoice_lines (sending both returns 400).

override_invoice_lines

A complete accounting line used to override the Factur-X invoice lines.
Lines absent from the XML (e.g. a down-payment deduction, a reverse-charge line)
are expressed directly here — a TTC deduction is a normal line with a negative
currency_amount.

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

Line total amount excluding tax, in the invoice currency. May be negative.

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

Line VAT amount, in the invoice currency.

string
enum
required

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

int64
required

The ledger account id (counterpart) for this line.

number

Line item quantity.

string
^-?\d+(\.\d{1,6})?$

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

int64 | null

The product id for this line.

Headers
string

Numeric ID of the company to act on. Required when authenticating with a firm token. Ignored when the token is already bound to a company.

Responses

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