---
title: "[BETA] Import e-invoices"
method: POST
path: "/api/external/v2/e-invoices/imports"
tags: ["E-Invoices"]
deprecated: true
---

# \[BETA\] Import e-invoices

`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`

> **Deprecated.**

This endpoint allows you to import an e-invoice.

> ‼️
> This endpoint is **DEPRECATED**
> As an alternative, please use either:
>   - [Import a customer e-invoice](https://pennylane.readme.io/reference/createcustomerinvoiceeinvoiceimport) endpoint
>   - [Import a supplier e-invoice](https://pennylane.readme.io/reference/createsupplierinvoiceeinvoiceimport) endpoint

> ⚠️ **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`

## Headers

- `X-Company-Id` string

## Request body `multipart/form-data`

- object
  - `file` string, 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 `201`

E-invoice imported successfully

- object
  - `id` integer, required
  - `url` string, required: The URL of the imported e-invoice. This can be used to access the document later.

## Other responses

- `400`: Bad request
- `401`: Access token is missing or invalid
- `403`: Access to this resource forbidden
- `422`: Unprocessable content

## Changes

- **2026-11-03** `871f863307e5`: 1 info
  - added the new optional `header` request parameter `X-Company-Id`

[Operation history](https://skmtc.dev/pennylane/apis/company-v2/changes/api/external/v2/e-invoices/imports/post.md)

---

[API](https://skmtc.dev/pennylane/apis/company-v2.md) - [All operations](https://skmtc.dev/pennylane/apis/company-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/pennylane/apis/company-v2/revisions/871f863307e5?raw)
