### Copy Environment Example Source: https://github.com/domonda/api/blob/master/mcp/openclaw/README.md Copy the example environment file to start configuring your API key and other settings. ```bash cp .env.example .env ``` -------------------------------- ### Install Go SDK Source: https://github.com/domonda/api/blob/master/README.md Install the Domonda Go SDK using Go modules. ```bash go get github.com/domonda/api/golang/domonda ``` -------------------------------- ### Copy MCP Server Configuration Example Source: https://github.com/domonda/api/blob/master/mcp/openclaw/README.md Copy the example OpenClaw MCP server configuration file. ```bash cp openclaw.json.example openclaw.json ``` -------------------------------- ### Directory Structure for MCP Setup Source: https://github.com/domonda/api/blob/master/mcp/claude-desktop/README.md This snippet outlines the file and directory structure for the Claude Desktop MCP integration. It includes the main configuration file, example configuration, a health check script, and the README itself. ```bash claude-desktop/ ├── SKILL.md # Skill definition (frontmatter + tool reference) ├── claude_desktop_config.json.example # Example Claude Desktop configuration ├── scripts/ │ └── health_check.sh # Connectivity check script └── README.md # This file ``` -------------------------------- ### Example Prompt: Execute Custom Query Source: https://github.com/domonda/api/blob/master/mcp/claude-code/README.md Example prompt for Claude Code to run a custom SQL query to find top partners by invoice count. ```text Run a query to find the top 10 partners by invoice count ``` -------------------------------- ### POST Partner Companies Request Example Source: https://github.com/domonda/api/blob/master/README.md Example cURL command to post partner company data. It includes authentication, content type, and a JSON array of partner objects. ```sh curl -X POST \ -H "Authorization: Bearer ${DOMONDA_API_KEY}" \ -H "Content-Type: application/json" \ --data '[{"Name":"Beispiel GmbH","Street":"Ringstrasse","ZIP":"10115","City":"Berlin","Country":"DE","Email":"contact@example.com","ClientAccountNumber":"K1","VendorAccountNumber":"L1"}]' \ -o - \ https://domonda.app/api/public/masterdata/partner-companies ``` -------------------------------- ### Example Prompt: List GL Accounts Source: https://github.com/domonda/api/blob/master/mcp/claude-code/README.md Example prompt for Claude Code to list all General Ledger accounts. ```text Which GL accounts are in use? ``` -------------------------------- ### POST General Ledger Accounts Example URL Source: https://github.com/domonda/api/blob/master/README.md Example URL for posting General Ledger Accounts with various optional query parameters. ```url https://domonda.app/api/public/masterdata/gl-accounts?source=MyCompany&objectSpecificAccountNos=true&findByName=true&failOnInvalid=false&allOrNone=true&useCleanedInvalid=true ``` -------------------------------- ### Example Prompt: Download Document PDF Source: https://github.com/domonda/api/blob/master/mcp/claude-code/README.md Example prompt for Claude Code to download a specific document's PDF. ```text Download the PDF for document 8a2f... ``` -------------------------------- ### Get Document Preview Tool Source: https://github.com/domonda/api/blob/master/mcp/claude-code/README.md Use the `get_document_preview` tool to get a preview of a document. ```tool_code get_document_preview ``` -------------------------------- ### GET Document Custom Fields Response Example Source: https://github.com/domonda/api/blob/master/README.md Example JSON response structure for custom document fields, showing a list of fields with their names and values. ```json [ { "name":"field1", "value":"KundenNr. 14392" } ] ``` -------------------------------- ### Example Prompt: Upload Document Source: https://github.com/domonda/api/blob/master/mcp/claude-code/README.md Example prompt for Claude Code to upload a PDF invoice into a specific category. ```text Upload this invoice PDF into the OTHER_DOCUMENTS category ``` -------------------------------- ### Example Prompt: Search Documents Source: https://github.com/domonda/api/blob/master/mcp/claude-code/README.md Example prompt for Claude Code to search for documents containing specific keywords. ```text Search documents for 'electricity bill' ``` -------------------------------- ### Copy Project-Scoped MCP Configuration Source: https://github.com/domonda/api/blob/master/mcp/claude-code/README.md Copies the example MCP configuration file to the project root, allowing it to be checked in and shared with teammates. ```bash cp mcp/claude-code/mcp.json.example /path/to/your/project/.mcp.json ``` -------------------------------- ### Example MCP Tool Object for Responses API Source: https://github.com/domonda/api/blob/master/mcp/chatgpt/README.md This is an example configuration object for an MCP tool when using the OpenAI Responses API. It defines the tool's name, description, and parameters. ```json { "name": "add_document", "description": "Ladet ein Dokument hoch.", "parameters": { "type": "object", "properties": { "document": { "type": "string", "description": "Das hochzuladende Dokument." } }, "required": ["document"] } } ``` -------------------------------- ### GET Document Custom Fields Request Example Source: https://github.com/domonda/api/blob/master/README.md Example of how to retrieve custom document fields using a cURL command. Ensure you replace 'your API key' and 'document ID' with actual values. ```bash #!/bin/bash TOKEN="your API key" doc_id="document ID" curl https://domonda.app/api/public/document/${doc_id}/custom-fields/ \ -H "Authorization: Bearer ${TOKEN}" ``` -------------------------------- ### Example Prompt: Filter Invoices Source: https://github.com/domonda/api/blob/master/mcp/claude-code/README.md Example prompt for Claude Code to find invoices within a specific date range and amount. ```text Show me all invoices from January 2026 over 1,000 ``` -------------------------------- ### Import Partner Companies with Go SDK Source: https://github.com/domonda/api/blob/master/README.md Demonstrates importing a list of partner companies into the Domonda system using the Go SDK. This example shows how to structure partner data and handle import results, including potential errors. ```go import ( "context" "github.com/domonda/api/golang/domonda" "github.com/domonda/go-types/account" "github.com/domonda/go-types/country" "github.com/domonda/go-types/notnull" "github.com/domonda/go-types/nullable" ) func importPartners() error { ctx := context.Background() apiKey := "YOUR_API_KEY" partners := []*domonda.Partner{ { Name: notnull.TrimmedString("Example Company GmbH"), Street: nullable.TrimmedString("Hauptstrasse 123"), City: nullable.TrimmedString("Berlin"), ZIP: nullable.TrimmedString("10115"), Country: country.NullableCode("DE"), VendorAccountNumber: account.NullableNumber("L1000"), ClientAccountNumber: account.NullableNumber("K2000"), }, } results, err := domonda.PostPartners( ctx, apiKey, partners, false, // failOnInvalid true, // useCleanedInvalid false, // allOrNone "MyERP", // source ) if err != nil { return err } // Check results for i, result := range results { switch result.State { case domonda.ImportStateCreated: println("Partner", i, "created") case domonda.ImportStateUpdated: println("Partner", i, "updated") case domonda.ImportStateUnchanged: println("Partner", i, "unchanged") case domonda.ImportStateError: println("Partner", i, "error:", result.Error) } } return nil } ``` -------------------------------- ### Download Audit Trail PDF in English Source: https://github.com/domonda/api/blob/master/README.md This example demonstrates how to download only the audit trail for a document in English by specifying query parameters in the URL. ```bash https://domonda.app/api/public/document/00000000-0000-0000-0000-000000000000.pdf?auditTrail=only&auditTrailLang=en ``` -------------------------------- ### POST General Ledger Accounts Request Body Example Source: https://github.com/domonda/api/blob/master/README.md Example JSON array representing GL Accounts to be posted. Each object includes Number, Name, Category, and optionally ObjectNo. ```json [ { "Number": "1/200", "Name": "Account for object 66", "Category": null, "ObjectNo": "66" }, { "Number": "9/100", "Name": "Other costs", } ] ``` -------------------------------- ### Upload a Document with Go SDK Source: https://github.com/domonda/api/blob/master/README.md Example of uploading a document and its associated invoice data using the Domonda Go SDK. Ensure you have the necessary API key and category ID. ```go import ( "context" "github.com/domonda/api/golang/domonda" "github.com/domonda/go-types/uu" "github.com/ungerik/go-fs" ) func uploadDocument() error { ctx := context.Background() apiKey := "YOUR_API_KEY" categoryID := uu.IDFromString("YOUR_CATEGORY_ID") documentFile := fs.File("invoice.pdf") invoiceFile := fs.File("invoice.json") documentID, err := domonda.UploadDocument( ctx, apiKey, categoryID, documentFile, invoiceFile, "tag1", "tag2", ) if err != nil { return err } // Use documentID for further operations println("Uploaded document:", documentID) return nil } ``` -------------------------------- ### Import General Ledger Accounts with Go SDK Source: https://github.com/domonda/api/blob/master/README.md Shows how to import general ledger accounts into the Domonda system using the Go SDK. This example includes defining account details and processing the import results, highlighting error states. ```go import ( "context" "github.com/domonda/api/golang/domonda" "github.com/domonda/go-types/account" "github.com/domonda/go-types/nullable" ) func importGLAccounts() error { ctx := context.Background() apiKey := "YOUR_API_KEY" accounts := []*domonda.GLAccount{ { Number: account.Number("1000"), Name: nullable.TrimmedString("Cash"), Category: nullable.TrimmedString("Assets"), }, { Number: account.Number("4000"), Name: nullable.TrimmedString("Sales Revenue"), Category: nullable.TrimmedString("Revenue"), }, } results, err := domonda.PostGLAccounts( ctx, apiKey, accounts, false, // findByName false, // objectSpecificAccountNos false, // failOnInvalid true, // allOrNone "MyERP", // source ) if err != nil { return err } // Check results for i, result := range results { if result.State == domonda.ImportStateError { println("Account", i, "error:", result.Error) } else { println("Account", result.NormalizedNumber, "imported with state:", result.State) } } return nil } ``` -------------------------------- ### Troubleshooting Source: https://github.com/domonda/api/blob/master/mcp/openclaw/README.md A guide to common issues encountered when using the API, including authentication errors, access problems, and query rejections, with suggested fixes. ```APIDOC ## Troubleshooting | Symptom | Cause | Fix | |---------------------------------|--------------------------------------------|------------------------------------------------------| | `Error: DOMONDA_API_KEY is not set` | Missing API key | Set `DOMONDA_API_KEY` in `.env` or your environment | | HTTP 401 | Invalid, expired, or blocked token | Verify your API key or OAuth token; contact admin if blocked | | HTTP 403 | Forbidden company access or insufficient OAuth scopes | Check the selected company or required scopes | | HTTP 404 | Wrong endpoint URL | Ensure the URL ends with `/api/mcp/` or `/api/mcp` | | Query returns no rows | Company scoping — data belongs to another company | Confirm `get_my_company` returns the expected company | | `execute_query` rejected | SQL validation failed (DML, wrong schema) | Use only SELECT/WITH against the `api` schema | ``` -------------------------------- ### List Capabilities Tool Source: https://github.com/domonda/api/blob/master/mcp/claude-code/README.md Use the `list_capabilities` tool to get a catalog of all available Domonda tools. ```tool_code list_capabilities ``` -------------------------------- ### List Available Capabilities Source: https://github.com/domonda/api/blob/master/mcp/openclaw/SKILL.md Use the `list_capabilities` tool to get a catalog of all available Domonda tools, grouped by topic. This is useful when unsure which tool to use. ```tool_code list_capabilities() ``` -------------------------------- ### Get User Tool Source: https://github.com/domonda/api/blob/master/mcp/claude-code/README.md Use the `get_user` tool to retrieve information about the current user. ```tool_code get_user ``` -------------------------------- ### Upload Invoice as XML (ebInterface) Source: https://github.com/domonda/api/blob/master/README.md This section details how to upload invoice data in the ebInterface 5.0 XML format. It provides examples using the CURL command-line tool, demonstrating how to include various fields like `documentCategory`, `tag`, `uuid`, `documentType`, `bookingType`, `bookingCategory`, and `allowDuplicateDeleted`. ```APIDOC ## Upload Invoice as XML (ebInterface) ### Description Upload an XML file in the ebInterface 5.0 format. This method supports various optional fields for categorization and processing. ### Method POST ### Endpoint https://domonda.app/api/public/upload ### Parameters #### Form Fields - **uuid** (string) - Optional - A user-defined UUID for the document that must not exist in Domonda yet. - **documentCategory** (string) - Optional - The ID of the document category. - **document** (file) - Optional - The invoice document (e.g., PDF). - **ebInterface** (file) - Required - The invoice data in ebInterface XML format. - **tag** (string) - Optional - Allows multiple tag fields for categorization. - **allowDuplicateDeleted** (boolean) - Optional - Allows duplicate deleted documents. - **documentType** (string) - Optional - Specifies the type of document (e.g., INCOMING_INVOICE). - **bookingType** (string) - Optional - Specifies the booking type. - **bookingCategory** (string) - Optional - Specifies the booking category. - **waitForExtraction** (boolean) - Optional - If true, the request will wait for the extraction process to complete. ``` -------------------------------- ### Get App URLs Tool Source: https://github.com/domonda/api/blob/master/mcp/claude-code/README.md Use the `get_app_urls` tool to retrieve application URLs. ```tool_code get_app_urls ``` -------------------------------- ### Get Document Tool Source: https://github.com/domonda/api/blob/master/mcp/claude-code/README.md Use the `get_document` tool to retrieve a specific document. ```tool_code get_document ``` -------------------------------- ### Get Company Information Tool Source: https://github.com/domonda/api/blob/master/mcp/claude-code/README.md Use the `get_my_company` tool to confirm authentication and identify the company associated with your API key. ```tool_code get_my_company ``` -------------------------------- ### Describe Table Tool Source: https://github.com/domonda/api/blob/master/mcp/claude-code/README.md Use the `describe_table` tool to get details about a specific table in the database schema. ```tool_code describe_table ``` -------------------------------- ### Authorization Header Example Source: https://github.com/domonda/api/blob/master/mcp/openclaw/README.md Use this header to authenticate your requests to the Domonda MCP server. Replace `` with your actual API key or OAuth token. ```http Authorization: Bearer ``` -------------------------------- ### Upload Structured Invoice Data as JSONC Source: https://github.com/domonda/api/blob/master/README.md This JSONC example demonstrates the structure for uploading structured invoice data. The 'confirmedBy' field, if set, marks all data as confirmed. JSONC format with comments is supported. ```jsonc { // Optional string or null "confirmedBy": "My Custom CRM", // Optional string or null "partnerName": "Muster I AG", // Optional string or null "partnerVatId": "ATU10223006", // Optional string or null "invoiceNumber": "17", // Optional string or null "internalNumber": null, // Optional string with format "YYYY-MM-DD" or null "invoiceDate": "2020-10-07", // Optional string with format "YYYY-MM-DD" or null "dueDate": "2020-10-21", // Optional string or null "orderNumber": "Auftrag 2020/1234", // Optional string with format "YYYY-MM-DD" or null "orderDate": "2020-08-15", // Optional boolean, false is used when missing "creditMemo": false, // Optional number or null "net": 5610.5, // Optional number or null "total": 6732.6, // Optional number or null "vatPercent": 20, // Optional array of numbers or null "vatPercentages": [20, 20, 20], // Optional array of numbers or null "vatAmounts": [210, 900, 12.1], // Optional number or null "discountPercent": 0, // Optional string with format "YYYY-MM-DD" or null "discountUntil": null, // Optional object or null "costCenters": { // Cost-center "number" as key with net amount as value "1000": 1050, // Cost-center "number" as key with net amount as value "2000": 4500, // Cost-center "number" as key with net amount as value "9000": 60.5 }, // Optional string or null, 3 character ISO 4217 alphabetic code "currency": "EUR", // Optional number greater zero or null "conversionRate": 1, // Optional string with format "YYYY-MM-DD" or null "conversionRateDate": "2020-10-07", // Optional string or null "goodsServices": "Website Design", // Optional string with format "YYYY-MM-DD" or null, use for performance period "deliveredFrom": "2020-09-01", // Optional string with format "YYYY-MM-DD" or null, use as single delivery date "deliveredUntil": "2020-09-30", // Optional string array "deliveryNoteNumbers": ["D12345"], // Optional string or null "iban": "DE02120300000000202051", // Optional string or null "bic": "BYLADEM1001", // Optional array of accounting-items or null "accountingItems": [ { // Required string "title": "Test", // Required string "generalLedgerAccountNumber": 1000, // Required enum "bookingType": "DEBIT", // or CREDIT // Required enum "amountType": "NET", // or TOTAL // Required number "amount": 5000, // Optional UUID or null "valueAddedTax": "e77d686e-92f2-4c96-a5c1-b7c912327e90", // See: vat-codes-and-percentages.csv // Optional number or null "valueAddedTaxPercentageAmount": 20 } ] } ``` -------------------------------- ### Initialize Session / Verify Token Source: https://github.com/domonda/api/blob/master/mcp/README.md Initialize a session or verify a token by sending a POST request with the 'initialize' method and client information. ```bash curl -s -X POST "https://domonda.app/api/mcp/" -H "Authorization: Bearer $DOMONDA_API_KEY" -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"curl","version":"1.0"}}}' | jq . ``` -------------------------------- ### Get Document Selection URL Tool Source: https://github.com/domonda/api/blob/master/mcp/claude-code/README.md Use the `get_document_selection_url` tool to get a URL for document selection. ```tool_code get_document_selection_url ``` -------------------------------- ### List Available Tools Source: https://github.com/domonda/api/blob/master/mcp/README.md Retrieve a list of available tools by sending a POST request with the 'tools/list' method. ```bash curl -s -X POST "https://domonda.app/api/mcp/" -H "Authorization: Bearer $DOMONDA_API_KEY" -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' | jq . ``` -------------------------------- ### List Available Tools Source: https://github.com/domonda/api/blob/master/mcp/README.md Lists the available tools by sending a JSON-RPC request with the 'tools/list' method. ```APIDOC ## POST /api/mcp/ ### Description Lists the available tools by sending a JSON-RPC request with the 'tools/list' method. Requires an Authorization header with a Bearer token. ### Method POST ### Endpoint https://domonda.app/api/mcp/ ### Parameters #### Headers - **Authorization** (string) - Required - Bearer token for authentication. - **Content-Type** (string) - Required - application/json #### Request Body - **jsonrpc** (string) - Required - "2.0" - **id** (integer) - Required - Request ID. - **method** (string) - Required - "tools/list" - **params** (object) - Required - Empty object for this method. ### Request Example { "example": "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/list\",\"params\":{}}" } ### Response #### Success Response (200) - **result** (array) - A list of available tools. - **id** (integer) - Request ID. #### Response Example { "example": "{\"jsonrpc\":\"2.0\",\"id\":1,\"result\":[]}" } ``` -------------------------------- ### Initialize Session / Verify Token Source: https://github.com/domonda/api/blob/master/mcp/README.md Initializes a session or verifies a token by sending a JSON-RPC request with the 'initialize' method. ```APIDOC ## POST /api/mcp/ ### Description Initializes a session or verifies a token by sending a JSON-RPC request with the 'initialize' method. Requires an Authorization header with a Bearer token. ### Method POST ### Endpoint https://domonda.app/api/mcp/ ### Parameters #### Headers - **Authorization** (string) - Required - Bearer token for authentication. - **Content-Type** (string) - Required - application/json #### Request Body - **jsonrpc** (string) - Required - "2.0" - **id** (integer) - Required - Request ID. - **method** (string) - Required - "initialize" - **params** (object) - Required - Parameters for the initialize method. - **protocolVersion** (string) - Required - The protocol version (e.g., "2025-11-25"). - **capabilities** (object) - Optional - Client capabilities. - **clientInfo** (object) - Optional - Information about the client. - **name** (string) - Client name. - **version** (string) - Client version. ### Request Example { "example": "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2025-11-25\",\"capabilities\":{},\"clientInfo\":{\"name\":\"curl\",\"version\":\"1.0\"}}}" } ### Response #### Success Response (200) - **result** (object) - Initialization result. - **id** (integer) - Request ID. #### Response Example { "example": "{\"jsonrpc\":\"2.0\",\"id\":1,\"result\":{}}" } ``` -------------------------------- ### GET /allInvoices Source: https://github.com/domonda/api/blob/master/doc/schema/query.doc.html Reads and enables pagination through a set of Invoice objects. ```APIDOC ## GET allInvoices ### Description Reads and enables pagination through a set of `Invoice`. ### Parameters #### Query Parameters - **first** (Int) - Optional - Only read the first n values of the set. - **last** (Int) - Optional - Only read the last n values of the set. - **offset** (Int) - Optional - Skip the first n values from our after cursor. - **before** (Cursor) - Optional - Read all values in the set before this cursor. - **after** (Cursor) - Optional - Read all values in the set after this cursor. - **orderBy** (InvoicesOrderBy) - Required - The method to use when ordering. - **condition** (InvoiceCondition) - Optional - A condition to be used in determining which values should be returned. ### Response - **Returns** (InvoicesConnection) - A connection object containing the paginated results. ``` -------------------------------- ### GET /allDocumentWorkflows Source: https://github.com/domonda/api/blob/master/doc/schema/query.doc.html Reads and enables pagination through a set of DocumentWorkflow objects. ```APIDOC ## GET allDocumentWorkflows ### Description Reads and enables pagination through a set of `DocumentWorkflow`. ### Parameters #### Query Parameters - **first** (Int) - Optional - Only read the first n values of the set. - **last** (Int) - Optional - Only read the last n values of the set. - **offset** (Int) - Optional - Skip the first n values from our after cursor. - **before** (Cursor) - Optional - Read all values in the set before this cursor. - **after** (Cursor) - Optional - Read all values in the set after this cursor. - **orderBy** (DocumentWorkflowsOrderBy) - Required - The method to use when ordering. - **condition** (DocumentWorkflowCondition) - Optional - A condition to be used in determining which values should be returned. ### Response - **Returns** (DocumentWorkflowsConnection) - A connection object containing the paginated results. ``` -------------------------------- ### GET allDocumentVersionFiles Source: https://github.com/domonda/api/blob/master/doc/schema/query.doc.html Reads and enables pagination through a set of DocumentVersionFile entities. ```APIDOC ## GET allDocumentVersionFiles ### Description Reads and enables pagination through a set of `DocumentVersionFile`. ### Method GET ### Parameters #### Query Parameters - **first** (Int) - Optional - Only read the first n values of the set. - **last** (Int) - Optional - Only read the last n values of the set. - **offset** (Int) - Optional - Skip the first n values from our after cursor. - **before** (Cursor) - Optional - Read all values in the set before this cursor. - **after** (Cursor) - Optional - Read all values in the set after this cursor. - **orderBy** (DocumentVersionFilesOrderBy[]) - Optional - The method to use when ordering DocumentVersionFile. - **condition** (DocumentVersionFileCondition) - Optional - A condition to be used in determining which values should be returned. ### Response #### Success Response (200) - **DocumentVersionFilesConnection** (Object) - A connection object containing the paginated list of DocumentVersionFile. ``` -------------------------------- ### List Tables Tool Source: https://github.com/domonda/api/blob/master/mcp/claude-code/README.md Use the `list_tables` tool to explore the available database schema. ```tool_code list_tables ``` -------------------------------- ### List Money Accounts Tool Source: https://github.com/domonda/api/blob/master/mcp/claude-code/README.md Use the `list_money_accounts` tool to list available money accounts. ```tool_code list_money_accounts ``` -------------------------------- ### GET allDocumentVersions Source: https://github.com/domonda/api/blob/master/doc/schema/query.doc.html Reads and enables pagination through a set of DocumentVersion entities. ```APIDOC ## GET allDocumentVersions ### Description Reads and enables pagination through a set of `DocumentVersion`. ### Method GET ### Parameters #### Query Parameters - **first** (Int) - Optional - Only read the first n values of the set. - **last** (Int) - Optional - Only read the last n values of the set. - **offset** (Int) - Optional - Skip the first n values from our after cursor. - **before** (Cursor) - Optional - Read all values in the set before this cursor. - **after** (Cursor) - Optional - Read all values in the set after this cursor. - **orderBy** (DocumentVersionsOrderBy[]) - Optional - The method to use when ordering DocumentVersion. - **condition** (DocumentVersionCondition) - Optional - A condition to be used in determining which values should be returned. ### Response #### Success Response (200) - **DocumentVersionsConnection** (Object) - A connection object containing the paginated list of DocumentVersion. ``` -------------------------------- ### GET allDocumentTags Source: https://github.com/domonda/api/blob/master/doc/schema/query.doc.html Reads and enables pagination through a set of DocumentTag entities. ```APIDOC ## GET allDocumentTags ### Description Reads and enables pagination through a set of `DocumentTag`. ### Method GET ### Parameters #### Query Parameters - **first** (Int) - Optional - Only read the first n values of the set. - **last** (Int) - Optional - Only read the last n values of the set. - **offset** (Int) - Optional - Skip the first n values from our after cursor. - **before** (Cursor) - Optional - Read all values in the set before this cursor. - **after** (Cursor) - Optional - Read all values in the set after this cursor. - **orderBy** (DocumentTagsOrderBy[]) - Optional - The method to use when ordering DocumentTag. - **condition** (DocumentTagCondition) - Optional - A condition to be used in determining which values should be returned. ### Response #### Success Response (200) - **DocumentTagsConnection** (Object) - A connection object containing the paginated list of DocumentTag. ``` -------------------------------- ### GET allDocumentCategories Source: https://github.com/domonda/api/blob/master/doc/schema/query.doc.html Reads and enables pagination through a set of DocumentCategory entities. ```APIDOC ## GET allDocumentCategories ### Description Reads and enables pagination through a set of `DocumentCategory`. ### Method GET ### Parameters #### Query Parameters - **first** (Int) - Optional - Only read the first n values of the set. - **last** (Int) - Optional - Only read the last n values of the set. - **offset** (Int) - Optional - Skip the first n values from our after cursor. - **before** (Cursor) - Optional - Read all values in the set before this cursor. - **after** (Cursor) - Optional - Read all values in the set after this cursor. - **orderBy** (DocumentCategoriesOrderBy[]) - Optional - The method to use when ordering DocumentCategory. - **condition** (DocumentCategoryCondition) - Optional - A condition to be used in determining which values should be returned. ### Response #### Success Response (200) - **DocumentCategoriesConnection** (Object) - A connection object containing the paginated list of DocumentCategory. ``` -------------------------------- ### Get Invoice Tool Source: https://github.com/domonda/api/blob/master/mcp/claude-code/README.md Use the `get_invoice` tool to retrieve details for a specific invoice. ```tool_code get_invoice ``` -------------------------------- ### Verify domonda MCP Server Addition Source: https://github.com/domonda/api/blob/master/mcp/claude-code/README.md Lists the currently configured MCP servers to confirm that the domonda server has been successfully added. ```bash claude mcp list ``` -------------------------------- ### Get Document URLs Tool Source: https://github.com/domonda/api/blob/master/mcp/claude-code/README.md Use the `get_document_urls` tool to retrieve URLs related to documents. ```tool_code get_document_urls ``` -------------------------------- ### Get Invoice Payments Tool Source: https://github.com/domonda/api/blob/master/mcp/claude-code/README.md Use the `get_invoice_payments` tool to retrieve payment information for an invoice. ```tool_code get_invoice_payments ``` -------------------------------- ### Get Document Thumbnail Tool Source: https://github.com/domonda/api/blob/master/mcp/claude-code/README.md Use the `get_document_thumbnail` tool to retrieve a thumbnail image for a document. ```tool_code get_document_thumbnail ``` -------------------------------- ### Connections Overview Source: https://github.com/domonda/api/blob/master/doc/schema/int.doc.html List of available connection types for retrieving paginated lists of objects. ```APIDOC ## Connections ### Description Various connection types used to retrieve lists of objects: - **DocumentTagsConnection**: A connection to a list of `DocumentTag` values. - **DocumentVersionFilesConnection**: A connection to a list of `DocumentVersionFile` values. - **DocumentVersionsConnection**: A connection to a list of `DocumentVersion` values. - **DocumentWorkflowsConnection**: A connection to a list of `DocumentWorkflow` values. - **DocumentWorkflowStepsConnection**: A connection to a list of `DocumentWorkflowStep` values. - **GeneralLedgerAccountsConnection**: A connection to a list of `GeneralLedgerAccount` values. - **InvoiceCostCentersConnection**: A connection to a list of `InvoiceCostCenter` values. - **InvoiceItemsConnection**: A connection to a list of `InvoiceItem` values. - **InvoicesConnection**: A connection to a list of `Invoice` values. - **UsersConnection**: A connection to a list of `User` values. ``` -------------------------------- ### OpenAI Agents SDK with MCPServerStreamableHttp Source: https://github.com/domonda/api/blob/master/mcp/chatgpt/README.md Uses the OpenAI Agents SDK to interact with a Domonda MCP server. Configures the MCPServerStreamableHttp with URL and headers, then uses an Agent to run a query against the server. ```python import os from agents import Agent, Runner from agents.mcp import MCPServerStreamableHttp async def main(): async with MCPServerStreamableHttp( name="domonda", params={ "url": "https://domonda.app/api/mcp/", "headers": {"Authorization": f"Bearer {os.environ['DOMONDA_API_KEY']}"}, }, cache_tools_list=True, ) as server: agent = Agent( name="Assistant", instructions="Use the domonda tools to answer.", mcp_servers=[server], ) result = await Runner.run(agent, "Which GL accounts are in use?") print(result.final_output) ``` -------------------------------- ### Get Document Fulltext Tool Source: https://github.com/domonda/api/blob/master/mcp/claude-code/README.md Use the `get_document_fulltext` tool to retrieve the full text content of a document. ```tool_code get_document_fulltext ``` -------------------------------- ### List Partner Companies Tool Source: https://github.com/domonda/api/blob/master/mcp/claude-code/README.md Use the `list_partner_companies` tool to list partner companies. ```tool_code list_partner_companies ``` -------------------------------- ### GET document's custom fields Source: https://github.com/domonda/api/blob/master/README.md Retrieves custom document fields that have been parsed from the document's fulltext. ```APIDOC ## GET document's custom fields ### Description Retrieves custom document fields that have been parsed from the document's fulltext. ### Method GET ### Endpoint https://domonda.app/api/public/document/{doc_id}/custom-fields/ ### Parameters #### Path Parameters - **doc_id** (string) - Required - The ID of the document. #### Request Example ```bash #!/bin/bash TOKEN="your API key" doc_id="document ID" curl https://domonda.app/api/public/document/${doc_id}/custom-fields/ \ -H "Authorization: Bearer ${TOKEN}" ``` #### Response #### Success Response (200) - **name** (string) - The name of the custom field. - **value** (string) - The value of the custom field. #### Response Example ```json [ { "name":"field1", "value":"KundenNr. 14392" } ] ``` ``` -------------------------------- ### GraphQL API Overview Source: https://github.com/domonda/api/blob/master/doc/schema/index.html Overview of the available GraphQL schema components including Queries, Scalars, Enums, and Interfaces. ```APIDOC ## GraphQL Schema Overview ### Description The Domonda API is built using GraphQL. This documentation outlines the core components of the schema. ### Query - [Query](query.doc.html) - Entry point for data retrieval. ### Scalars - BankBic, BankIban, BigInt, Boolean, CountryCode, CreatedTime, CurrencyCode, Cursor, Date, Datetime, EmailAddr, EmailAlias, Float, ID, Int, LanguageCode, String, UpdatedTime, UUID, VatId ### Enums - AccountingCompaniesOrderBy, BankAccountsOrderBy, BankAccountType, BanksOrderBy, BankTransactionsOrderBy, BankTransactionType, ClientCompaniesOrderBy, CompaniesOrderBy, CompanyCostCentersOrderBy, CompanyTagsOrderBy, CurrencyRatesOrderBy, DeliveryNoteItemsOrderBy, DeliveryNotesOrderBy, DocumentBankTransactionsOrderBy, DocumentCategoriesOrderBy, DocumentCategoryProcessor, DocumentsOrderBy, DocumentTagsOrderBy, DocumentType, DocumentVersionFilesOrderBy, DocumentVersionsOrderBy, DocumentWorkflowsOrderBy, DocumentWorkflowStepsOrderBy, GeneralLedgerAccountsOrderBy, InvoiceCostCentersOrderBy, InvoiceItemsOrderBy, InvoicePaymentStatus, InvoicesOrderBy, LegalForm, ProcessingFrequency, UsersOrderBy, VatDeclarationFrequency, __DirectiveLocation, __TypeKind ### Interfaces - [Node](node.doc.html) ``` -------------------------------- ### Add Document Tool Source: https://github.com/domonda/api/blob/master/mcp/claude-code/README.md Use the `add_document` tool to upload a new document. This is a write operation. ```tool_code add_document ``` -------------------------------- ### Add Domonda MCP Server Configuration (Local Development) Source: https://github.com/domonda/api/blob/master/mcp/claude-desktop/README.md This JSON snippet configures Claude Desktop for local development with the domonda MCP server. It uses a local endpoint URL and specifies npx as the command runner. ```json { "mcpServers": { "domonda": { "command": "npx", "args": [ "mcp-remote", "http://localhost:5001/mcp/", "--header", "Authorization: Bearer YOUR_API_KEY_HERE" ] } } } ``` -------------------------------- ### API Key Authentication Header Source: https://github.com/domonda/api/blob/master/mcp/README.md Example of the Authorization header for programmatic access using an API key as a Bearer token (HS256-signed JWT). ```http Authorization: Bearer ``` -------------------------------- ### Query allClientCompanies Source: https://github.com/domonda/api/blob/master/doc/schema/query.doc.html Reads and enables pagination through a set of ClientCompany entities. ```APIDOC ## Query allClientCompanies ### Description Reads and enables pagination through a set of ClientCompany entities. ### Parameters #### Query Parameters - **first** (Int) - Optional - Only read the first n values of the set. - **last** (Int) - Optional - Only read the last n values of the set. - **offset** (Int) - Optional - Skip the first n values from our after cursor. - **before** (Cursor) - Optional - Read all values in the set before this cursor. - **after** (Cursor) - Optional - Read all values in the set after this cursor. - **orderBy** (ClientCompaniesOrderBy!) - Required - The method to use when ordering ClientCompany. - **condition** (ClientCompanyCondition) - Optional - A condition to be used in determining which values should be returned. ### Response - **Returns** (ClientCompaniesConnection) - A connection object containing the paginated results. ``` -------------------------------- ### Run Read-Only SQL Query Source: https://github.com/domonda/api/blob/master/mcp/README.md Execute a read-only SQL query against the 'api' schema. The query is limited to selecting specific columns and ordering by date. ```bash curl -s -X POST "https://domonda.app/api/mcp/" -H "Authorization: Bearer $DOMONDA_API_KEY" -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"execute_query","arguments":{"sql":"SELECT id, title, document_date FROM api.document ORDER BY document_date DESC LIMIT 5"}}}' | jq . ``` -------------------------------- ### API Schema Overview Source: https://github.com/domonda/api/blob/master/doc/schema/bankaccounttype.doc.html Overview of the available schema components including scalars, enums, and interfaces. ```APIDOC ## API Schema Overview ### Description The Domonda API utilizes a structured schema consisting of scalars, enums, and interfaces to define data models and query parameters. ### Scalars - BankBic, BankIban, BigInt, Boolean, CountryCode, CreatedTime, CurrencyCode, Cursor, Date, Datetime, EmailAddr, EmailAlias, Float, ID, Int, LanguageCode, String, UpdatedTime, UUID, VatId ### Enums - AccountingCompaniesOrderBy, BankAccountsOrderBy, BankAccountType, BanksOrderBy, BankTransactionsOrderBy, BankTransactionType, ClientCompaniesOrderBy, CompaniesOrderBy, CompanyCostCentersOrderBy, CompanyTagsOrderBy, CurrencyRatesOrderBy, DeliveryNoteItemsOrderBy, DeliveryNotesOrderBy, DocumentBankTransactionsOrderBy, DocumentCategoriesOrderBy, DocumentCategoryProcessor, DocumentsOrderBy, DocumentTagsOrderBy, DocumentType, DocumentVersionFilesOrderBy, DocumentVersionsOrderBy, DocumentWorkflowsOrderBy, DocumentWorkflowStepsOrderBy, GeneralLedgerAccountsOrderBy, InvoiceCostCentersOrderBy, InvoiceItemsOrderBy, InvoicePaymentStatus, InvoicesOrderBy, LegalForm, ProcessingFrequency, UsersOrderBy, VatDeclarationFrequency, __DirectiveLocation, __TypeKind ### Interfaces - Node ``` -------------------------------- ### Local Development MCP Server Configuration Source: https://github.com/domonda/api/blob/master/mcp/openclaw/README.md For local development, update the 'url' field to use the DOMONDA_URL from your .env file. ```json { "mcpServers": { "domonda": { "url": "${DOMONDA_URL}/api/mcp/", "headers": { "Authorization": "Bearer ${DOMONDA_API_KEY}" } } } } ``` -------------------------------- ### JSON Payload for Company Master Data Upload Source: https://github.com/domonda/api/blob/master/README.md Example JSON payload for updating client-company master data via the REST API. This data follows an 'upsert' logic. ```JSON { "number": "1/200", "name": "Account for object 66", "category": null, "objectNo": "66" } ``` -------------------------------- ### List Document Workflows Tool Source: https://github.com/domonda/api/blob/master/mcp/claude-code/README.md Use the `list_document_workflows` tool to list document workflows. ```tool_code list_document_workflows ``` -------------------------------- ### Describe Table Schema Source: https://github.com/domonda/api/blob/master/mcp/openclaw/SKILL.md Use the `describe_table` tool to get details about the columns of a table or view in the `api` schema, including column names and data types. This is useful before writing a `SELECT` query. ```tool_code describe_table(table_name='invoice') ``` -------------------------------- ### List Document Workflow Steps Tool Source: https://github.com/domonda/api/blob/master/mcp/claude-code/README.md Use the `list_document_workflow_steps` tool to list steps within document workflows. ```tool_code list_document_workflow_steps ```