> ## Documentation Index
> Fetch the complete documentation index at: https://docs.consile.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# API reference: e-conomic

> All 27 tools in the e-conomic connector: 23 read tools across receivables, invoices, accounting and lookups; 4 guardrailed write tools for customers and draft invoices. Covers shared list parameters, the preview-first confirm gate and the WritePreview shape.

e-conomic is a **read + guardrailed write** connector, called via `tools/call`
over `POST /economic/mcp`. The connector is connected with a static grant token
(see [Forbind e-conomic](/connect/forbind-economic)).

<Info>
  Endpoint: `https://mcp.consile.ai/economic/mcp`. e-conomic is its own named
  connector with only its own tools. Tool names are namespaced `economic__<tool>`
  in Claude/ChatGPT; the bare names are used here for readability.
</Info>

## Shared list parameters

The **list** tools (those returning a collection) accept e-conomic's pagination,
filter and sort parameters:

<ParamField path="pagesize" type="integer" default="20">
  Rows per page. e-conomic max is `1000`.
</ParamField>

<ParamField path="skippages" type="integer" default="0">
  0-based page index to skip to.
</ParamField>

<ParamField path="filter" type="string">
  e-conomic filter expression, e.g. `name$like:*acme*` or
  `date$gte:2025-01-01$and:date$lte:2025-12-31`.
</ParamField>

<ParamField path="sort" type="string">
  Sort expression, e.g. `name` (asc) or `-date` (desc); sortable fields only.
</ParamField>

A list result is shaped as `{ items: [...], pagination: { results, pageSize, skipPages, hasMore } }`.

<Warning>
  Not every list tool takes all four. `list_accounting_years` and
  `list_vat_accounts` accept **only** `pagesize` / `skippages` (no `filter` /
  `sort`); `list_accounting_periods` and `list_year_account_totals` take a required
  `year` plus `pagesize` / `skippages`; `list_account_entries` takes `accountNumber`

  * `year` + `pagesize` / `skippages` / `filter` but **not** `sort`. The
    single-resource tools (`get_*`, `download_invoice_pdf`) take their own required
    arguments instead.
</Warning>

***

## Receivables & cash-flow

### get\_invoice\_totals

Accounts-receivable summary in one call: drafts vs booked, booked unpaid (split
overdue / not overdue) and paid amounts. **Arguments:** none.

### list\_invoices\_overdue

Booked invoices past their due date with an outstanding balance. **Arguments:**
shared list parameters.

### list\_customers

Customers (debtors) with name, currency, `balance` (outstanding), `dueAmount`
(overdue), payment terms, group and VAT zone. **Arguments:** shared list parameters
(use `filter` to search).

### get\_customer

One customer by number, including balance and dueAmount.
<ParamField path="customerNumber" type="integer" required>The customer (debtor) number.</ParamField>

***

## Invoices

### list\_booked\_invoices

Booked (final, legal) invoices with `bookedInvoiceNumber`, dates, net/gross/VAT
amounts, `remainder` (outstanding) and customer. **Arguments:** shared list
parameters (filter by date range or customer).

### get\_booked\_invoice

One booked invoice including its line items (description, quantity, prices, VAT).
<ParamField path="bookedInvoiceNumber" type="integer" required>The booked invoice number.</ParamField>

### download\_invoice\_pdf

Download a booked invoice as a PDF, returned **base64-encoded**.

<ParamField path="bookedInvoiceNumber" type="integer" required />

<ResponseField name="bookedInvoiceNumber" type="integer" />

<ResponseField name="contentType" type="string">`application/pdf`.</ResponseField>
<ResponseField name="pdfBase64" type="string">The PDF bytes, base64-encoded.</ResponseField>

### list\_draft\_invoices

Draft (unbooked) invoices with no ledger effect yet. **Arguments:** shared list
parameters.

***

## Accounting

### list\_chart\_of\_accounts

Chart of accounts with live balances. Each row carries `accountNumber`, `name`,
`accountType`, `balance` and `debitCredit`. **Arguments:** shared list parameters.

### list\_year\_account\_totals

All-account totals for an accounting year (one row per account). Join each row's
`accountType` to build P\&L / balance-sheet lines.
<ParamField path="year" type="string" required>Accounting year as e-conomic returns it, e.g. `"2024"`.</ParamField>

<ParamField path="pagesize" type="integer" default="20" />

<ParamField path="skippages" type="integer" default="0" />

### get\_account\_year\_total

Balance/movement of one account for a full accounting year. Answers
"balance of account X in year Y".
<ParamField path="accountNumber" type="integer" required>Ledger account number, e.g. `1010`.</ParamField>

<ParamField path="year" type="string" required />

### list\_accounting\_years

Fiscal years with `fromDate` / `toDate` and the year string. **Arguments:**
`pagesize` / `skippages`.

### list\_accounting\_periods

Periods of an accounting year (`periodNumber`, `fromDate`, `toDate`). Period
numbers are not necessarily 1-12.

<ParamField path="year" type="string" required />

<ParamField path="pagesize" type="integer" default="20" />

<ParamField path="skippages" type="integer" default="0" />

### list\_account\_entries

Posted general-ledger entries for one account in an accounting year (an account
statement). Always scoped by account + year.

<ParamField path="accountNumber" type="integer" required />

<ParamField path="year" type="string" required />

<ParamField path="pagesize" type="integer" default="20" />

<ParamField path="skippages" type="integer" default="0" />

<ParamField path="filter" type="string" />

***

## Products & suppliers

### list\_products

Products with `productNumber`, `name`, `salesPrice`, `costPrice` and group.
**Arguments:** shared list parameters.

### list\_suppliers

Suppliers (creditors) with number, name, currency, payment terms, VAT zone and
group, for accounts-payable / spend questions. **Arguments:** shared list parameters.

***

## Lookups (reference numbers for writes)

Most of these return reference numbers that `create_customer`, `update_customer`
and `create_draft_invoice` take, and the connector never auto-selects them. They are
not all required, and not all feed a write: a customer or invoice write takes its VAT
zone from `list_vat_zones` (`vatZoneNumber`), whereas `list_vat_accounts` is
interpretive only (VAT codes and rates, consumed by no write tool), and
`list_units`' `unitNumber` is optional on invoice lines.

### list\_vat\_accounts

VAT codes with rates (`vatCode`, `name`, `ratePercentage`, `account`, `vatType`).
**Arguments:** `pagesize` / `skippages`.

### list\_customer\_groups

Customer (debtor) groups. `customerGroupNumber` is required to create or update a
customer. **Arguments:** shared list parameters.

### list\_payment\_terms

Payment terms. `paymentTermsNumber` is required for a customer and a draft invoice.
**Arguments:** shared list parameters.

### list\_vat\_zones

VAT zones (domestic / EU / world). `vatZoneNumber` is required for a customer and
for an invoice recipient. **Arguments:** shared list parameters.

### list\_layouts

Invoice / document layouts. `layoutNumber` is required for a customer and a draft
invoice. **Arguments:** shared list parameters.

### list\_units

Units (e.g. hours or pieces) for use on invoice lines. **Arguments:** shared list
parameters.

***

## Support

### validate\_connection

Connectivity/credential health check: an authenticated request to the API root.
Use it after connecting and to detect a revoked grant. **Arguments:** none.

***

## Write safety: guardrail model

The four write tools share a connector-local guardrail. The platform's `readOnly`
flag is a hint only; the safety lives in the tool handlers.

1. **Every write is preview-first.** The first (unconfirmed) call to any write tool
   **never writes**. `create_customer` and `create_draft_invoice` build the preview
   purely locally without calling e-conomic at all; `update_customer` and
   `duplicate_invoice` first issue a live GET to read the current record (the PUT
   merge / the copy source) before returning the preview, so a dry-run can surface a
   real upstream read error. Either way you get a [WritePreview](#writepreview-shape)
   dry-run of the exact request (method + path + body) and nothing is written.
2. **`confirm: true` is required to apply.** In accounting there is no
   zero-consequence write, so `requiresConfirm()` is always `true` with no
   exceptions. Re-run the identical call with `confirm: true` to write.
3. **No booking, no deletion.** There is deliberately no book-invoice tool and no
   delete tool (booking posts to the ledger, which is legal and irreversible;
   deletion destroys data). The client has no DELETE method at all.
4. **`update_customer` is a full-record PUT.** e-conomic has no PATCH, so the tool
   reads the current customer, merges only the fields you supplied, strips
   server-owned fields (`balance`, `dueAmount`, `lastUpdated`, …) and writes the
   whole record back.
5. **`duplicate_invoice` reads then re-creates.** e-conomic has no native copy
   endpoint, so the tool reads the source invoice, strips id/amount/booking fields
   and creates a fresh draft; e-conomic recalculates the amounts.
6. **Validation errors surface field-level detail.** An e-conomic `HTTP 400` is
   passed through with the rejected field, so the assistant can see exactly what
   was refused.

This is a designed-in safety default (connector-local logic), not an unbreakable
platform gate. See
[Handlinger & guardrails](/essentials/handlinger-og-guardrails) for the full
cross-connector policy.

### WritePreview shape

When a write is not confirmed (`confirm` omitted or `false`), the tool returns this
instead of calling e-conomic:

```json theme={null}
{
  "preview": {
    "action": "create_customer",
    "summary": "Create customer \"Acme ApS\" (DKK); group 1, terms 2, VAT zone 1, layout 3.",
    "request": {
      "method": "POST",
      "path": "/customers",
      "body": { "name": "Acme ApS", "currency": "DKK", "...": "..." }
    },
    "confirmHint": "Re-run the same call with confirm: true to apply this change."
  }
}
```

***

## Write tools (4 guardrailed)

<Warning>
  Write tools change data in e-conomic. Every one is preview-first: without
  `confirm: true` you get a [WritePreview](#writepreview-shape) and no API call is
  made. Booking a draft and deleting records are not supported.
</Warning>

### create\_customer

Create a new customer (debtor). Requires a name, a currency and the four reference
numbers (discover them via the lookup tools).

<ParamField path="name" type="string" required>Customer (company) name.</ParamField>
<ParamField path="currency" type="string" required>ISO 4217 code, e.g. `"DKK"`.</ParamField>
<ParamField path="customerGroupNumber" type="integer" required>From `list_customer_groups`.</ParamField>
<ParamField path="paymentTermsNumber" type="integer" required>From `list_payment_terms`.</ParamField>
<ParamField path="vatZoneNumber" type="integer" required>From `list_vat_zones`.</ParamField>
<ParamField path="layoutNumber" type="integer" required>From `list_layouts`.</ParamField>
<ParamField path="customerNumber" type="integer">Optional; e-conomic auto-assigns one if omitted.</ParamField>
<ParamField path="email" type="string">Email address (validated as a single email).</ParamField>

<ParamField path="address" type="string" />

<ParamField path="city" type="string" />

<ParamField path="zip" type="string" />

<ParamField path="country" type="string" />

<ParamField path="telephoneAndFaxNumber" type="string" />

<ParamField path="corporateIdentificationNumber" type="string">CVR / company registration number.</ParamField>

<ParamField path="vatNumber" type="string" />

<ParamField path="ean" type="string" />

<ParamField path="confirm" type="boolean">Set `true` to apply; omit for a dry-run preview.</ParamField>

**Requires confirmation:** **always**.

***

### update\_customer

Update an existing customer. e-conomic supports only full replacement (PUT), so the
tool reads the current customer, merges the fields you pass and writes the whole
record back; fields you omit are preserved.

<ParamField path="customerNumber" type="integer" required>The customer to update.</ParamField>

<ParamField path="name" type="string" />

<ParamField path="email" type="string" />

<ParamField path="address" type="string" />

<ParamField path="city" type="string" />

<ParamField path="zip" type="string" />

<ParamField path="country" type="string" />

<ParamField path="telephoneAndFaxNumber" type="string" />

<ParamField path="corporateIdentificationNumber" type="string" />

<ParamField path="vatNumber" type="string" />

<ParamField path="ean" type="string" />

<ParamField path="paymentTermsNumber" type="integer" />

<ParamField path="customerGroupNumber" type="integer" />

<ParamField path="vatZoneNumber" type="integer" />

<ParamField path="layoutNumber" type="integer" />

<ParamField path="confirm" type="boolean">Set `true` to apply; omit for a dry-run preview.</ParamField>

**Requires confirmation:** **always**.

***

### create\_draft\_invoice

Create a DRAFT (unbooked) invoice with no ledger effect. Booking it is deliberately
not supported.

<ParamField path="customerNumber" type="integer" required>The customer to invoice.</ParamField>
<ParamField path="currency" type="string" required>ISO 4217 code.</ParamField>
<ParamField path="paymentTermsNumber" type="integer" required>From `list_payment_terms`.</ParamField>
<ParamField path="layoutNumber" type="integer" required>From `list_layouts`.</ParamField>
<ParamField path="recipientName" type="string" required>Invoice recipient name.</ParamField>
<ParamField path="recipientVatZoneNumber" type="integer" required>Recipient VAT zone (from `list_vat_zones`).</ParamField>

<ParamField path="lines" type="object[]" required>
  At least one line. Each: `productNumber` (from `list_products`), `quantity`,
  `unitNetPrice`, `description?`, `unitNumber?` (from `list_units`),
  `discountPercentage?`.
</ParamField>

<ParamField path="date" type="string">Invoice date `YYYY-MM-DD` (defaults to today).</ParamField>
<ParamField path="dueDate" type="string">Due date `YYYY-MM-DD` (required if the payment terms type is `dueDate`).</ParamField>

<ParamField path="notesHeading" type="string" />

<ParamField path="notesTextLine1" type="string" />

<ParamField path="notesTextLine2" type="string" />

<ParamField path="confirm" type="boolean">Set `true` to apply; omit for a dry-run preview.</ParamField>

**Requires confirmation:** **always**. On confirm, e-conomic returns the new
`draftInvoiceNumber` and the calculated net/gross/VAT amounts.

***

### duplicate\_invoice

Create a new DRAFT invoice by copying an existing booked or draft invoice, then
optionally overriding the customer, dates, notes or replacing the lines. Read-only
id/amount/booking fields are stripped; e-conomic recalculates the amounts.

<ParamField path="source" type="string" required>`booked` or `draft`: where to copy from.</ParamField>
<ParamField path="invoiceNumber" type="integer" required>The `bookedInvoiceNumber` or `draftInvoiceNumber` to copy from.</ParamField>
<ParamField path="newCustomerNumber" type="integer">Re-target the copy to a different customer.</ParamField>
<ParamField path="date" type="string">Override the invoice date (`YYYY-MM-DD`).</ParamField>
<ParamField path="dueDate" type="string">Override the due date (`YYYY-MM-DD`).</ParamField>

<ParamField path="notesHeading" type="string" />

<ParamField path="notesTextLine1" type="string" />

<ParamField path="notesTextLine2" type="string" />

<ParamField path="replaceLines" type="object[]">If set, REPLACE the copied lines entirely with these (same line shape as `create_draft_invoice`).</ParamField>
<ParamField path="confirm" type="boolean">Set `true` to apply; omit for a dry-run preview.</ParamField>

**Requires confirmation:** **always**.

***

## Code examples

<CodeGroup>
  ```json Request: list_customers theme={null}
  {
    "name": "economic__list_customers",
    "arguments": { "filter": "name$like:*acme*", "pagesize": 50 }
  }
  ```

  ```json Request: get_account_year_total theme={null}
  {
    "name": "economic__get_account_year_total",
    "arguments": { "accountNumber": 1010, "year": "2025" }
  }
  ```

  ```json Request: create_customer (dry-run preview) theme={null}
  {
    "name": "economic__create_customer",
    "arguments": {
      "name": "Acme ApS",
      "currency": "DKK",
      "customerGroupNumber": 1,
      "paymentTermsNumber": 2,
      "vatZoneNumber": 1,
      "layoutNumber": 3
    }
  }
  ```

  ```json Request: create_customer (apply with confirm) theme={null}
  {
    "name": "economic__create_customer",
    "arguments": {
      "name": "Acme ApS",
      "currency": "DKK",
      "customerGroupNumber": 1,
      "paymentTermsNumber": 2,
      "vatZoneNumber": 1,
      "layoutNumber": 3,
      "confirm": true
    }
  }
  ```
</CodeGroup>

<Note>
  Each upstream call has a 15-second timeout; the client has no built-in
  retry/backoff or rate-limit handling. A revoked or invalid grant token returns a
  "reconnect required" error (the upstream responded `401`/`403`; for writes a `403`
  can also mean the app role lacks write permission). See
  [Errors & limits](/developers/errors-and-limits).
</Note>
