E-Invoices

[BETA] Import e-invoices

Changed on

This endpoint allows you to import an e-invoice.

‼️ This endpoint is DEPRECATED As an alternative, please use either:

⚠️ 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: e_invoices:all

post/api/external/v2/e-invoices/imports

Request

  • Base URL
    https://app.pennylane.com
  • URL
    https://app.pennylane.com/api/external/v2/e-invoices/imports
  • Auth
    OAuth 2
    Authorization code: https://app.pennylane.com/oauth/authorize
    Token URL: https://app.pennylane.com/oauth/oauth/token scopes: e_invoices:all

Headers

X-Company-Idstring
Example:12345

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.

Request body multipart/form-data

filestring binary required

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

type'customer' | 'supplier' required

The type of the invoice.

Response

E-invoice imported successfully

idinteger required
urlstring required

The URL of the imported e-invoice. This can be used to access the document later.

Example response

{
  "id": 42
}

Changes