---
updatedAt: 2026-11-19T13:48:28.000Z
agentTools:
  projectIndex: https://partner-dwh.readme.io/llms.txt
---

# E-Invoices

Table name: `e_invoices`

One row per e-invoice document issued by your teams and operators (the seller side), for example the invoices, credit notes and self-billed invoices Monta sends to the buyer over the e-invoicing network. The line items of each document are in [E-Invoice Lines](e_invoice_lines.md).

Credit notes carry negative amounts, as sent to the buyer. Net, VAT and gross amounts are calculated from the document lines. Purged drafts stay in the table with `deleted_at` set (`document_status = 'deleted'`). Drafts and failed documents are included too; read `document_status` to tell the states apart, and filter on `document_status = 'delivered'` for the documents the buyer received.

**SQL:** `e_invoices`

## Schema

| Column Name                    | Data Type      | Description                                                                                                                                                                                                                                                                                                                                                                                             |
| :----------------------------- | :------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Primary ID**                 |                |                                                                                                                                                                                                                                                                                                                                                                                                         |
| id                             | INTEGER        | Primary key, unique identifier of the e-invoice document                                                                                                                                                                                                                                                                                                                                                |
| **Other IDs**                  |                |                                                                                                                                                                                                                                                                                                                                                                                                         |
| invoice\_number                | VARCHAR        | Serial number carried on the transmitted document                                                                                                                                                                                                                                                                                                                                                       |
| corrects\_document\_id         | INTEGER        | For a credit note, the `id` of the e-invoice document it gives money back against. Null on every other document type. Not available in the Partner API                                                                                                                                                                                                                                                  |
| seller\_owner\_id              | INTEGER        | ID of the team or operator that owns the legal entity which issued the document                                                                                                                                                                                                                                                                                                                         |
| seller\_wallet\_id             | INTEGER        | Wallet the document was issued from, as recorded on the latest submission. Null when the document has no submission                                                                                                                                                                                                                                                                                     |
| buyer\_owner\_id               | INTEGER        | ID of the team or operator the document was issued to                                                                                                                                                                                                                                                                                                                                                   |
| buyer\_wallet\_id              | INTEGER        | Wallet of the buyer, as recorded on the latest submission. Null when the document has no submission                                                                                                                                                                                                                                                                                                     |
| **Timestamps**                 |                |                                                                                                                                                                                                                                                                                                                                                                                                         |
| created\_at                    | TIMESTAMP\_NTZ | Timestamp when the document was created                                                                                                                                                                                                                                                                                                                                                                 |
| updated\_at                    | TIMESTAMP\_NTZ | Timestamp when the document was last updated                                                                                                                                                                                                                                                                                                                                                            |
| deleted\_at                    | TIMESTAMP\_NTZ | Timestamp when the document was soft deleted (a purged draft or failed document, not a cancelled invoice), null if not deleted. The Partner API never returns deleted documents                                                                                                                                                                                                                         |
| period\_from                   | TIMESTAMP\_NTZ | Start of the period the document covers                                                                                                                                                                                                                                                                                                                                                                 |
| period\_to                     | TIMESTAMP\_NTZ | End of the period the document covers                                                                                                                                                                                                                                                                                                                                                                   |
| submitted\_at                  | TIMESTAMP\_NTZ | When the document was handed to the e-invoicing network                                                                                                                                                                                                                                                                                                                                                 |
| delivered\_at                  | TIMESTAMP\_NTZ | When the network confirmed delivery to the buyer                                                                                                                                                                                                                                                                                                                                                        |
| payment\_lifecycle\_status\_at | TIMESTAMP\_NTZ | When the buyer reported `payment_lifecycle_status`                                                                                                                                                                                                                                                                                                                                                      |
| **Dates**                      |                |                                                                                                                                                                                                                                                                                                                                                                                                         |
| invoice\_date                  | DATE           | Date the document was issued                                                                                                                                                                                                                                                                                                                                                                            |
| due\_date                      | DATE           | When payment is due: the end of the invoicing period plus the agreed days to pay. Null when the document asks for nothing. Not available in the Partner API                                                                                                                                                                                                                                             |
| **Seller**                     |                |                                                                                                                                                                                                                                                                                                                                                                                                         |
| seller\_owner\_type            | VARCHAR        | Type of the seller owner: `TEAM` or `OPERATOR`                                                                                                                                                                                                                                                                                                                                                          |
| seller\_company\_name          | VARCHAR        | Registered company name of the seller. Null when unknown or the seller is a deleted personal account                                                                                                                                                                                                                                                                                                    |
| seller\_country\_code          | VARCHAR        | ISO 3166-1 alpha-2 country of the seller. Null when unknown or the seller is a deleted personal account                                                                                                                                                                                                                                                                                                 |
| seller\_identifiers            | ARRAY          | Tax and registration identifiers of the seller, as an array of objects with `scheme` (Monta scheme name such as `NL_KVK` or `FO_VAT`) and `id` (the value)                                                                                                                                                                                                                                              |
| **Buyer**                      |                |                                                                                                                                                                                                                                                                                                                                                                                                         |
| buyer\_owner\_type             | VARCHAR        | Type of the buyer owner: `TEAM` or `OPERATOR`                                                                                                                                                                                                                                                                                                                                                           |
| buyer\_company\_name           | VARCHAR        | Registered company name of the buyer. Null when unknown or the buyer is a deleted personal account                                                                                                                                                                                                                                                                                                      |
| buyer\_country\_code           | VARCHAR        | ISO 3166-1 alpha-2 country of the buyer. Null when unknown or the buyer is a deleted personal account                                                                                                                                                                                                                                                                                                   |
| buyer\_identifiers             | ARRAY          | Tax and registration identifiers of the buyer, same shape as `seller_identifiers`                                                                                                                                                                                                                                                                                                                       |
| **Attributes**                 |                |                                                                                                                                                                                                                                                                                                                                                                                                         |
| document\_type                 | VARCHAR        | Type of document: `INVOICE`, `SELF_BILLED_INVOICE` or `CREDIT_NOTE`                                                                                                                                                                                                                                                                                                                                     |
| currency\_code                 | VARCHAR        | ISO 4217 currency code of every amount on the document                                                                                                                                                                                                                                                                                                                                                  |
| net\_amount                    | NUMBER         | Total excluding VAT, in major units. Sum of the line net amounts; negative on credit notes                                                                                                                                                                                                                                                                                                              |
| vat\_amount                    | NUMBER         | Total VAT, in major units. Sum of the line VAT amounts; negative on credit notes                                                                                                                                                                                                                                                                                                                        |
| gross\_amount                  | NUMBER         | Total including VAT, in major units. Negative on credit notes                                                                                                                                                                                                                                                                                                                                           |
| payable\_amount                | NUMBER         | Part of the total the receiver still owes against this document. 0 means the whole total was settled through the Monta wallets. Not available in the Partner API                                                                                                                                                                                                                                        |
| note                           | VARCHAR        | Free-text note carried on the document                                                                                                                                                                                                                                                                                                                                                                  |
| **Status**                     |                |                                                                                                                                                                                                                                                                                                                                                                                                         |
| document\_status               | VARCHAR        | One reading of where the document stands: `deleted` when `deleted_at` is set; otherwise the lowercase latest submission status: `delivered` (the only value meaning the buyer received it), `failed` (see `submission_error_details`), `draft`, `processing` or `pending`, or `no_submission` when the document has no live submission. Draft, failed and no\_submission documents were never delivered |
| submission\_status             | VARCHAR        | Latest non-deleted submission status on the e-invoicing network: `PENDING`, `DRAFT`, `PROCESSING`, `DELIVERED` or `FAILED`. Null when there is none                                                                                                                                                                                                                                                     |
| submission\_error\_details     | VARCHAR        | Why the submission failed, when `submission_status` is `FAILED`                                                                                                                                                                                                                                                                                                                                         |
| payment\_lifecycle\_status     | VARCHAR        | Latest payment state the buyer reported back over the e-invoicing network                                                                                                                                                                                                                                                                                                                               |

## Inclusion Criteria

A document is included if its seller is a team or operator within your scope. Documents issued *to* your teams and operators by others (the buyer side) are not included, which matches the Partner API.

Soft-deleted documents are included with `deleted_at` set, and so are drafts and failed documents. Submission fields (`submission_status`, `submitted_at`, `delivered_at`, `submission_error_details`) come from the latest non-deleted submission. The seller and buyer company name, country and identifiers are blank for a deleted personal team, the same rule as in `teams`.

## Data flow

| Upstream tables | Downstream tables |
| :-------------- | :---------------- |
| `teams`         | `e_invoice_lines` |
| `operators`     | ---               |

## Alignment

### Monta API

* Aligns with the Monta API e-invoices endpoint, which returns only the documents the owner issued (seller side)
* The Monta DW table includes additional fields not in the API response: `payable_amount`, `due_date`, `corrects_document_id`, and the soft-deleted documents (`deleted_at`, `document_status = 'deleted'`)
* Payment instructions, bank details and the raw document payload are not exposed

## Joining e-invoices to their lines

```sql
select
    i.invoice_number
    , i.document_type
    , i.invoice_date
    , i.currency_code
    , l.item_name
    , l.quantity
    , l.net_amount
    , l.vat_amount
from e_invoices i
inner join e_invoice_lines l
    on l.e_invoice_document_id = i.id
where i.document_status = 'delivered'
```