Skip to content

Einvoices tools

MCP tools for Einvoices: einvoices_get, einvoices_list, einvoices_retry.

  • einvoices_get: Get an e-invoice
  • einvoices_list: List e-invoices
  • einvoices_retry: Retry an e-invoice

einvoices_get

Get an e-invoice. Operation einvoices.get · Brand level · permission invoices:read · risk tier read · since M13

Returns one e-invoice (einv_…): the invoice or credit note it was generated from, the route it was sent by (country, transaction type, provider, format), its status and history, the provider's ID, the stored document (its SHA-256 and the generator version) and, when it failed or was rejected, the reason. E-invoices of another brand or mode are resource_not_found.

Annotations: readOnlyHint: true · destructiveHint: false · idempotentHint: true · openWorldHint: false

Arguments

ArgumentTypeRequiredDescription
idID (einv_…)yes–
entity_idID (ent_…)noOptional: the brand's legal entity (ent_…); brand_id alone is enough.
brand_idID (brd_…)noThe brand to act on (brd_…), inside your API key's reach. Needed with an organization or entity key; a brand key acts on its own brand.
  • Brand: pass brand_id with an organization or entity key; a brand key acts on its own brand.
  • Read-only: changes nothing; idempotency_key is ignored.

Errors

Examples

An accepted e-invoice

Arguments:

JSON
{
  "id": "einv_01jbxa6qk3f0v8w9zq2y7k5n70",
  "brand_id": "brd_01jbx4m3v8e9t0s6k2c5n7q1wz"
}

Result output:

JSON
{
  "id": "einv_01jbxa6qk3f0v8w9zq2y7k5n70",
  "object": "einvoice",
  "livemode": false,
  "orgId": "org_01jacq4m3xf0v8w9zq2y7k5n6a",
  "entityId": "ent_01jacq4m3xf0v8w9zq2y7k5n6h",
  "brandId": "brd_01jacq4m3xf0v8w9zq2y7k5n6j",
  "documentKind": "invoice",
  "documentId": "inv_01jacq4m3xf0v8w9zq2y7k5n70",
  "documentNumber": "ACME-2026-000101",
  "customerId": "cus_01jacq4m3xf0v8w9zq2y7k5n6k",
  "country": "HR",
  "transactionType": "b2b",
  "provider": "fake",
  "format": "UBL_2_1_PEPPOL_BIS_3",
  "status": "accepted",
  "externalId": "fake_einv_000001_inv_01jacq4m3xf0v8w9zq2y7k5n70",
  "buyerEndpoint": null,
  "sellerEndpoint": null,
  "buyerReference": null,
  "file": {
    "fileId": "file_01jbxa6qk3f0v8w9zq2y7k5n71",
    "sha256": "3f0c1e9b7a2d4c6e8f0a1b3c5d7e9f1a2b4c6d8e0f1a3b5c7d9e1f2a4b6c8d0e",
    "size": 4211,
    "generator": "ubl_peppol_bis_3@1"
  },
  "error": null,
  "attempts": 1,
  "sentAt": "2026-10-14T09:31:02.000Z",
  "lastCheckedAt": "2026-10-14T09:45:00.000Z",
  "history": [
    {
      "status": "pending",
      "at": "2026-10-14T09:30:05.000Z",
      "reason": null
    },
    {
      "status": "queued",
      "at": "2026-10-14T09:31:02.000Z",
      "reason": null
    },
    {
      "status": "accepted",
      "at": "2026-10-14T09:45:00.000Z",
      "reason": null
    }
  ],
  "createdAt": "2026-10-14T09:30:05.000Z",
  "updatedAt": "2026-10-14T09:45:00.000Z"
}

An e-invoice that couldn't be sent

Arguments:

JSON
{
  "id": "einv_01jbxa6qk3f0v8w9zq2y7k5n70",
  "brand_id": "brd_01jbx4m3v8e9t0s6k2c5n7q1wz"
}

Result output:

JSON
{
  "id": "einv_01jbxa6qk3f0v8w9zq2y7k5n70",
  "object": "einvoice",
  "livemode": false,
  "orgId": "org_01jacq4m3xf0v8w9zq2y7k5n6a",
  "entityId": "ent_01jacq4m3xf0v8w9zq2y7k5n6h",
  "brandId": "brd_01jacq4m3xf0v8w9zq2y7k5n6j",
  "documentKind": "invoice",
  "documentId": "inv_01jacq4m3xf0v8w9zq2y7k5n70",
  "documentNumber": "ACME-2026-000101",
  "customerId": "cus_01jacq4m3xf0v8w9zq2y7k5n6k",
  "country": "HR",
  "transactionType": "b2b",
  "provider": "fake",
  "format": "UBL_2_1_PEPPOL_BIS_3",
  "status": "failed",
  "externalId": null,
  "buyerEndpoint": null,
  "sellerEndpoint": null,
  "buyerReference": null,
  "file": null,
  "error": {
    "code": "einvoice_endpoint_missing",
    "message": "The buyer has no electronic address: set the customer's `einvoice_endpoint` metadata (<scheme>:<identifier>).",
    "at": "2026-10-14T09:31:02.000Z"
  },
  "attempts": 1,
  "sentAt": null,
  "lastCheckedAt": null,
  "history": [
    {
      "status": "pending",
      "at": "2026-10-14T09:30:05.000Z",
      "reason": null
    },
    {
      "status": "failed",
      "at": "2026-10-14T09:31:02.000Z",
      "reason": "The buyer has no electronic address: set the customer's `einvoice_endpoint` metadata (<scheme>:<identifier>)."
    }
  ],
  "createdAt": "2026-10-14T09:30:05.000Z",
  "updatedAt": "2026-10-14T09:31:02.000Z"
}

einvoices_list

List e-invoices. Operation einvoices.list · Brand level · permission invoices:read · risk tier read · since M13

Lists the brand's e-invoices in the mode of the request, newest first: one per invoice or credit note whose case (the buyer's country and transaction type) the entity's e-invoicing settings route to a provider, with its status (pending, queued, delivered, accepted, rejected, failed), the provider's ID and the stored document. Filter by documentId (an invoice's or credit note's e-invoice) or status. Paginate with limit (1–100, default 10) and starting_after.

Annotations: readOnlyHint: true · destructiveHint: false · idempotentHint: true · openWorldHint: false

Arguments

ArgumentTypeRequiredDescription
documentIdstringnoThe e-invoice of one invoice (inv_…) or credit note (cn_…).
statusone of pending, queued, delivered, accepted, rejected, failednoOnly e-invoices in this status.
limitintegernoPage size, 1 to 100 (default 10). (1–100)
starting_afterID (einv_…)noThe next_cursor of the previous page.
entity_idID (ent_…)noOptional: the brand's legal entity (ent_…); brand_id alone is enough.
brand_idID (brd_…)noThe brand to act on (brd_…), inside your API key's reach. Needed with an organization or entity key; a brand key acts on its own brand.
  • Brand: pass brand_id with an organization or entity key; a brand key acts on its own brand.
  • Read-only: changes nothing; idempotency_key is ignored.

Errors

Example

The e-invoice of an invoice

Arguments:

JSON
{
  "documentId": "inv_01jacq4m3xf0v8w9zq2y7k5n70",
  "brand_id": "brd_01jbx4m3v8e9t0s6k2c5n7q1wz"
}

Result output:

JSON
{
  "object": "list",
  "data": [
    {
      "id": "einv_01jbxa6qk3f0v8w9zq2y7k5n70",
      "object": "einvoice",
      "livemode": false,
      "orgId": "org_01jacq4m3xf0v8w9zq2y7k5n6a",
      "entityId": "ent_01jacq4m3xf0v8w9zq2y7k5n6h",
      "brandId": "brd_01jacq4m3xf0v8w9zq2y7k5n6j",
      "documentKind": "invoice",
      "documentId": "inv_01jacq4m3xf0v8w9zq2y7k5n70",
      "documentNumber": "ACME-2026-000101",
      "customerId": "cus_01jacq4m3xf0v8w9zq2y7k5n6k",
      "country": "HR",
      "transactionType": "b2b",
      "provider": "fake",
      "format": "UBL_2_1_PEPPOL_BIS_3",
      "status": "accepted",
      "externalId": "fake_einv_000001_inv_01jacq4m3xf0v8w9zq2y7k5n70",
      "buyerEndpoint": null,
      "sellerEndpoint": null,
      "buyerReference": null,
      "file": {
        "fileId": "file_01jbxa6qk3f0v8w9zq2y7k5n71",
        "sha256": "3f0c1e9b7a2d4c6e8f0a1b3c5d7e9f1a2b4c6d8e0f1a3b5c7d9e1f2a4b6c8d0e",
        "size": 4211,
        "generator": "ubl_peppol_bis_3@1"
      },
      "error": null,
      "attempts": 1,
      "sentAt": "2026-10-14T09:31:02.000Z",
      "lastCheckedAt": "2026-10-14T09:45:00.000Z",
      "history": [
        {
          "status": "pending",
          "at": "2026-10-14T09:30:05.000Z",
          "reason": null
        },
        {
          "status": "queued",
          "at": "2026-10-14T09:31:02.000Z",
          "reason": null
        },
        {
          "status": "accepted",
          "at": "2026-10-14T09:45:00.000Z",
          "reason": null
        }
      ],
      "createdAt": "2026-10-14T09:30:05.000Z",
      "updatedAt": "2026-10-14T09:45:00.000Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

einvoices_retry

Retry an e-invoice. Operation einvoices.retry · Brand level · permission invoices:write · risk tier write · since M13

Sends a failed or rejected e-invoice again, once its cause is fixed: for example after setting the customer's einvoice_endpoint metadata (its electronic address). The e-invoice goes back to pending with the customer's and the entity's current e-invoicing details, one attempt more, and is generated and handed to its provider after the call returns (einvoice.sent, or einvoice.failed again). The document itself never changes: correct a wrong invoice with a credit note.

Annotations: readOnlyHint: false · destructiveHint: false · idempotentHint: false · openWorldHint: true

Arguments

ArgumentTypeRequiredDescription
idID (einv_…)yes–
entity_idID (ent_…)noOptional: the brand's legal entity (ent_…); brand_id alone is enough.
brand_idID (brd_…)noThe brand to act on (brd_…), inside your API key's reach. Needed with an organization or entity key; a brand key acts on its own brand.
idempotency_keystringnoA unique string for this change. Retrying with the same key and arguments never acts twice. When left out, the server generates one and returns it in the result's idempotency_key. (1–255 characters)
dry_runbooleannotrue: check permissions and rules and compute the result, then roll everything back. Nothing is saved. (default false)
  • Brand: pass brand_id with an organization or entity key; a brand key acts on its own brand.
  • Idempotency: the result returns the idempotency_key used, yours or one the server generated. Retry with it: a call with the same key and arguments never acts twice (keys are kept for 24 hours).
  • Dry run: supported. dry_run: true checks permissions and rules and computes the result, then rolls everything back.

Errors

Example

Send a failed e-invoice again

Arguments:

JSON
{
  "id": "einv_01jbxa6qk3f0v8w9zq2y7k5n70",
  "brand_id": "brd_01jbx4m3v8e9t0s6k2c5n7q1wz",
  "idempotency_key": "8d0c5f8e-4b7a-4e43-9b0f-2f6a0c1d9e21"
}

Result output:

JSON
{
  "id": "einv_01jbxa6qk3f0v8w9zq2y7k5n70",
  "object": "einvoice",
  "livemode": false,
  "orgId": "org_01jacq4m3xf0v8w9zq2y7k5n6a",
  "entityId": "ent_01jacq4m3xf0v8w9zq2y7k5n6h",
  "brandId": "brd_01jacq4m3xf0v8w9zq2y7k5n6j",
  "documentKind": "invoice",
  "documentId": "inv_01jacq4m3xf0v8w9zq2y7k5n70",
  "documentNumber": "ACME-2026-000101",
  "customerId": "cus_01jacq4m3xf0v8w9zq2y7k5n6k",
  "country": "HR",
  "transactionType": "b2b",
  "provider": "fake",
  "format": "UBL_2_1_PEPPOL_BIS_3",
  "status": "pending",
  "externalId": null,
  "buyerEndpoint": "0208:0123456789",
  "sellerEndpoint": null,
  "buyerReference": null,
  "file": null,
  "error": null,
  "attempts": 2,
  "sentAt": null,
  "lastCheckedAt": null,
  "history": [
    {
      "status": "pending",
      "at": "2026-10-14T09:30:05.000Z",
      "reason": null
    },
    {
      "status": "failed",
      "at": "2026-10-14T09:31:02.000Z",
      "reason": "The buyer has no electronic address: set the customer's `einvoice_endpoint` metadata (<scheme>:<identifier>)."
    },
    {
      "status": "pending",
      "at": "2026-10-15T08:00:00.000Z",
      "reason": null
    }
  ],
  "createdAt": "2026-10-14T09:30:05.000Z",
  "updatedAt": "2026-10-15T08:00:00.000Z"
}