Create invoice

Save a draft invoice for a contact. Nothing is sent and no number is assigned yet.

MCP tool lexware_office_write → create_invoice

write

Saves an invoice as a draft, the state Lexware Office keeps editable until finalised. The draft has no invoice number, reaches no customer and is deleted with one call in the app, so it does not ask for your OK. Returns net, tax and gross totals so you can check them before finalize_document.

Parameters

Parameters: create_invoice
NameTypeDescription
contact_id string required string Contact ID from list_contacts or create_contact.
invoice_date string required string Invoice date, YYYY-MM-DD.
lines array required array Line items. Each has name, quantity, unit_price_net (EUR) and tax_rate (percent, as offered in your Lexware Office tax settings). Free-text lines need only a name.
delivery_date string string Delivery or service date, YYYY-MM-DD.
payment_term_days integer integer Days until the invoice is due. Default: your Lexware Office payment terms.
intro_text string string Introduction text above the lines.

tools/call

JSON-RPC

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "lexware_office_write",
    "arguments": {
      "operation": "create_invoice",
      "arguments": {
        "contact_id": "c_4f2a91",
        "invoice_date": "2026-10-14",
        "payment_term_days": 14,
        "lines": [
          {
            "name": "Consulting, October",
            "quantity": 10,
            "unit_price_net": 95,
            "tax_rate": 19
          }
        ]
      }
    }
  }
}

Example response

JSON

{
  "content": [
    {
      "type": "text",
      "text": "{ ... same JSON as structuredContent ... }"
    }
  ],
  "structuredContent": {
    "document_id": "d_c44e19",
    "type": "invoice",
    "number": null,
    "status": "draft",
    "contact": {
      "contact_id": "c_4f2a91",
      "name": "Nordlicht Design GmbH"
    },
    "date": "2026-10-14",
    "due_date": "2026-10-28",
    "lines": [
      {
        "name": "Consulting, October",
        "quantity": 10,
        "unit_price_net": 95,
        "tax_rate": 19
      }
    ],
    "total_net": 950,
    "total_tax": 180.5,
    "total_gross": 1130.5,
    "currency": "EUR"
  },
  "isError": false
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.