{"openapi":"3.0.3","info":{"title":"NoCFO API Documentation","version":"v1","x-logo":{"url":"https://cdn.nocfo.io/logos/nocfo-black.svg","backgroundColor":"#f2f4f7","altText":"NoCFO logo","href":"https://nocfo.io"},"description":"Get help and discuss in our [Slack community](https://nocfocommunity.slack.com) 👉 [**Click here to join**](https://join.slack.com/t/nocfocommunity/shared_invite/zt-3b7i1rcfp-4JmhWVTqGxzireppzCwA)\n\n### Welcome!\n\nWelcome to the NoCFO API Documentation! The **NoCFO API** provides secure, programmatic access to the core functionalities of the NoCFO platform, enabling seamless integration with your own applications and workflows.\nWith these endpoints, you can interact with a variety of features including **bookkeeping**, **invoicing**, and other financial operations.\n\nOur API is built to be reliable, scalable, and developer-friendly, with consistent request/response structures and clear authentication methods. Whether you are building new integrations, automating repetitive tasks, or syncing data between systems, the NoCFO API offers the tools you need.\n\n### Idempotency (POST requests)\n\nNetwork retries and client timeouts can cause the same **create** operation to be sent more than once. For **POST** requests you may send an optional **`Idempotency-Key`** header with a unique value (for example a UUID) that identifies one logical operation.\n\n- **Optional** — requests without this header behave as before.\n- **POST only** — `PUT`, `PATCH`, and `DELETE` are not handled by idempotency keys (they are already idempotent by HTTP semantics).\n- **Same key, same request** — if a previous POST with the same key completed successfully (HTTP 2xx), the API returns the **stored response** instead of creating a duplicate resource. The response includes the header `Idempotent-Replayed: true`.\n- **Same key, different body** — reusing a key with a different request payload is almost always a client bug. The API rejects it with **422 Unprocessable Content** and does not create a new resource. Generate a fresh key for a different operation.\n- **Failed requests** — non-2xx responses are **not** stored; you may retry with the same key after fixing the error.\n- **In progress** — if the same key is used while the first request is still processing, the API responds with **409 Conflict**.\n- **Retention** — successful responses are remembered for **24 hours**; after that, the same key may create a new resource.\n\nExample:\n\n```http\nPOST /v1/business/{business_slug}/invoices/\nIdempotency-Key: 550e8400-e29b-41d4-a716-446655440000\nAuthorization: Token <your_token_here>\nContent-Type: application/json\n\n{\"contact\": 1, \"lines\": []}\n```\n\n### Available Resources\n\nWe provide both **testing** and **production** environments so you can safely develop and validate your integration before going live.\n\n- **Testing environment**: [https://api-tst.nocfo.io/docs](https://api-tst.nocfo.io/docs)\nUse this environment for development and testing purposes. Data here is isolated and does not affect production systems.\n\n- **Production environment**: [https://api.nocfo.io/docs](https://api.nocfo.io/docs)\nUse this environment for live, real-world operations once your integration is fully tested.\n\n### Authentication\n\nThe NoCFO API uses **token-based authentication** to ensure secure access.\nTo authenticate requests, you must include a valid **Personal Access Token (PAT)** in the `Authorization` header:\n\n```http\nAuthorization: Token <your_token_here>\n```\n\n#### Key points to note:\n\n- Tokens are user-specific. Any action performed with a token will be attributed to the user who created it.\n- Keep your token secure — treat it like a password. Do not share it or expose it in public repositories.\n- If a token is compromised, it should be revoked immediately from your account settings.\n\n#### Obtaining Access Tokens\n\nYou can generate and manage your access tokens directly in the NoCFO web application under Account Settings.\n- Testing environment: https://login-tst.nocfo.io/auth/tokens/\n- Production environment: https://login.nocfo.io/auth/tokens/\n\n### Developer Support and Community\n\nJoin our [NoCFO Slack Community](https://nocfocommunity.slack.com) to connect with other developers, share best practices, and get direct support from our team.\nIn the Slack workspace, you can:\n- Ask questions about API usage and integrations\n- Get quick feedback and troubleshooting help\n- Share your use cases and solutions with others\n\n[**Click here to join**](https://join.slack.com/t/nocfocommunity/shared_invite/zt-3b7i1rcfp-4JmhWVTqGxzireppzCwA)"},"paths":{"/auth/jwt/":{"post":{"operationId":"auth_jwt_create","description":"Returns a short-lived JWT (1 hour) for the authenticated user. If a `business_slug` is provided, the token is scoped to that business.\n\nUse the returned token in the `Authorization` header:\n\n`Authorization: Token <jwt>`\n\nBusiness scoping: when provided, the `business_slug` is embedded in the JWT. The token is only valid for the business whose slug was requested, and requests must match that slug in the business context.\n\nWorkspace scoping: `selected_business_slugs` restricts a slug-less token to those businesses and embeds a per-business `billing_entities` cap for each. A selection that resolves to no accessible business is rejected.","summary":"Get JWT token","tags":["JWT"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetJwtTokenRequestRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/GetJwtTokenRequestRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/GetJwtTokenRequestRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetJwtTokenResponse"}}},"description":""},"400":{"description":"Validation error"},"403":{"description":"Forbidden"}}}},"/v1/business/":{"get":{"operationId":"settings.businesses.list","description":"List businesses. Supports search by business name, slug, and identifier value.","summary":"Businesses - List","parameters":[{"name":"page","required":false,"in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer"}},{"name":"page_size","required":false,"in":"query","description":"Number of results to return per page.","schema":{"type":"integer"}},{"name":"search","required":false,"in":"query","description":"A search term.","schema":{"type":"string"}}],"tags":["Businesses"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedBusinessList"}}},"description":""}}},"post":{"operationId":"settings.business.create","description":"Create a new business","summary":"Business - Create","tags":["Businesses"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/BusinessRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/BusinessRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Business"}}},"description":""}}}},"/v1/business/{business_slug}/":{"get":{"operationId":"settings.business.retrieve","description":"Retrieve the currently selected business (`business_slug`). Use this for business settings and metadata.","summary":"Business - Retrieve","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Businesses"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Business"}}},"description":""}}},"put":{"operationId":"settings.business.replace","description":"Replace the currently selected business (`business_slug`, full body). Use this for business settings and metadata updates.","summary":"Business - Replace","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Businesses"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/BusinessRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/BusinessRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Business"}}},"description":""}}},"patch":{"operationId":"settings.business.update","description":"Update the currently selected business (`business_slug`). Use this for business settings and metadata updates.","summary":"Business - Update","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Businesses"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedBusinessRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedBusinessRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedBusinessRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Business"}}},"description":""}}},"delete":{"operationId":"settings.business.delete","description":"Delete the currently selected business (`business_slug`).","summary":"Business - Delete","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Businesses"],"responses":{"204":{"description":"No response body"}}}},"/v1/business/{business_slug}/account/":{"get":{"operationId":"accounts_list","description":"List accounts for the selected business. Supports search by account number/name and filtering by type, usage, visibility, and tags.","summary":"Accounts - List","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"query","name":"is_shown","schema":{"type":"boolean"},"description":"If set to true, it will return accounts that are selected to be shown in the UI."},{"in":"query","name":"is_used","schema":{"type":"boolean"},"description":"If set to true, it will return accounts that have at least one entry."},{"in":"query","name":"number","schema":{"type":"number"},"description":"Filter accounts by exact numeric account number."},{"in":"query","name":"number_gte","schema":{"type":"number"},"description":"Filter accounts by minimum numeric account number. Use together with `number_lte` for a bounded account range."},{"in":"query","name":"number_lte","schema":{"type":"number"},"description":"Filter accounts by maximum numeric account number. Use together with `number_gte` for a bounded account range."},{"name":"page","required":false,"in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer"}},{"name":"page_size","required":false,"in":"query","description":"Number of results to return per page.","schema":{"type":"integer"}},{"in":"query","name":"search","schema":{"type":"string"},"description":"A search term.\n\nThe following fields are searched:\n\n| field    | match mode   |\n|----------|--------------|\n| `number` | prefix       |\n| `name`   | contains     |"},{"in":"query","name":"tags","schema":{"type":"number"},"description":"Filter accounts by tags. Account will be shown if it has at least one associated document with the specified tag."},{"in":"query","name":"type","schema":{"type":"array","items":{"type":"string","enum":["ASS","ASS_DEP","ASS_DUE","ASS_PAY","ASS_REC","ASS_VAT","EXP","EXP_50","EXP_DEP","EXP_NO","EXP_TAX","EXP_TAX_PRE","LIA","LIA_ACC","LIA_DEB","LIA_DUE","LIA_EQU","LIA_PRE","LIA_VAT","REV","REV_NO","REV_SAL"]}},"description":"Filter accounts by account type enum values (for example `ASS_PAY`, `LIA_DUE`, `REV_SAL`, `EXP`).\n\n* `ASS` - Vastaavaa\n* `ASS_DEP` - Poistokelpoinen omaisuus\n* `ASS_VAT` - Arvonlisäverosaatava\n* `ASS_REC` - Siirtosaamiset\n* `ASS_PAY` - Pankkitili / käteisvarat\n* `ASS_DUE` - Myyntisaatavat\n* `LIA` - Vastattavaa\n* `LIA_EQU` - Oma pääoma\n* `LIA_PRE` - Edellisten tilikausien voitto\n* `LIA_DUE` - Ostovelat\n* `LIA_DEB` - Velat\n* `LIA_ACC` - Siirtovelat\n* `LIA_VAT` - Arvonlisäverovelka\n* `REV` - Tulot\n* `REV_SAL` - Liikevaihtotulot (myynti)\n* `REV_NO` - Verottomat tulot\n* `EXP` - Menot\n* `EXP_DEP` - Poistot\n* `EXP_NO` - Vähennyskelvottomat menot\n* `EXP_50` - Puoliksi vähennyskelpoiset menot\n* `EXP_TAX` - Verotili\n* `EXP_TAX_PRE` - Ennakkoverot","explode":true,"style":"form"}],"tags":["Accounts"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedAccountListList"}}},"description":""}}},"post":{"operationId":"bookkeeping_account_create","description":"Create an account for the selected business.","summary":"Account - Create","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Accounts"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountListRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/AccountListRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/AccountListRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountList"}}},"description":""}},"x-mcp-namespace":"bookkeeping","x-mcp-component-type":"tool","x-mcp-mutates-state":true,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":true,"x-mcp-idempotency":"non_idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":["The request payload and target resource state must satisfy validation and business-rule preconditions before this action can succeed."],"x-mcp-state-constraints":{"validation_error":"400 validation_error","dependency_error":"412 precondition_failed","locked_error":"423 locked","notes":"Validation failures return `400 validation_error`; business-rule or resource-state blockers may return `412 precondition_failed` or `423 locked`."},"x-mcp-id-source":null,"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/business/{business_slug}/account/{account_id}/":{"get":{"operationId":"bookkeeping_account_retrieve","description":"Retrieve one account by ID. This endpoint can access hidden accounts when an explicit ID is provided.","summary":"Account - Retrieve","parameters":[{"in":"path","name":"account_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target account. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."},{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Accounts"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}},"description":""}},"x-mcp-namespace":"bookkeeping","x-mcp-component-type":"tool","x-mcp-mutates-state":false,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":false,"x-mcp-idempotency":"idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":null,"x-mcp-state-constraints":null,"x-mcp-id-source":{"account_id":{"discover_via":["bookkeeping_accounts_list","bookkeeping_account_retrieve"],"scope":"business_slug"}},"x-mcp-read-graph":{"account_id":{"scope":"business_slug","binding_mode":"single","dispatch_mode":"scalar","sources":[{"capability_name":"bookkeeping_accounts_list","query_parameter_names":["number","is_shown","is_used","number_gte","number_lte","tags","type","search"],"inherited_argument_names":["number"],"row_field_path":"id","allows_existing_collection":true,"allows_enumeration_without_candidate":false}]}},"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false},"put":{"operationId":"bookkeeping_account_replace","description":"Replace one account by ID (full body).","summary":"Account - Replace","parameters":[{"in":"path","name":"account_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target account. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."},{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Accounts"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/AccountRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/AccountRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}},"description":""}}},"patch":{"operationId":"bookkeeping_account_update","description":"Update one account by ID.","summary":"Account - Update","parameters":[{"in":"path","name":"account_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target account. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."},{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Accounts"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedAccountRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedAccountRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedAccountRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}},"description":""}},"x-mcp-namespace":"bookkeeping","x-mcp-component-type":"tool","x-mcp-mutates-state":true,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":true,"x-mcp-idempotency":"non_idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":["Target record must exist and the requested update must satisfy validation and business-rule constraints."],"x-mcp-state-constraints":{"validation_error":"400 validation_error","dependency_error":"412 precondition_failed","locked_error":"423 locked","notes":"Validation failures return `400 validation_error`; business-rule or resource-state blockers may return `412 precondition_failed` or `423 locked`."},"x-mcp-id-source":{"account_id":{"discover_via":["bookkeeping_accounts_list","bookkeeping_account_retrieve"],"scope":"business_slug"}},"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false},"delete":{"operationId":"bookkeeping_account_delete","description":"Delete one account by ID. Precondition: the account must not be referenced by protected bookkeeping documents or entries. If dependencies exist, API returns `412 precondition_failed`.","summary":"Account - Delete","parameters":[{"in":"path","name":"account_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target account. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."},{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Accounts"],"responses":{"204":{"description":"No response body"}},"x-mcp-namespace":"bookkeeping","x-mcp-component-type":"tool","x-mcp-mutates-state":true,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":true,"x-mcp-idempotency":"non_idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":["Account must not be referenced by protected bookkeeping entries or documents.","If the ID is unknown, resolve the account first with `bookkeeping_accounts_list` or `bookkeeping_account_retrieve`, then inspect dependent bookkeeping documents with `bookkeeping_documents_list` before retrying the delete."],"x-mcp-state-constraints":{"dependency_error":"412 precondition_failed","notes":"Delete fails when dependent bookkeeping records exist."},"x-mcp-id-source":{"account_id":{"discover_via":["bookkeeping_accounts_list","bookkeeping_account_retrieve"],"scope":"business_slug"}},"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/business/{business_slug}/account/{account_id}/hide/":{"post":{"operationId":"bookkeeping_account_hide","description":"Mark one account as hidden by ID.","summary":"Account - Hide","parameters":[{"in":"path","name":"account_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target account. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."},{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Accounts"],"responses":{"200":{"content":{"application/json":{"schema":null}},"description":""}},"x-mcp-namespace":"bookkeeping","x-mcp-component-type":"tool","x-mcp-mutates-state":true,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":true,"x-mcp-idempotency":"non_idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":["The request payload must satisfy validation and business-rule preconditions before this mutation can succeed."],"x-mcp-state-constraints":{"validation_error":"400 validation_error","dependency_error":"412 precondition_failed","locked_error":"423 locked","notes":"Validation failures return `400 validation_error`; business-rule or resource-state blockers may return `412 precondition_failed` or `423 locked`."},"x-mcp-id-source":{"account_id":{"discover_via":["bookkeeping_accounts_list","bookkeeping_account_retrieve"],"scope":"business_slug"}},"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/business/{business_slug}/account/{account_id}/show/":{"post":{"operationId":"bookkeeping_account_show","description":"Mark one account as shown by ID.","summary":"Account - Show","parameters":[{"in":"path","name":"account_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target account. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."},{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Accounts"],"responses":{"200":{"content":{"application/json":{"schema":null}},"description":""}},"x-mcp-namespace":"bookkeeping","x-mcp-component-type":"tool","x-mcp-mutates-state":true,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":true,"x-mcp-idempotency":"non_idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":["The request payload must satisfy validation and business-rule preconditions before this mutation can succeed."],"x-mcp-state-constraints":{"validation_error":"400 validation_error","dependency_error":"412 precondition_failed","locked_error":"423 locked","notes":"Validation failures return `400 validation_error`; business-rule or resource-state blockers may return `412 precondition_failed` or `423 locked`."},"x-mcp-id-source":{"account_id":{"discover_via":["bookkeeping_accounts_list","bookkeeping_account_retrieve"],"scope":"business_slug"}},"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/business/{business_slug}/account/balance_check/accounting_balance/":{"get":{"operationId":"accounts_balance_check_accounting_balance","description":"Returns the bookkeeping cumulative balance for an account on or before the given date. For migrated businesses with no entries in the range, the account opening balance is returned instead.","summary":"Accounts - Balance Check Accounting Balance","parameters":[{"in":"query","name":"account_id","schema":{"type":"integer"},"description":"Account ID to look up.","required":true},{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"query","name":"date","schema":{"type":"string","format":"date"},"description":"Return the balance on or before this date. Future dates are rejected.","required":true}],"tags":["Accounts"],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}},"description":""},"400":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}},"description":""}}}},"/v1/business/{business_slug}/account/balance_forecast/":{"get":{"operationId":"accounts_balance_forecast","description":"Returns daily balance forecast for the selected business (7 past days, current day, and 30 forecast days).","summary":"Accounts - Balance Forecast","parameters":[{"in":"query","name":"account_id","schema":{"type":"integer"},"description":"Optional account ID. If omitted, all supported accounts are combined."},{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Accounts"],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}},"description":""},"400":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}},"description":""}}}},"/v1/business/{business_slug}/constants/business_identifiers/":{"get":{"operationId":"constants_business_identifiers_retrieve","description":"Retrieve country-specific business identifier requirements for the selected business.","summary":"Constants - Business identifiers","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Businesses"],"responses":{"200":{"description":"No response body"}}}},"/v1/business/{business_slug}/constants/document_relation_roles/":{"get":{"operationId":"constants_document_relation_roles_retrieve","description":"Retrieve the document relation roles available for filtering documents by their role in a linking relation.","summary":"Constants - Document relation roles","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Documents"],"responses":{"200":{"description":"No response body"}}}},"/v1/business/{business_slug}/constants/einvoice_operators/":{"get":{"operationId":"constants_einvoice_operators_retrieve","description":"Retrieve supported e-invoice operators.","summary":"Constants - E-invoice operators","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Businesses"],"responses":{"200":{"description":"No response body"}},"x-mcp-namespace":"constants","x-mcp-component-type":"tool","x-mcp-mutates-state":false,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":false,"x-mcp-idempotency":"idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":null,"x-mcp-state-constraints":null,"x-mcp-id-source":null,"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/business/{business_slug}/constants/usership_tags/":{"get":{"operationId":"constants_usership_tags_retrieve","description":"Retrieve the business roles that can be assigned to members, with names and help text in the current user's language.","summary":"Constants - Business roles","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Businesses"],"responses":{"200":{"description":"No response body"}}}},"/v1/business/{business_slug}/constants/vat_codes/":{"get":{"operationId":"constants_vat_codes_retrieve","description":"Retrieve VAT codes available for the selected business country configuration.","summary":"Constants - VAT codes","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Businesses"],"responses":{"200":{"description":"No response body"}},"x-mcp-namespace":"constants","x-mcp-component-type":"tool","x-mcp-mutates-state":false,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":false,"x-mcp-idempotency":"idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":null,"x-mcp-state-constraints":null,"x-mcp-id-source":null,"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/business/{business_slug}/constants/vat_rates/":{"get":{"operationId":"constants_vat_rates_retrieve","description":"Retrieve VAT rate configuration effective for a specific date in the selected business country configuration.","summary":"Constants - VAT rates by date","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"query","name":"date_at","schema":{"type":"string","format":"date"},"description":"Effective date for VAT rate lookup, format YYYY-MM-DD (for example 2026-01-31).","required":true}],"tags":["Businesses"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VatRatesResponse"}}},"description":""}},"x-mcp-namespace":"constants","x-mcp-component-type":"tool","x-mcp-mutates-state":false,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":false,"x-mcp-idempotency":"idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":null,"x-mcp-state-constraints":null,"x-mcp-id-source":null,"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/business/{business_slug}/constants/workflow_event_trigger_types/":{"get":{"operationId":"workflow_event_trigger_types_list","description":"List event types available for event trigger nodes.","summary":"Constants - Workflow event trigger types","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Workflows"],"responses":{"200":{"description":"No response body"}}}},"/v1/business/{business_slug}/constants/workflow_filter_types/":{"get":{"operationId":"workflow_filter_types_list","description":"List filter types and their fields available for filter nodes.","summary":"Constants - Workflow filter types","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Workflows"],"responses":{"200":{"description":"No response body"}}}},"/v1/business/{business_slug}/constants/workflow_node_types/":{"get":{"operationId":"workflow_node_types_list","description":"List workflow node types available in the builder palette.","summary":"Constants - Workflow node types","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Workflows"],"responses":{"200":{"description":"No response body"}}}},"/v1/business/{business_slug}/constants/workflow_scheduled_trigger_frequencies/":{"get":{"operationId":"workflow_scheduled_trigger_frequencies_list","description":"List schedule frequencies available for scheduled trigger nodes.","summary":"Constants - Workflow scheduled trigger frequencies","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Workflows"],"responses":{"200":{"description":"No response body"}}}},"/v1/business/{business_slug}/contacts/":{"get":{"operationId":"contacts_list","description":"List contacts for the selected business. Supports search and filters such as invoicing-enabled, exact name, and excluded contact ID. Use `contact_business_id` for deterministic lookup when the identifier is known.","summary":"Contacts - List","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"query","name":"contact_business_id","schema":{"type":"string"},"description":"Filter contacts by exact business contact ID (asiakastunnus). Use this when the identifier is known."},{"in":"query","name":"exclude_id","schema":{"type":"integer"},"description":"Exclude contact by ID."},{"in":"query","name":"is_invoicing_enabled","schema":{"type":"boolean"},"description":"Filter contacts by whether they have invoicing enabled."},{"in":"query","name":"name_iexact","schema":{"type":"string"},"description":"Filter contacts by exact name match (case insensitive)."},{"name":"page","required":false,"in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer"}},{"name":"page_size","required":false,"in":"query","description":"Number of results to return per page.","schema":{"type":"integer"}},{"in":"query","name":"search","schema":{"type":"string"},"description":"A search term.\n\nThe following fields are searched:\n\n| field                 | match mode   |\n|-----------------------|--------------|\n| `name`                | contains     |\n| `contact_business_id` | prefix       |\n| `name_aliases`        | contains     |"}],"tags":["Contacts"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedContactList"}}},"description":""}}},"post":{"operationId":"invoicing_contact_create","description":"Create a contact for the selected business.","summary":"Contact - Create","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Contacts"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/ContactRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ContactRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}},"description":""}},"x-mcp-namespace":"invoicing","x-mcp-component-type":"tool","x-mcp-mutates-state":true,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":true,"x-mcp-idempotency":"non_idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":["The request payload and target resource state must satisfy validation and business-rule preconditions before this action can succeed."],"x-mcp-state-constraints":{"validation_error":"400 validation_error","dependency_error":"412 precondition_failed","locked_error":"423 locked","notes":"Validation failures return `400 validation_error`; business-rule or resource-state blockers may return `412 precondition_failed` or `423 locked`."},"x-mcp-id-source":null,"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/business/{business_slug}/contacts/{contact_id}/":{"get":{"operationId":"invoicing_contact_retrieve","description":"Retrieve one contact by ID. If ID is unknown, call `invoicing_contacts_list` with `contact_business_id` first, then use `search` as fallback.","summary":"Contact - Retrieve","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"contact_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target contact. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Contacts"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}},"description":""}},"x-mcp-namespace":"invoicing","x-mcp-component-type":"tool","x-mcp-mutates-state":false,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":false,"x-mcp-idempotency":"idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":null,"x-mcp-state-constraints":null,"x-mcp-id-source":{"contact_id":{"discover_via":["invoicing_contacts_list","invoicing_contact_retrieve"],"scope":"business_slug"}},"x-mcp-read-graph":{"contact_id":{"scope":"business_slug","binding_mode":"single","dispatch_mode":"scalar","sources":[{"capability_name":"invoicing_contacts_list","query_parameter_names":["contact_business_id","name_iexact","exclude_id","is_invoicing_enabled","search"],"inherited_argument_names":["contact_business_id","name_iexact"],"row_field_path":"id","allows_existing_collection":true,"allows_enumeration_without_candidate":false}]}},"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false},"put":{"operationId":"invoicing_contact_replace","description":"Replace one contact by ID (full body).","summary":"Contact - Replace","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"contact_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target contact. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Contacts"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/ContactRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ContactRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}},"description":""}}},"patch":{"operationId":"invoicing_contact_update","description":"Update one contact by ID.","summary":"Contact - Update","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"contact_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target contact. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Contacts"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedContactRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedContactRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedContactRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}},"description":""}},"x-mcp-namespace":"invoicing","x-mcp-component-type":"tool","x-mcp-mutates-state":true,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":true,"x-mcp-idempotency":"non_idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":["Target record must exist and the requested update must satisfy validation and business-rule constraints."],"x-mcp-state-constraints":{"validation_error":"400 validation_error","dependency_error":"412 precondition_failed","locked_error":"423 locked","notes":"Validation failures return `400 validation_error`; business-rule or resource-state blockers may return `412 precondition_failed` or `423 locked`."},"x-mcp-id-source":{"contact_id":{"discover_via":["invoicing_contacts_list","invoicing_contact_retrieve"],"scope":"business_slug"}},"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false},"delete":{"operationId":"invoicing_contact_delete","description":"Delete one contact by ID. Precondition: contact must not be referenced by invoices/documents. If dependencies exist, API returns `412 precondition_failed`.","summary":"Contact - Delete","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"contact_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target contact. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Contacts"],"responses":{"204":{"description":"No response body"}},"x-mcp-namespace":"invoicing","x-mcp-component-type":"tool","x-mcp-mutates-state":true,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":true,"x-mcp-idempotency":"non_idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":["Contact must not be referenced by invoices, documents, or other protected relations."],"x-mcp-state-constraints":{"dependency_error":"412 precondition_failed","notes":"Delete fails when dependent invoice or document links exist."},"x-mcp-id-source":{"contact_id":{"discover_via":["invoicing_contacts_list","invoicing_contact_retrieve"],"scope":"business_slug"}},"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/business/{business_slug}/document/":{"get":{"operationId":"v1_business_document_list","description":"List accounting documents for the selected business. Supports search and extensive filtering (including account type, date range, draft/flag state, tags, attachments, and ACCRUAL_PAIR due mismatch). Numeric `search` values also match entry amounts. Use `number` for deterministic lookup when the document number is known. List `relation_network_signals` include mismatch flags only; fetch document detail for ACCRUAL_PAIR invoice_total/payment_total. The following fields are searched:\n\n| field                          | match mode   |\n|--------------------------------|--------------|\n| `number`                       | prefix       |\n| `description`                  | contains     |\n| `contact__name`                | contains     |\n| `contact__name_aliases`        | contains     |\n| `contact__contact_business_id` | prefix       |\n| `import_data__contact_hint`    | contains     |","summary":"Documents - List","parameters":[{"in":"query","name":"account","schema":{"type":"number"},"description":"Filter documents by account ID."},{"in":"query","name":"account_type","schema":{"type":"string"},"description":"Filter documents that include at least one entry matching the provided account type. The parameter can be repeated, e.g. account_type=ASS_DUE&account_type=LIA_DUE. Values must be valid `AccountType` enum values. Use account_type_match=all to require every provided type to be present on the same document."},{"in":"query","name":"account_type_match","schema":{"type":"string"},"description":"Controls how repeated account_type values are combined. Use 'any' (default) or 'all'."},{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"query","name":"contact","schema":{"type":"number"},"description":"Filter documents by contact ID."},{"in":"query","name":"date_from","schema":{"type":"string","format":"date"},"description":"Filter documents from this date onwards. Date is inclusive."},{"in":"query","name":"date_to","schema":{"type":"string","format":"date"},"description":"Filter documents up to this date. Date is inclusive."},{"in":"query","name":"expense","schema":{"type":"boolean"},"description":"Filter documents that have expense entries."},{"in":"query","name":"file","schema":{"type":"integer"},"description":"Filter documents by attachment ID."},{"in":"query","name":"has_attachments","schema":{"type":"boolean"},"description":"Filter documents that have attachments."},{"in":"query","name":"has_due_mismatch","schema":{"type":"boolean"},"description":"Filter documents by ACCRUAL_PAIR due-amount mismatch (the list warning icon). Pass `true` for documents whose linked invoice/payment network does not net to zero. Pass `false` to exclude those documents."},{"in":"query","name":"has_rule","schema":{"type":"boolean"},"description":"Filter documents that have an accounting rule."},{"in":"query","name":"income","schema":{"type":"boolean"},"description":"Filter documents that have income entries."},{"in":"query","name":"is_draft","schema":{"type":"boolean"},"description":"Filter documents by draft status."},{"in":"query","name":"is_flagged","schema":{"type":"boolean"},"description":"Filter documents by flagged status."},{"in":"query","name":"is_linked","schema":{"type":"boolean"},"description":"Filter documents by whether they are linked to another document via a relation. Pass `true` for linked documents and `false` for unlinked documents."},{"in":"query","name":"is_locked","schema":{"type":"boolean"},"description":"Filter documents by locked status."},{"in":"query","name":"number","schema":{"type":"string"},"description":"Filter documents by exact document number. Use this when the document number is known."},{"name":"page","required":false,"in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer"}},{"name":"page_size","required":false,"in":"query","description":"Number of results to return per page.","schema":{"type":"integer"}},{"in":"query","name":"relation_role","schema":{"type":"string"},"description":"Filter linked documents by the role the document plays in its relations, e.g. relation_role=ACCRUAL or relation_role=SETTLEMENT. Values must be valid `DocumentRelationRole` values. Unknown values yield an empty result set (HTTP 200), not a 400."},{"in":"query","name":"rule","schema":{"type":"number"},"description":"Filter documents by accounting rule ID."},{"name":"search","required":false,"in":"query","description":"A search term.","schema":{"type":"string"}},{"in":"query","name":"tagged","schema":{"type":"number"},"description":"Filter documents by user ID tagged in comments."},{"in":"query","name":"tags","schema":{"type":"integer"},"description":"Filter documents by tag ID."},{"in":"query","name":"vat_code","schema":{"type":"number"},"description":"Filter documents that include at least one entry with the provided VAT code."},{"in":"query","name":"vat_rate","schema":{"type":"number"},"description":"Filter documents that include at least one entry with the provided VAT rate."}],"tags":["Documents"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedDocumentListList"}}},"description":""}}},"post":{"operationId":"v1_business_document_create","description":"Create an accounting document for the selected business. On create, entries are generated from `blueprint`.","summary":"Document - Create","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Documents"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentListRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/DocumentListRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/DocumentListRequest"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentList"}}},"description":""}}}},"/v1/business/{business_slug}/document/{document_id}/":{"get":{"operationId":"v1_business_document_retrieve","description":"Retrieve one accounting document by ID. If ID is unknown, call the list endpoint with `number` first, then use `search` as fallback.","summary":"Document - Retrieve","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"document_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target document. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Documents"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentInstance"}}},"description":""}}},"put":{"operationId":"v1_business_document_update","description":"Replace one accounting document by ID (full document body). Entries are recalculated from the current blueprint payload.","summary":"Document - Replace","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"document_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target document. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Documents"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentInstanceRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/DocumentInstanceRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/DocumentInstanceRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentInstance"}}},"description":""}}},"patch":{"operationId":"v1_business_document_partial_update","description":"Update one accounting document by ID. On update, entries are recalculated from the current blueprint payload.","summary":"Document - Update","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"document_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target document. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Documents"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedDocumentInstanceRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedDocumentInstanceRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedDocumentInstanceRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentInstance"}}},"description":""}}},"delete":{"operationId":"v1_business_document_destroy","description":"Delete one accounting document by ID.","summary":"Document - Delete","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"document_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target document. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Documents"],"responses":{"204":{"description":"No response body"}}}},"/v1/business/{business_slug}/document/{document_id}/action/attach_files/":{"post":{"operationId":"v1_business_document_action_attach_files_create","description":"Attach files to one document by ID.","summary":"Document - Attach files","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"document_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target document. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Documents"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentAttachmentIdsRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/DocumentAttachmentIdsRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/DocumentAttachmentIdsRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentInstance"}}},"description":""}}}},"/v1/business/{business_slug}/document/{document_id}/action/detach_files/":{"post":{"operationId":"v1_business_document_action_detach_files_create","description":"Detach files from one document by ID.","summary":"Document - Detach files","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"document_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target document. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Documents"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentAttachmentIdsRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/DocumentAttachmentIdsRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/DocumentAttachmentIdsRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentInstance"}}},"description":""}}}},"/v1/business/{business_slug}/document/{document_id}/action/flag/":{"post":{"operationId":"v1_business_document_action_flag_create","description":"Flag one document by ID.","summary":"Document - Flag","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"document_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target document. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Documents"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentInstance"}}},"description":""}}}},"/v1/business/{business_slug}/document/{document_id}/action/lock/":{"post":{"operationId":"v1_business_document_action_lock_create","description":"Lock one document by ID.","summary":"Document - Lock","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"document_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target document. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Documents"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentInstance"}}},"description":""}}}},"/v1/business/{business_slug}/document/{document_id}/action/unflag/":{"post":{"operationId":"v1_business_document_action_unflag_create","description":"Unflag one document by ID.","summary":"Document - Unflag","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"document_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target document. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Documents"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentInstance"}}},"description":""}}}},"/v1/business/{business_slug}/document/{document_id}/action/unlock/":{"post":{"operationId":"v1_business_document_action_unlock_create","description":"Unlock one document by ID.","summary":"Document - Unlock","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"document_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target document. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Documents"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentInstance"}}},"description":""}}}},"/v1/business/{business_slug}/document/{document_id}/entry/":{"get":{"operationId":"entries_list","description":"List entries for a single document. Entries are typically generated and maintained through the document `blueprint`, so update the document when you need to change accounting logic.","summary":"Entries - List","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"document_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target document. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."},{"name":"page","required":false,"in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer"}},{"name":"page_size","required":false,"in":"query","description":"Number of results to return per page.","schema":{"type":"integer"}}],"tags":["Documents"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedEntryList"}}},"description":""}}}},"/v1/business/{business_slug}/document/{document_id}/relation/":{"get":{"operationId":"document_relations_list","description":"List all relations belonging to a document. Each relation links the document to another document with a role and type (e.g. accrual/settlement pair).","summary":"Document relations — list","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"document_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target document. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."},{"name":"page","required":false,"in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer"}},{"name":"page_size","required":false,"in":"query","description":"Number of results to return per page.","schema":{"type":"integer"}}],"tags":["Documents"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedDocumentRelationList"}}},"description":""}}},"post":{"operationId":"document_relation_create","description":"Create a document relation between two documents in the same business (source and target, with roles and relation type).","summary":"Document relation — create","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"document_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target document. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Documents"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRelationRequest"},"examples":{"MinimalAccrualRelation":{"value":{"related_document":9303,"role":"ACCRUAL","type":"ACCRUAL_PAIR"},"summary":"Minimal accrual relation"}}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/DocumentRelationRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/DocumentRelationRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRelation"}}},"description":""}}}},"/v1/business/{business_slug}/document/{document_id}/relation/{relation_id}/":{"get":{"operationId":"document_relation_retrieve","description":"Retrieve one document relation by ID.","summary":"Document relation — retrieve","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"document_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target document. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."},{"in":"path","name":"relation_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target relation. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Documents"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRelation"}}},"description":""}}},"put":{"operationId":"bookkeeping_document_relation_replace","description":"Replace one document relation by ID (full update).","summary":"Document relation — replace","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"document_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target document. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."},{"in":"path","name":"relation_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target relation. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Documents"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRelationRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/DocumentRelationRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/DocumentRelationRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRelation"}}},"description":""}}},"patch":{"operationId":"document_relation_update","description":"Partially update one document relation by ID. Use `relation_id` values from `bookkeeping_document_relations_list` for the same `document_id`.","summary":"Document relation — update","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"document_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target document. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."},{"in":"path","name":"relation_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target relation. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Documents"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedDocumentRelationRequest"},"examples":{"SwitchRelationRole":{"value":{"role":"SETTLEMENT"},"summary":"Switch relation role"}}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedDocumentRelationRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedDocumentRelationRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRelation"}}},"description":""}}},"delete":{"operationId":"document_relation_delete","description":"Delete one document relation by ID. Use `relation_id` values from `bookkeeping_document_relations_list` for the same `document_id` context.","summary":"Document relation — delete","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"document_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target document. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."},{"in":"path","name":"relation_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target relation. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Documents"],"responses":{"204":{"description":"No response body"}}}},"/v1/business/{business_slug}/document/{document_id}/relation/suggestions/":{"get":{"operationId":"document_relation_suggestions_list","description":"List suggested document relations for a document, based on business rules and context (for example matching accrual/settlement pairs).","summary":"Document relation suggestions — list","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"document_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target document. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Documents"],"responses":{"200":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentRelationSuggestion"}}}},"description":""}}}},"/v1/business/{business_slug}/document/relation/suggestions/preview/":{"post":{"operationId":"bookkeeping_document_relation_suggestions_preview","description":"Preview document relation suggestions and relation signals from a draft blueprint and optional filters (date, contact, excluded document IDs) without persisting a document.","summary":"Document relation suggestions — preview","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Documents"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRelationSuggestionPreviewRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/DocumentRelationSuggestionPreviewRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/DocumentRelationSuggestionPreviewRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRelationSuggestionPreviewResponse"}}},"description":""}},"x-mcp-namespace":"bookkeeping","x-mcp-component-type":"tool","x-mcp-mutates-state":false,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":false,"x-mcp-idempotency":"idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":null,"x-mcp-state-constraints":null,"x-mcp-id-source":null,"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/business/{business_slug}/file_upload/":{"post":{"operationId":"bookkeeping_file_upload","description":"Upload a file using either multipart form data or a JSON payload with base64-encoded file content.","summary":"Files - Upload","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Files"],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/FileUploadRequestRequest"}},"application/json":{"schema":{"$ref":"#/components/schemas/FileUploadJsonRequestRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentInstance"}}},"description":""}},"x-mcp-namespace":"bookkeeping","x-mcp-component-type":"tool","x-mcp-mutates-state":true,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":true,"x-mcp-idempotency":"non_idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":["The request payload must satisfy validation and business-rule preconditions before this mutation can succeed."],"x-mcp-state-constraints":{"validation_error":"400 validation_error","dependency_error":"412 precondition_failed","locked_error":"423 locked","notes":"Validation failures return `400 validation_error`; business-rule or resource-state blockers may return `412 precondition_failed` or `423 locked`."},"x-mcp-id-source":null,"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/business/{business_slug}/files/":{"get":{"operationId":"files_list","description":"List uploaded files for the selected business. Files exist separately from accounting documents until linked as attachments.","summary":"Files - List","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"query","name":"folder","schema":{"type":"number"},"description":"Filter files by exact folder ID."},{"in":"query","name":"is_used","schema":{"type":"boolean"},"description":"Filter files that are already attached to at least one document."},{"name":"page","required":false,"in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer"}},{"name":"page_size","required":false,"in":"query","description":"Number of results to return per page.","schema":{"type":"integer"}},{"in":"query","name":"root","schema":{"type":"boolean"},"description":"Filter files that are stored at the root level with no folder assigned."},{"in":"query","name":"search","schema":{"type":"string"},"description":"A search term. Numeric values may also match amount fields.\n\nThe following fields are searched:\n\n| field                                 | match mode   |\n|---------------------------------------|--------------|\n| `name`                                | contains     |\n| `type`                                | contains     |\n| `documents__number`                   | prefix       |\n| `invoice__invoice_number`             | prefix       |\n| `invoice__receiver__name`             | prefix       |\n| `invoice__receiver__name_aliases`     | contains     |\n| `analysis_results__values__value_str` | contains     |"},{"in":"query","name":"tags","schema":{"type":"number"},"description":"Filter files that are linked to at least one document with the specified tag ID."}],"tags":["Files"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedAttachmentListList"}}},"description":""}}}},"/v1/business/{business_slug}/files/{file_id}/":{"get":{"operationId":"bookkeeping_file_retrieve","description":"Retrieve one file by ID.","summary":"File - Retrieve","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"file_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target file. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Files"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentInstance"}}},"description":""}},"x-mcp-namespace":"bookkeeping","x-mcp-component-type":"tool","x-mcp-mutates-state":false,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":false,"x-mcp-idempotency":"idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":null,"x-mcp-state-constraints":null,"x-mcp-id-source":{"file_id":{"discover_via":["bookkeeping_files_list","bookkeeping_file_retrieve"],"scope":"business_slug"}},"x-mcp-read-graph":{"file_id":{"scope":"business_slug","binding_mode":"single","dispatch_mode":"scalar","sources":[{"capability_name":"bookkeeping_files_list","query_parameter_names":["folder","is_used","root","tags","search"],"inherited_argument_names":["folder"],"row_field_path":"id","allows_existing_collection":true,"allows_enumeration_without_candidate":false}]}},"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false},"put":{"operationId":"bookkeeping_file_replace","description":"Replace one file's metadata by ID (full body).","summary":"File - Replace","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"file_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target file. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Files"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentInstanceRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/AttachmentInstanceRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/AttachmentInstanceRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentInstance"}}},"description":""}}},"patch":{"operationId":"bookkeeping_file_update","description":"Update one file's metadata by ID.","summary":"File - Update","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"file_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target file. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Files"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedAttachmentInstanceRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedAttachmentInstanceRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedAttachmentInstanceRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentInstance"}}},"description":""}},"x-mcp-namespace":"bookkeeping","x-mcp-component-type":"tool","x-mcp-mutates-state":true,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":true,"x-mcp-idempotency":"non_idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":["Target record must exist and the requested update must satisfy validation and business-rule constraints."],"x-mcp-state-constraints":{"validation_error":"400 validation_error","dependency_error":"412 precondition_failed","locked_error":"423 locked","notes":"Validation failures return `400 validation_error`; business-rule or resource-state blockers may return `412 precondition_failed` or `423 locked`."},"x-mcp-id-source":{"file_id":{"discover_via":["bookkeeping_files_list","bookkeeping_file_retrieve"],"scope":"business_slug"}},"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false},"delete":{"operationId":"bookkeeping_file_delete","description":"Delete one file by ID. Delete requires lock-safe permissions.","summary":"File - Delete","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"file_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target file. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Files"],"responses":{"204":{"description":"No response body"}},"x-mcp-namespace":"bookkeeping","x-mcp-component-type":"tool","x-mcp-mutates-state":true,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":true,"x-mcp-idempotency":"non_idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":["Target record must exist and any protected dependencies or business-rule constraints must allow deletion."],"x-mcp-state-constraints":{"dependency_error":"412 precondition_failed","notes":"Dependency-protected deletes may return `412 precondition_failed`."},"x-mcp-id-source":{"file_id":{"discover_via":["bookkeeping_files_list","bookkeeping_file_retrieve"],"scope":"business_slug"}},"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/business/{business_slug}/header/":{"get":{"operationId":"headers_list","description":"List account headers (account groups) for the selected business. Supports name search and returns hierarchy metadata (parent and level).","summary":"Headers - List","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"name":"page","required":false,"in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer"}},{"name":"page_size","required":false,"in":"query","description":"Number of results to return per page.","schema":{"type":"integer"}},{"in":"query","name":"search","schema":{"type":"string"},"description":"A search term.\n\nThe following fields are searched:\n\n| field   | match mode   |\n|---------|--------------|\n| `name`  | contains     |"}],"tags":["Accounts"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedHeaderListList"}}},"description":""}}},"post":{"operationId":"bookkeeping_header_create","description":"Create an account header (account group) for the selected business.","summary":"Header - Create","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Accounts"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeaderListRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/HeaderListRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/HeaderListRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeaderList"}}},"description":""}},"x-mcp-namespace":"bookkeeping","x-mcp-component-type":"tool","x-mcp-mutates-state":true,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":true,"x-mcp-idempotency":"non_idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":["The request payload and target resource state must satisfy validation and business-rule preconditions before this action can succeed."],"x-mcp-state-constraints":{"validation_error":"400 validation_error","dependency_error":"412 precondition_failed","locked_error":"423 locked","notes":"Validation failures return `400 validation_error`; business-rule or resource-state blockers may return `412 precondition_failed` or `423 locked`."},"x-mcp-id-source":null,"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/business/{business_slug}/header/{header_id}/":{"get":{"operationId":"bookkeeping_header_retrieve","description":"Retrieve one account header by ID. This endpoint is read-only; use header list/create for creation.","summary":"Header - Retrieve","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"header_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target header. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Accounts"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeaderList"}}},"description":""}},"x-mcp-namespace":"bookkeeping","x-mcp-component-type":"tool","x-mcp-mutates-state":false,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":false,"x-mcp-idempotency":"idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":null,"x-mcp-state-constraints":null,"x-mcp-id-source":{"header_id":{"discover_via":["bookkeeping_headers_list","bookkeeping_header_retrieve"],"scope":"business_slug"}},"x-mcp-read-graph":{"header_id":{"scope":"business_slug","binding_mode":"single","dispatch_mode":"scalar","sources":[{"capability_name":"bookkeeping_headers_list","query_parameter_names":["search"],"inherited_argument_names":[],"row_field_path":"id","allows_existing_collection":true,"allows_enumeration_without_candidate":false}]}},"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/business/{business_slug}/identifiers/":{"get":{"operationId":"settings.business_identifiers.list","description":"List or upsert business identifiers for the selected business. Identifier `type` uses enum `y_tunnus`, `vat_code`, or `steuernummer`.","summary":"Business identifiers - List","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"name":"page","required":false,"in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer"}},{"name":"page_size","required":false,"in":"query","description":"Number of results to return per page.","schema":{"type":"integer"}}],"tags":["Businesses"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedBusinessIdentifierList"}}},"description":""}}},"post":{"operationId":"settings.business_identifier.create","description":"List or upsert business identifiers for the selected business. Identifier `type` uses enum `y_tunnus`, `vat_code`, or `steuernummer`.","summary":"Business identifier - Create","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Businesses"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessIdentifierRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/BusinessIdentifierRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/BusinessIdentifierRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessIdentifier"}}},"description":""}}}},"/v1/business/{business_slug}/identifiers/{identifier_id}/":{"get":{"operationId":"settings.business_identifier.retrieve","description":"Retrieve one business identifier by ID.","summary":"Business identifier - Retrieve","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"identifier_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target identifier. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Businesses"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessIdentifier"}}},"description":""}}},"put":{"operationId":"settings.business_identifier.replace","description":"Replace one business identifier by ID (full body).","summary":"Business identifier - Replace","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"identifier_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target identifier. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Businesses"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessIdentifierRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/BusinessIdentifierRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/BusinessIdentifierRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessIdentifier"}}},"description":""}}},"patch":{"operationId":"settings.business_identifier.update","description":"Update one business identifier by ID.","summary":"Business identifier - Update","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"identifier_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target identifier. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Businesses"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedBusinessIdentifierRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedBusinessIdentifierRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedBusinessIdentifierRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessIdentifier"}}},"description":""}}},"delete":{"operationId":"settings.business_identifier.delete","description":"Delete one business identifier by ID. Deletion is blocked for country-required identifier types.","summary":"Business identifier - Delete","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"identifier_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target identifier. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Businesses"],"responses":{"204":{"description":"No response body"}}}},"/v1/business/{business_slug}/me/permissions/":{"get":{"operationId":"common_business_permissions_retrieve","description":"Retrieve current user (`me`) permissions for the selected business (`business_slug`).","summary":"Business permissions - Retrieve","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Businesses"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessPermissionsResponse"}}},"description":""}},"x-mcp-namespace":"common","x-mcp-component-type":"tool","x-mcp-mutates-state":false,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":false,"x-mcp-idempotency":"idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":null,"x-mcp-state-constraints":null,"x-mcp-id-source":null,"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/business/{business_slug}/period/":{"get":{"operationId":"accounting_periods_list","description":"List accounting periods for the selected business (`business_slug`).","summary":"Accounting periods - List","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"name":"page","required":false,"in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer"}},{"name":"page_size","required":false,"in":"query","description":"Number of results to return per page.","schema":{"type":"integer"}}],"tags":["Reports"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPeriodList"}}},"description":""}}},"post":{"operationId":"reporting_accounting_period_create","description":"Create a new accounting period for the selected business (`business_slug`).","summary":"Accounting period - Create","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Reports"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PeriodRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PeriodRequest"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Period"}}},"description":""}}}},"/v1/business/{business_slug}/period/{period_id}/":{"get":{"operationId":"reporting_accounting_period_retrieve","description":"Retrieve one accounting period (`period_id`) for the selected business (`business_slug`).","summary":"Accounting period - Retrieve","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"period_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target period. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Reports"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Period"}}},"description":""}},"x-mcp-namespace":"reporting","x-mcp-component-type":"tool","x-mcp-mutates-state":false,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":false,"x-mcp-idempotency":"idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":["reporting_editor","reporting_admin"],"x-mcp-permission-mode":"any_of","x-mcp-preconditions":null,"x-mcp-state-constraints":null,"x-mcp-id-source":{"period_id":{"discover_via":[],"scope":"business_slug"}},"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false},"put":{"operationId":"reporting_accounting_period_replace","description":"Replace one accounting period (`period_id`) for the selected business (`business_slug`) using a full payload.","summary":"Accounting period - Replace","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"period_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target period. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Reports"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PeriodRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PeriodRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Period"}}},"description":""}}},"patch":{"operationId":"reporting_accounting_period_update","description":"Update one accounting period (`period_id`) for the selected business (`business_slug`). Precondition: period must be editable and not protected by related posted data. Delete/update operations can fail with `412 precondition_failed` when dependent records exist.","summary":"Accounting period - Update","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"period_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target period. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Reports"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPeriodRequest"},"examples":{"MinimalEditablePeriodUpdate":{"value":{"end_date":"2024-12-31"},"summary":"Minimal editable period update"}}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedPeriodRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedPeriodRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Period"}}},"description":""}},"x-mcp-namespace":"reporting","x-mcp-component-type":"tool","x-mcp-mutates-state":true,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":true,"x-mcp-idempotency":"non_idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":["reporting_editor","reporting_admin"],"x-mcp-permission-mode":"any_of","x-mcp-preconditions":["The accounting period must not be locked.","The update must not violate related posted-data constraints."],"x-mcp-state-constraints":{"locked_error":"423 locked","dependency_error":"412 precondition_failed","notes":"Updates and deletes can fail when period lock or dependency constraints are violated."},"x-mcp-id-source":{"period_id":{"discover_via":["reporting_accounting_periods_list"],"scope":"business_slug"}},"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false},"delete":{"operationId":"reporting_accounting_period_delete","description":"Delete one accounting period (`period_id`) for the selected business (`business_slug`).","summary":"Accounting period - Delete","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"period_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target period. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Reports"],"responses":{"204":{"description":"No response body"}},"x-mcp-namespace":"reporting","x-mcp-component-type":"tool","x-mcp-mutates-state":true,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":true,"x-mcp-idempotency":"non_idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":["reporting_editor","reporting_admin"],"x-mcp-permission-mode":"any_of","x-mcp-preconditions":["The accounting period must not be locked.","The accounting period must not have dependent records that prevent deletion."],"x-mcp-state-constraints":{"locked_error":"423 locked","dependency_error":"412 precondition_failed","notes":"Deletes can fail when lock or dependency constraints are violated."},"x-mcp-id-source":{"period_id":{"discover_via":["reporting_accounting_periods_list"],"scope":"business_slug"}},"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/business/{business_slug}/report/balance-sheet/":{"post":{"operationId":"reporting_balance_sheet_retrieve","description":"Generate balance sheet report data as JSON using typed report request filters and columns.","summary":"Balance sheet","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Reports"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PointInTimeTypedReportRequestSchemaRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PointInTimeTypedReportRequestSchemaRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PointInTimeTypedReportRequestSchemaRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingReportJsonResponse"}}},"description":""}},"x-mcp-namespace":"reporting","x-mcp-component-type":"tool","x-mcp-mutates-state":false,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":false,"x-mcp-idempotency":"idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":null,"x-mcp-state-constraints":null,"x-mcp-id-source":null,"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/business/{business_slug}/report/balance-sheet-reconciliation/":{"post":{"operationId":"reporting_balance_sheet_reconciliation_retrieve","description":"Generate balance sheet reconciliation (specifications) data as JSON using typed report request filters and columns.","summary":"Balance sheet specifications","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Reports"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DateRangeTypedReportRequestSchemaRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/DateRangeTypedReportRequestSchemaRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/DateRangeTypedReportRequestSchemaRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceSheetReconciliationJsonResponse"}}},"description":""}},"x-mcp-namespace":"reporting","x-mcp-component-type":"tool","x-mcp-mutates-state":false,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":false,"x-mcp-idempotency":"idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":null,"x-mcp-state-constraints":null,"x-mcp-id-source":null,"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/business/{business_slug}/report/balance-sheet-short/":{"post":{"operationId":"reporting.balance_sheet_short.retrieve","description":"Generate short balance sheet report data as JSON using typed report request filters and columns.","summary":"Balance sheet - Short","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Reports"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PointInTimeTypedReportRequestSchemaRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PointInTimeTypedReportRequestSchemaRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PointInTimeTypedReportRequestSchemaRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingReportJsonResponse"}}},"description":""}}}},"/v1/business/{business_slug}/report/entries/":{"get":{"operationId":"reporting.entries.list","description":"List entry lines for one account or one document, paginated in the database. Account-scoped responses carry the running balance and the opening and closing balances of the window.","summary":"Report entries","parameters":[{"in":"query","name":"account_number","schema":{"type":"string","minLength":1},"description":"Return entries booked on this account. Mutually exclusive with `document_number`."},{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"query","name":"date_from","schema":{"type":"string","format":"date"},"description":"Start of the window (YYYY-MM-DD). Defaults to the earliest accounting period start, which makes running balances accumulate from inception."},{"in":"query","name":"date_to","schema":{"type":"string","format":"date"},"description":"End of the window (YYYY-MM-DD). Defaults to unbounded."},{"in":"query","name":"document_number","schema":{"type":"string","minLength":1},"description":"Return entries belonging to this document. Mutually exclusive with `account_number`."},{"in":"query","name":"page","schema":{"type":"integer","minimum":1,"default":1},"description":"1-based page index. Pages beyond the last one return the last page."},{"in":"query","name":"page_size","schema":{"type":"integer","maximum":200,"minimum":1,"default":8},"description":"Entries per page. Capped at 200."},{"in":"query","name":"tag_ids","schema":{"type":"array","items":{"type":"integer"}},"description":"Only include entries whose document carries one of these tags."}],"tags":["Reports"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScopedEntriesResponse"}}},"description":""}}}},"/v1/business/{business_slug}/report/equity-changes/":{"post":{"operationId":"reporting_equity_changes_retrieve","description":"Generate equity changes report data as JSON using typed report request filters and columns.","summary":"Equity changes","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Reports"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DateRangeTypedReportRequestSchemaRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/DateRangeTypedReportRequestSchemaRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/DateRangeTypedReportRequestSchemaRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingReportJsonResponse"}}},"description":""}},"x-mcp-namespace":"reporting","x-mcp-component-type":"tool","x-mcp-mutates-state":false,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":false,"x-mcp-idempotency":"idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":null,"x-mcp-state-constraints":null,"x-mcp-id-source":null,"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/business/{business_slug}/report/eu-vat-contact-report/":{"post":{"operationId":"reporting_eu_vat_contact_report_retrieve","description":"Generate EU VAT report data as JSON using typed report request filters and columns.","summary":"EU VAT report","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Reports"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DateRangeTypedReportRequestSchemaRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/DateRangeTypedReportRequestSchemaRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/DateRangeTypedReportRequestSchemaRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EUVatContactReportJsonResponse"}}},"description":""}},"x-mcp-namespace":"reporting","x-mcp-component-type":"tool","x-mcp-mutates-state":false,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":false,"x-mcp-idempotency":"idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":null,"x-mcp-state-constraints":null,"x-mcp-id-source":null,"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/business/{business_slug}/report/income-statement/":{"post":{"operationId":"reporting_income_statement_retrieve","description":"Generate income statement report data as JSON using typed report request filters and columns.","summary":"Income statement","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Reports"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DateRangeTypedReportRequestSchemaRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/DateRangeTypedReportRequestSchemaRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/DateRangeTypedReportRequestSchemaRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingReportJsonResponse"}}},"description":""}},"x-mcp-namespace":"reporting","x-mcp-component-type":"tool","x-mcp-mutates-state":false,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":false,"x-mcp-idempotency":"idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":null,"x-mcp-state-constraints":null,"x-mcp-id-source":null,"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/business/{business_slug}/report/income-statement-short/":{"post":{"operationId":"reporting.income_statement_short.retrieve","description":"Generate short income statement report data as JSON using typed report request filters and columns.","summary":"Income statement - Short","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Reports"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DateRangeTypedReportRequestSchemaRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/DateRangeTypedReportRequestSchemaRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/DateRangeTypedReportRequestSchemaRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingReportJsonResponse"}}},"description":""}}}},"/v1/business/{business_slug}/report/journal/":{"post":{"operationId":"reporting_journal_retrieve","description":"Generate journal report data as JSON using typed report request filters and columns.","summary":"Journal","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Reports"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DateRangeTypedReportRequestSchemaRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/DateRangeTypedReportRequestSchemaRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/DateRangeTypedReportRequestSchemaRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JournalJsonResponse"}}},"description":""}},"x-mcp-namespace":"reporting","x-mcp-component-type":"tool","x-mcp-mutates-state":false,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":false,"x-mcp-idempotency":"idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":null,"x-mcp-state-constraints":null,"x-mcp-id-source":null,"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/business/{business_slug}/report/ledger/":{"post":{"operationId":"reporting_ledger_retrieve","description":"Generate ledger report data as JSON using typed report request filters and columns.","summary":"Ledger","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Reports"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DateRangeTypedReportRequestSchemaRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/DateRangeTypedReportRequestSchemaRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/DateRangeTypedReportRequestSchemaRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerJsonResponse"}}},"description":""}},"x-mcp-namespace":"reporting","x-mcp-component-type":"tool","x-mcp-mutates-state":false,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":false,"x-mcp-idempotency":"idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":null,"x-mcp-state-constraints":null,"x-mcp-id-source":null,"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/business/{business_slug}/report/vat-report/":{"post":{"operationId":"reporting_vat_retrieve","description":"Generate VAT statement data as JSON using typed report request filters and columns.","summary":"VAT statement","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Reports"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DateRangeTypedReportRequestSchemaRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/DateRangeTypedReportRequestSchemaRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/DateRangeTypedReportRequestSchemaRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VatReportJsonResponse"}}},"description":""}},"x-mcp-namespace":"reporting","x-mcp-component-type":"tool","x-mcp-mutates-state":false,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":false,"x-mcp-idempotency":"idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":null,"x-mcp-state-constraints":null,"x-mcp-id-source":null,"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/business/{business_slug}/sales_payouts/":{"get":{"operationId":"sales_payouts_list","description":"List card/POS processor payouts ingested for this business. These records are the source for later bank matching and booking.","summary":"Sales payouts - List","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"name":"page","required":false,"in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer"}},{"name":"page_size","required":false,"in":"query","description":"Number of results to return per page.","schema":{"type":"integer"}}],"tags":["Sales payouts"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedSalesPayoutList"}}},"description":""}}},"post":{"operationId":"sales_payout_create","description":"Create a sales payout with signed line items. The sum of item amounts must equal the net payout amount. external_id must be unique per business. end_to_end_id is the bank-statement reference used for later matching.","summary":"Sales payout - Create","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Sales payouts"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesPayoutRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/SalesPayoutRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/SalesPayoutRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesPayout"}}},"description":""}}}},"/v1/business/{business_slug}/sales_payouts/{sales_payout_id}/":{"get":{"operationId":"sales_payout_retrieve","description":"Retrieve one sales payout by ID, including its line items.","summary":"Sales payout - Retrieve","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"sales_payout_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target sales payout. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Sales payouts"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesPayout"}}},"description":""}}}},"/v1/business/{business_slug}/tags/":{"get":{"operationId":"tags_list","description":"List tags for the selected business. Tags can be used to group documents/events and to filter report calculations.","summary":"Tags - List","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"name":"page","required":false,"in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer"}},{"name":"page_size","required":false,"in":"query","description":"Number of results to return per page.","schema":{"type":"integer"}}],"tags":["Tags"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedTagList"}}},"description":""}}},"post":{"operationId":"bookkeeping_tag_create","description":"Create a tag for the selected business.","summary":"Tag - Create","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Tags"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/TagRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/TagRequest"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag"}}},"description":""}},"x-mcp-namespace":"bookkeeping","x-mcp-component-type":"tool","x-mcp-mutates-state":true,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":true,"x-mcp-idempotency":"non_idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":["The request payload and target resource state must satisfy validation and business-rule preconditions before this action can succeed."],"x-mcp-state-constraints":{"validation_error":"400 validation_error","dependency_error":"412 precondition_failed","locked_error":"423 locked","notes":"Validation failures return `400 validation_error`; business-rule or resource-state blockers may return `412 precondition_failed` or `423 locked`."},"x-mcp-id-source":null,"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/business/{business_slug}/tags/{tag_id}/":{"get":{"operationId":"bookkeeping_tag_retrieve","description":"Retrieve one tag by ID.","summary":"Tag - Retrieve","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"tag_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target tag. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Tags"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag"}}},"description":""}},"x-mcp-namespace":"bookkeeping","x-mcp-component-type":"tool","x-mcp-mutates-state":false,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":false,"x-mcp-idempotency":"idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":null,"x-mcp-state-constraints":null,"x-mcp-id-source":{"tag_id":{"discover_via":["bookkeeping_tags_list","bookkeeping_tag_retrieve"],"scope":"business_slug"}},"x-mcp-read-graph":{"tag_id":{"scope":"business_slug","binding_mode":"single","dispatch_mode":"scalar","sources":[{"capability_name":"bookkeeping_tags_list","query_parameter_names":["ids","search"],"inherited_argument_names":["ids"],"row_field_path":"id","allows_existing_collection":true,"allows_enumeration_without_candidate":false}]}},"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false},"put":{"operationId":"bookkeeping_tag_replace","description":"Replace one tag by ID (full body).","summary":"Tag - Replace","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"tag_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target tag. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Tags"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/TagRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/TagRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag"}}},"description":""}}},"patch":{"operationId":"bookkeeping_tag_update","description":"Update one tag by ID.","summary":"Tag - Update","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"tag_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target tag. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Tags"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedTagRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedTagRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedTagRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag"}}},"description":""}},"x-mcp-namespace":"bookkeeping","x-mcp-component-type":"tool","x-mcp-mutates-state":true,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":true,"x-mcp-idempotency":"non_idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":["Target record must exist and the requested update must satisfy validation and business-rule constraints."],"x-mcp-state-constraints":{"validation_error":"400 validation_error","dependency_error":"412 precondition_failed","locked_error":"423 locked","notes":"Validation failures return `400 validation_error`; business-rule or resource-state blockers may return `412 precondition_failed` or `423 locked`."},"x-mcp-id-source":{"tag_id":{"discover_via":["bookkeeping_tags_list","bookkeeping_tag_retrieve"],"scope":"business_slug"}},"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false},"delete":{"operationId":"bookkeeping_tag_delete","description":"Delete one tag by ID.","summary":"Tag - Delete","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"tag_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target tag. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Tags"],"responses":{"204":{"description":"No response body"}},"x-mcp-namespace":"bookkeeping","x-mcp-component-type":"tool","x-mcp-mutates-state":true,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":true,"x-mcp-idempotency":"non_idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":["Target record must exist and any protected dependencies or business-rule constraints must allow deletion."],"x-mcp-state-constraints":{"dependency_error":"412 precondition_failed","notes":"Dependency-protected deletes may return `412 precondition_failed`."},"x-mcp-id-source":{"tag_id":{"discover_via":["bookkeeping_tags_list","bookkeeping_tag_retrieve"],"scope":"business_slug"}},"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/business/{business_slug}/vat_period/":{"get":{"operationId":"vat_periods_list","description":"List VAT periods for the selected business (`business_slug`).","summary":"VAT periods - List","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"name":"page","required":false,"in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer"}},{"name":"page_size","required":false,"in":"query","description":"Number of results to return per page.","schema":{"type":"integer"}}],"tags":["Reports"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedVatPeriodList"}}},"description":""}}},"post":{"operationId":"reporting_vat_period_create","description":"Create a new VAT period for the selected business (`business_slug`).","summary":"VAT period - Create","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Reports"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VatPeriodRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/VatPeriodRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/VatPeriodRequest"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VatPeriod"}}},"description":""}}}},"/v1/business/{business_slug}/vat_period/{vat_period_id}/":{"get":{"operationId":"reporting_vat_period_retrieve","description":"Retrieve one VAT period (`vat_period_id`) for the selected business (`business_slug`).","summary":"VAT period - Retrieve","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"vat_period_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target vat period. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Reports"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VatPeriod"}}},"description":""}},"x-mcp-namespace":"reporting","x-mcp-component-type":"tool","x-mcp-mutates-state":false,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":false,"x-mcp-idempotency":"idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":["reporting_editor","reporting_admin"],"x-mcp-permission-mode":"any_of","x-mcp-preconditions":null,"x-mcp-state-constraints":null,"x-mcp-id-source":{"vat_period_id":{"discover_via":["reporting_vat_periods_list","reporting_vat_period_retrieve"],"scope":"business_slug"}},"x-mcp-read-graph":{"vat_period_id":{"scope":"business_slug","binding_mode":"single","dispatch_mode":"scalar","sources":[{"capability_name":"reporting_vat_periods_list","query_parameter_names":[],"inherited_argument_names":[],"row_field_path":"id","allows_existing_collection":true,"allows_enumeration_without_candidate":false}]}},"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false},"put":{"operationId":"reporting_vat_period_replace","description":"Replace one VAT period (`vat_period_id`) for the selected business (`business_slug`) using a full payload.","summary":"VAT period - Replace","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"vat_period_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target vat period. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Reports"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VatPeriodRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/VatPeriodRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/VatPeriodRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VatPeriod"}}},"description":""}}},"patch":{"operationId":"reporting_vat_period_update","description":"Update one VAT period (`vat_period_id`) for the selected business (`business_slug`). State precondition: VAT period must be editable (not locked/reported).","summary":"VAT period - Update","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"vat_period_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target vat period. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Reports"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedVatPeriodRequest"},"examples":{"MinimalVATPeriodUpdate":{"value":{"start_date":"2024-02-01","period":1},"summary":"Minimal VAT period update"}}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedVatPeriodRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedVatPeriodRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VatPeriod"}}},"description":""}},"x-mcp-namespace":"reporting","x-mcp-component-type":"tool","x-mcp-mutates-state":true,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":true,"x-mcp-idempotency":"non_idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":["reporting_editor","reporting_admin"],"x-mcp-permission-mode":"any_of","x-mcp-preconditions":["VAT period must be editable for the selected business and current workflow state."],"x-mcp-state-constraints":{"editable_states":{"is_locked":false,"is_reported":false}},"x-mcp-id-source":{"vat_period_id":{"discover_via":["reporting_vat_periods_list","reporting_vat_period_retrieve"],"scope":"business_slug"}},"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false},"delete":{"operationId":"reporting_vat_period_delete","description":"Delete one VAT period (`vat_period_id`) for the selected business (`business_slug`). May return `412 precondition_failed` when linked records prevent deletion.","summary":"VAT period - Delete","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"vat_period_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target vat period. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Reports"],"responses":{"204":{"description":"No response body"}},"x-mcp-namespace":"reporting","x-mcp-component-type":"tool","x-mcp-mutates-state":true,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":true,"x-mcp-idempotency":"non_idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":["reporting_editor","reporting_admin"],"x-mcp-permission-mode":"any_of","x-mcp-preconditions":["VAT period must be deletable in the current business state.","Delete can fail when linked records or reporting workflow block removal."],"x-mcp-state-constraints":{"delete_blockers":["linked_records","reported_or_locked_state"]},"x-mcp-id-source":{"vat_period_id":{"discover_via":["reporting_vat_periods_list","reporting_vat_period_retrieve"],"scope":"business_slug"}},"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/business/{business_slug}/webhook_subscriptions/":{"get":{"operationId":"webhooks.subscription.list","summary":"Webhook subscriptions - List","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"name":"page","required":false,"in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer"}},{"name":"page_size","required":false,"in":"query","description":"Number of results to return per page.","schema":{"type":"integer"}}],"tags":["Businesses"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedWebhookSubscriptionList"}}},"description":""}}},"post":{"operationId":"webhooks.subscription.create","summary":"Webhook subscription - Create","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Businesses"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscription"}}},"description":""}}}},"/v1/business/{business_slug}/webhook_subscriptions/{subscription_id}/":{"get":{"operationId":"webhooks.subscription.retrieve","summary":"Webhook subscription - Retrieve","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"subscription_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target subscription. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Businesses"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscription"}}},"description":""}}},"put":{"operationId":"webhooks.subscription.replace","summary":"Webhook subscription - Replace","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"subscription_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target subscription. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Businesses"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscription"}}},"description":""}}},"patch":{"operationId":"webhooks.subscription.update","summary":"Webhook subscription - Update","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"subscription_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target subscription. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Businesses"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedWebhookSubscriptionRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedWebhookSubscriptionRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedWebhookSubscriptionRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscription"}}},"description":""}}},"delete":{"operationId":"webhooks.subscription.delete","summary":"Webhook subscription - Delete","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"subscription_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target subscription. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Businesses"],"responses":{"204":{"description":"No response body"}}}},"/v1/business/{business_slug}/workflows/":{"get":{"operationId":"workflows_list","description":"List automation workflows for the selected business.","summary":"Workflows - List","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"name":"ordering","required":false,"in":"query","description":"Which field to use when ordering the results.","schema":{"type":"string"}},{"name":"page","required":false,"in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer"}},{"name":"page_size","required":false,"in":"query","description":"Number of results to return per page.","schema":{"type":"integer"}}],"tags":["Workflows"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedWorkflowListList"}}},"description":""}}},"post":{"operationId":"workflow_create","description":"Create an automation workflow for the selected business.","summary":"Workflow - Create","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Workflows"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/WorkflowRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/WorkflowRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflow"}}},"description":""}}}},"/v1/business/{business_slug}/workflows/{workflow_id}/":{"get":{"operationId":"workflow_retrieve","description":"Retrieve one workflow by ID.","summary":"Workflow - Retrieve","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"workflow_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target workflow. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Workflows"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflow"}}},"description":""}}},"put":{"operationId":"workflow_replace","description":"Replace one workflow by ID (full body).","summary":"Workflow - Replace","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"workflow_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target workflow. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Workflows"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/WorkflowRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/WorkflowRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflow"}}},"description":""}}},"patch":{"operationId":"workflow_update","description":"Update one workflow by ID.","summary":"Workflow - Update","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"workflow_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target workflow. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Workflows"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedWorkflowRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedWorkflowRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedWorkflowRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workflow"}}},"description":""}}},"delete":{"operationId":"workflow_delete","description":"Delete one workflow by ID.","summary":"Workflow - Delete","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"workflow_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target workflow. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Workflows"],"responses":{"204":{"description":"No response body"}}}},"/v1/business/{business_slug}/workflows/{workflow_id}/runs/":{"get":{"operationId":"workflow_runs_list","description":"List execution history for one workflow.","summary":"Workflow runs - List","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"name":"page","required":false,"in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer"}},{"name":"page_size","required":false,"in":"query","description":"Number of results to return per page.","schema":{"type":"integer"}},{"in":"path","name":"workflow_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target workflow. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Workflows"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedWorkflowRunListList"}}},"description":""}}}},"/v1/business/{business_slug}/workflows/{workflow_id}/runs/{run_id}/":{"get":{"operationId":"workflow_run_retrieve","description":"Retrieve one workflow run with per-node execution rows.","summary":"Workflow run - Retrieve","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"run_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target run. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."},{"in":"path","name":"workflow_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target workflow. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Workflows"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRunDetail"}}},"description":""}}}},"/v1/business/{business_slug}/workflows/{workflow_id}/runs/{run_id}/cancel/":{"post":{"operationId":"workflow_run_cancel","description":"Request cancellation of a pending or running workflow run.","summary":"Workflow run - Cancel","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"run_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target run. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."},{"in":"path","name":"workflow_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target workflow. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Workflows"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRunDetailRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/WorkflowRunDetailRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/WorkflowRunDetailRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRunDetail"}}},"description":""}}}},"/v1/business/{business_slug}/workflows/scheduled_trigger_preview/":{"post":{"operationId":"workflow_scheduled_trigger_preview","description":"Preview the next scheduled trigger occurrences for a candidate config.","summary":"Workflow - Scheduled trigger preview","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Workflows"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduledTriggerPreviewRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/ScheduledTriggerPreviewRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ScheduledTriggerPreviewRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduledTriggerPreview"}}},"description":""}}}},"/v1/business_overview/":{"get":{"operationId":"start.business_overview.list","description":"Paginated, sortable overview of the user's businesses for the start page table. Separate from the plain businesses list API; optional metric columns are only computed when requested.","summary":"Business overview - List","parameters":[{"in":"query","name":"columns","schema":{"type":"string"},"description":"Comma-separated optional columns to include, e.g. `sales,drafts,bank_count`."},{"in":"query","name":"filters","schema":{"type":"string"},"description":"Comma-separated filters: `vat_soon`, `low_automation`, `overdue`, `archived` (agency users only)."},{"in":"query","name":"ordering","schema":{"type":"string"},"description":"Sort key, prefix with `-` for descending. One of: `name`, `automation`, `deadline`, `time_saved`, `sales`, `purchase`, `sales_unpaid`, `sales_overdue`, `purchase_overdue`, `debt`, `drafts`, `docs_month`, `docs_year`, `bank_count`, `last_sync`, `luca`."},{"name":"page","required":false,"in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer"}},{"name":"page_size","required":false,"in":"query","description":"Number of results to return per page.","schema":{"type":"integer"}},{"name":"search","required":false,"in":"query","description":"A search term.","schema":{"type":"string"}}],"tags":["Businesses"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedBusinessOverviewList"}}},"description":""}}}},"/v1/business_overview/archive/":{"post":{"operationId":"start.business_overview.archive","description":"Bulk (un)archive of the agency's businesses, driven by the overview table's selection. Archived businesses drop out of the agency's default list and live behind the `archived` filter; the client's own users are unaffected.","summary":"Business overview - Archive businesses","tags":["Businesses"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessOverviewArchiveRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/BusinessOverviewArchiveRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/BusinessOverviewArchiveRequest"}}},"required":true},"responses":{"200":{"description":"No response body"}}}},"/v1/business_overview/columns/":{"get":{"operationId":"start.business_overview.columns","description":"Overview table columns the current user may enable, with translated names and descriptions. A column is offered when at least one of the user's businesses permits it; the row-level enforcement still masks it on businesses that do not.","summary":"Business overview - Column options","tags":["Businesses"],"responses":{"200":{"description":"No response body"}}}},"/v1/business_overview/filter_counts/":{"get":{"operationId":"start.business_overview.filter_counts","description":"Number of businesses matching each quick filter of the start page table.","summary":"Business overview - Filter counts","tags":["Businesses"],"responses":{"200":{"description":"No response body"}}}},"/v1/constants/business_forms/":{"get":{"operationId":"constants_business_forms_retrieve","description":"Retrieve onboardable business forms for the request market. Demo and NY forms are omitted; they have dedicated onboard flows.","summary":"Constants - Business forms","tags":["Businesses"],"responses":{"200":{"description":"No response body"}}}},"/v1/integrations/business/{business_slug}/elster/certificate/":{"post":{"operationId":"v1_integrations_business_elster_certificate_create","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Integrations"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ElsterCertificateUploadRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/ElsterCertificateUploadRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ElsterCertificateUploadRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ElsterCertificateStatus"}}},"description":""}}}},"/v1/invoicing/{business_slug}/invoice/":{"get":{"operationId":"sales_invoices_list","description":"List sales invoices for the selected business. For sync/integration use cases, status-based filters support both current status (`status`) and status transition history windows (`status_changed_to` + `status_changed_at_gte/lte`). When available, invoice payloads also include related bank transaction/document linkage. Use `invoice_number` for deterministic lookup when the number is known.","summary":"Sales Invoices - List","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"query","name":"created_at_gte","schema":{"type":"string","format":"date"},"description":"Filter invoices by creation date from this date onwards (inclusive)."},{"in":"query","name":"created_at_lte","schema":{"type":"string","format":"date"},"description":"Filter invoices by creation date up to this date (inclusive)."},{"in":"query","name":"due_date_gte","schema":{"type":"string","format":"date"},"description":"Filter invoices from this due date onwards (inclusive)."},{"in":"query","name":"due_date_lte","schema":{"type":"string","format":"date"},"description":"Filter invoices up to this due date (inclusive)."},{"in":"query","name":"invoice_number","schema":{"type":"integer"},"description":"Filter invoices by exact invoice number. Use this when the invoice number is known."},{"in":"query","name":"invoicing_date_gte","schema":{"type":"string","format":"date"},"description":"Filter invoices from this invoicing date onwards (inclusive)."},{"in":"query","name":"invoicing_date_lte","schema":{"type":"string","format":"date"},"description":"Filter invoices up to this invoicing date (inclusive)."},{"in":"query","name":"is_credit_note","schema":{"type":"boolean"},"description":"Filter invoices based on whether they are credit notes."},{"name":"page","required":false,"in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer"}},{"name":"page_size","required":false,"in":"query","description":"Number of results to return per page.","schema":{"type":"integer"}},{"in":"query","name":"search","schema":{"type":"string"},"description":"A search term. Numeric values may also match amount fields.\n\nThe following fields are searched:\n\n| field                       | match mode   |\n|-----------------------------|--------------|\n| `invoice_number`            | contains     |\n| `description`               | contains     |\n| `reference`                 | exact        |\n| `receiver__name`            | contains     |\n| `receiver__name_aliases`    | contains     |\n| `receiver__invoicing_email` | contains     |\n| `rows__name`                | prefix       |\n| `rows__code`                | exact        |"},{"in":"query","name":"status","schema":{"type":"string"},"description":"Filter invoices by current status. Supports repeated query params (status=PAID&status=ACCEPTED) or comma-separated values (status=PAID,ACCEPTED). Allowed values: DRAFT, ACCEPTED, PAID, CREDIT_LOSS."},{"in":"query","name":"status_changed_at_gte","schema":{"type":"string","format":"date"},"description":"Filter status transition history from this date onwards (inclusive). Requires status_changed_to."},{"in":"query","name":"status_changed_at_lte","schema":{"type":"string","format":"date"},"description":"Filter status transition history up to this date (inclusive). Requires status_changed_to."},{"in":"query","name":"status_changed_to","schema":{"type":"string"},"description":"Filter invoices that have transitioned to this status within the status_changed_at window."},{"in":"query","name":"tags","schema":{"type":"string"},"description":"Filter invoices by tags. Supports repeated query params (tags=1&tags=2) or comma-separated values (tags=1,2)."},{"in":"query","name":"updated_at_gte","schema":{"type":"string","format":"date"},"description":"Filter invoices by last update date from this date onwards (inclusive)."},{"in":"query","name":"updated_at_lte","schema":{"type":"string","format":"date"},"description":"Filter invoices by last update date up to this date (inclusive)."}],"tags":["Invoices"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedInvoiceList"}}},"description":""}}},"post":{"operationId":"sales_invoice_create","description":"Create a sales invoice for the selected business. Request body includes invoice header fields and optional `rows`. `payment_condition_days` and `penalty_interest` use business defaults when omitted. If accrual-based invoicing accounting is enabled for the business, `settlement_date` is required. For reverse-charge VAT rows, receiver VAT ID must be available.","summary":"Sales Invoice - Create","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Invoices"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceRequest"},"examples":{"MinimalSalesInvoicePayload":{"value":{"receiver":1,"invoicing_date":"2024-12-31","description":"Consulting work","payment_condition_days":14,"rows":[{"name":"Consulting","unit":"pcs","product_count":1,"amount":100,"vat_code":1,"vat_rate":25.5}]},"summary":"Minimal sales invoice payload"}}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/InvoiceRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/InvoiceRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"description":""}}}},"/v1/invoicing/{business_slug}/invoice/{invoice_id}/":{"get":{"operationId":"sales_invoice_retrieve","description":"Retrieve one sales invoice by ID. When an invoice is linked to imported banking data, related bank transaction and document details are included in the response. If ID is unknown, call `invoicing_sales_invoices_list` with `invoice_number` first, then use `search` as fallback.","summary":"Sales Invoice - Retrieve","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"invoice_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target sales invoice. If the ID is not known, use `invoicing_sales_invoices_list` with relevant filters and/or the `search` parameter to locate the sales invoice."}],"tags":["Invoices"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"description":""}}},"put":{"operationId":"invoicing_sales_invoice_replace","description":"Replace one sales invoice by ID (full body).","summary":"Sales Invoice - Replace","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"invoice_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target sales invoice. If the ID is not known, use `invoicing_sales_invoices_list` with relevant filters and/or the `search` parameter to locate the sales invoice."}],"tags":["Invoices"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/InvoiceRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/InvoiceRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"description":""}}},"patch":{"operationId":"sales_invoice_update","description":"Update one sales invoice by ID. Precondition: invoice must be editable (draft state). If invoice is locked by status/workflow, API returns `423`.","summary":"Sales Invoice - Update","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"invoice_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target sales invoice. If the ID is not known, use `invoicing_sales_invoices_list` with relevant filters and/or the `search` parameter to locate the sales invoice."}],"tags":["Invoices"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedInvoiceRequest"},"examples":{"PatchSalesInvoiceDescription":{"value":{"description":"Updated invoice description"},"summary":"Patch sales invoice description"}}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedInvoiceRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedInvoiceRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"description":""}}},"delete":{"operationId":"sales_invoice_delete","description":"Delete one sales invoice by ID.","summary":"Sales Invoice - Delete","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"invoice_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target sales invoice. If the ID is not known, use `invoicing_sales_invoices_list` with relevant filters and/or the `search` parameter to locate the sales invoice."}],"tags":["Invoices"],"responses":{"204":{"description":"No response body"}}}},"/v1/invoicing/{business_slug}/invoice/{invoice_id}/actions/accept/":{"post":{"operationId":"invoicing_sales_invoice_accept","description":"Transition invoice status from draft to accepted and assign invoice numbering/reference. Acceptance does not send the invoice. After acceptance, first call `invoicing_sales_invoice_delivery_methods` to choose a channel, then call `invoicing_sales_invoice_send` to deliver it.","summary":"Sales Invoice - Accept","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"invoice_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target sales invoice. If the ID is not known, use `invoicing_sales_invoices_list` with relevant filters and/or the `search` parameter to locate the sales invoice."}],"tags":["Invoices"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"description":""}},"x-mcp-namespace":"invoicing","x-mcp-component-type":"tool","x-mcp-mutates-state":true,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":true,"x-mcp-idempotency":"non_idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":["invoicing_editor","invoicing_admin"],"x-mcp-permission-mode":"any_of","x-mcp-preconditions":["The request payload and target resource state must satisfy validation and business-rule preconditions before this action can succeed."],"x-mcp-state-constraints":{"validation_error":"400 validation_error","dependency_error":"412 precondition_failed","locked_error":"423 locked","notes":"Validation failures return `400 validation_error`; business-rule or resource-state blockers may return `412 precondition_failed` or `423 locked`."},"x-mcp-id-source":{"invoice_id":{"discover_via":[],"scope":"business_slug"}},"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/invoicing/{business_slug}/invoice/{invoice_id}/actions/credit_loss/":{"post":{"operationId":"invoicing_sales_invoice_mark_credit_loss","description":"Set invoice status to `CREDIT_LOSS`.","summary":"Sales Invoice - Set as Credit Loss","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"invoice_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target sales invoice. If the ID is not known, use `invoicing_sales_invoices_list` with relevant filters and/or the `search` parameter to locate the sales invoice."}],"tags":["Invoices"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"description":""}},"x-mcp-namespace":"invoicing","x-mcp-component-type":"tool","x-mcp-mutates-state":true,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":true,"x-mcp-idempotency":"non_idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":["invoicing_editor","invoicing_admin"],"x-mcp-permission-mode":"any_of","x-mcp-preconditions":["The request payload and target resource state must satisfy validation and business-rule preconditions before this action can succeed."],"x-mcp-state-constraints":{"validation_error":"400 validation_error","dependency_error":"412 precondition_failed","locked_error":"423 locked","notes":"Validation failures return `400 validation_error`; business-rule or resource-state blockers may return `412 precondition_failed` or `423 locked`."},"x-mcp-id-source":{"invoice_id":{"discover_via":[],"scope":"business_slug"}},"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/invoicing/{business_slug}/invoice/{invoice_id}/actions/disable_recurrence/":{"post":{"operationId":"invoicing_sales_invoice_recurrence_disable","description":"Disable future recurrence generation for this invoice template.","summary":"Sales Invoice - Disable Recurrence","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"invoice_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target sales invoice. If the ID is not known, use `invoicing_sales_invoices_list` with relevant filters and/or the `search` parameter to locate the sales invoice."}],"tags":["Invoices"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"description":""}},"x-mcp-namespace":"invoicing","x-mcp-component-type":"tool","x-mcp-mutates-state":true,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":true,"x-mcp-idempotency":"non_idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":["invoicing_editor","invoicing_admin"],"x-mcp-permission-mode":"any_of","x-mcp-preconditions":["The request payload and target resource state must satisfy validation and business-rule preconditions before this action can succeed."],"x-mcp-state-constraints":{"validation_error":"400 validation_error","dependency_error":"412 precondition_failed","locked_error":"423 locked","notes":"Validation failures return `400 validation_error`; business-rule or resource-state blockers may return `412 precondition_failed` or `423 locked`."},"x-mcp-id-source":{"invoice_id":{"discover_via":[],"scope":"business_slug"}},"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/invoicing/{business_slug}/invoice/{invoice_id}/actions/paid/":{"post":{"operationId":"invoicing_sales_invoice_mark_paid","description":"Set invoice status to `PAID` and update payment date to current timestamp.","summary":"Sales Invoice - Set as Paid","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"invoice_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target sales invoice. If the ID is not known, use `invoicing_sales_invoices_list` with relevant filters and/or the `search` parameter to locate the sales invoice."}],"tags":["Invoices"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"description":""}},"x-mcp-namespace":"invoicing","x-mcp-component-type":"tool","x-mcp-mutates-state":true,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":true,"x-mcp-idempotency":"non_idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":["invoicing_editor","invoicing_admin"],"x-mcp-permission-mode":"any_of","x-mcp-preconditions":["The request payload and target resource state must satisfy validation and business-rule preconditions before this action can succeed."],"x-mcp-state-constraints":{"validation_error":"400 validation_error","dependency_error":"412 precondition_failed","locked_error":"423 locked","notes":"Validation failures return `400 validation_error`; business-rule or resource-state blockers may return `412 precondition_failed` or `423 locked`."},"x-mcp-id-source":{"invoice_id":{"discover_via":[],"scope":"business_slug"}},"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/invoicing/{business_slug}/invoice/{invoice_id}/actions/unpaid/":{"post":{"operationId":"invoicing_sales_invoice_mark_unpaid","description":"Set invoice status back to `ACCEPTED` (unpaid state).","summary":"Sales Invoice - Set as Unpaid","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"invoice_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target sales invoice. If the ID is not known, use `invoicing_sales_invoices_list` with relevant filters and/or the `search` parameter to locate the sales invoice."}],"tags":["Invoices"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"description":""}},"x-mcp-namespace":"invoicing","x-mcp-component-type":"tool","x-mcp-mutates-state":true,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":true,"x-mcp-idempotency":"non_idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":["invoicing_editor","invoicing_admin"],"x-mcp-permission-mode":"any_of","x-mcp-preconditions":["The request payload and target resource state must satisfy validation and business-rule preconditions before this action can succeed."],"x-mcp-state-constraints":{"validation_error":"400 validation_error","dependency_error":"412 precondition_failed","locked_error":"423 locked","notes":"Validation failures return `400 validation_error`; business-rule or resource-state blockers may return `412 precondition_failed` or `423 locked`."},"x-mcp-id-source":{"invoice_id":{"discover_via":[],"scope":"business_slug"}},"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/invoicing/{business_slug}/invoice/{invoice_id}/delivery_methods/":{"get":{"operationId":"invoicing_sales_invoice_delivery_methods","description":"List available delivery methods for this invoice (for example email).","summary":"Sales Invoice - Get Delivery Methods","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"invoice_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target sales invoice. If the ID is not known, use `invoicing_sales_invoices_list` with relevant filters and/or the `search` parameter to locate the sales invoice."}],"tags":["Invoices"],"responses":{"200":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeliveryMethodInfo"}}}},"description":""}},"x-mcp-namespace":"invoicing","x-mcp-component-type":"tool","x-mcp-mutates-state":false,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":false,"x-mcp-idempotency":"idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":["invoicing_editor","invoicing_admin"],"x-mcp-permission-mode":"any_of","x-mcp-preconditions":null,"x-mcp-state-constraints":null,"x-mcp-id-source":{"invoice_id":{"discover_via":[],"scope":"business_slug"}},"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/invoicing/{business_slug}/invoice/{invoice_id}/send/":{"post":{"operationId":"invoicing_sales_invoice_send","description":"Send the invoice using the selected delivery method. This action can trigger external delivery channels such as email/e-invoice.","summary":"Sales Invoice - Send","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"invoice_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target sales invoice. If the ID is not known, use `invoicing_sales_invoices_list` with relevant filters and/or the `search` parameter to locate the sales invoice."}],"tags":["Invoices"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendInvoiceRequest"},"examples":{"EmailDeliveryPayload":{"value":{"delivery_method":"EMAIL","data":{"email_subject":"Invoice 2024-12","email_content":"Please find the invoice attached."}},"summary":"Email delivery payload"}}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/SendInvoiceRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/SendInvoiceRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"description":""},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"},"examples":{"InvalidStateError":{"value":{"error_type":"precondition_failed","error_code":"invalid_state","message":"Invoice cannot be sent in its current state. Ensure the invoice is accepted and recurrence is disabled.","status_code":400,"details":{"status":"DRAFT","is_recurrence_active":false},"hint":"Accept the invoice first and ensure recurrence is disabled before sending."},"summary":"Invalid state error"}}}},"description":"Structured error when the invoice cannot be sent in the current state or delivery validation fails."}},"x-mcp-namespace":"invoicing","x-mcp-component-type":"tool","x-mcp-mutates-state":true,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":true,"x-mcp-requires-confirmation":true,"x-mcp-idempotency":"non_idempotent","x-mcp-external-effects":["email","einvoice","elasku","paper_delivery"],"x-mcp-required-permissions":["invoicing_editor","invoicing_admin"],"x-mcp-permission-mode":"any_of","x-mcp-preconditions":["Invoice must be in a sendable state (`ACCEPTED`) and recurrence must be disabled.","Delivery method prerequisites must be satisfied before sending."],"x-mcp-state-constraints":{"sendable_statuses":["ACCEPTED"],"locked_failure":null,"invalid_state_error":{"status_code":400,"error_type":"precondition_failed","error_code":"invalid_state"}},"x-mcp-id-source":{"invoice_id":{"discover_via":["invoicing_sales_invoice_retrieve","invoicing_sales_invoice_delivery_methods"],"scope":"business_slug","hint":"Use invoice IDs from the same business scope."}},"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/invoicing/{business_slug}/invoice/{invoice_id}/status_messages/":{"post":{"operationId":"invoicing_sales_invoice_status_message_create","description":"Add a custom status message shown in NoCFO UI, typically used to surface progress from external processing systems.","summary":"Sales Invoice - Create external status message","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"invoice_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target sales invoice. If the ID is not known, use `invoicing_sales_invoices_list` with relevant filters and/or the `search` parameter to locate the sales invoice."}],"tags":["Invoices"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceExternalStatusMessageRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/InvoiceExternalStatusMessageRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/InvoiceExternalStatusMessageRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceExternalStatusMessage"}}},"description":""}},"x-mcp-namespace":"invoicing","x-mcp-component-type":"tool","x-mcp-mutates-state":true,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":true,"x-mcp-idempotency":"non_idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":["invoicing_admin"],"x-mcp-permission-mode":"any_of","x-mcp-preconditions":["The request payload and target resource state must satisfy validation and business-rule preconditions before this action can succeed."],"x-mcp-state-constraints":{"validation_error":"400 validation_error","dependency_error":"412 precondition_failed","locked_error":"423 locked","notes":"Validation failures return `400 validation_error`; business-rule or resource-state blockers may return `412 precondition_failed` or `423 locked`."},"x-mcp-id-source":{"invoice_id":{"discover_via":[],"scope":"business_slug"}},"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/invoicing/{business_slug}/invoice/{invoice_id}/status_messages/{message_id}/":{"delete":{"operationId":"invoicing_sales_invoice_status_message_delete","description":"Delete one external status message by ID. Use `message_id` values from `invoicing_sales_invoice_retrieve` (`external_status_messages`) for the same invoice.","summary":"Sales Invoice - Delete External Status Message","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"invoice_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target sales invoice. If the ID is not known, use `invoicing_sales_invoices_list` with relevant filters and/or the `search` parameter to locate the sales invoice."},{"in":"path","name":"message_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target message. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Invoices"],"responses":{"204":{"description":"No response body"}},"x-mcp-namespace":"invoicing","x-mcp-component-type":"tool","x-mcp-mutates-state":true,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":true,"x-mcp-idempotency":"non_idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":["invoicing_admin"],"x-mcp-permission-mode":"any_of","x-mcp-preconditions":["The `message_id` must belong to the selected invoice."],"x-mcp-state-constraints":{"dependency_error":"412 precondition_failed","notes":"Dependency-protected deletes may return `412 precondition_failed`."},"x-mcp-id-source":{"invoice_id":{"discover_via":["invoicing_sales_invoice_retrieve"],"scope":"business_slug","hint":"Retrieve the invoice first to inspect external status messages."},"message_id":{"discover_via":["invoicing_sales_invoice_retrieve"],"scope":"invoice_id","hint":"Use `external_status_messages` from the same invoice retrieve response."}},"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/invoicing/{business_slug}/product/":{"get":{"operationId":"products_list","description":"List invoicing products for the selected business. Products are reusable invoice row templates and support code/name search. Use `code` for deterministic lookup when the product code is known.","summary":"Products - List","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"query","name":"code","schema":{"type":"string"},"description":"Filter products by exact product code (tuotekoodi). Use this when the code is known."},{"name":"page","required":false,"in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer"}},{"name":"page_size","required":false,"in":"query","description":"Number of results to return per page.","schema":{"type":"integer"}},{"in":"query","name":"search","schema":{"type":"string"},"description":"A search term. Numeric values may also match amount fields.\n\nThe following fields are searched:\n\n| field   | match mode   |\n|---------|--------------|\n| `code`  | prefix       |\n| `name`  | contains     |"}],"tags":["Products"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedProductList"}}},"description":""}}},"post":{"operationId":"invoicing_product_create","description":"Create an invoicing product for the selected business.","summary":"Product - Create","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."}],"tags":["Products"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/ProductRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ProductRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}},"description":""}},"x-mcp-namespace":"invoicing","x-mcp-component-type":"tool","x-mcp-mutates-state":true,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":true,"x-mcp-idempotency":"non_idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":["The request payload and target resource state must satisfy validation and business-rule preconditions before this action can succeed."],"x-mcp-state-constraints":{"validation_error":"400 validation_error","dependency_error":"412 precondition_failed","locked_error":"423 locked","notes":"Validation failures return `400 validation_error`; business-rule or resource-state blockers may return `412 precondition_failed` or `423 locked`."},"x-mcp-id-source":null,"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/invoicing/{business_slug}/product/{product_id}/":{"get":{"operationId":"invoicing_product_retrieve","description":"Retrieve one product by ID. If ID is unknown, call `invoicing_products_list` with `code` first, then use `search` as fallback.","summary":"Product - Retrieve","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"product_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target product. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Products"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}},"description":""}},"x-mcp-namespace":"invoicing","x-mcp-component-type":"tool","x-mcp-mutates-state":false,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":false,"x-mcp-idempotency":"idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":null,"x-mcp-state-constraints":null,"x-mcp-id-source":{"product_id":{"discover_via":["invoicing_products_list","invoicing_product_retrieve"],"scope":"business_slug"}},"x-mcp-read-graph":{"product_id":{"scope":"business_slug","binding_mode":"single","dispatch_mode":"scalar","sources":[{"capability_name":"invoicing_products_list","query_parameter_names":["code","search"],"inherited_argument_names":["code"],"row_field_path":"id","allows_existing_collection":true,"allows_enumeration_without_candidate":false}]}},"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false},"put":{"operationId":"invoicing_product_replace","description":"Replace one product by ID (full body).","summary":"Product - Replace","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"product_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target product. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Products"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/ProductRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ProductRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}},"description":""}}},"patch":{"operationId":"invoicing_product_update","description":"Update one product by ID.","summary":"Product - Update","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"product_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target product. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Products"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedProductRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedProductRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedProductRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}},"description":""}},"x-mcp-namespace":"invoicing","x-mcp-component-type":"tool","x-mcp-mutates-state":true,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":true,"x-mcp-idempotency":"non_idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":["Target record must exist and the requested update must satisfy validation and business-rule constraints."],"x-mcp-state-constraints":{"validation_error":"400 validation_error","dependency_error":"412 precondition_failed","locked_error":"423 locked","notes":"Validation failures return `400 validation_error`; business-rule or resource-state blockers may return `412 precondition_failed` or `423 locked`."},"x-mcp-id-source":{"product_id":{"discover_via":["invoicing_products_list","invoicing_product_retrieve"],"scope":"business_slug"}},"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false},"delete":{"operationId":"invoicing_product_delete","description":"Delete one product by ID.","summary":"Product - Delete","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"product_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target product. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Products"],"responses":{"204":{"description":"No response body"}},"x-mcp-namespace":"invoicing","x-mcp-component-type":"tool","x-mcp-mutates-state":true,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":true,"x-mcp-idempotency":"non_idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":["Target record must exist and any protected dependencies or business-rule constraints must allow deletion."],"x-mcp-state-constraints":{"dependency_error":"412 precondition_failed","notes":"Dependency-protected deletes may return `412 precondition_failed`."},"x-mcp-id-source":{"product_id":{"discover_via":["invoicing_products_list","invoicing_product_retrieve"],"scope":"business_slug"}},"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/invoicing/{business_slug}/purchase_invoice/":{"get":{"operationId":"purchase_invoices_list","description":"List purchase invoices for the selected business. Supports date-window filtering (`invoicing_date_*`, `due_date_*`, `created_at_*`, `updated_at_*`, `payment_date_*`), paid-state filtering (`is_paid`, `is_past_due`), import source filtering (`import_source`) and search. Use `invoice_number` for deterministic lookup when the number is known.","summary":"Purchase Invoices - List","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"query","name":"created_at_gte","schema":{"type":"string","format":"date"},"description":"Filter purchase invoices by creation date from this date onwards (inclusive)."},{"in":"query","name":"created_at_lte","schema":{"type":"string","format":"date"},"description":"Filter purchase invoices by creation date up to this date (inclusive)."},{"in":"query","name":"due_date_gte","schema":{"type":"string","format":"date"},"description":"Filter purchase invoices from this due date onwards (inclusive)."},{"in":"query","name":"due_date_lte","schema":{"type":"string","format":"date"},"description":"Filter purchase invoices up to this due date (inclusive)."},{"in":"query","name":"import_source","schema":{"type":"string"},"description":"Filter purchase invoices by import source."},{"in":"query","name":"invoice_number","schema":{"type":"string"},"description":"Filter purchase invoices by exact invoice number. Use this when the invoice number is known."},{"in":"query","name":"invoicing_date_gte","schema":{"type":"string","format":"date"},"description":"Filter purchase invoices from this invoicing date onwards (inclusive)."},{"in":"query","name":"invoicing_date_lte","schema":{"type":"string","format":"date"},"description":"Filter purchase invoices up to this invoicing date (inclusive)."},{"in":"query","name":"is_paid","schema":{"type":"boolean"},"description":"Filter purchase invoices by paid status."},{"in":"query","name":"is_past_due","schema":{"type":"boolean"},"description":"Filter purchase invoices by whether the due date has already passed. Combine with `is_paid=false` for invoices that are still overdue."},{"name":"page","required":false,"in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer"}},{"name":"page_size","required":false,"in":"query","description":"Number of results to return per page.","schema":{"type":"integer"}},{"in":"query","name":"payment_date_gte","schema":{"type":"string","format":"date"},"description":"Filter purchase invoices by payment date from this date onwards (inclusive)."},{"in":"query","name":"payment_date_lte","schema":{"type":"string","format":"date"},"description":"Filter purchase invoices by payment date up to this date (inclusive)."},{"in":"query","name":"search","schema":{"type":"string"},"description":"A search term. Numeric values may also match amount fields.\n\nThe following fields are searched:\n\n| field            | match mode   |\n|------------------|--------------|\n| `invoice_number` | contains     |\n| `sender_name`    | contains     |\n| `sender_vat`     | contains     |\n| `reference`      | exact        |\n| `message`        | contains     |"},{"in":"query","name":"tags","schema":{"type":"string"},"description":"Filter purchase invoices by tags. Supports repeated query params (tags=1&tags=2) or comma-separated values (tags=1,2)."},{"in":"query","name":"updated_at_gte","schema":{"type":"string","format":"date"},"description":"Filter purchase invoices by last update date from this date onwards (inclusive)."},{"in":"query","name":"updated_at_lte","schema":{"type":"string","format":"date"},"description":"Filter purchase invoices by last update date up to this date (inclusive)."}],"tags":["Invoices"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPurchaseInvoiceListList"}}},"description":""}}}},"/v1/invoicing/{business_slug}/purchase_invoice/{purchase_invoice_id}/":{"get":{"operationId":"invoicing_purchase_invoice_retrieve","description":"Retrieve one purchase invoice by ID. When linked to imported banking data, related bank transaction and document details are included. If ID is unknown, call `invoicing_purchase_invoices_list` with `invoice_number` first, then use `search` as fallback.","summary":"Purchase Invoice - Retrieve","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"purchase_invoice_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target purchase invoice. If the ID is not known, use `invoicing_purchase_invoices_list` with relevant filters and/or the `search` parameter to locate the purchase invoice."}],"tags":["Invoices"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseInvoice"}}},"description":""}},"x-mcp-namespace":"invoicing","x-mcp-component-type":"tool","x-mcp-mutates-state":false,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":true,"x-mcp-requires-confirmation":false,"x-mcp-idempotency":"idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":null,"x-mcp-state-constraints":null,"x-mcp-id-source":{"purchase_invoice_id":{"discover_via":["invoicing_purchase_invoices_list","invoicing_purchase_invoice_retrieve"],"scope":"business_slug"}},"x-mcp-read-graph":{"purchase_invoice_id":{"scope":"business_slug","binding_mode":"single","dispatch_mode":"scalar","sources":[{"capability_name":"invoicing_purchase_invoices_list","query_parameter_names":["invoice_number","import_source","is_paid","created_at_gte","created_at_lte","due_date_gte","due_date_lte","invoicing_date_gte","invoicing_date_lte","is_past_due","payment_date_gte","payment_date_lte","tags","updated_at_gte","updated_at_lte","search"],"inherited_argument_names":["invoice_number","import_source","is_paid"],"row_field_path":"id","allows_existing_collection":true,"allows_enumeration_without_candidate":false}]}},"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false},"put":{"operationId":"invoicing_purchase_invoice_replace","description":"Replace one purchase invoice by ID (full body).","summary":"Purchase Invoice - Replace","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"purchase_invoice_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target purchase invoice. If the ID is not known, use `invoicing_purchase_invoices_list` with relevant filters and/or the `search` parameter to locate the purchase invoice."}],"tags":["Invoices"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseInvoiceRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PurchaseInvoiceRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PurchaseInvoiceRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseInvoice"}}},"description":""}}},"patch":{"operationId":"invoicing_purchase_invoice_update","description":"Update one purchase invoice by ID. If ID is unknown, call `invoicing_purchase_invoices_list` with `invoice_number` first, then use `search` as fallback.","summary":"Purchase Invoice - Update","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"purchase_invoice_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target purchase invoice. If the ID is not known, use `invoicing_purchase_invoices_list` with relevant filters and/or the `search` parameter to locate the purchase invoice."}],"tags":["Invoices"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedPurchaseInvoiceRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedPurchaseInvoiceRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedPurchaseInvoiceRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseInvoice"}}},"description":""}},"x-mcp-namespace":"invoicing","x-mcp-component-type":"tool","x-mcp-mutates-state":true,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":true,"x-mcp-idempotency":"non_idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":["Target record must exist and the requested update must satisfy validation and business-rule constraints."],"x-mcp-state-constraints":{"validation_error":"400 validation_error","dependency_error":"412 precondition_failed","locked_error":"423 locked","notes":"Validation failures return `400 validation_error`; business-rule or resource-state blockers may return `412 precondition_failed` or `423 locked`."},"x-mcp-id-source":{"purchase_invoice_id":{"discover_via":["invoicing_purchase_invoices_list"],"scope":"business_slug","hint":"Use an ID from the purchase invoice list in the same business. IDs from other businesses or deleted invoices return not_found."}},"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false},"delete":{"operationId":"invoicing_purchase_invoice_delete","description":"Delete one purchase invoice by ID. If ID is unknown, call `invoicing_purchase_invoices_list` with `invoice_number` first, then use `search` as fallback.","summary":"Purchase Invoice - Delete","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"purchase_invoice_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target purchase invoice. If the ID is not known, use `invoicing_purchase_invoices_list` with relevant filters and/or the `search` parameter to locate the purchase invoice."}],"tags":["Invoices"],"responses":{"204":{"description":"No response body"}},"x-mcp-namespace":"invoicing","x-mcp-component-type":"tool","x-mcp-mutates-state":true,"x-mcp-requires-business-context":true,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":true,"x-mcp-idempotency":"non_idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":["Target record must exist and any protected dependencies or business-rule constraints must allow deletion."],"x-mcp-state-constraints":{"dependency_error":"412 precondition_failed","notes":"Dependency-protected deletes may return `412 precondition_failed`."},"x-mcp-id-source":{"purchase_invoice_id":{"discover_via":["invoicing_purchase_invoices_list"],"scope":"business_slug","hint":"Use an ID from the purchase invoice list in the same business. Already deleted or out-of-scope IDs return not_found."}},"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}},"/v1/mcp/business/{business_slug}/documents/{document_id}/relations/{relation_id}/":{"put":{"operationId":"bookkeeping_document_relation_replace_2","description":"Replace one document relation by ID (full update).","summary":"Document relation — replace","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"document_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target document. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."},{"in":"path","name":"relation_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target relation. If the ID is not known, use the corresponding list endpoint with relevant filters and/or the `search` parameter to discover valid IDs."}],"tags":["Documents"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRelationRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/DocumentRelationRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/DocumentRelationRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRelation"}}},"description":""}}}},"/v1/mcp/business/{business_slug}/sales_invoices/{invoice_id}/":{"put":{"operationId":"invoicing_sales_invoice_replace_2","description":"Replace one sales invoice by ID (full body).","summary":"Sales Invoice - Replace","parameters":[{"in":"path","name":"business_slug","schema":{"type":"string"},"required":true,"description":"Business slug that scopes this request. If you do not have one yet, call `common_accessible_businesses_list` and pick a slug from the response."},{"in":"path","name":"invoice_id","schema":{"type":"integer"},"required":true,"description":"Identifier of the target sales invoice. If the ID is not known, use `invoicing_sales_invoices_list` with relevant filters and/or the `search` parameter to locate the sales invoice."}],"tags":["Invoices"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/InvoiceRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/InvoiceRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"description":""}}}},"/v1/user/":{"get":{"operationId":"common_user_retrieve","description":"Retrieve the currently authenticated user profile. This endpoint is always scoped to the caller and does not accept a user ID.","summary":"Current User - Retrieve","tags":["User"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentUser"}}},"description":""}},"x-mcp-namespace":"common","x-mcp-component-type":"tool","x-mcp-mutates-state":false,"x-mcp-requires-business-context":false,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":false,"x-mcp-idempotency":"idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":null,"x-mcp-state-constraints":null,"x-mcp-id-source":null,"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false},"put":{"operationId":"identity_user_replace","description":"Replace the currently authenticated user profile (full body). This endpoint is always scoped to the caller and does not accept a user ID.","summary":"Current User - Replace","tags":["User"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentUserRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/CurrentUserRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CurrentUserRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentUser"}}},"description":""}}},"patch":{"operationId":"common_user_update","description":"Update the currently authenticated user profile. This endpoint is always scoped to the caller and does not accept a user ID.","summary":"Current User - Update","tags":["User"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedCurrentUserRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedCurrentUserRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedCurrentUserRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentUser"}}},"description":""}},"x-mcp-namespace":"common","x-mcp-component-type":"tool","x-mcp-mutates-state":true,"x-mcp-requires-business-context":false,"x-mcp-has-external-side-effects":false,"x-mcp-requires-confirmation":true,"x-mcp-idempotency":"non_idempotent","x-mcp-external-effects":[],"x-mcp-required-permissions":[],"x-mcp-permission-mode":"none","x-mcp-preconditions":["Target record must exist and the requested update must satisfy validation and business-rule constraints."],"x-mcp-state-constraints":{"validation_error":"400 validation_error","dependency_error":"412 precondition_failed","locked_error":"423 locked","notes":"Validation failures return `400 validation_error`; business-rule or resource-state blockers may return `412 precondition_failed` or `423 locked`."},"x-mcp-id-source":null,"x-mcp-read-graph":null,"x-mcp-list-hints":null,"x-mcp-exclude-from-public-docs":false}}},"components":{"schemas":{"Account":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was created."},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was last updated."},"number":{"type":"string","pattern":"^\\d+$","maxLength":7},"padded_number":{"type":"integer","readOnly":true},"name":{"type":"string","readOnly":true},"name_translations":{"type":"array","description":"List of translations. Each item maps one language code to the translated text.","items":{"type":"object","properties":{"key":{"type":"string","description":"Language code for this translation"},"value":{"type":"string","description":"Translated text in the language defined by `key`."}},"required":["key","value"]}},"header_id":{"type":"integer","nullable":true,"description":"Optional header ID for account grouping in countries/setups that use headers. Field may be omitted when the business has no header models."},"header_path":{"type":"array","items":{"type":"string"},"readOnly":true},"description":{"type":"string","nullable":true,"maxLength":8192},"type":{"$ref":"#/components/schemas/AccountTypeEnum"},"default_vat_code":{"allOf":[{"$ref":"#/components/schemas/VatCodeEnum"}],"description":"Default VAT code. See `constants.vat_codes.retrieve` (MCP component `constants_vat_codes_retrieve`, endpoint `GET /business/{business_slug}/constants/vat_codes/`) for business-specific allowed values.\n\n* `1` - Kotimaan verollinen myynti\n* `2` - Kotimaan verollinen osto\n* `3` - Veroton\n* `4` - Nollaverokannan myynti\n* `5` - Tavaroiden myynti EU-maihin\n* `6` - Palveluiden myynti EU-maihin\n* `7` - Tavaroiden ostot EU-maista\n* `8` - Palveluiden ostot EU-maista\n* `9` - Tavaroiden maahantuonti EU:n ulkopuolelta\n* `15` - Tavaroiden maahantuonti EU:n ulkopuolelta\n* `14` - Palveluostot EU:n ulkopuolelta\n* `10` - Rakennuspalveluiden myynti\n* `11` - Rakennuspalveluiden osto\n* `12` - Palvelumyynnit EU:n ulkopuolelle\n* `13` - Tavaroiden myynti EU:n ulkopuolelle","minimum":0,"maximum":2147483647},"default_vat_rate":{"type":"number","format":"double","readOnly":true},"default_vat_rate_label":{"$ref":"#/components/schemas/DefaultVatRateLabelEnum"},"opening_balance":{"type":"number","format":"float"},"is_shown":{"type":"boolean","readOnly":true},"balance":{"type":"number","format":"float","readOnly":true},"is_used":{"type":"boolean","readOnly":true}},"required":["balance","created_at","default_vat_rate","header_path","id","is_shown","is_used","name","name_translations","number","padded_number","updated_at"]},"AccountList":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was created."},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was last updated."},"number":{"type":"string","pattern":"^\\d+$","maxLength":7},"padded_number":{"type":"integer","readOnly":true},"name":{"type":"string","readOnly":true},"name_translations":{"type":"array","description":"List of translations. Each item maps one language code to the translated text.","items":{"type":"object","properties":{"key":{"type":"string","description":"Language code for this translation"},"value":{"type":"string","description":"Translated text in the language defined by `key`."}},"required":["key","value"]}},"header_id":{"type":"integer","nullable":true,"description":"Optional header ID for account grouping in countries/setups that use headers. Field may be omitted when the business has no header models."},"header_path":{"type":"array","items":{"type":"string"},"readOnly":true},"description":{"type":"string","nullable":true,"maxLength":8192},"type":{"$ref":"#/components/schemas/AccountTypeEnum"},"default_vat_code":{"allOf":[{"$ref":"#/components/schemas/VatCodeEnum"}],"description":"Default VAT code. See `constants.vat_codes.retrieve` (MCP component `constants_vat_codes_retrieve`, endpoint `GET /business/{business_slug}/constants/vat_codes/`) for business-specific allowed values.\n\n* `1` - Kotimaan verollinen myynti\n* `2` - Kotimaan verollinen osto\n* `3` - Veroton\n* `4` - Nollaverokannan myynti\n* `5` - Tavaroiden myynti EU-maihin\n* `6` - Palveluiden myynti EU-maihin\n* `7` - Tavaroiden ostot EU-maista\n* `8` - Palveluiden ostot EU-maista\n* `9` - Tavaroiden maahantuonti EU:n ulkopuolelta\n* `15` - Tavaroiden maahantuonti EU:n ulkopuolelta\n* `14` - Palveluostot EU:n ulkopuolelta\n* `10` - Rakennuspalveluiden myynti\n* `11` - Rakennuspalveluiden osto\n* `12` - Palvelumyynnit EU:n ulkopuolelle\n* `13` - Tavaroiden myynti EU:n ulkopuolelle","minimum":0,"maximum":2147483647},"default_vat_rate":{"type":"number","format":"double","readOnly":true},"default_vat_rate_label":{"$ref":"#/components/schemas/DefaultVatRateLabelEnum"},"opening_balance":{"type":"number","format":"float"},"is_shown":{"type":"boolean","readOnly":true}},"required":["created_at","default_vat_rate","header_path","id","is_shown","name","name_translations","number","padded_number","updated_at"]},"AccountListRequest":{"type":"object","properties":{"number":{"type":"string","minLength":1,"pattern":"^\\d+$","maxLength":7},"name_translations":{"type":"array","description":"List of translations. Each item maps one language code to the translated text.","items":{"type":"object","properties":{"key":{"type":"string","description":"Language code for this translation"},"value":{"type":"string","description":"Translated text in the language defined by `key`."}},"required":["key","value"]}},"header_id":{"type":"integer","nullable":true,"description":"Optional header ID for account grouping in countries/setups that use headers. Field may be omitted when the business has no header models."},"description":{"type":"string","nullable":true,"maxLength":8192},"type":{"$ref":"#/components/schemas/AccountTypeEnum"},"default_vat_code":{"allOf":[{"$ref":"#/components/schemas/VatCodeEnum"}],"description":"Default VAT code. See `constants.vat_codes.retrieve` (MCP component `constants_vat_codes_retrieve`, endpoint `GET /business/{business_slug}/constants/vat_codes/`) for business-specific allowed values.\n\n* `1` - Kotimaan verollinen myynti\n* `2` - Kotimaan verollinen osto\n* `3` - Veroton\n* `4` - Nollaverokannan myynti\n* `5` - Tavaroiden myynti EU-maihin\n* `6` - Palveluiden myynti EU-maihin\n* `7` - Tavaroiden ostot EU-maista\n* `8` - Palveluiden ostot EU-maista\n* `9` - Tavaroiden maahantuonti EU:n ulkopuolelta\n* `15` - Tavaroiden maahantuonti EU:n ulkopuolelta\n* `14` - Palveluostot EU:n ulkopuolelta\n* `10` - Rakennuspalveluiden myynti\n* `11` - Rakennuspalveluiden osto\n* `12` - Palvelumyynnit EU:n ulkopuolelle\n* `13` - Tavaroiden myynti EU:n ulkopuolelle","minimum":0,"maximum":2147483647},"default_vat_rate_label":{"$ref":"#/components/schemas/DefaultVatRateLabelEnum"},"opening_balance":{"type":"number","format":"float"}},"required":["name_translations","number"]},"AccountRequest":{"type":"object","properties":{"number":{"type":"string","minLength":1,"pattern":"^\\d+$","maxLength":7},"name_translations":{"type":"array","description":"List of translations. Each item maps one language code to the translated text.","items":{"type":"object","properties":{"key":{"type":"string","description":"Language code for this translation"},"value":{"type":"string","description":"Translated text in the language defined by `key`."}},"required":["key","value"]}},"header_id":{"type":"integer","nullable":true,"description":"Optional header ID for account grouping in countries/setups that use headers. Field may be omitted when the business has no header models."},"description":{"type":"string","nullable":true,"maxLength":8192},"type":{"$ref":"#/components/schemas/AccountTypeEnum"},"default_vat_code":{"allOf":[{"$ref":"#/components/schemas/VatCodeEnum"}],"description":"Default VAT code. See `constants.vat_codes.retrieve` (MCP component `constants_vat_codes_retrieve`, endpoint `GET /business/{business_slug}/constants/vat_codes/`) for business-specific allowed values.\n\n* `1` - Kotimaan verollinen myynti\n* `2` - Kotimaan verollinen osto\n* `3` - Veroton\n* `4` - Nollaverokannan myynti\n* `5` - Tavaroiden myynti EU-maihin\n* `6` - Palveluiden myynti EU-maihin\n* `7` - Tavaroiden ostot EU-maista\n* `8` - Palveluiden ostot EU-maista\n* `9` - Tavaroiden maahantuonti EU:n ulkopuolelta\n* `15` - Tavaroiden maahantuonti EU:n ulkopuolelta\n* `14` - Palveluostot EU:n ulkopuolelta\n* `10` - Rakennuspalveluiden myynti\n* `11` - Rakennuspalveluiden osto\n* `12` - Palvelumyynnit EU:n ulkopuolelle\n* `13` - Tavaroiden myynti EU:n ulkopuolelle","minimum":0,"maximum":2147483647},"default_vat_rate_label":{"$ref":"#/components/schemas/DefaultVatRateLabelEnum"},"opening_balance":{"type":"number","format":"float"}},"required":["name_translations","number"]},"AccountTypeEnum":{"enum":["ASS","ASS_DEP","ASS_VAT","ASS_REC","ASS_PAY","ASS_DUE","LIA","LIA_EQU","LIA_PRE","LIA_DUE","LIA_DEB","LIA_ACC","LIA_VAT","REV","REV_SAL","REV_NO","EXP","EXP_DEP","EXP_NO","EXP_50","EXP_TAX","EXP_TAX_PRE"],"type":"string","description":"* `ASS` - Vastaavaa\n* `ASS_DEP` - Poistokelpoinen omaisuus\n* `ASS_VAT` - Arvonlisäverosaatava\n* `ASS_REC` - Siirtosaamiset\n* `ASS_PAY` - Pankkitili / käteisvarat\n* `ASS_DUE` - Myyntisaatavat\n* `LIA` - Vastattavaa\n* `LIA_EQU` - Oma pääoma\n* `LIA_PRE` - Edellisten tilikausien voitto\n* `LIA_DUE` - Ostovelat\n* `LIA_DEB` - Velat\n* `LIA_ACC` - Siirtovelat\n* `LIA_VAT` - Arvonlisäverovelka\n* `REV` - Tulot\n* `REV_SAL` - Liikevaihtotulot (myynti)\n* `REV_NO` - Verottomat tulot\n* `EXP` - Menot\n* `EXP_DEP` - Poistot\n* `EXP_NO` - Vähennyskelvottomat menot\n* `EXP_50` - Puoliksi vähennyskelpoiset menot\n* `EXP_TAX` - Verotili\n* `EXP_TAX_PRE` - Ennakkoverot"},"AccountTypeMatchEnum":{"enum":["any","all"],"type":"string","description":"* `any` - any\n* `all` - all"},"AccountingReportJsonResponse":{"type":"object","properties":{"report_type":{"type":"string","description":"Internal report type identifier that tells which report payload was generated."},"date_from":{"type":"string","format":"date","nullable":true,"description":"Start date used for the report range when applicable. Null for point-in-time reports."},"date_to":{"type":"string","format":"date","nullable":true,"description":"End date used for the report range when applicable. For point-in-time reports, this may match the reporting date or be null."},"comparison_mode":{"allOf":[{"$ref":"#/components/schemas/ComparisonModeEnum"}],"description":"How interleaved Change columns are expressed on balance sheet and income statement payloads. Omitted on other accounting reports.\n\n* `amount` - amount\n* `percent` - percent"},"column_units":{"type":"array","items":{"$ref":"#/components/schemas/ColumnUnitsEnum"},"description":"Unit of each `values` slot, same order as `labels`. `percent` columns are (left - right) / right * 100 and may be null when the right-hand period is 0. Present on balance sheet and income statement payloads."},"labels":{"type":"array","items":{"type":"string"},"description":"Column labels for accounting-style reports."},"rows":{"type":"array","items":{"$ref":"#/components/schemas/ReportRowSchema"},"description":"Normalized report rows. Each row value array aligns with `labels`; rows can include nested account-level drill-down data."}},"required":["labels","report_type","rows"]},"AlgoStatusEnum":{"enum":["INITIAL","PENDING","RUNNING","SUCCESS","FAILURE"],"type":"string","description":"* `INITIAL` - INITIAL\n* `PENDING` - PENDING\n* `RUNNING` - RUNNING\n* `SUCCESS` - SUCCESS\n* `FAILURE` - FAILURE"},"AnalysisStatusEnum":{"enum":["PENDING","IN_PROGRESS","COMPLETED","CANCELLED","FAILED"],"type":"string","description":"* `PENDING` - Odottaa\n* `IN_PROGRESS` - Kesken\n* `COMPLETED` - Valmis\n* `CANCELLED` - Peruttu\n* `FAILED` - Epäonnistunut"},"AttachmentAnalysis":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/AttachmentAnalysisValue"},"readOnly":true},"analysis_data":{"readOnly":true,"nullable":true}},"required":["analysis_data","values"]},"AttachmentAnalysisBadge":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["key","label","value"]},"AttachmentAnalysisValue":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/AttachmentAnalysisValueTypeEnum"},"value":{"type":"string","nullable":true,"readOnly":true}},"required":["type","value"]},"AttachmentAnalysisValueRequest":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/AttachmentAnalysisValueTypeEnum"}},"required":["type"]},"AttachmentAnalysisValueTypeEnum":{"enum":["ATTACHMENT_TYPE","CONTACT_NAME","CURRENCY_CODE","INVOICE_DATE","INVOICE_DUE_DATE","PAYMENT_REF","RECEIPT_DATE","TOTAL_AMOUNT"],"type":"string","description":"* `ATTACHMENT_TYPE` - Liitteen tyyppi\n* `CONTACT_NAME` - Kontaktin nimi\n* `CURRENCY_CODE` - Valuutta\n* `INVOICE_DATE` - Laskun päivämäärä\n* `INVOICE_DUE_DATE` - Laskun eräpäivä\n* `PAYMENT_REF` - Viitenumero\n* `RECEIPT_DATE` - Kuitin päivämäärä\n* `TOTAL_AMOUNT` - Summa"},"AttachmentInstance":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was created."},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was last updated."},"file":{"type":"string","format":"uri","readOnly":true},"name":{"type":"string","maxLength":256},"type":{"type":"string","readOnly":true},"preview":{"allOf":[{"$ref":"#/components/schemas/AttachmentPreview"}],"readOnly":true,"nullable":true},"folder_id":{"type":"integer","nullable":true},"blurhash":{"type":"string","readOnly":true,"nullable":true},"blurhash_w":{"type":"integer","readOnly":true,"nullable":true},"blurhash_h":{"type":"integer","readOnly":true,"nullable":true},"is_deletable":{"type":"boolean","readOnly":true},"analysis_badges":{"type":"array","items":{"$ref":"#/components/schemas/AttachmentAnalysisBadge"},"readOnly":true},"analysis_results":{"type":"array","items":{"$ref":"#/components/schemas/AttachmentAnalysis"},"readOnly":true},"analysis_status":{"$ref":"#/components/schemas/AnalysisStatusEnum"},"notes":{"type":"string","nullable":true}},"required":["analysis_badges","analysis_results","blurhash","blurhash_h","blurhash_w","created_at","file","id","is_deletable","name","preview","type","updated_at"]},"AttachmentInstanceRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256},"folder_id":{"type":"integer","nullable":true},"analysis_status":{"$ref":"#/components/schemas/AnalysisStatusEnum"},"notes":{"type":"string","nullable":true}},"required":["name"]},"AttachmentList":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was created."},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was last updated."},"name":{"type":"string","maxLength":256},"type":{"type":"string","readOnly":true},"file":{"type":"string","format":"uri","readOnly":true},"preview":{"allOf":[{"$ref":"#/components/schemas/AttachmentPreview"}],"readOnly":true,"nullable":true},"folder_id":{"type":"integer","nullable":true},"blurhash":{"type":"string","readOnly":true,"nullable":true},"blurhash_w":{"type":"integer","readOnly":true,"nullable":true},"blurhash_h":{"type":"integer","readOnly":true,"nullable":true},"analysis_badges":{"type":"array","items":{"$ref":"#/components/schemas/AttachmentAnalysisBadge"},"readOnly":true},"analysis_status":{"$ref":"#/components/schemas/AnalysisStatusEnum"},"notes":{"type":"string","readOnly":true,"nullable":true}},"required":["analysis_badges","blurhash","blurhash_h","blurhash_w","created_at","file","id","name","notes","preview","type","updated_at"]},"AttachmentPreview":{"type":"object","properties":{"image":{"type":"string","format":"uri","readOnly":true},"blurhash":{"type":"string","readOnly":true,"nullable":true},"blurhash_w":{"type":"integer","readOnly":true,"nullable":true},"blurhash_h":{"type":"integer","readOnly":true,"nullable":true}},"required":["blurhash","blurhash_h","blurhash_w","image"]},"AutomaticDebtCollectionStatusEnum":{"enum":["NOT_STARTED","EMAIL_SENT","SENT_TO_KRAVIA","FAILED"],"type":"string","description":"* `NOT_STARTED` - Ei aloitettu\n* `EMAIL_SENT` - Sähköposti lähetetty\n* `SENT_TO_KRAVIA` - Rekisteröity Kravialle\n* `FAILED` - Epäonnistunut"},"BalanceSheetReconciliationAccountSchema":{"type":"object","properties":{"number":{"type":"string","description":"Account number."},"name":{"type":"string","description":"Account name."},"opening_balance":{"type":"number","format":"double","description":"Opening balance before period entries."},"closing_balance":{"type":"number","format":"double","description":"Closing balance after period entries."},"entries":{"type":"array","items":{"$ref":"#/components/schemas/BalanceSheetReconciliationEntrySchema"},"description":"Entries that affect this account in the period."}},"required":["closing_balance","entries","name","number","opening_balance"]},"BalanceSheetReconciliationEntrySchema":{"type":"object","properties":{"number":{"type":"string","description":"Entry/voucher number for this line."},"date":{"type":"string","format":"date","description":"Posting date for this entry."},"description":{"type":"string","description":"Optional description for this entry."},"amount":{"type":"number","format":"double","description":"Movement amount for this entry in report currency."},"document_id":{"type":"integer","nullable":true,"description":"ID of the document this entry belongs to, for deep linking and for looking the entry's attachments up in `attachments_by_document`."}},"required":["amount","date","number"]},"BalanceSheetReconciliationJsonResponse":{"type":"object","properties":{"report_type":{"type":"string","description":"Internal report type identifier that tells which report payload was generated."},"date_from":{"type":"string","format":"date","nullable":true,"description":"Start date used for the report range when applicable. Null for point-in-time reports."},"date_to":{"type":"string","format":"date","nullable":true,"description":"End date used for the report range when applicable. For point-in-time reports, this may match the reporting date or be null."},"attachments_by_document":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/ReportEntryAttachmentSchema"}},"description":"Attachments keyed by document ID as a string. Entries reference this map through their `document_id`, so a document shared by several entries is sent once. Documents without attachments are omitted."},"rows":{"type":"array","items":{"$ref":"#/components/schemas/BalanceSheetReconciliationRowSchema"},"description":"Balance sheet reconciliation sections with optional account drill-down."}},"required":["report_type","rows"]},"BalanceSheetReconciliationRowSchema":{"type":"object","properties":{"name":{"type":"string","description":"Balance sheet template section name."},"level":{"type":"integer","description":"Indentation level in the template tree."},"is_empty":{"type":"boolean","description":"Whether this section has no reconcilable account activity."},"accounts":{"type":"array","items":{"$ref":"#/components/schemas/BalanceSheetReconciliationAccountSchema"},"description":"Accounts with reconciliation entries under this section."}},"required":["accounts","is_empty","level","name"]},"BlankEnum":{"enum":[""]},"Blueprint":{"type":"object","properties":{"debet_account_id":{"type":"integer","nullable":true,"description":"Shortcut for debit-side payment account (for example bank account). If set, keep `debet_entries` empty."},"debet_entries":{"type":"array","items":{"$ref":"#/components/schemas/BlueprintEntry"},"nullable":true,"default":[],"description":"Debit entries generated from this blueprint. Must be empty when `debet_account_id` is used. See `docs_blueprint` for canonical blueprint rules."},"credit_account_id":{"type":"integer","nullable":true,"description":"Shortcut for credit-side payment account (for example bank account). If set, keep `credit_entries` empty."},"credit_entries":{"type":"array","items":{"$ref":"#/components/schemas/BlueprintEntry"},"nullable":true,"default":[],"description":"Credit entries generated from this blueprint. Must be empty when `credit_account_id` is used. See `docs_blueprint` for canonical blueprint rules."},"expense_entries":{"type":"array","items":{"$ref":"#/components/schemas/BlueprintEntry"},"nullable":true,"default":[],"description":"Optional extra expense entries used mainly in sales blueprints for indirect costs (for example overhead). See `docs_blueprint` for canonical blueprint rules."}}},"BlueprintEntry":{"type":"object","properties":{"account_id":{"type":"integer","nullable":true,"description":"The account ID associated with this entry."},"description":{"type":"string","nullable":true,"description":"Description of the entry, providing additional context or details.","maxLength":256},"vat_code":{"allOf":[{"$ref":"#/components/schemas/VatCodeEnum"}],"default":3,"description":"VAT code for the entry. See `constants_vat_codes_retrieve` for business-specific allowed values.\n\n* `1` - Kotimaan verollinen myynti\n* `2` - Kotimaan verollinen osto\n* `3` - Veroton\n* `4` - Nollaverokannan myynti\n* `5` - Tavaroiden myynti EU-maihin\n* `6` - Palveluiden myynti EU-maihin\n* `7` - Tavaroiden ostot EU-maista\n* `8` - Palveluiden ostot EU-maista\n* `9` - Tavaroiden maahantuonti EU:n ulkopuolelta\n* `15` - Tavaroiden maahantuonti EU:n ulkopuolelta\n* `14` - Palveluostot EU:n ulkopuolelta\n* `10` - Rakennuspalveluiden myynti\n* `11` - Rakennuspalveluiden osto\n* `12` - Palvelumyynnit EU:n ulkopuolelle\n* `13` - Tavaroiden myynti EU:n ulkopuolelle"},"vat_rate":{"type":"number","format":"double","default":0,"description":"VAT rate percentage for this entry (for example 0, 10, 24)."},"vat_method":{"allOf":[{"$ref":"#/components/schemas/VatMethodEnum"}],"default":0,"description":"VAT method for this entry: `0` (gross posting) or `1` (net posting).\n\n* `0` - Bruttokirjaus\n* `1` - Nettokirjaus"},"amount":{"type":"number","format":"float","nullable":true,"default":0,"description":"The amount of this entry, in the smallest currency unit (e.g., cents)."}},"required":["account_id"]},"BlueprintEntryRequest":{"type":"object","properties":{"account_id":{"type":"integer","nullable":true,"description":"The account ID associated with this entry."},"description":{"type":"string","nullable":true,"description":"Description of the entry, providing additional context or details.","maxLength":256},"vat_code":{"allOf":[{"$ref":"#/components/schemas/VatCodeEnum"}],"default":3,"description":"VAT code for the entry. See `constants_vat_codes_retrieve` for business-specific allowed values.\n\n* `1` - Kotimaan verollinen myynti\n* `2` - Kotimaan verollinen osto\n* `3` - Veroton\n* `4` - Nollaverokannan myynti\n* `5` - Tavaroiden myynti EU-maihin\n* `6` - Palveluiden myynti EU-maihin\n* `7` - Tavaroiden ostot EU-maista\n* `8` - Palveluiden ostot EU-maista\n* `9` - Tavaroiden maahantuonti EU:n ulkopuolelta\n* `15` - Tavaroiden maahantuonti EU:n ulkopuolelta\n* `14` - Palveluostot EU:n ulkopuolelta\n* `10` - Rakennuspalveluiden myynti\n* `11` - Rakennuspalveluiden osto\n* `12` - Palvelumyynnit EU:n ulkopuolelle\n* `13` - Tavaroiden myynti EU:n ulkopuolelle"},"vat_rate":{"type":"number","format":"double","default":0,"description":"VAT rate percentage for this entry (for example 0, 10, 24)."},"vat_method":{"allOf":[{"$ref":"#/components/schemas/VatMethodEnum"}],"default":0,"description":"VAT method for this entry: `0` (gross posting) or `1` (net posting).\n\n* `0` - Bruttokirjaus\n* `1` - Nettokirjaus"},"amount":{"type":"number","format":"float","nullable":true,"default":0,"description":"The amount of this entry, in the smallest currency unit (e.g., cents)."}},"required":["account_id"]},"BlueprintRequest":{"type":"object","properties":{"debet_account_id":{"type":"integer","nullable":true,"description":"Shortcut for debit-side payment account (for example bank account). If set, keep `debet_entries` empty."},"debet_entries":{"type":"array","items":{"$ref":"#/components/schemas/BlueprintEntryRequest"},"nullable":true,"default":[],"description":"Debit entries generated from this blueprint. Must be empty when `debet_account_id` is used. See `docs_blueprint` for canonical blueprint rules."},"credit_account_id":{"type":"integer","nullable":true,"description":"Shortcut for credit-side payment account (for example bank account). If set, keep `credit_entries` empty."},"credit_entries":{"type":"array","items":{"$ref":"#/components/schemas/BlueprintEntryRequest"},"nullable":true,"default":[],"description":"Credit entries generated from this blueprint. Must be empty when `credit_account_id` is used. See `docs_blueprint` for canonical blueprint rules."},"expense_entries":{"type":"array","items":{"$ref":"#/components/schemas/BlueprintEntryRequest"},"nullable":true,"default":[],"description":"Optional extra expense entries used mainly in sales blueprints for indirect costs (for example overhead). See `docs_blueprint` for canonical blueprint rules."}}},"Business":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was created."},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was last updated."},"logo":{"type":"string","format":"uri","readOnly":true,"nullable":true},"name":{"type":"string","maxLength":256},"slug":{"type":"string","maxLength":16,"pattern":"^[-a-zA-Z0-9_]+$"},"business_id":{"type":"string"},"country":{"type":"string","readOnly":true},"country_config":{"readOnly":true},"period_id":{"type":"integer","readOnly":true,"nullable":true},"is_billable":{"type":"boolean","readOnly":true},"vat_period_id":{"type":"integer","readOnly":true,"nullable":true},"vat_posting_method":{"$ref":"#/components/schemas/VatPostingMethodEnum"},"vat_reporting_method":{"$ref":"#/components/schemas/VatReportingMethodEnum"},"form":{"$ref":"#/components/schemas/FormEnum"},"default_vat_period":{"allOf":[{"$ref":"#/components/schemas/DefaultVatPeriodEnum"}],"minimum":-2147483648,"maximum":2147483647},"has_dauerfristverlaengerung":{"type":"boolean","description":"DE only: Dauerfristverlängerung shifts UStVA due dates by one month."},"finanzamtsnummer":{"type":"string","nullable":true,"description":"DE only: four-digit Bundesfinanzamtsnummer (Empfänger) for UStVA due dates and ELSTER filings.","maxLength":4},"invoicing_default_penalty_interest":{"type":"number","format":"double"},"invoicing_default_payment_condition_days":{"type":"integer","maximum":999,"minimum":0},"invoicing_default_email_subject":{"type":"string","nullable":true},"invoicing_default_email_content":{"type":"string","nullable":true},"invoicing_vat_exemption_reason":{"type":"string","nullable":true},"has_accrual_based_entries_for_invoicing":{"type":"boolean"},"owner_name":{"type":"string","readOnly":true},"owner_email":{"type":"string","readOnly":true},"has_history_before_nocfo":{"type":"boolean"},"fiscal_period_needs_review":{"type":"boolean"},"vat_period_needs_review":{"type":"boolean"},"contact_phone":{"type":"string","nullable":true,"pattern":"^[+]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\\s\\./0-9]*$","maxLength":32},"invoicing_email":{"type":"string","format":"email","nullable":true,"maxLength":254},"invoicing_electronic_address":{"type":"string","nullable":true,"description":"Electronic address used for EN16931/XRechnung EndpointID.","maxLength":256},"invoicing_electronic_address_scheme":{"type":"string","nullable":true,"description":"EndpointID EAS scheme code (for example EM, 0204, 0088).","maxLength":16},"invoicing_iban":{"type":"string","nullable":true,"maxLength":34},"finanzkasse_iban":{"type":"string","nullable":true,"description":"German Finanzkasse IBAN used to pay UStVA (Kz83).","maxLength":34},"finanzkasse_recipient_name":{"type":"string","nullable":true,"description":"SEPA Empfängername for the Finanzkasse IBAN (VoP).","maxLength":70},"invoicing_tax_code":{"type":"string","nullable":true,"readOnly":true},"invoicing_bic":{"type":"string","nullable":true,"maxLength":11},"invoicing_contact":{"type":"string","nullable":true,"maxLength":64},"invoicing_street":{"type":"string","nullable":true,"maxLength":64},"invoicing_city":{"type":"string","nullable":true,"maxLength":32},"invoicing_postal_code":{"type":"string","nullable":true,"maxLength":8},"invoicing_country":{"type":"string","nullable":true,"maxLength":2},"has_business_address":{"type":"boolean","readOnly":true},"business_street":{"type":"string","nullable":true,"maxLength":64},"business_city":{"type":"string","nullable":true,"maxLength":32},"business_postal_code":{"type":"string","nullable":true,"maxLength":8},"business_country":{"type":"string","nullable":true,"maxLength":2},"account_yle_tax":{"type":"integer","nullable":true},"account_tax_deferrals":{"type":"integer","nullable":true},"account_income_tax_rec":{"type":"integer","nullable":true},"account_income_tax_lia":{"type":"integer","nullable":true},"account_previous_profit":{"type":"integer","nullable":true},"account_vat_receivables":{"type":"integer","nullable":true},"account_vat_liabilities":{"type":"integer","nullable":true},"account_vat_accrual_adjustment":{"type":"integer","nullable":true},"account_trade_receivables":{"type":"integer","nullable":true},"account_payables":{"type":"integer","nullable":true},"account_cash_payment":{"type":"integer","nullable":true},"subscription_plan":{"type":"string","readOnly":true,"description":"Currently active subscription plan"},"subscription_source":{"type":"string","readOnly":true,"description":"Where the current subscription plan is controlled from"},"stripe_customer_id":{"type":"string","readOnly":true,"nullable":true},"stripe_subscription_id":{"type":"string","readOnly":true,"nullable":true},"stripe_plan_status":{"type":"string","readOnly":true,"nullable":true},"stripe_billing_interval":{"type":"string","readOnly":true,"nullable":true,"description":"Billing interval from Stripe: 'month' or 'year'."},"billing_lock_reason":{"type":"string","readOnly":true},"stripe_payg_checkout_enabled":{"type":"boolean","readOnly":true},"credit_cap":{"type":"integer","minimum":0,"nullable":true},"can_invoice":{"type":"boolean","readOnly":true},"onboarding_updated_invoicing_settings":{"type":"boolean"},"onboarding_created_invoicing_contact":{"type":"boolean"},"onboarding_created_invoicing_product":{"type":"boolean"},"onboarding_registered_to_kravia":{"type":"boolean"},"einvoicing_enabled":{"type":"boolean","readOnly":true},"usage_billed_features_enabled":{"type":"boolean","readOnly":true},"einvoicing_address":{"type":"string","readOnly":true,"nullable":true},"einvoicing_operator":{"type":"string","readOnly":true,"nullable":true},"einvoicing_operator_name":{"type":"string","readOnly":true},"apix_unique_id":{"type":"string","readOnly":true,"nullable":true},"apix_transfer_id":{"type":"string","readOnly":true,"nullable":true},"apix_transfer_key":{"type":"string","readOnly":true,"nullable":true},"holvi_bookkeeping_api_enabled":{"type":"boolean","readOnly":true},"holvi_bookkeeping_api_staled":{"type":"boolean","readOnly":true},"holvi_nocfo_connection_enabled":{"type":"boolean"},"salaxy_enabled":{"type":"boolean","readOnly":true},"salaxy_account_id":{"type":"string","readOnly":true,"nullable":true},"demo_days_left":{"type":"integer","readOnly":true},"verohallinto_latest_reporter_full_name":{"type":"string","nullable":true,"maxLength":300},"verohallinto_latest_reporter_phone_number":{"type":"string","nullable":true,"maxLength":32},"is_eligible_for_einvoicing":{"type":"boolean","readOnly":true},"has_tags":{"type":"boolean","readOnly":true},"identifiers":{"type":"array","items":{"$ref":"#/components/schemas/BusinessIdentifier"},"readOnly":true},"is_new_invoicer":{"type":"boolean","readOnly":true},"is_automatic_debt_collection_enabled":{"type":"boolean"},"is_agency_business":{"type":"boolean","readOnly":true}},"required":["apix_transfer_id","apix_transfer_key","apix_unique_id","billing_lock_reason","can_invoice","country","country_config","created_at","demo_days_left","einvoicing_address","einvoicing_enabled","einvoicing_operator","einvoicing_operator_name","has_business_address","has_tags","holvi_bookkeeping_api_enabled","holvi_bookkeeping_api_staled","id","identifiers","invoicing_tax_code","is_agency_business","is_billable","is_eligible_for_einvoicing","is_new_invoicer","logo","name","owner_email","owner_name","period_id","salaxy_account_id","salaxy_enabled","stripe_billing_interval","stripe_customer_id","stripe_payg_checkout_enabled","stripe_plan_status","stripe_subscription_id","subscription_plan","subscription_source","updated_at","usage_billed_features_enabled","vat_period_id"]},"BusinessIdentifier":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"type":{"allOf":[{"$ref":"#/components/schemas/BusinessIdentifierTypeEnum"}],"description":"Identifier type enum. Allowed values: `y_tunnus`, `vat_code`, `steuernummer`.\n\n* `y_tunnus` - Y_TUNNUS\n* `vat_code` - VAT_CODE\n* `steuernummer` - STEUERNUMMER\n* `handelsregisternummer` - HANDELSREGISTERNUMMER"},"value":{"type":"string","description":"Identifier value string validated by country-specific rules.","maxLength":64}},"required":["id","type","value"]},"BusinessIdentifierRequest":{"type":"object","properties":{"type":{"allOf":[{"$ref":"#/components/schemas/BusinessIdentifierTypeEnum"}],"description":"Identifier type enum. Allowed values: `y_tunnus`, `vat_code`, `steuernummer`.\n\n* `y_tunnus` - Y_TUNNUS\n* `vat_code` - VAT_CODE\n* `steuernummer` - STEUERNUMMER\n* `handelsregisternummer` - HANDELSREGISTERNUMMER"},"value":{"type":"string","minLength":1,"description":"Identifier value string validated by country-specific rules.","maxLength":64}},"required":["type","value"]},"BusinessIdentifierTypeEnum":{"enum":["y_tunnus","vat_code","steuernummer","handelsregisternummer"],"type":"string","description":"* `y_tunnus` - Y_TUNNUS\n* `vat_code` - VAT_CODE\n* `steuernummer` - STEUERNUMMER\n* `handelsregisternummer` - HANDELSREGISTERNUMMER"},"BusinessOverview":{"type":"object","description":"Read-only row of the start-page businesses table.\n\nRows are ``BusinessModel`` instances carrying the annotations added by\n``main.services.business_overview``. Optional column fields are removed\nin ``__init__`` unless the client requested the column.\n\nColumn permissions are granular per business, so a row may be allowed\nto show a column that its neighbour must mask: unpermitted rows carry\nNULL annotations (see ``ColumnPermissionGate``) and serialize as\n``null``, never as fake zeroes.\n\nContext: ``columns`` (set), ``permitted_by_business``\n(``{business_id: {column keys}}``, optional).","properties":{"id":{"type":"integer","readOnly":true},"name":{"type":"string","readOnly":true},"slug":{"type":"string","readOnly":true},"business_id":{"type":"string","readOnly":true,"nullable":true},"form":{"type":"string","readOnly":true},"logo":{"type":"string","format":"uri","readOnly":true,"nullable":true},"is_agency_business":{"type":"boolean","readOnly":true},"can_archive":{"type":"boolean","readOnly":true},"automation_pct":{"type":"integer","nullable":true,"readOnly":true},"next_deadline":{"type":"object","additionalProperties":{},"nullable":true,"readOnly":true},"time_saved_hours":{"type":"number","format":"double","nullable":true,"readOnly":true}},"required":["automation_pct","business_id","can_archive","form","id","is_agency_business","logo","name","next_deadline","slug","time_saved_hours"]},"BusinessOverviewArchiveRequest":{"type":"object","description":"Bulk (un)archive request from the overview's agency selection.","properties":{"business_ids":{"type":"array","items":{"type":"integer"},"maxItems":500},"archived":{"type":"boolean"}},"required":["archived","business_ids"]},"BusinessPermission":{"type":"object","properties":{"id":{"type":"string","description":"Permission identifier."},"name":{"type":"string","description":"Localized permission name."},"explanation":{"type":"string","description":"Permission description."}},"required":["explanation","id","name"]},"BusinessPermissionsResponse":{"type":"object","properties":{"business_slug":{"type":"string","description":"Selected business slug."},"granted_permission_ids":{"type":"array","items":{"type":"string"},"description":"Granted permission identifiers for the current user in this business."},"granted_permissions":{"type":"array","items":{"$ref":"#/components/schemas/BusinessPermission"},"description":"Detailed granted permissions for the current user in this business."}},"required":["business_slug","granted_permission_ids","granted_permissions"]},"BusinessRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256},"slug":{"type":"string","minLength":1,"maxLength":16,"pattern":"^[-a-zA-Z0-9_]+$"},"business_id":{"type":"string","minLength":1},"vat_posting_method":{"$ref":"#/components/schemas/VatPostingMethodEnum"},"vat_reporting_method":{"$ref":"#/components/schemas/VatReportingMethodEnum"},"form":{"$ref":"#/components/schemas/FormEnum"},"default_vat_period":{"allOf":[{"$ref":"#/components/schemas/DefaultVatPeriodEnum"}],"minimum":-2147483648,"maximum":2147483647},"has_dauerfristverlaengerung":{"type":"boolean","description":"DE only: Dauerfristverlängerung shifts UStVA due dates by one month."},"finanzamtsnummer":{"type":"string","nullable":true,"description":"DE only: four-digit Bundesfinanzamtsnummer (Empfänger) for UStVA due dates and ELSTER filings.","maxLength":4},"invoicing_default_penalty_interest":{"type":"number","format":"double"},"invoicing_default_payment_condition_days":{"type":"integer","maximum":999,"minimum":0},"invoicing_default_email_subject":{"type":"string","nullable":true},"invoicing_default_email_content":{"type":"string","nullable":true},"invoicing_vat_exemption_reason":{"type":"string","nullable":true},"has_accrual_based_entries_for_invoicing":{"type":"boolean"},"has_history_before_nocfo":{"type":"boolean"},"fiscal_period_needs_review":{"type":"boolean"},"vat_period_needs_review":{"type":"boolean"},"contact_phone":{"type":"string","nullable":true,"pattern":"^[+]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\\s\\./0-9]*$","maxLength":32},"invoicing_email":{"type":"string","format":"email","nullable":true,"maxLength":254},"invoicing_electronic_address":{"type":"string","nullable":true,"description":"Electronic address used for EN16931/XRechnung EndpointID.","maxLength":256},"invoicing_electronic_address_scheme":{"type":"string","nullable":true,"description":"EndpointID EAS scheme code (for example EM, 0204, 0088).","maxLength":16},"invoicing_iban":{"type":"string","nullable":true,"maxLength":34},"finanzkasse_iban":{"type":"string","nullable":true,"description":"German Finanzkasse IBAN used to pay UStVA (Kz83).","maxLength":34},"finanzkasse_recipient_name":{"type":"string","nullable":true,"description":"SEPA Empfängername for the Finanzkasse IBAN (VoP).","maxLength":70},"invoicing_bic":{"type":"string","nullable":true,"maxLength":11},"invoicing_contact":{"type":"string","nullable":true,"maxLength":64},"invoicing_street":{"type":"string","nullable":true,"maxLength":64},"invoicing_city":{"type":"string","nullable":true,"maxLength":32},"invoicing_postal_code":{"type":"string","nullable":true,"maxLength":8},"invoicing_country":{"type":"string","nullable":true,"maxLength":2},"business_street":{"type":"string","nullable":true,"maxLength":64},"business_city":{"type":"string","nullable":true,"maxLength":32},"business_postal_code":{"type":"string","nullable":true,"maxLength":8},"business_country":{"type":"string","nullable":true,"maxLength":2},"account_yle_tax":{"type":"integer","nullable":true},"account_tax_deferrals":{"type":"integer","nullable":true},"account_income_tax_rec":{"type":"integer","nullable":true},"account_income_tax_lia":{"type":"integer","nullable":true},"account_previous_profit":{"type":"integer","nullable":true},"account_vat_receivables":{"type":"integer","nullable":true},"account_vat_liabilities":{"type":"integer","nullable":true},"account_vat_accrual_adjustment":{"type":"integer","nullable":true},"account_trade_receivables":{"type":"integer","nullable":true},"account_payables":{"type":"integer","nullable":true},"account_cash_payment":{"type":"integer","nullable":true},"credit_cap":{"type":"integer","minimum":0,"nullable":true},"onboarding_updated_invoicing_settings":{"type":"boolean"},"onboarding_created_invoicing_contact":{"type":"boolean"},"onboarding_created_invoicing_product":{"type":"boolean"},"onboarding_registered_to_kravia":{"type":"boolean"},"holvi_nocfo_connection_enabled":{"type":"boolean"},"verohallinto_latest_reporter_full_name":{"type":"string","nullable":true,"maxLength":300},"verohallinto_latest_reporter_phone_number":{"type":"string","nullable":true,"maxLength":32},"is_automatic_debt_collection_enabled":{"type":"boolean"}},"required":["name"]},"BusinessUsership":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was created."},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was last updated."},"user":{"type":"integer"},"business":{"type":"integer","readOnly":true},"business_id":{"type":"string","readOnly":true},"permissions":{"$ref":"#/components/schemas/NocfoPermission"}},"required":["business","business_id","created_at","id","permissions","updated_at","user"]},"BusinessUsershipRequest":{"type":"object","properties":{"user":{"type":"integer"},"permissions":{"$ref":"#/components/schemas/NocfoPermissionRequest"}},"required":["permissions","user"]},"ColumnUnitsEnum":{"enum":["amount","percent"],"type":"string","description":"* `amount` - amount\n* `percent` - percent"},"ComparisonModeEnum":{"enum":["amount","percent"],"type":"string","description":"* `amount` - amount\n* `percent` - percent"},"Contact":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was created."},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was last updated."},"customer_id":{"type":"string","nullable":true,"description":"Optional business-specific customer identifier. Must be unique within the business when provided.","maxLength":32},"type":{"allOf":[{"$ref":"#/components/schemas/ContactTypeEnum"}],"description":"Contact type. Use BUSINESS for companies or PERSON for individuals.\n\n* `UNSET` - Ei asetettu\n* `PERSON` - Yksityishenkilö\n* `BUSINESS` - Yritys"},"name":{"type":"string","description":"Contact display name.","maxLength":256},"name_aliases":{"type":"array","items":{"type":"string","maxLength":256},"description":"Optional alternative names used for search and matching."},"contact_business_id":{"type":"string","nullable":true,"description":"Optional business ID for business contacts. Required for invoicing when contact type is BUSINESS.","maxLength":16},"xrechnung_buyer_reference":{"type":"string","nullable":true,"maxLength":64},"notes":{"type":"string","nullable":true,"description":"Optional internal notes for this contact.","maxLength":8192},"phone_number":{"type":"string","nullable":true,"description":"Optional phone number for this contact.","maxLength":32},"is_invoicing_enabled":{"type":"boolean","description":"Whether invoicing is enabled for this contact."},"invoicing_email":{"type":"string","format":"email","nullable":true,"description":"Email address used when sending invoices by email.","maxLength":254},"invoicing_electronic_address":{"type":"string","nullable":true,"description":"Electronic address used for EN16931/XRechnung EndpointID.","maxLength":256},"invoicing_electronic_address_scheme":{"type":"string","nullable":true,"description":"EndpointID EAS scheme code (for example EM, 0204, 0088).","maxLength":16},"invoicing_einvoice_address":{"type":"string","nullable":true,"description":"E-invoice receiver address (OVT/e-invoice address).","maxLength":32},"invoicing_einvoice_operator":{"type":"string","nullable":true,"description":"E-invoice operator code for routing e-invoices.","maxLength":32},"invoicing_tax_code":{"type":"string","nullable":true,"description":"VAT/tax identifier for invoicing. Used for tax-sensitive invoicing scenarios.","maxLength":16},"invoicing_street":{"type":"string","nullable":true,"description":"Invoice recipient street address.","maxLength":64},"invoicing_city":{"type":"string","nullable":true,"description":"Invoice recipient city.","maxLength":32},"invoicing_postal_code":{"type":"string","nullable":true,"description":"Invoice recipient postal code.","maxLength":8},"invoicing_country":{"type":"string","nullable":true,"description":"Invoice recipient country code (ISO 3166-1 alpha-2).","maxLength":2},"invoicing_language":{"allOf":[{"$ref":"#/components/schemas/InvoicingLanguageEnum"}],"description":"Preferred invoicing language for this contact.\n\n* `fi` - Suomi\n* `en` - Englanti\n* `sv` - Ruotsi\n* `de` - Saksa"},"buyer_postal_address_details_xml_override":{"type":"string","nullable":true,"description":"Optional legacy XML override for Finvoice BuyerPostalAddressDetails block."},"can_be_invoiced":{"type":"boolean","readOnly":true,"description":"Whether contact details are complete enough to create an invoice (address fields and required business ID for business contacts)."},"can_be_invoiced_via_email":{"type":"boolean","readOnly":true,"description":"Whether the contact can be invoiced via email with current contact data."},"can_be_invoiced_via_einvoice":{"type":"boolean","readOnly":true,"description":"Whether the contact can be invoiced via e-invoice with current contact data and business feature availability."}},"required":["can_be_invoiced","can_be_invoiced_via_einvoice","can_be_invoiced_via_email","created_at","id","name","updated_at"]},"ContactRequest":{"type":"object","properties":{"customer_id":{"type":"string","nullable":true,"description":"Optional business-specific customer identifier. Must be unique within the business when provided.","maxLength":32},"type":{"allOf":[{"$ref":"#/components/schemas/ContactTypeEnum"}],"description":"Contact type. Use BUSINESS for companies or PERSON for individuals.\n\n* `UNSET` - Ei asetettu\n* `PERSON` - Yksityishenkilö\n* `BUSINESS` - Yritys"},"name":{"type":"string","minLength":1,"description":"Contact display name.","maxLength":256},"name_aliases":{"type":"array","items":{"type":"string","minLength":1,"maxLength":256},"description":"Optional alternative names used for search and matching."},"contact_business_id":{"type":"string","nullable":true,"description":"Optional business ID for business contacts. Required for invoicing when contact type is BUSINESS.","maxLength":16},"xrechnung_buyer_reference":{"type":"string","nullable":true,"maxLength":64},"notes":{"type":"string","nullable":true,"description":"Optional internal notes for this contact.","maxLength":8192},"phone_number":{"type":"string","nullable":true,"description":"Optional phone number for this contact.","maxLength":32},"is_invoicing_enabled":{"type":"boolean","description":"Whether invoicing is enabled for this contact."},"invoicing_email":{"type":"string","format":"email","nullable":true,"description":"Email address used when sending invoices by email.","maxLength":254},"invoicing_electronic_address":{"type":"string","nullable":true,"description":"Electronic address used for EN16931/XRechnung EndpointID.","maxLength":256},"invoicing_electronic_address_scheme":{"type":"string","nullable":true,"description":"EndpointID EAS scheme code (for example EM, 0204, 0088).","maxLength":16},"invoicing_einvoice_address":{"type":"string","nullable":true,"description":"E-invoice receiver address (OVT/e-invoice address).","maxLength":32},"invoicing_einvoice_operator":{"type":"string","nullable":true,"description":"E-invoice operator code for routing e-invoices.","maxLength":32},"invoicing_tax_code":{"type":"string","nullable":true,"description":"VAT/tax identifier for invoicing. Used for tax-sensitive invoicing scenarios.","maxLength":16},"invoicing_street":{"type":"string","nullable":true,"description":"Invoice recipient street address.","maxLength":64},"invoicing_city":{"type":"string","nullable":true,"description":"Invoice recipient city.","maxLength":32},"invoicing_postal_code":{"type":"string","nullable":true,"description":"Invoice recipient postal code.","maxLength":8},"invoicing_country":{"type":"string","nullable":true,"description":"Invoice recipient country code (ISO 3166-1 alpha-2).","maxLength":2},"invoicing_language":{"allOf":[{"$ref":"#/components/schemas/InvoicingLanguageEnum"}],"description":"Preferred invoicing language for this contact.\n\n* `fi` - Suomi\n* `en` - Englanti\n* `sv` - Ruotsi\n* `de` - Saksa"},"buyer_postal_address_details_xml_override":{"type":"string","nullable":true,"description":"Optional legacy XML override for Finvoice BuyerPostalAddressDetails block."}},"required":["name"]},"ContactTypeEnum":{"enum":["UNSET","PERSON","BUSINESS"],"type":"string","description":"* `UNSET` - Ei asetettu\n* `PERSON` - Yksityishenkilö\n* `BUSINESS` - Yritys"},"CreditorInfo":{"type":"object","properties":{"name":{"type":"string","maxLength":140,"minLength":3},"iban":{"type":"string"},"bic":{"type":"string","nullable":true}},"required":["iban","name"]},"CreditorInfoRequest":{"type":"object","properties":{"name":{"type":"string","minLength":3,"maxLength":140},"iban":{"type":"string","minLength":1},"bic":{"type":"string","nullable":true}},"required":["iban","name"]},"CurrentUser":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"email":{"type":"string","format":"email","readOnly":true,"title":"Sähköpostiosoite"},"first_name":{"type":"string","title":"Etunimi","maxLength":150},"last_name":{"type":"string","title":"Sukunimi","maxLength":150},"last_login":{"type":"string","format":"date-time","readOnly":true,"nullable":true,"title":"Viimeisin kirjautuminen"},"date_joined":{"type":"string","format":"date-time","readOnly":true,"title":"Liittynyt"},"tos_accepted":{"type":"boolean","readOnly":true},"tos_accepted_by_market":{"type":"object","additionalProperties":{"type":"boolean"},"readOnly":true},"saltedge_tos_accepted_at":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"last_csat":{"type":"string","format":"date-time","readOnly":true,"nullable":true},"invitations":{"type":"array","items":{"$ref":"#/components/schemas/Invitation"},"readOnly":true},"notifications":{"readOnly":true},"avatar_url":{"type":"string","readOnly":true},"userships":{"type":"array","items":{"$ref":"#/components/schemas/BusinessUsership"},"readOnly":true},"show_get_started_info":{"type":"boolean"},"language":{"nullable":true,"oneOf":[{"$ref":"#/components/schemas/LanguageEnum"},{"$ref":"#/components/schemas/BlankEnum"},{"$ref":"#/components/schemas/NullEnum"}]},"last_active_business_id":{"type":"string","readOnly":true,"nullable":true},"last_active_business_slug":{"type":"string","readOnly":true,"nullable":true},"subscription_tier":{"type":"string","readOnly":true},"has_tos_acceptance_record":{"type":"boolean","readOnly":true},"agency_id":{"type":"integer","nullable":true,"readOnly":true},"is_agency_user":{"type":"boolean","readOnly":true},"agency_role":{"type":"string","nullable":true,"readOnly":true},"is_agency_admin":{"type":"boolean","readOnly":true},"credit_cap":{"type":"integer","nullable":true,"readOnly":true},"agency_name":{"type":"string","nullable":true,"readOnly":true},"ui_preferences":{"description":"Per-user UI preferences, e.g. the column configuration of the businesses table on the start page."}},"required":["agency_id","agency_name","agency_role","avatar_url","credit_cap","date_joined","email","has_tos_acceptance_record","id","invitations","is_agency_admin","is_agency_user","last_active_business_id","last_active_business_slug","last_csat","last_login","notifications","saltedge_tos_accepted_at","subscription_tier","tos_accepted","tos_accepted_by_market","userships"]},"CurrentUserRequest":{"type":"object","properties":{"first_name":{"type":"string","title":"Etunimi","maxLength":150},"last_name":{"type":"string","title":"Sukunimi","maxLength":150},"show_get_started_info":{"type":"boolean"},"language":{"nullable":true,"oneOf":[{"$ref":"#/components/schemas/LanguageEnum"},{"$ref":"#/components/schemas/BlankEnum"},{"$ref":"#/components/schemas/NullEnum"}]},"ui_preferences":{"description":"Per-user UI preferences, e.g. the column configuration of the businesses table on the start page."}}},"DateRangeReportColumnSchemaRequest":{"type":"object","properties":{"name":{"type":"string","description":"Optional column label shown in report output."},"date_from":{"type":"string","format":"date","description":"Start date for range-based reports (YYYY-MM-DD)."},"date_to":{"type":"string","format":"date","description":"End date for range-based reports (YYYY-MM-DD)."}},"required":["date_from","date_to"]},"DateRangeTypedReportRequestSchemaRequest":{"type":"object","properties":{"extend_accounts":{"type":"boolean","description":"When true, include account-level drill-down rows for supported reports."},"append_comparison_columns":{"type":"boolean","description":"When true and column count is small enough, add comparison columns."},"comparison_mode":{"allOf":[{"$ref":"#/components/schemas/ComparisonModeEnum"}],"description":"How interleaved Change columns are expressed when comparison is on: `amount` (default, cents difference) or `percent` ((left - right) / right * 100). Null when the right-hand period is 0.\n\n* `amount` - amount\n* `percent` - percent"},"tag_ids":{"type":"array","items":{"type":"integer"},"description":"Optional tag filters. Only entries/documents matching these tags are included in report calculations."},"account_number":{"type":"string","minLength":1,"description":"When set, return entry lines only for this account (ledger/reconciliation)."},"document_number":{"type":"string","minLength":1,"description":"When set, return entry lines only for this journal voucher."},"vat_entry_group":{"type":"string","minLength":1,"description":"When set, return paginated entry lines for this VAT summary line id."},"entries_page":{"type":"integer","minimum":1,"default":1,"description":"1-based page index for scoped entry-line requests."},"entries_page_size":{"type":"integer","maximum":200,"minimum":1,"default":8,"description":"Page size for scoped entry-line requests. Capped at 200."},"include_entry_lines":{"type":"boolean","default":true,"description":"When false, omit entry line arrays from JSON responses and include `entries_count` instead. Scoped entry requests always return lines."},"columns":{"type":"array","items":{"$ref":"#/components/schemas/DateRangeReportColumnSchemaRequest"},"description":"Columns for period reports. Use `date_from` and `date_to` for each column."}},"required":["columns"]},"DefaultVatPeriodEnum":{"enum":[-1,0,1,2],"type":"integer","description":"* `-1` - NONE\n* `0` - MONTH\n* `1` - QUARTER\n* `2` - YEAR"},"DefaultVatRateLabelEnum":{"enum":["standard","reduced_a","reduced_b","zero"],"type":"string","description":"* `standard` - STANDARD\n* `reduced_a` - REDUCED_A\n* `reduced_b` - REDUCED_B\n* `zero` - ZERO"},"DeliveryMethodEnum":{"enum":["EMAIL","EMAIL_XRECHNUNG","EINVOICE","ELASKU","PAPER","SELF_PRINT"],"type":"string","description":"* `EMAIL` - Email\n* `EMAIL_XRECHNUNG` - Email Xrechnung\n* `EINVOICE` - Einvoice\n* `ELASKU` - Elasku\n* `PAPER` - Paper\n* `SELF_PRINT` - Self Print"},"DeliveryMethodInfo":{"type":"object","properties":{"method":{"type":"string","description":"Machine-readable delivery method identifier, such as EMAIL or EINVOICE."},"name":{"type":"string","description":"Human-readable label for the delivery method."},"info":{"type":"string","nullable":true,"description":"Optional explanatory text about the delivery method or its current availability."},"errors":{"type":"array","items":{"type":"string"},"description":"Validation or availability issues that prevent using this delivery method."}},"required":["method","name"]},"DocumentAttachmentIdsRequest":{"type":"object","properties":{"attachment_ids":{"type":"array","items":{"type":"integer"},"description":"List of attachment IDs to attach or detach from the document."}},"required":["attachment_ids"]},"DocumentImport":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"trace_id":{"type":"string","format":"uuid","readOnly":true,"nullable":true,"description":"Unique identifier attached to logs. For debugging purposes."},"algo_status":{"$ref":"#/components/schemas/AlgoStatusEnum"},"data_source":{"type":"string","readOnly":true,"nullable":true},"identifier":{"type":"string","nullable":true,"maxLength":256},"date":{"type":"string","format":"date"},"amount":{"type":"number","format":"float"},"description":{"type":"string","nullable":true,"maxLength":2048},"contact_hint":{"type":"string","nullable":true,"title":"Contact","maxLength":256},"balance_after_transaction":{"type":"number","format":"float","readOnly":true,"nullable":true},"reference_number":{"type":"string","nullable":true,"maxLength":64},"payment_account_id":{"type":"integer","nullable":true,"readOnly":true}},"required":["amount","balance_after_transaction","data_source","date","id","payment_account_id","trace_id"]},"DocumentImportRequest":{"type":"object","properties":{"algo_status":{"$ref":"#/components/schemas/AlgoStatusEnum"},"identifier":{"type":"string","nullable":true,"maxLength":256},"date":{"type":"string","format":"date"},"amount":{"type":"number","format":"float"},"description":{"type":"string","nullable":true,"maxLength":2048},"contact_hint":{"type":"string","nullable":true,"title":"Contact","maxLength":256},"reference_number":{"type":"string","nullable":true,"minLength":1,"maxLength":64}},"required":["amount","date"]},"DocumentInstance":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was created."},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was last updated."},"number":{"type":"string","readOnly":true,"nullable":true,"description":"The document number is an automatically generated number that identifies the document in the accounting system."},"is_flagged":{"type":"boolean","description":"Indicates whether the document is flagged for review or attention."},"is_locked":{"type":"boolean","readOnly":true,"description":"Indicates whether the document is locked and cannot be modified."},"is_draft":{"type":"boolean","description":"Indicates whether the document is a draft. Draft documents are not yet finalized."},"date":{"type":"string","format":"date","description":"The date of the document. This is the date when the document was created or issued."},"description":{"type":"string","description":"A brief description of the document.","maxLength":256},"contact_id":{"type":"integer","nullable":true,"description":"Contact ID associated with this document."},"contact_name":{"type":"string","readOnly":true,"nullable":true,"description":"Contact name associated with this document."},"balance":{"type":"number","format":"float","readOnly":true,"description":"Total balance of the document. This value represents the net effect on accounts of type \"bank account.\" Note that this value is typically zero if no money has yet moved, for example, when recording accounts receivable. Once money is received or paid via a bank account, the amount will be shown in this field."},"attachment_ids":{"type":"array","items":{"type":"integer"},"description":"IDs of attachments associated with this document."},"type":{"allOf":[{"$ref":"#/components/schemas/DocumentTypeEnum"}],"description":"The type of the document.\n\n* `0` - Normaali kirjaus\n* `3` - Arvonlisäverokirjaus\n* `4` - Poisto\n* `6` - YLE-vero\n* `7` - Tulovero","minimum":-2147483648,"maximum":2147483647},"blueprint":{"allOf":[{"$ref":"#/components/schemas/Blueprint"}],"description":"Accounting blueprint used to generate document entries. Whenever this payload changes, entries are recalculated from it. See MCP resource `docs_blueprint` for full field-level guidance."},"blueprint_type":{"type":"string","readOnly":true,"description":"Read-only blueprint classification derived from blueprint content. Possible values: `SALES`, `PURCHASE`, `MANUAL`."},"import_data":{"allOf":[{"$ref":"#/components/schemas/DocumentImport"}],"readOnly":true,"nullable":true,"description":"Import data e.g. CSV or bank transaction data associated with this document."},"entry_ui_rows":{"type":"array","items":{"$ref":"#/components/schemas/EntryUIRows"},"readOnly":true,"description":"UI rows for entries in this document, used for rendering the entry UI."},"audit_trail_last_seen_at":{"type":"string","format":"date-time","readOnly":true,"nullable":true,"description":"Last time the user has visited this document's activity feed."},"audit_trail_has_unseen_actions":{"type":"boolean","readOnly":true,"nullable":true,"description":"Indicates whether there are unseen actions in the activity feed for this document."},"audit_trail_last_mention_at":{"type":"string","format":"date-time","readOnly":true,"nullable":true,"description":"Last time the user was mentioned in the activity feed of this document."},"audit_trail_last_comment_at":{"type":"string","format":"date-time","readOnly":true,"nullable":true,"description":"Last time the user has commented in the activity feed of this document."},"tag_ids":{"type":"array","items":{"type":"integer"},"description":"List of tag IDs associated with this document."},"relations":{"type":"array","items":{"$ref":"#/components/schemas/DocumentRelation"},"readOnly":true,"description":"Combined list of incoming and outgoing document relations."},"relation_network_signals":{"type":"string","readOnly":true,"description":"Relation network signals keyed by relation_type. ACCRUAL_PAIR always exposes has_due_mismatch. due_effect, invoice_total, and payment_total are populated on document detail; list responses omit those (mismatch flags only)."},"relation_entry_signals":{"type":"string","readOnly":true,"description":"Document-local entry fingerprints (due account effect/types and ASS_PAY presence) used for link-kind metadata and suggestions."},"available_link_kinds":{"type":"string","readOnly":true,"description":"Counterpart picker metadata derived from due account types and ASS_PAY entries. Each kind includes relation_type for multi-type clients."},"eu_b2b_vat_details_missing":{"type":"boolean","readOnly":true,"description":"True when this document has EU B2B sales of goods or services and the buyer or their VAT ID is missing. Private individuals are excluded. False when the list annotation is not present (nested invoice payloads)."},"eu_sale_to_private_person":{"type":"boolean","readOnly":true,"description":"True when this document has EU sales of goods or services booked to a private individual. Those sales are not part of the recapitulative statement. False when the list annotation is not present."},"is_deletable":{"type":"boolean","readOnly":true,"description":"Whether this document can be deleted."},"shortcuts":{"type":"array","items":{"$ref":"#/components/schemas/Shortcut"},"readOnly":true}},"required":["audit_trail_has_unseen_actions","audit_trail_last_comment_at","audit_trail_last_mention_at","audit_trail_last_seen_at","available_link_kinds","balance","blueprint_type","contact_name","created_at","entry_ui_rows","eu_b2b_vat_details_missing","eu_sale_to_private_person","id","import_data","is_deletable","is_locked","number","relation_entry_signals","relation_network_signals","relations","shortcuts","updated_at"]},"DocumentInstanceRequest":{"type":"object","properties":{"is_flagged":{"type":"boolean","description":"Indicates whether the document is flagged for review or attention."},"is_draft":{"type":"boolean","description":"Indicates whether the document is a draft. Draft documents are not yet finalized."},"date":{"type":"string","format":"date","description":"The date of the document. This is the date when the document was created or issued."},"description":{"type":"string","description":"A brief description of the document.","maxLength":256},"contact_id":{"type":"integer","nullable":true,"description":"Contact ID associated with this document."},"attachment_ids":{"type":"array","items":{"type":"integer"},"description":"IDs of attachments associated with this document."},"type":{"allOf":[{"$ref":"#/components/schemas/DocumentTypeEnum"}],"description":"The type of the document.\n\n* `0` - Normaali kirjaus\n* `3` - Arvonlisäverokirjaus\n* `4` - Poisto\n* `6` - YLE-vero\n* `7` - Tulovero","minimum":-2147483648,"maximum":2147483647},"blueprint":{"allOf":[{"$ref":"#/components/schemas/BlueprintRequest"}],"description":"Accounting blueprint used to generate document entries. Whenever this payload changes, entries are recalculated from it. See MCP resource `docs_blueprint` for full field-level guidance."},"tag_ids":{"type":"array","items":{"type":"integer"},"description":"List of tag IDs associated with this document."}}},"DocumentList":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was created."},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was last updated."},"number":{"type":"string","readOnly":true,"nullable":true,"description":"The document number is an automatically generated number that identifies the document in the accounting system."},"is_flagged":{"type":"boolean","description":"Indicates whether the document is flagged for review or attention."},"is_locked":{"type":"boolean","readOnly":true,"description":"Indicates whether the document is locked and cannot be modified."},"is_draft":{"type":"boolean","description":"Indicates whether the document is a draft. Draft documents are not yet finalized."},"date":{"type":"string","format":"date","description":"The date of the document. This is the date when the document was created or issued."},"description":{"type":"string","description":"A brief description of the document.","maxLength":256},"contact_id":{"type":"integer","nullable":true,"description":"Contact ID associated with this document."},"contact_name":{"type":"string","readOnly":true,"nullable":true,"description":"Contact name associated with this document."},"balance":{"type":"number","format":"float","readOnly":true,"description":"Total balance of the document. This value represents the net effect on accounts of type \"bank account.\" Note that this value is typically zero if no money has yet moved, for example, when recording accounts receivable. Once money is received or paid via a bank account, the amount will be shown in this field."},"attachment_ids":{"type":"array","items":{"type":"integer"},"description":"IDs of attachments associated with this document."},"type":{"allOf":[{"$ref":"#/components/schemas/DocumentTypeEnum"}],"description":"The type of the document.\n\n* `0` - Normaali kirjaus\n* `3` - Arvonlisäverokirjaus\n* `4` - Poisto\n* `6` - YLE-vero\n* `7` - Tulovero","minimum":-2147483648,"maximum":2147483647},"blueprint":{"allOf":[{"$ref":"#/components/schemas/Blueprint"}],"description":"Accounting blueprint used to generate document entries. Whenever this payload changes, entries are recalculated from it. See MCP resource `docs_blueprint` for full field-level guidance."},"blueprint_type":{"type":"string","readOnly":true,"description":"Read-only blueprint classification derived from blueprint content. Possible values: `SALES`, `PURCHASE`, `MANUAL`."},"import_data":{"allOf":[{"$ref":"#/components/schemas/DocumentImport"}],"readOnly":true,"nullable":true,"description":"Import data e.g. CSV or bank transaction data associated with this document."},"entry_ui_rows":{"type":"array","items":{"$ref":"#/components/schemas/EntryUIRows"},"readOnly":true,"description":"UI rows for entries in this document, used for rendering the entry UI."},"audit_trail_last_seen_at":{"type":"string","format":"date-time","readOnly":true,"nullable":true,"description":"Last time the user has visited this document's activity feed."},"audit_trail_has_unseen_actions":{"type":"boolean","readOnly":true,"nullable":true,"description":"Indicates whether there are unseen actions in the activity feed for this document."},"audit_trail_last_mention_at":{"type":"string","format":"date-time","readOnly":true,"nullable":true,"description":"Last time the user was mentioned in the activity feed of this document."},"audit_trail_last_comment_at":{"type":"string","format":"date-time","readOnly":true,"nullable":true,"description":"Last time the user has commented in the activity feed of this document."},"tag_ids":{"type":"array","items":{"type":"integer"},"description":"List of tag IDs associated with this document."},"relations":{"type":"array","items":{"$ref":"#/components/schemas/DocumentRelation"},"readOnly":true,"description":"Combined list of incoming and outgoing document relations."},"relation_network_signals":{"type":"string","readOnly":true,"description":"Relation network signals keyed by relation_type. ACCRUAL_PAIR always exposes has_due_mismatch. due_effect, invoice_total, and payment_total are populated on document detail; list responses omit those (mismatch flags only)."},"relation_entry_signals":{"type":"string","readOnly":true,"description":"Document-local entry fingerprints (due account effect/types and ASS_PAY presence) used for link-kind metadata and suggestions."},"available_link_kinds":{"type":"string","readOnly":true,"description":"Counterpart picker metadata derived from due account types and ASS_PAY entries. Each kind includes relation_type for multi-type clients."},"eu_b2b_vat_details_missing":{"type":"boolean","readOnly":true,"description":"True when this document has EU B2B sales of goods or services and the buyer or their VAT ID is missing. Private individuals are excluded. False when the list annotation is not present (nested invoice payloads)."},"eu_sale_to_private_person":{"type":"boolean","readOnly":true,"description":"True when this document has EU sales of goods or services booked to a private individual. Those sales are not part of the recapitulative statement. False when the list annotation is not present."}},"required":["audit_trail_has_unseen_actions","audit_trail_last_comment_at","audit_trail_last_mention_at","audit_trail_last_seen_at","available_link_kinds","balance","blueprint_type","contact_name","created_at","entry_ui_rows","eu_b2b_vat_details_missing","eu_sale_to_private_person","id","import_data","is_locked","number","relation_entry_signals","relation_network_signals","relations","updated_at"]},"DocumentListRequest":{"type":"object","properties":{"is_flagged":{"type":"boolean","description":"Indicates whether the document is flagged for review or attention."},"is_draft":{"type":"boolean","description":"Indicates whether the document is a draft. Draft documents are not yet finalized."},"date":{"type":"string","format":"date","description":"The date of the document. This is the date when the document was created or issued."},"description":{"type":"string","description":"A brief description of the document.","maxLength":256},"contact_id":{"type":"integer","nullable":true,"description":"Contact ID associated with this document."},"attachment_ids":{"type":"array","items":{"type":"integer"},"description":"IDs of attachments associated with this document."},"type":{"allOf":[{"$ref":"#/components/schemas/DocumentTypeEnum"}],"description":"The type of the document.\n\n* `0` - Normaali kirjaus\n* `3` - Arvonlisäverokirjaus\n* `4` - Poisto\n* `6` - YLE-vero\n* `7` - Tulovero","minimum":-2147483648,"maximum":2147483647},"blueprint":{"allOf":[{"$ref":"#/components/schemas/BlueprintRequest"}],"description":"Accounting blueprint used to generate document entries. Whenever this payload changes, entries are recalculated from it. See MCP resource `docs_blueprint` for full field-level guidance."},"tag_ids":{"type":"array","items":{"type":"integer"},"description":"List of tag IDs associated with this document."}}},"DocumentRelation":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was created."},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was last updated."},"related_document":{"type":"integer","description":"The related document of this relation."},"related_document_summary":{"type":"object","additionalProperties":{},"readOnly":true,"description":"Lightweight summary of the related document for display."},"description":{"type":"string","readOnly":true,"description":"Description of the related (target) document."},"role":{"allOf":[{"$ref":"#/components/schemas/RoleEnum"}],"description":"Semantic role of the current document within this relation.\n\n* `ACCRUAL` - ACCRUAL\n* `SETTLEMENT` - SETTLEMENT"},"type":{"allOf":[{"$ref":"#/components/schemas/DocumentRelationTypeEnum"}],"description":"Type of relation that links the documents. For `ACCRUAL_PAIR`, supported roles are `ACCRUAL` and `SETTLEMENT`.\n\n* `ACCRUAL_PAIR` - ACCRUAL_PAIR"},"source_document_signals":{"type":"object","additionalProperties":{},"nullable":true,"readOnly":true,"description":"Updated relation network signals keyed by relation_type for the context document after this relation write (create/update/retrieve only)."},"related_document_signals":{"type":"object","additionalProperties":{},"nullable":true,"readOnly":true,"description":"Updated relation network signals keyed by relation_type for the related document after this relation write (create/update/retrieve only)."}},"required":["created_at","description","id","related_document","related_document_signals","related_document_summary","role","source_document_signals","type","updated_at"]},"DocumentRelationLinkKind":{"type":"object","properties":{"kind":{"type":"string"},"role":{"$ref":"#/components/schemas/RoleEnum"},"relation_type":{"$ref":"#/components/schemas/DocumentRelationTypeEnum"},"account_types":{"type":"array","items":{"type":"string"}},"account_type_match":{"$ref":"#/components/schemas/AccountTypeMatchEnum"}},"required":["account_type_match","account_types","kind","relation_type","role"]},"DocumentRelationRequest":{"type":"object","properties":{"related_document":{"type":"integer","description":"The related document of this relation."},"role":{"allOf":[{"$ref":"#/components/schemas/RoleEnum"}],"description":"Semantic role of the current document within this relation.\n\n* `ACCRUAL` - ACCRUAL\n* `SETTLEMENT` - SETTLEMENT"},"type":{"allOf":[{"$ref":"#/components/schemas/DocumentRelationTypeEnum"}],"description":"Type of relation that links the documents. For `ACCRUAL_PAIR`, supported roles are `ACCRUAL` and `SETTLEMENT`.\n\n* `ACCRUAL_PAIR` - ACCRUAL_PAIR"}},"required":["related_document","role","type"]},"DocumentRelationSuggestion":{"type":"object","properties":{"related_document":{"type":"integer"},"role":{"$ref":"#/components/schemas/RoleEnum"},"type":{"$ref":"#/components/schemas/DocumentRelationTypeEnum"},"reason":{"type":"string"},"score":{"type":"integer"}},"required":["reason","related_document","role","score","type"]},"DocumentRelationSuggestionPreviewRequest":{"type":"object","properties":{"date":{"type":"string","format":"date","nullable":true},"contact_id":{"type":"integer","nullable":true},"blueprint":{"$ref":"#/components/schemas/BlueprintRequest"},"exclude_document_ids":{"type":"array","items":{"type":"integer","minimum":1}}}},"DocumentRelationSuggestionPreviewResponse":{"type":"object","properties":{"suggestions":{"type":"array","items":{"$ref":"#/components/schemas/DocumentRelationSuggestion"}},"relation_entry_signals":{"$ref":"#/components/schemas/RelationEntrySignals"},"source_amount":{"type":"number","format":"float","nullable":true},"available_link_kinds":{"type":"array","items":{"$ref":"#/components/schemas/DocumentRelationLinkKind"}},"settlement_blueprint":{"allOf":[{"$ref":"#/components/schemas/Blueprint"}],"nullable":true}},"required":["available_link_kinds","relation_entry_signals","source_amount","suggestions"]},"DocumentRelationTypeEnum":{"enum":["ACCRUAL_PAIR"],"type":"string","description":"* `ACCRUAL_PAIR` - ACCRUAL_PAIR"},"DocumentTypeEnum":{"enum":[0,3,4,6,7],"type":"integer","description":"* `0` - Normaali kirjaus\n* `3` - Arvonlisäverokirjaus\n* `4` - Poisto\n* `6` - YLE-vero\n* `7` - Tulovero"},"EUVatContactReportJsonResponse":{"type":"object","properties":{"report_type":{"type":"string","description":"Internal report type identifier that tells which report payload was generated."},"date_from":{"type":"string","format":"date","nullable":true,"description":"Start date used for the report range when applicable. Null for point-in-time reports."},"date_to":{"type":"string","format":"date","nullable":true,"description":"End date used for the report range when applicable. For point-in-time reports, this may match the reporting date or be null."},"business_vat_id":{"type":"string","description":"Business VAT number shown in report header. Can be a localized fallback value when VAT number is missing."},"rows":{"type":"array","items":{"$ref":"#/components/schemas/EUVatContactReportRowSchema"},"description":"EU VAT report rows grouped by contact and VAT handling for the period."},"private_person_rows":{"type":"array","items":{"$ref":"#/components/schemas/EUVatContactReportRowSchema"},"description":"EU-coded sales booked to private individuals. They are not part of the recapitulative statement and are omitted from rows."}},"required":["business_vat_id","private_person_rows","report_type","rows"]},"EUVatContactReportRowSchema":{"type":"object","properties":{"country_code":{"type":"string","description":"Customer invoicing country code shown on the row."},"vat_id":{"type":"string","description":"Customer VAT number shown on the row. Can be a localized warning value when VAT number is missing."},"name":{"type":"string","description":"Contact name used as the row grouping key."},"vat_handling":{"type":"string","description":"Localized VAT handling label (for example intra-community sale of goods/services)."},"net_amount":{"type":"number","format":"double","description":"Net amount for this contact and VAT handling row."},"vat_id_missing":{"type":"boolean","description":"True when the customer VAT number is missing."},"contact_missing":{"type":"boolean","description":"True when the sale has no contact linked."},"document_id":{"type":"integer","nullable":true,"description":"Document id when the row is a sale without a buyer."},"document_number":{"type":"string","nullable":true,"description":"Document number when the row is a sale without a buyer."}},"required":["contact_missing","country_code","name","net_amount","vat_handling","vat_id","vat_id_missing"]},"ElsterCertificateStatus":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"label":{"type":"string","readOnly":true,"description":"Optional name to identify this certificate in the UI."},"is_valid":{"type":"boolean","readOnly":true,"title":"Valid","description":"Whether this certificate can be used to send UStVA filings."},"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was created."},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was last updated."}},"required":["created_at","id","is_valid","label","updated_at"]},"ElsterCertificateUploadRequest":{"type":"object","properties":{"pfx_b64":{"type":"string","minLength":1},"pin":{"type":"string","minLength":1,"maxLength":128},"label":{"type":"string","maxLength":255}},"required":["pfx_b64","pin"]},"Entry":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was created."},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was last updated."},"account":{"type":"integer","description":"The account ID associated with this entry."},"account_name":{"type":"string","readOnly":true,"nullable":true,"description":"The name of the account associated with this entry."},"account_number":{"type":"string","readOnly":true,"nullable":true,"description":"The number of the account associated with this entry."},"amount":{"type":"number","format":"float"},"is_debet":{"type":"boolean","description":"Indicates whether this entry is a debit (True) or credit (False)."},"description":{"type":"string","nullable":true,"description":"Description of the entry, providing additional context or details."},"vat_code":{"allOf":[{"$ref":"#/components/schemas/VatCodeEnum"}],"description":"VAT code for this entry. See `constants.vat_codes.retrieve` (MCP component `constants_vat_codes_retrieve`, endpoint `GET /business/{business_slug}/constants/vat_codes/`) for business-specific allowed values.\n\n* `1` - Kotimaan verollinen myynti\n* `2` - Kotimaan verollinen osto\n* `3` - Veroton\n* `4` - Nollaverokannan myynti\n* `5` - Tavaroiden myynti EU-maihin\n* `6` - Palveluiden myynti EU-maihin\n* `7` - Tavaroiden ostot EU-maista\n* `8` - Palveluiden ostot EU-maista\n* `9` - Tavaroiden maahantuonti EU:n ulkopuolelta\n* `15` - Tavaroiden maahantuonti EU:n ulkopuolelta\n* `14` - Palveluostot EU:n ulkopuolelta\n* `10` - Rakennuspalveluiden myynti\n* `11` - Rakennuspalveluiden osto\n* `12` - Palvelumyynnit EU:n ulkopuolelle\n* `13` - Tavaroiden myynti EU:n ulkopuolelle","minimum":-2147483648,"maximum":2147483647},"vat_rate":{"type":"string","format":"decimal","pattern":"^-?\\d{0,3}(?:\\.\\d{0,2})?$","description":"The VAT rate of this entry."}},"required":["account_name","account_number","created_at","id","updated_at"]},"EntryUIRows":{"type":"object","properties":{"account_name":{"type":"string","readOnly":true},"account_number":{"type":"string","readOnly":true},"vat_code":{"allOf":[{"$ref":"#/components/schemas/VatCodeEnum"}],"readOnly":true,"description":"VAT code for the entry row. See `constants_vat_codes_retrieve` for business-specific allowed values.\n\n* `1` - Kotimaan verollinen myynti\n* `2` - Kotimaan verollinen osto\n* `3` - Veroton\n* `4` - Nollaverokannan myynti\n* `5` - Tavaroiden myynti EU-maihin\n* `6` - Palveluiden myynti EU-maihin\n* `7` - Tavaroiden ostot EU-maista\n* `8` - Palveluiden ostot EU-maista\n* `9` - Tavaroiden maahantuonti EU:n ulkopuolelta\n* `15` - Tavaroiden maahantuonti EU:n ulkopuolelta\n* `14` - Palveluostot EU:n ulkopuolelta\n* `10` - Rakennuspalveluiden myynti\n* `11` - Rakennuspalveluiden osto\n* `12` - Palvelumyynnit EU:n ulkopuolelle\n* `13` - Tavaroiden myynti EU:n ulkopuolelle"},"vat_rate":{"type":"string","format":"decimal","pattern":"^-?\\d{0,3}(?:\\.\\d{0,2})?$","readOnly":true},"is_debet":{"type":"boolean","readOnly":true},"amount":{"type":"number","format":"float","readOnly":true}},"required":["account_name","account_number","amount","is_debet","vat_code","vat_rate"]},"FileUploadJsonRequestRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256},"file":{"type":"string","minLength":1,"description":"File payload as base64-encoded content."},"type":{"type":"string"},"folder_id":{"type":"integer","nullable":true},"notes":{"type":"string","nullable":true}},"required":["file","name"]},"FileUploadRequestRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256},"file":{"type":"string","format":"binary"},"type":{"type":"string"},"folder_id":{"type":"integer","nullable":true},"notes":{"type":"string","nullable":true}},"required":["file","name"]},"FormEnum":{"enum":["FI_OY","FI_OYJ","FI_TMI","FI_KY","FI_OK","FI_AY","FI_AS_OY","FI_KOY","FI_NY","FI_YHD","DE_UG","DE_GMBH","DEMO"],"type":"string","description":"* `FI_OY` - Osakeyhtiö (Oy)\n* `FI_OYJ` - Julkinen osakeyhtiö (Oyj)\n* `FI_TMI` - Toiminimi (Tmi)\n* `FI_KY` - Kommandiittiyhtiö (Ky)\n* `FI_OK` - Osuuskunta (Osk)\n* `FI_AY` - Avoin yhtiö (AY)\n* `FI_AS_OY` - Asunto-osakeyhtiö (As Oy)\n* `FI_KOY` - Kiinteistöosakeyhtiö (Koy)\n* `FI_NY` - NYT-yritys\n* `FI_YHD` - Yhdistys (ry)\n* `DE_UG` - Saksalainen yrittäjäosakeyhtiö (UG)\n* `DE_GMBH` - Saksalainen osakeyhtiö (GmbH)\n* `DEMO` - Demo-yritys"},"GetJwtTokenRequestRequest":{"type":"object","properties":{"business_slug":{"type":"string","minLength":1},"selected_business_slugs":{"type":"array","items":{"type":"string","minLength":1},"description":"Optional. Restrict a slug-less workspace token to these businesses so the hosted MCP cannot reach an unselected one."}}},"GetJwtTokenResponse":{"type":"object","properties":{"token":{"type":"string"}},"required":["token"]},"HeaderList":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"name":{"type":"string","readOnly":true},"name_translations":{"type":"array","description":"List of translations. Each item maps one language code to the translated text.","items":{"type":"object","properties":{"key":{"type":"string","description":"Language code for this translation"},"value":{"type":"string","description":"Translated text in the language defined by `key`."}},"required":["key","value"]}},"type":{"$ref":"#/components/schemas/HeaderTypeEnum"},"parent_id":{"type":"integer","nullable":true,"readOnly":true},"parent_ids":{"type":"array","items":{"type":"integer"},"readOnly":true},"level":{"type":"integer","readOnly":true,"nullable":true}},"required":["id","level","name","name_translations","parent_id","parent_ids","type"]},"HeaderListRequest":{"type":"object","properties":{"name_translations":{"type":"array","description":"List of translations. Each item maps one language code to the translated text.","items":{"type":"object","properties":{"key":{"type":"string","description":"Language code for this translation"},"value":{"type":"string","description":"Translated text in the language defined by `key`."}},"required":["key","value"]}},"type":{"$ref":"#/components/schemas/HeaderTypeEnum"}},"required":["name_translations","type"]},"HeaderTypeEnum":{"enum":["B","I"],"type":"string","description":"* `B` - BALANCE_SHEET\n* `I` - INCOME_STATEMENT"},"Identifier":{"type":"object","properties":{"key":{"type":"string","description":"Human-readable business identifier key label."},"type":{"type":"string","description":"Business identifier type key."},"value":{"type":"string","description":"Business identifier value."}},"required":["key","type","value"]},"ImportSourceEnum":{"enum":["APIX","EMAIL","UPLOAD","VAT_PURCHASE_INVOICE"],"type":"string","description":"* `APIX` - Apix\n* `EMAIL` - Email\n* `UPLOAD` - Lataus\n* `VAT_PURCHASE_INVOICE` - ALV-ostolasku"},"Invitation":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was created."},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was last updated."},"email":{"type":"string","format":"email"},"status":{"$ref":"#/components/schemas/InvitationStatusEnum"},"permissions":{"type":"array","items":{"$ref":"#/components/schemas/PermissionsEnum"},"description":"\n        Business specific permissions for this invitation.\n        If no permission group is provided, this can be\n        used as a fallback for custom permissions."},"permission_group":{"nullable":true,"description":"The permission group for the invitation.\n\n* `admin` - Pääkäyttäjä\n* `read_only` - Lukuoikeus\n* `bookkeeping` - Kirjanpito\n* `invoicing` - Laskutus\n* `custom` - Omavalinta","oneOf":[{"$ref":"#/components/schemas/PermissionGroupEnum"},{"$ref":"#/components/schemas/NullEnum"}]},"tags":{"type":"array","items":{"$ref":"#/components/schemas/TagsEnum"}}},"required":["created_at","email","id","updated_at"]},"InvitationRequest":{"type":"object","properties":{"email":{"type":"string","format":"email","minLength":1},"status":{"$ref":"#/components/schemas/InvitationStatusEnum"},"permissions":{"type":"array","items":{"$ref":"#/components/schemas/PermissionsEnum"},"description":"\n        Business specific permissions for this invitation.\n        If no permission group is provided, this can be\n        used as a fallback for custom permissions."},"permission_group":{"nullable":true,"description":"The permission group for the invitation.\n\n* `admin` - Pääkäyttäjä\n* `read_only` - Lukuoikeus\n* `bookkeeping` - Kirjanpito\n* `invoicing` - Laskutus\n* `custom` - Omavalinta","oneOf":[{"$ref":"#/components/schemas/PermissionGroupEnum"},{"$ref":"#/components/schemas/NullEnum"}]},"tags":{"type":"array","items":{"$ref":"#/components/schemas/TagsEnum"}}},"required":["email"]},"InvitationStatusEnum":{"enum":["OPEN","ACCEPTED","REJECTED"],"type":"string","description":"* `OPEN` - Avoin\n* `ACCEPTED` - Hyväksytty\n* `REJECTED` - Hylätty"},"Invoice":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was created."},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was last updated."},"friendly_name":{"type":"string","readOnly":true,"description":"Human-friendly invoice label based on date and receiver."},"receiver":{"type":"integer","description":"Receiver contact ID. Must belong to the selected business and be eligible for invoicing."},"receiver_info":{"allOf":[{"$ref":"#/components/schemas/Contact"}],"readOnly":true,"description":"Resolved receiver contact data."},"contact_person":{"type":"string","nullable":true,"description":"Optional receiver contact person for the invoice.","maxLength":64},"invoice_number":{"type":"integer","readOnly":true,"nullable":true,"description":"Sequential invoice number assigned when the invoice is accepted."},"invoicing_date":{"type":"string","format":"date","description":"Invoice issue date."},"payment_condition_days":{"type":"integer","maximum":999,"minimum":0,"description":"Payment term in days."},"due_date":{"type":"string","format":"date","readOnly":true,"description":"Calculated due date based on invoicing date and payment term."},"reference":{"type":"string","nullable":true,"description":"Optional payment reference number. Supports Finnish references and RF references based on the business country configuration.","maxLength":20},"penalty_interest":{"type":"number","format":"double","description":"Late-payment interest percentage. If omitted, business default is used. Example values: 0, 7.0, 8.5."},"currency":{"type":"string","readOnly":true,"description":"Invoice currency code."},"vat_country":{"type":"string","readOnly":true,"description":"VAT country code used for invoice VAT interpretation."},"description":{"type":"string","nullable":true,"description":"Optional invoice-level description.","maxLength":512},"is_credit_note_for":{"type":"integer","nullable":true,"description":"Optional original invoice ID when creating a credit note."},"original_invoice_collection":{"type":"object","nullable":true,"description":"Read-only collection/Kravia snapshot for the original invoice when the current invoice is a credit note.","properties":{"invoice_id":{"type":"integer","description":"Original invoice ID."},"is_registered_to_kravia":{"type":"boolean","description":"Whether the original invoice is registered to Kravia."},"kravia_invoice_status":{"type":"string","nullable":true,"description":"Kravia status text for the original invoice."},"automatic_debt_collection_status":{"type":"string","description":"Automatic debt collection status for the original invoice.","enum":["NOT_STARTED","EMAIL_SENT","SENT_TO_KRAVIA","FAILED"]}},"required":["invoice_id","is_registered_to_kravia","kravia_invoice_status","automatic_debt_collection_status"],"additionalProperties":false,"readOnly":true},"credit_notes":{"type":"array","items":{"type":"integer"},"readOnly":true},"pdf":{"allOf":[{"$ref":"#/components/schemas/AttachmentInstance"}],"readOnly":true,"nullable":true,"description":"Generated invoice PDF attachment, when available."},"xrechnung_ubl_xml":{"type":"string","format":"uri","readOnly":true,"nullable":true,"description":"Generated XRechnung UBL XML file, when available."},"rows":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceRow"},"description":"Invoice rows. Each row defines product/quantity/amount and VAT."},"status":{"allOf":[{"$ref":"#/components/schemas/InvoiceStatusEnum"}],"readOnly":true,"description":"Invoice status enum. Values: DRAFT, ACCEPTED, PAID, CREDIT_LOSS.\n\n* `DRAFT` - Luonnos\n* `ACCEPTED` - Hyväksytty\n* `PAID` - Maksettu\n* `CREDIT_LOSS` - Luottotappio"},"total_vat_amount":{"type":"number","format":"float","readOnly":true,"description":"Total VAT amount for the invoice."},"total_amount":{"type":"number","format":"float","readOnly":true,"description":"Total invoice amount excluding VAT."},"is_editable":{"type":"boolean","readOnly":true,"description":"Whether the invoice can still be edited in its current status."},"is_deletable":{"type":"boolean","readOnly":true,"description":"Whether this invoice can be deleted."},"is_active_recurrence_template":{"type":"boolean","description":"Whether this invoice is an active recurrence template."},"is_recurrence_active":{"type":"boolean","readOnly":true,"description":"Whether recurrence is currently active for this invoice."},"is_recurrence_end_exceeded":{"type":"boolean","readOnly":true,"nullable":true,"description":"Whether recurrence end date has already passed."},"is_recurrence_applied":{"type":"boolean","readOnly":true,"description":"Whether this invoice is recurring (template, child recurrence, or has fulfilled recurrences)."},"is_past_due":{"type":"boolean","readOnly":true,"description":"Whether today is after the invoice due date."},"delivery_method":{"nullable":true,"description":"Selected invoice delivery channel. Check available methods first with `invoicing.sales_invoice.delivery_methods`.\n\n* `EMAIL` - Email\n* `EMAIL_XRECHNUNG` - Email Xrechnung\n* `EINVOICE` - Einvoice\n* `ELASKU` - Elasku\n* `PAPER` - Paper\n* `SELF_PRINT` - Self Print","oneOf":[{"$ref":"#/components/schemas/DeliveryMethodEnum"},{"$ref":"#/components/schemas/NullEnum"}]},"is_sendable":{"type":"boolean","readOnly":true,"description":"Whether manual sending is currently allowed for this invoice."},"last_delivery_at":{"type":"string","format":"date-time","nullable":true,"description":"Timestamp of the latest successful invoice delivery."},"recurrence_rule":{"nullable":true,"description":"Optional recurrence definition. Provide `rule.frequency` (0=yearly, 1=monthly), optional `rule.interval` (monthly only, default 1), `rule.by_month`, `rule.by_month_day`, `start`."},"recurrence_parent_id":{"type":"integer","readOnly":true,"nullable":true,"description":"Parent invoice ID when this invoice was generated from recurrence."},"recurrence_reference_method":{"nullable":true,"description":"Reference strategy for recurring invoices. `KEEP` keeps contact-based reference progression, `ROLL` generates reference per invoice.\n\n* `KEEP` - Keep\n* `ROLL` - Roll","oneOf":[{"$ref":"#/components/schemas/RecurrenceReferenceMethodEnum"},{"$ref":"#/components/schemas/BlankEnum"},{"$ref":"#/components/schemas/NullEnum"}]},"recurrence_email_subject":{"type":"string","nullable":true,"description":"Optional custom email subject for recurrence-generated invoices."},"recurrence_email_content":{"type":"string","nullable":true,"description":"Optional custom email content for recurrence-generated invoices."},"recurrence_end":{"type":"string","format":"date","nullable":true,"description":"Optional end date for recurrence generation."},"next_recurrences":{"type":"array","items":{"type":"string","format":"date"},"readOnly":true,"description":"Upcoming recurrence dates generated from recurrence settings."},"is_registered_to_kravia":{"type":"boolean","readOnly":true,"description":"Whether the invoice has already been registered to Kravia."},"earliest_debt_collection_date":{"type":"string","format":"date","readOnly":true,"description":"Earliest date when debt collection can start for this invoice."},"attachments":{"type":"array","items":{"type":"integer"},"description":"Optional attachment IDs linked to this invoice."},"settlement_date":{"type":"string","format":"date","nullable":true,"description":"Settlement date used in accrual accounting workflows. Required when accrual-based invoicing accounting is enabled."},"seller_reference":{"type":"string","nullable":true,"description":"Optional seller reference (your reference / Viiteemme).","maxLength":32},"buyer_reference":{"type":"string","nullable":true,"description":"Optional buyer reference (customer reference / Viitteenne).","maxLength":64},"bank_transaction":{"allOf":[{"$ref":"#/components/schemas/DocumentImport"}],"readOnly":true,"nullable":true,"description":"Imported bank transaction linked to this invoice, when available."},"payment_date":{"type":"string","format":"date","readOnly":true,"nullable":true,"description":"Payment date when invoice status is marked as paid."},"document":{"allOf":[{"$ref":"#/components/schemas/DocumentList"}],"readOnly":true,"nullable":true,"description":"Accounting document linked through the related bank transaction."},"is_automatic_debt_collection_enabled":{"type":"boolean","description":"Enable automatic debt collection for this invoice. Cannot be enabled for credit notes and has recurrence constraints."},"automatic_debt_collection_status":{"allOf":[{"$ref":"#/components/schemas/AutomaticDebtCollectionStatusEnum"}],"readOnly":true,"description":"Current automatic debt collection workflow status.\n\n* `NOT_STARTED` - Ei aloitettu\n* `EMAIL_SENT` - Sähköposti lähetetty\n* `SENT_TO_KRAVIA` - Rekisteröity Kravialle\n* `FAILED` - Epäonnistunut"},"external_status_messages":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceExternalStatusMessage"},"readOnly":true,"description":"External processing status messages linked to this invoice."},"tag_ids":{"type":"array","items":{"type":"integer"},"description":"List of tag IDs associated with this invoice."}},"required":["automatic_debt_collection_status","bank_transaction","created_at","credit_notes","currency","document","due_date","earliest_debt_collection_date","external_status_messages","friendly_name","id","invoice_number","invoicing_date","is_deletable","is_editable","is_past_due","is_recurrence_active","is_recurrence_applied","is_recurrence_end_exceeded","is_registered_to_kravia","is_sendable","next_recurrences","original_invoice_collection","payment_condition_days","payment_date","pdf","receiver","receiver_info","recurrence_parent_id","status","total_amount","total_vat_amount","updated_at","vat_country","xrechnung_ubl_xml"]},"InvoiceExternalStatusMessage":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"message":{"type":"string","description":"Status message shown in NoCFO UI for this invoice, typically from external processing systems."}},"required":["id","message"]},"InvoiceExternalStatusMessageRequest":{"type":"object","properties":{"message":{"type":"string","minLength":1,"description":"Status message shown in NoCFO UI for this invoice, typically from external processing systems."}},"required":["message"]},"InvoiceRequest":{"type":"object","properties":{"receiver":{"type":"integer","description":"Receiver contact ID. Must belong to the selected business and be eligible for invoicing."},"contact_person":{"type":"string","nullable":true,"description":"Optional receiver contact person for the invoice.","maxLength":64},"invoicing_date":{"type":"string","format":"date","description":"Invoice issue date."},"payment_condition_days":{"type":"integer","maximum":999,"minimum":0,"description":"Payment term in days."},"reference":{"type":"string","nullable":true,"description":"Optional payment reference number. Supports Finnish references and RF references based on the business country configuration.","maxLength":20},"penalty_interest":{"type":"number","format":"double","description":"Late-payment interest percentage. If omitted, business default is used. Example values: 0, 7.0, 8.5."},"description":{"type":"string","nullable":true,"description":"Optional invoice-level description.","maxLength":512},"is_credit_note_for":{"type":"integer","nullable":true,"description":"Optional original invoice ID when creating a credit note."},"rows":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceRowRequest"},"description":"Invoice rows. Each row defines product/quantity/amount and VAT."},"is_active_recurrence_template":{"type":"boolean","description":"Whether this invoice is an active recurrence template."},"delivery_method":{"nullable":true,"description":"Selected invoice delivery channel. Check available methods first with `invoicing.sales_invoice.delivery_methods`.\n\n* `EMAIL` - Email\n* `EMAIL_XRECHNUNG` - Email Xrechnung\n* `EINVOICE` - Einvoice\n* `ELASKU` - Elasku\n* `PAPER` - Paper\n* `SELF_PRINT` - Self Print","oneOf":[{"$ref":"#/components/schemas/DeliveryMethodEnum"},{"$ref":"#/components/schemas/NullEnum"}]},"last_delivery_at":{"type":"string","format":"date-time","nullable":true,"description":"Timestamp of the latest successful invoice delivery."},"recurrence_rule":{"nullable":true,"description":"Optional recurrence definition. Provide `rule.frequency` (0=yearly, 1=monthly), optional `rule.interval` (monthly only, default 1), `rule.by_month`, `rule.by_month_day`, `start`."},"recurrence_reference_method":{"nullable":true,"description":"Reference strategy for recurring invoices. `KEEP` keeps contact-based reference progression, `ROLL` generates reference per invoice.\n\n* `KEEP` - Keep\n* `ROLL` - Roll","oneOf":[{"$ref":"#/components/schemas/RecurrenceReferenceMethodEnum"},{"$ref":"#/components/schemas/BlankEnum"},{"$ref":"#/components/schemas/NullEnum"}]},"recurrence_email_subject":{"type":"string","nullable":true,"description":"Optional custom email subject for recurrence-generated invoices."},"recurrence_email_content":{"type":"string","nullable":true,"description":"Optional custom email content for recurrence-generated invoices."},"recurrence_end":{"type":"string","format":"date","nullable":true,"description":"Optional end date for recurrence generation."},"attachments":{"type":"array","items":{"type":"integer"},"description":"Optional attachment IDs linked to this invoice."},"settlement_date":{"type":"string","format":"date","nullable":true,"description":"Settlement date used in accrual accounting workflows. Required when accrual-based invoicing accounting is enabled."},"seller_reference":{"type":"string","nullable":true,"description":"Optional seller reference (your reference / Viiteemme).","maxLength":32},"buyer_reference":{"type":"string","nullable":true,"description":"Optional buyer reference (customer reference / Viitteenne).","maxLength":64},"is_automatic_debt_collection_enabled":{"type":"boolean","description":"Enable automatic debt collection for this invoice. Cannot be enabled for credit notes and has recurrence constraints."},"tag_ids":{"type":"array","items":{"type":"integer"},"description":"List of tag IDs associated with this invoice."}},"required":["invoicing_date","payment_condition_days","receiver"]},"InvoiceRow":{"type":"object","properties":{"id":{"type":"integer"},"code":{"type":"string","nullable":true,"description":"Optional product code for this row. Used to resolve a business product when product ID is not provided.","maxLength":25},"name":{"type":"string","description":"Invoice row name shown on the invoice.","maxLength":64},"unit":{"type":"string","description":"Unit label for quantity, for example pcs or h.","maxLength":8},"amount":{"type":"number","format":"float","description":"Unit net amount for this row (excluding VAT)."},"vat_rate":{"type":"number","format":"double","description":"VAT percentage for this row."},"vat_code":{"allOf":[{"$ref":"#/components/schemas/VatCodeEnum"}],"description":"VAT code for the invoice row. See `constants_vat_codes_retrieve` for business-specific allowed values.\n\n* `1` - Kotimaan verollinen myynti\n* `2` - Kotimaan verollinen osto\n* `3` - Veroton\n* `4` - Nollaverokannan myynti\n* `5` - Tavaroiden myynti EU-maihin\n* `6` - Palveluiden myynti EU-maihin\n* `7` - Tavaroiden ostot EU-maista\n* `8` - Palveluiden ostot EU-maista\n* `9` - Tavaroiden maahantuonti EU:n ulkopuolelta\n* `15` - Tavaroiden maahantuonti EU:n ulkopuolelta\n* `14` - Palveluostot EU:n ulkopuolelta\n* `10` - Rakennuspalveluiden myynti\n* `11` - Rakennuspalveluiden osto\n* `12` - Palvelumyynnit EU:n ulkopuolelle\n* `13` - Tavaroiden myynti EU:n ulkopuolelle"},"product":{"type":"integer","nullable":true,"description":"Optional product ID. When provided, the product account and code can be used as defaults for the row."},"product_count":{"type":"number","format":"double","description":"Quantity for this invoice row."},"description":{"type":"string","nullable":true,"description":"Optional free-text description shown on the invoice row.","maxLength":128},"total_vat_amount":{"type":"number","format":"float","readOnly":true,"description":"Total VAT amount for this row (unit amount * quantity)."},"total_amount":{"type":"number","format":"float","readOnly":true,"description":"Total amount excluding VAT for this row."},"account_id":{"type":"integer","nullable":true,"description":"Optional account ID for automatic accounting entries. If omitted, NoCFO uses the linked product account when available."}},"required":["amount","name","product_count","total_amount","total_vat_amount","unit","vat_code","vat_rate"]},"InvoiceRowRequest":{"type":"object","properties":{"id":{"type":"integer"},"code":{"type":"string","nullable":true,"description":"Optional product code for this row. Used to resolve a business product when product ID is not provided.","maxLength":25},"name":{"type":"string","minLength":1,"description":"Invoice row name shown on the invoice.","maxLength":64},"unit":{"type":"string","minLength":1,"description":"Unit label for quantity, for example pcs or h.","maxLength":8},"amount":{"type":"number","format":"float","description":"Unit net amount for this row (excluding VAT)."},"vat_rate":{"type":"number","format":"double","description":"VAT percentage for this row."},"vat_code":{"allOf":[{"$ref":"#/components/schemas/VatCodeEnum"}],"description":"VAT code for the invoice row. See `constants_vat_codes_retrieve` for business-specific allowed values.\n\n* `1` - Kotimaan verollinen myynti\n* `2` - Kotimaan verollinen osto\n* `3` - Veroton\n* `4` - Nollaverokannan myynti\n* `5` - Tavaroiden myynti EU-maihin\n* `6` - Palveluiden myynti EU-maihin\n* `7` - Tavaroiden ostot EU-maista\n* `8` - Palveluiden ostot EU-maista\n* `9` - Tavaroiden maahantuonti EU:n ulkopuolelta\n* `15` - Tavaroiden maahantuonti EU:n ulkopuolelta\n* `14` - Palveluostot EU:n ulkopuolelta\n* `10` - Rakennuspalveluiden myynti\n* `11` - Rakennuspalveluiden osto\n* `12` - Palvelumyynnit EU:n ulkopuolelle\n* `13` - Tavaroiden myynti EU:n ulkopuolelle"},"product":{"type":"integer","nullable":true,"description":"Optional product ID. When provided, the product account and code can be used as defaults for the row."},"product_count":{"type":"number","format":"double","description":"Quantity for this invoice row."},"description":{"type":"string","nullable":true,"description":"Optional free-text description shown on the invoice row.","maxLength":128},"account_id":{"type":"integer","nullable":true,"description":"Optional account ID for automatic accounting entries. If omitted, NoCFO uses the linked product account when available."}},"required":["amount","name","product_count","unit","vat_code","vat_rate"]},"InvoiceStatusEnum":{"enum":["DRAFT","ACCEPTED","PAID","CREDIT_LOSS"],"type":"string","description":"* `DRAFT` - Luonnos\n* `ACCEPTED` - Hyväksytty\n* `PAID` - Maksettu\n* `CREDIT_LOSS` - Luottotappio"},"InvoicingLanguageEnum":{"enum":["fi","en","sv","de"],"type":"string","description":"* `fi` - Suomi\n* `en` - Englanti\n* `sv` - Ruotsi\n* `de` - Saksa"},"JournalJsonResponse":{"type":"object","properties":{"report_type":{"type":"string","description":"Internal report type identifier that tells which report payload was generated."},"date_from":{"type":"string","format":"date","nullable":true,"description":"Start date used for the report range when applicable. Null for point-in-time reports."},"date_to":{"type":"string","format":"date","nullable":true,"description":"End date used for the report range when applicable. For point-in-time reports, this may match the reporting date or be null."},"documents":{"type":"array","items":{"$ref":"#/components/schemas/JournalReportDocumentSchema"},"description":"Journal grouped by source document/voucher with entry lines and totals."},"totals":{"type":"object","additionalProperties":{"type":"number","format":"double"},"nullable":true,"description":"Report-level totals keyed by metric name. Common keys include debet and credit."}},"required":["documents","report_type"]},"JournalReportDocumentSchema":{"type":"object","properties":{"number":{"type":"string","description":"Document/journal voucher number for this journal block."},"date":{"type":"string","format":"date","nullable":true,"description":"Posting date for the journal document when available."},"document_id":{"type":"integer","nullable":true,"description":"ID of the document this entry belongs to, for deep linking and for looking the entry's attachments up in `attachments_by_document`."},"entries":{"type":"array","items":{"$ref":"#/components/schemas/JournalReportEntrySchema"},"description":"Journal lines that belong to this document."},"totals":{"type":"object","additionalProperties":{"type":"number","format":"double"},"nullable":true,"description":"Per-document totals keyed by metric name. Common keys include debet and credit."}},"required":["entries","number"]},"JournalReportEntrySchema":{"type":"object","properties":{"account_number":{"type":"string","description":"Account number used in this journal entry line."},"account_name":{"type":"string","description":"Account name used in this journal entry line."},"debet":{"type":"number","format":"double","description":"Debit amount for this journal line."},"credit":{"type":"number","format":"double","description":"Credit amount for this journal line."},"description":{"type":"string","description":"Optional description for this journal entry line."}},"required":["account_name","account_number","credit","debet"]},"LanguageEnum":{"enum":["fi","sv","en","de"],"type":"string","description":"* `fi` - Suomi\n* `sv` - Ruotsi\n* `en` - Englanti\n* `de` - Saksa"},"LedgerJsonResponse":{"type":"object","properties":{"report_type":{"type":"string","description":"Internal report type identifier that tells which report payload was generated."},"date_from":{"type":"string","format":"date","nullable":true,"description":"Start date used for the report range when applicable. Null for point-in-time reports."},"date_to":{"type":"string","format":"date","nullable":true,"description":"End date used for the report range when applicable. For point-in-time reports, this may match the reporting date or be null."},"attachments_by_document":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/ReportEntryAttachmentSchema"}},"description":"Attachments keyed by document ID as a string. Entries reference this map through their `document_id`, so a document shared by several entries is sent once. Documents without attachments are omitted."},"accounts":{"type":"array","items":{"$ref":"#/components/schemas/LedgerReportAccountSchema"},"description":"Ledger grouped by account. Each item contains opening balance, entries, and optional per-account totals."},"totals":{"type":"object","additionalProperties":{"type":"number","format":"double"},"nullable":true,"description":"Report-level totals keyed by metric name. Common keys include debet, credit, and balance_csum."}},"required":["accounts","report_type"]},"LedgerReportAccountSchema":{"type":"object","properties":{"number":{"type":"string","description":"Account number for this ledger account section."},"name":{"type":"string","description":"Account name for this ledger account section."},"opening_balance":{"type":"number","format":"double","description":"Opening balance of the account before the listed period entries."},"closing_balance":{"type":"number","format":"double","description":"Closing balance after period entries, taken from the last entry's running balance. Equals opening_balance when the account has no period entries."},"entries":{"type":"array","items":{"$ref":"#/components/schemas/LedgerReportEntrySchema"},"description":"Ledger entries belonging to this account within the requested period."},"totals":{"type":"object","additionalProperties":{"type":"number","format":"double"},"nullable":true,"description":"Per-account totals keyed by metric name. Common keys include debet, credit, and balance_csum."}},"required":["entries","name","number","opening_balance"]},"LedgerReportEntrySchema":{"type":"object","properties":{"number":{"type":"string","description":"Entry/document number for this ledger line."},"date":{"type":"string","format":"date","description":"Posting date of the ledger entry."},"debet":{"type":"number","format":"double","description":"Debit amount for this ledger entry line."},"credit":{"type":"number","format":"double","description":"Credit amount for this ledger entry line."},"balance_csum":{"type":"number","format":"double","description":"Running cumulative balance after applying this entry."},"description":{"type":"string","description":"Optional free-text description for this ledger entry."},"document_id":{"type":"integer","nullable":true,"description":"ID of the document this entry belongs to, for deep linking and for looking the entry's attachments up in `attachments_by_document`."}},"required":["balance_csum","credit","date","debet","number"]},"MCPAccessibleBusinessList":{"type":"object","properties":{"slug":{"type":"string","description":"Business slug."},"name":{"type":"string","description":"Business name."},"form_name":{"type":"string","nullable":true,"description":"Human-readable business form name."},"identifiers":{"type":"array","items":{"$ref":"#/components/schemas/Identifier"},"description":"Business identifiers available for this business."},"granted_permission_ids":{"type":"array","items":{"type":"string"},"description":"Granted permission identifiers for the current user in this business."}},"required":["form_name","granted_permission_ids","identifiers","name","slug"]},"MCPAccountList":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was created."},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was last updated."},"number":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":true},"header_id":{"type":"integer","nullable":true},"header_path":{"type":"array","items":{"type":"string"},"readOnly":true},"type":{"allOf":[{"$ref":"#/components/schemas/AccountTypeEnum"}],"readOnly":true},"description":{"type":"string","readOnly":true,"nullable":true},"is_shown":{"type":"boolean","readOnly":true}},"required":["created_at","description","header_path","id","is_shown","name","number","type","updated_at"]},"MCPActiveSuggestion":{"type":"object","properties":{"id":{"type":"integer","readOnly":true,"description":"Active accounting suggestion ID linked to this document."},"description":{"type":"string","readOnly":true,"nullable":true,"description":"Human-readable suggestion summary."},"state":{"allOf":[{"$ref":"#/components/schemas/StateEnum"}],"readOnly":true,"description":"Suggestion state. Possible values: `active`.\n\n* `active` - active"}},"required":["description","id","state"]},"MCPCompactDocumentList":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"number":{"type":"string","readOnly":true,"nullable":true,"description":"The document number is an automatically generated number that identifies the document in the accounting system."},"is_flagged":{"type":"boolean","readOnly":true,"description":"Indicates whether the document is flagged for review or attention."},"is_locked":{"type":"boolean","readOnly":true,"description":"Indicates whether the document is locked and cannot be modified."},"is_draft":{"type":"boolean","readOnly":true,"description":"Indicates whether the document is a draft. Draft documents are not yet finalized."},"date":{"type":"string","format":"date","readOnly":true,"description":"The date of the document. This is the date when the document was created or issued."},"description":{"type":"string","readOnly":true,"description":"A brief description of the document."},"contact_id":{"type":"integer","nullable":true,"description":"Contact ID associated with this document."},"contact_name":{"type":"string","readOnly":true,"nullable":true,"description":"Contact name associated with this document."},"balance":{"type":"number","format":"float","readOnly":true,"description":"Total balance of the document. This value represents the net effect on accounts of type \"bank account.\" Note that this value is typically zero if no money has yet moved, for example, when recording accounts receivable. Once money is received or paid via a bank account, the amount will be shown in this field."},"attachment_count":{"type":"integer","readOnly":true,"description":"Number of attachments linked to this document."},"tag_count":{"type":"integer","readOnly":true,"description":"Number of tags linked to this document."},"relation_count":{"type":"integer","readOnly":true,"description":"Number of document relations linked to this document."},"workflow":{"allOf":[{"$ref":"#/components/schemas/MCPDocumentWorkflow"}],"readOnly":true,"description":"Workflow metadata for this document, including current status, recommended next action, and editability."},"suggestion_info":{"allOf":[{"$ref":"#/components/schemas/MCPDocumentSuggestion"}],"readOnly":true,"description":"Suggestion metadata for this document, including whether an active suggestion exists, its details, and handling guidance."},"available_actions":{"type":"array","items":{"$ref":"#/components/schemas/MCPDocumentAction"},"readOnly":true,"description":"Available next MCP actions for this document workflow."}},"required":["attachment_count","available_actions","balance","contact_name","date","description","id","is_draft","is_flagged","is_locked","number","relation_count","suggestion_info","tag_count","workflow"]},"MCPContactList":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was created."},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was last updated."},"customer_id":{"type":"string","readOnly":true,"nullable":true,"description":"Optional business-specific customer identifier. Must be unique within the business when provided."},"type":{"allOf":[{"$ref":"#/components/schemas/ContactTypeEnum"}],"readOnly":true,"description":"Contact type. Use BUSINESS for companies or PERSON for individuals.\n\n* `UNSET` - Ei asetettu\n* `PERSON` - Yksityishenkilö\n* `BUSINESS` - Yritys"},"name":{"type":"string","readOnly":true,"description":"Contact display name."},"contact_business_id":{"type":"string","readOnly":true,"nullable":true,"description":"Optional business ID for business contacts. Required for invoicing when contact type is BUSINESS."},"is_invoicing_enabled":{"type":"boolean","readOnly":true,"description":"Whether invoicing is enabled for this contact."},"invoicing_email":{"type":"string","format":"email","readOnly":true,"nullable":true,"description":"Email address used when sending invoices by email."}},"required":["contact_business_id","created_at","customer_id","id","invoicing_email","is_invoicing_enabled","name","type","updated_at"]},"MCPDocument":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"number":{"type":"string","readOnly":true,"nullable":true,"description":"The document number is an automatically generated number that identifies the document in the accounting system."},"is_flagged":{"type":"boolean","readOnly":true,"description":"Indicates whether the document is flagged for review or attention."},"is_locked":{"type":"boolean","readOnly":true,"description":"Indicates whether the document is locked and cannot be modified."},"is_draft":{"type":"boolean","readOnly":true,"description":"Indicates whether the document is a draft. Draft documents are not yet finalized."},"is_deletable":{"type":"boolean","readOnly":true,"description":"Whether this document can be deleted."},"date":{"type":"string","format":"date","description":"The date of the document. This is the date when the document was created or issued."},"description":{"type":"string","description":"A brief description of the document.","maxLength":256},"contact_id":{"type":"integer","nullable":true,"description":"Contact ID associated with this document."},"contact_name":{"type":"string","readOnly":true,"nullable":true,"description":"Contact name associated with this document."},"balance":{"type":"number","format":"float","readOnly":true,"description":"Total balance of the document. This value represents the net effect on accounts of type \"bank account.\" Note that this value is typically zero if no money has yet moved, for example, when recording accounts receivable. Once money is received or paid via a bank account, the amount will be shown in this field."},"attachment_ids":{"type":"array","items":{"type":"integer"},"description":"IDs of attachments associated with this document."},"blueprint":{"allOf":[{"$ref":"#/components/schemas/Blueprint"}],"description":"Accounting blueprint used to generate document entries. Whenever this payload changes, entries are recalculated from it. See MCP resource `docs_blueprint` for full field-level guidance."},"tag_ids":{"type":"array","items":{"type":"integer"},"description":"List of tag IDs associated with this document."},"relations":{"type":"array","items":{"$ref":"#/components/schemas/DocumentRelation"},"readOnly":true,"description":"Combined list of incoming and outgoing document relations."},"workflow":{"allOf":[{"$ref":"#/components/schemas/MCPDocumentWorkflow"}],"readOnly":true,"description":"Workflow metadata for this document, including current status, recommended next action, and editability."},"suggestion_info":{"allOf":[{"$ref":"#/components/schemas/MCPDocumentSuggestion"}],"readOnly":true,"description":"Suggestion metadata for this document, including whether an active suggestion exists, its details, and handling guidance."},"available_actions":{"type":"array","items":{"$ref":"#/components/schemas/MCPDocumentAction"},"readOnly":true,"description":"Available next MCP actions for this document workflow."}},"required":["available_actions","balance","contact_name","id","is_deletable","is_draft","is_flagged","is_locked","number","relations","suggestion_info","workflow"]},"MCPDocumentAction":{"type":"object","properties":{"id":{"allOf":[{"$ref":"#/components/schemas/PreferredActionEnum"}],"readOnly":true,"description":"Stable action identifier. Possible values: `edit_document`, `finalize_active_suggestion`.\n\n* `edit_document` - edit_document\n* `finalize_active_suggestion` - finalize_active_suggestion"},"tool_name":{"allOf":[{"$ref":"#/components/schemas/ToolNameEnum"}],"readOnly":true,"description":"MCP tool to call for this action.\n\n* `bookkeeping_document_update` - bookkeeping_document_update\n* `bookkeeping_document_finalize_active_suggestion` - bookkeeping_document_finalize_active_suggestion"},"description":{"type":"string","readOnly":true,"description":"What this action does."},"recommended":{"type":"boolean","readOnly":true,"description":"Whether this is the recommended next action for the document."}},"required":["description","id","recommended","tool_name"]},"MCPDocumentRequest":{"type":"object","properties":{"date":{"type":"string","format":"date","description":"The date of the document. This is the date when the document was created or issued."},"description":{"type":"string","description":"A brief description of the document.","maxLength":256},"contact_id":{"type":"integer","nullable":true,"description":"Contact ID associated with this document."},"attachment_ids":{"type":"array","items":{"type":"integer"},"description":"IDs of attachments associated with this document."},"blueprint":{"allOf":[{"$ref":"#/components/schemas/BlueprintRequest"}],"description":"Accounting blueprint used to generate document entries. Whenever this payload changes, entries are recalculated from it. See MCP resource `docs_blueprint` for full field-level guidance."},"tag_ids":{"type":"array","items":{"type":"integer"},"description":"List of tag IDs associated with this document."}}},"MCPDocumentSuggestion":{"type":"object","properties":{"has_active_suggestion":{"type":"boolean","readOnly":true,"description":"Whether the document currently has an active accounting suggestion."},"active_suggestion":{"allOf":[{"$ref":"#/components/schemas/MCPActiveSuggestion"}],"readOnly":true,"nullable":true,"description":"Active accounting suggestion details, or `null` when none exist."},"handling":{"allOf":[{"$ref":"#/components/schemas/MCPSuggestionHandling"}],"readOnly":true,"description":"Guidance for handling suggestions for this document."}},"required":["active_suggestion","handling","has_active_suggestion"]},"MCPDocumentWorkflow":{"type":"object","properties":{"workflow_status":{"allOf":[{"$ref":"#/components/schemas/WorkflowStatusEnum"}],"readOnly":true,"description":"Document workflow status. Possible values: `finalized`, `draft_without_active_suggestion`, `draft_with_active_suggestion`.\n\n* `finalized` - finalized\n* `draft_without_active_suggestion` - draft_without_active_suggestion\n* `draft_with_active_suggestion` - draft_with_active_suggestion"},"preferred_action":{"allOf":[{"$ref":"#/components/schemas/PreferredActionEnum"}],"readOnly":true,"description":"Recommended next action identifier for this document. Possible values: `edit_document`, `finalize_active_suggestion`.\n\n* `edit_document` - edit_document\n* `finalize_active_suggestion` - finalize_active_suggestion"},"document_editable":{"type":"boolean","readOnly":true,"description":"Whether the document can currently be edited."}},"required":["document_editable","preferred_action","workflow_status"]},"MCPFileList":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was created."},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was last updated."},"name":{"type":"string","readOnly":true},"type":{"type":"string","readOnly":true},"folder_id":{"type":"integer","nullable":true,"readOnly":true},"analysis_status":{"allOf":[{"$ref":"#/components/schemas/AnalysisStatusEnum"}],"readOnly":true}},"required":["analysis_status","created_at","folder_id","id","name","type","updated_at"]},"MCPHeaderList":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"name":{"type":"string","readOnly":true},"type":{"allOf":[{"$ref":"#/components/schemas/HeaderTypeEnum"}],"readOnly":true},"parent_id":{"type":"integer","nullable":true,"readOnly":true},"parent_ids":{"type":"array","items":{"type":"integer"},"readOnly":true},"level":{"type":"integer","readOnly":true,"nullable":true}},"required":["id","level","name","parent_id","parent_ids","type"]},"MCPPeriodList":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"start_date":{"type":"string","format":"date","description":"Accounting period start date (inclusive)."},"end_date":{"type":"string","format":"date","description":"Accounting period end date (inclusive)."},"has_began":{"type":"boolean","readOnly":true,"description":"True when the accounting period start date is in the past."},"has_ended":{"type":"boolean","readOnly":true,"description":"True when the accounting period end date is in the past."},"is_locked":{"type":"boolean","readOnly":true,"description":"Whether documents in this accounting period are locked."},"is_reported":{"type":"boolean","readOnly":true,"description":"Whether this accounting period has been reported/closed."}},"required":["has_began","has_ended","id","is_locked","is_reported"]},"MCPProductList":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was created."},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was last updated."},"code":{"type":"string","readOnly":true,"nullable":true,"description":"Optional product code. Must be unique within a business, so two products in the same business cannot share the same code."},"name":{"type":"string","readOnly":true,"description":"Product name."},"unit":{"type":"string","readOnly":true,"description":"Unit label, for example pcs or h."},"amount":{"type":"number","format":"float","description":"Product unit price."},"vat_rate":{"type":"string","format":"decimal","pattern":"^-?\\d{0,3}(?:\\.\\d{0,2})?$","readOnly":true,"description":"VAT percentage for the product."},"vat_code":{"allOf":[{"$ref":"#/components/schemas/VatCodeSalesEnum"}],"readOnly":true,"description":"VAT code used for the product sale. See `constants.vat_codes.retrieve` (MCP component `constants_vat_codes_retrieve`, endpoint `GET /business/{business_slug}/constants/vat_codes/`) for business-specific allowed values.\n\n* `1` - Kotimaan verollinen myynti\n* `3` - Veroton\n* `4` - Nollaverokannan myynti\n* `5` - Tavaroiden myynti EU-maihin\n* `6` - Palveluiden myynti EU-maihin\n* `10` - Rakennuspalveluiden myynti\n* `12` - Palvelumyynnit EU:n ulkopuolelle\n* `13` - Tavaroiden myynti EU:n ulkopuolelle"},"is_vat_inclusive":{"type":"boolean","readOnly":true,"description":"Defines how amount is interpreted: if true, amount already includes VAT (for example 100 EUR total); if false, VAT is added on top of amount (for example 100 EUR + VAT)."},"account_id":{"type":"integer","nullable":true,"description":"Optional accounting account used for this product.","readOnly":true}},"required":["account_id","amount","code","created_at","id","is_vat_inclusive","name","unit","updated_at","vat_code","vat_rate"]},"MCPPurchaseInvoiceList":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was created."},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was last updated."},"invoice_number":{"type":"string","readOnly":true,"nullable":true},"invoicing_date":{"type":"string","format":"date","readOnly":true},"due_date":{"type":"string","format":"date","readOnly":true,"nullable":true},"sender_vat":{"type":"string","readOnly":true,"nullable":true},"sender_name":{"type":"string","readOnly":true,"nullable":true},"reference":{"type":"string","readOnly":true,"nullable":true},"message":{"type":"string","readOnly":true,"nullable":true},"amount":{"type":"number","format":"float","description":"Invoice total amount."},"currency":{"type":"string","readOnly":true},"is_paid":{"type":"boolean","readOnly":true},"is_past_due":{"type":"boolean","readOnly":true,"description":"Whether the purchase invoice due date has already passed."},"import_source":{"allOf":[{"$ref":"#/components/schemas/ImportSourceEnum"}],"readOnly":true,"description":"Tells the source where the invoice was imported from.\n\n* `APIX` - Apix\n* `EMAIL` - Email\n* `UPLOAD` - Lataus\n* `VAT_PURCHASE_INVOICE` - ALV-ostolasku"},"payment_date":{"type":"string","format":"date","readOnly":true,"nullable":true,"description":"The date when the invoice was set to paid."},"document_id":{"type":"integer","readOnly":true,"nullable":true,"description":"Linked bookkeeping document ID, when available."}},"required":["amount","created_at","currency","document_id","due_date","id","import_source","invoice_number","invoicing_date","is_paid","is_past_due","message","payment_date","reference","sender_name","sender_vat","updated_at"]},"MCPSalesInvoiceList":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was created."},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was last updated."},"invoice_number":{"type":"integer","readOnly":true,"nullable":true,"description":"Sequential invoice number assigned when the invoice is accepted."},"receiver_id":{"type":"integer","readOnly":true,"nullable":true,"description":"Receiver contact ID."},"receiver_name":{"type":"string","readOnly":true,"nullable":true,"description":"Receiver contact name."},"description":{"type":"string","readOnly":true,"nullable":true,"description":"Optional invoice-level description."},"status":{"allOf":[{"$ref":"#/components/schemas/InvoiceStatusEnum"}],"readOnly":true,"description":"Invoice status enum. Values: DRAFT, ACCEPTED, PAID, CREDIT_LOSS.\n\n* `DRAFT` - Luonnos\n* `ACCEPTED` - Hyväksytty\n* `PAID` - Maksettu\n* `CREDIT_LOSS` - Luottotappio"},"invoicing_date":{"type":"string","format":"date","readOnly":true,"description":"Invoice issue date."},"due_date":{"type":"string","format":"date","readOnly":true,"description":"Calculated due date based on invoicing date and payment term."},"reference":{"type":"string","readOnly":true,"nullable":true,"description":"Optional payment reference number. Supports Finnish references and RF references based on the business country configuration."},"delivery_method":{"readOnly":true,"nullable":true,"description":"Selected invoice delivery channel. Check available methods first with `invoicing.sales_invoice.delivery_methods`.\n\n* `EMAIL` - Email\n* `EMAIL_XRECHNUNG` - Email Xrechnung\n* `EINVOICE` - Einvoice\n* `ELASKU` - Elasku\n* `PAPER` - Paper\n* `SELF_PRINT` - Self Print","oneOf":[{"$ref":"#/components/schemas/DeliveryMethodEnum"},{"$ref":"#/components/schemas/NullEnum"}]},"last_delivery_at":{"type":"string","format":"date-time","readOnly":true,"nullable":true,"description":"Timestamp of the latest successful invoice delivery."},"settlement_date":{"type":"string","format":"date","readOnly":true,"nullable":true,"description":"Settlement date used in accrual accounting workflows. Required when accrual-based invoicing accounting is enabled."},"total_vat_amount":{"type":"number","format":"float","readOnly":true,"description":"Total VAT amount for the invoice."},"total_amount":{"type":"number","format":"float","readOnly":true,"description":"Total invoice amount excluding VAT."},"is_editable":{"type":"boolean","readOnly":true},"is_past_due":{"type":"boolean","readOnly":true},"is_sendable":{"type":"boolean","readOnly":true}},"required":["created_at","delivery_method","description","due_date","id","invoice_number","invoicing_date","is_editable","is_past_due","is_sendable","last_delivery_at","receiver_id","receiver_name","reference","settlement_date","status","total_amount","total_vat_amount","updated_at"]},"MCPSuggestionHandling":{"type":"object","properties":{"status":{"allOf":[{"$ref":"#/components/schemas/MCPSuggestionHandlingStatusEnum"}],"readOnly":true,"description":"Suggestion handling status. Possible values: `none`, `active`.\n\n* `none` - none\n* `active` - active"},"recommended_action":{"allOf":[{"$ref":"#/components/schemas/PreferredActionEnum"}],"readOnly":true,"description":"Recommended next action for this document workflow. Possible values: `edit_document`, `finalize_active_suggestion`.\n\n* `edit_document` - edit_document\n* `finalize_active_suggestion` - finalize_active_suggestion"},"instructions":{"type":"string","readOnly":true,"description":"Plain-language guidance for how to handle suggestions for this document."}},"required":["instructions","recommended_action","status"]},"MCPSuggestionHandlingStatusEnum":{"enum":["none","active"],"type":"string","description":"* `none` - none\n* `active` - active"},"MCPTagList":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was created."},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was last updated."},"name":{"type":"string","readOnly":true,"nullable":true},"description":{"type":"string","readOnly":true,"nullable":true},"color":{"type":"string","readOnly":true,"nullable":true}},"required":["color","created_at","description","id","name","updated_at"]},"MCPVatPeriodList":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"start_date":{"type":"string","format":"date","description":"VAT period start date (inclusive)."},"end_date":{"type":"string","format":"date","readOnly":true,"description":"VAT period end date (inclusive)."},"due_date":{"type":"string","format":"date","readOnly":true,"description":"Due date for VAT reporting/payment of this VAT period."},"period":{"type":"integer","nullable":true,"description":"VAT cadence value used by this VAT period."},"has_began":{"type":"boolean","readOnly":true,"description":"True when the VAT period start date is in the past."},"has_ended":{"type":"boolean","readOnly":true,"description":"True when the VAT period end date is in the past."},"has_due_passed":{"type":"boolean","readOnly":true,"description":"True when the VAT due date has passed."},"is_locked":{"type":"boolean","readOnly":true,"description":"Whether documents in this VAT period are locked."},"is_reported":{"type":"boolean","readOnly":true,"description":"Whether this VAT period has been reported."}},"required":["due_date","end_date","has_began","has_due_passed","has_ended","id","is_locked","is_reported"]},"MutationError":{"type":"object","properties":{"error_type":{"type":"string","description":"Stable machine-readable error category."},"error_code":{"type":"string","description":"Stable machine-readable error category."},"message":{"type":"string","description":"Human-readable error summary."},"field_errors":{"description":"Optional field-level validation errors."},"hint":{"type":"string","description":"Optional remediation hint for the caller."},"status_code":{"type":"integer","description":"HTTP status code echoed in body."},"details":{"description":"Optional structured details for troubleshooting."}},"required":["error_code","error_type","message","status_code"]},"NocfoPermission":{"type":"object","properties":{"admin":{"$ref":"#/components/schemas/PermissionValue"},"bookkeeping_read":{"$ref":"#/components/schemas/PermissionValue"},"bookkeeping_admin":{"$ref":"#/components/schemas/PermissionValue"},"bookkeeping_editor":{"$ref":"#/components/schemas/PermissionValue"},"bookkeeping_attachment":{"$ref":"#/components/schemas/PermissionValue"},"accounts_read":{"$ref":"#/components/schemas/PermissionValue"},"accounts_editor":{"$ref":"#/components/schemas/PermissionValue"},"files_read":{"$ref":"#/components/schemas/PermissionValue"},"files_editor":{"$ref":"#/components/schemas/PermissionValue"},"invoicing_read":{"$ref":"#/components/schemas/PermissionValue"},"invoicing_admin":{"$ref":"#/components/schemas/PermissionValue"},"invoicing_editor":{"$ref":"#/components/schemas/PermissionValue"},"contact_read":{"$ref":"#/components/schemas/PermissionValue"},"contact_editor":{"$ref":"#/components/schemas/PermissionValue"},"reporting_read":{"$ref":"#/components/schemas/PermissionValue"},"reporting_admin":{"$ref":"#/components/schemas/PermissionValue"},"reporting_editor":{"$ref":"#/components/schemas/PermissionValue"},"salary":{"$ref":"#/components/schemas/PermissionValue"},"integration_admin":{"$ref":"#/components/schemas/PermissionValue"}},"required":["accounts_editor","accounts_read","admin","bookkeeping_admin","bookkeeping_attachment","bookkeeping_editor","bookkeeping_read","contact_editor","contact_read","files_editor","files_read","integration_admin","invoicing_admin","invoicing_editor","invoicing_read","reporting_admin","reporting_editor","reporting_read","salary"]},"NocfoPermissionRequest":{"type":"object","properties":{"admin":{"$ref":"#/components/schemas/PermissionValueRequest"},"bookkeeping_read":{"$ref":"#/components/schemas/PermissionValueRequest"},"bookkeeping_admin":{"$ref":"#/components/schemas/PermissionValueRequest"},"bookkeeping_editor":{"$ref":"#/components/schemas/PermissionValueRequest"},"bookkeeping_attachment":{"$ref":"#/components/schemas/PermissionValueRequest"},"accounts_read":{"$ref":"#/components/schemas/PermissionValueRequest"},"accounts_editor":{"$ref":"#/components/schemas/PermissionValueRequest"},"files_read":{"$ref":"#/components/schemas/PermissionValueRequest"},"files_editor":{"$ref":"#/components/schemas/PermissionValueRequest"},"invoicing_read":{"$ref":"#/components/schemas/PermissionValueRequest"},"invoicing_admin":{"$ref":"#/components/schemas/PermissionValueRequest"},"invoicing_editor":{"$ref":"#/components/schemas/PermissionValueRequest"},"contact_read":{"$ref":"#/components/schemas/PermissionValueRequest"},"contact_editor":{"$ref":"#/components/schemas/PermissionValueRequest"},"reporting_read":{"$ref":"#/components/schemas/PermissionValueRequest"},"reporting_admin":{"$ref":"#/components/schemas/PermissionValueRequest"},"reporting_editor":{"$ref":"#/components/schemas/PermissionValueRequest"},"salary":{"$ref":"#/components/schemas/PermissionValueRequest"},"integration_admin":{"$ref":"#/components/schemas/PermissionValueRequest"}},"required":["accounts_editor","accounts_read","admin","bookkeeping_admin","bookkeeping_attachment","bookkeeping_editor","bookkeeping_read","contact_editor","contact_read","files_editor","files_read","integration_admin","invoicing_admin","invoicing_editor","invoicing_read","reporting_admin","reporting_editor","reporting_read","salary"]},"NullEnum":{"enum":[null]},"PaginatedAccountListList":{"type":"object","required":["count","results","size"],"properties":{"count":{"type":"integer","example":123,"description":"Total number of items in the collection"},"next":{"type":"integer","nullable":true,"example":2,"description":"Next page number"},"prev":{"type":"integer","nullable":true,"example":1,"description":"Previous page number"},"size":{"type":"integer","example":30,"description":"Number of items on the current page"},"results":{"type":"array","items":{"$ref":"#/components/schemas/AccountList"}}}},"PaginatedAttachmentListList":{"type":"object","required":["count","results","size"],"properties":{"count":{"type":"integer","example":123,"description":"Total number of items in the collection"},"next":{"type":"integer","nullable":true,"example":2,"description":"Next page number"},"prev":{"type":"integer","nullable":true,"example":1,"description":"Previous page number"},"size":{"type":"integer","example":30,"description":"Number of items on the current page"},"results":{"type":"array","items":{"$ref":"#/components/schemas/AttachmentList"}}}},"PaginatedBusinessIdentifierList":{"type":"object","required":["count","results","size"],"properties":{"count":{"type":"integer","example":123,"description":"Total number of items in the collection"},"next":{"type":"integer","nullable":true,"example":2,"description":"Next page number"},"prev":{"type":"integer","nullable":true,"example":1,"description":"Previous page number"},"size":{"type":"integer","example":30,"description":"Number of items on the current page"},"results":{"type":"array","items":{"$ref":"#/components/schemas/BusinessIdentifier"}}}},"PaginatedBusinessList":{"type":"object","required":["count","results","size"],"properties":{"count":{"type":"integer","example":123,"description":"Total number of items in the collection"},"next":{"type":"integer","nullable":true,"example":2,"description":"Next page number"},"prev":{"type":"integer","nullable":true,"example":1,"description":"Previous page number"},"size":{"type":"integer","example":30,"description":"Number of items on the current page"},"results":{"type":"array","items":{"$ref":"#/components/schemas/Business"}}}},"PaginatedBusinessOverviewList":{"type":"object","required":["count","results","size"],"properties":{"count":{"type":"integer","example":123,"description":"Total number of items in the collection"},"next":{"type":"integer","nullable":true,"example":2,"description":"Next page number"},"prev":{"type":"integer","nullable":true,"example":1,"description":"Previous page number"},"size":{"type":"integer","example":30,"description":"Number of items on the current page"},"results":{"type":"array","items":{"$ref":"#/components/schemas/BusinessOverview"}}}},"PaginatedContactList":{"type":"object","required":["count","results","size"],"properties":{"count":{"type":"integer","example":123,"description":"Total number of items in the collection"},"next":{"type":"integer","nullable":true,"example":2,"description":"Next page number"},"prev":{"type":"integer","nullable":true,"example":1,"description":"Previous page number"},"size":{"type":"integer","example":30,"description":"Number of items on the current page"},"results":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}}}},"PaginatedDocumentListList":{"type":"object","required":["count","results","size"],"properties":{"count":{"type":"integer","example":123,"description":"Total number of items in the collection"},"next":{"type":"integer","nullable":true,"example":2,"description":"Next page number"},"prev":{"type":"integer","nullable":true,"example":1,"description":"Previous page number"},"size":{"type":"integer","example":30,"description":"Number of items on the current page"},"results":{"type":"array","items":{"$ref":"#/components/schemas/DocumentList"}}}},"PaginatedDocumentRelationList":{"type":"object","required":["count","results","size"],"properties":{"count":{"type":"integer","example":123,"description":"Total number of items in the collection"},"next":{"type":"integer","nullable":true,"example":2,"description":"Next page number"},"prev":{"type":"integer","nullable":true,"example":1,"description":"Previous page number"},"size":{"type":"integer","example":30,"description":"Number of items on the current page"},"results":{"type":"array","items":{"$ref":"#/components/schemas/DocumentRelation"}}}},"PaginatedDocumentRelationSuggestionList":{"type":"object","required":["count","results","size"],"properties":{"count":{"type":"integer","example":123,"description":"Total number of items in the collection"},"next":{"type":"integer","nullable":true,"example":2,"description":"Next page number"},"prev":{"type":"integer","nullable":true,"example":1,"description":"Previous page number"},"size":{"type":"integer","example":30,"description":"Number of items on the current page"},"results":{"type":"array","items":{"$ref":"#/components/schemas/DocumentRelationSuggestion"}}}},"PaginatedEntryList":{"type":"object","required":["count","results","size"],"properties":{"count":{"type":"integer","example":123,"description":"Total number of items in the collection"},"next":{"type":"integer","nullable":true,"example":2,"description":"Next page number"},"prev":{"type":"integer","nullable":true,"example":1,"description":"Previous page number"},"size":{"type":"integer","example":30,"description":"Number of items on the current page"},"results":{"type":"array","items":{"$ref":"#/components/schemas/Entry"}}}},"PaginatedHeaderListList":{"type":"object","required":["count","results","size"],"properties":{"count":{"type":"integer","example":123,"description":"Total number of items in the collection"},"next":{"type":"integer","nullable":true,"example":2,"description":"Next page number"},"prev":{"type":"integer","nullable":true,"example":1,"description":"Previous page number"},"size":{"type":"integer","example":30,"description":"Number of items on the current page"},"results":{"type":"array","items":{"$ref":"#/components/schemas/HeaderList"}}}},"PaginatedInvoiceList":{"type":"object","required":["count","results","size"],"properties":{"count":{"type":"integer","example":123,"description":"Total number of items in the collection"},"next":{"type":"integer","nullable":true,"example":2,"description":"Next page number"},"prev":{"type":"integer","nullable":true,"example":1,"description":"Previous page number"},"size":{"type":"integer","example":30,"description":"Number of items on the current page"},"results":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}}}},"PaginatedMCPAccessibleBusinessListList":{"type":"object","required":["count","results","size"],"properties":{"count":{"type":"integer","example":123,"description":"Total number of items in the collection"},"next":{"type":"integer","nullable":true,"example":2,"description":"Next page number"},"prev":{"type":"integer","nullable":true,"example":1,"description":"Previous page number"},"size":{"type":"integer","example":30,"description":"Number of items on the current page"},"results":{"type":"array","items":{"$ref":"#/components/schemas/MCPAccessibleBusinessList"}}}},"PaginatedMCPAccountListList":{"type":"object","required":["count","results","size"],"properties":{"count":{"type":"integer","example":123,"description":"Total number of items in the collection"},"next":{"type":"integer","nullable":true,"example":2,"description":"Next page number"},"prev":{"type":"integer","nullable":true,"example":1,"description":"Previous page number"},"size":{"type":"integer","example":30,"description":"Number of items on the current page"},"results":{"type":"array","items":{"$ref":"#/components/schemas/MCPAccountList"}}}},"PaginatedMCPCompactDocumentListList":{"type":"object","required":["count","results","size"],"properties":{"count":{"type":"integer","example":123,"description":"Total number of items in the collection"},"next":{"type":"integer","nullable":true,"example":2,"description":"Next page number"},"prev":{"type":"integer","nullable":true,"example":1,"description":"Previous page number"},"size":{"type":"integer","example":30,"description":"Number of items on the current page"},"results":{"type":"array","items":{"$ref":"#/components/schemas/MCPCompactDocumentList"}}}},"PaginatedMCPContactListList":{"type":"object","required":["count","results","size"],"properties":{"count":{"type":"integer","example":123,"description":"Total number of items in the collection"},"next":{"type":"integer","nullable":true,"example":2,"description":"Next page number"},"prev":{"type":"integer","nullable":true,"example":1,"description":"Previous page number"},"size":{"type":"integer","example":30,"description":"Number of items on the current page"},"results":{"type":"array","items":{"$ref":"#/components/schemas/MCPContactList"}}}},"PaginatedMCPFileListList":{"type":"object","required":["count","results","size"],"properties":{"count":{"type":"integer","example":123,"description":"Total number of items in the collection"},"next":{"type":"integer","nullable":true,"example":2,"description":"Next page number"},"prev":{"type":"integer","nullable":true,"example":1,"description":"Previous page number"},"size":{"type":"integer","example":30,"description":"Number of items on the current page"},"results":{"type":"array","items":{"$ref":"#/components/schemas/MCPFileList"}}}},"PaginatedMCPHeaderListList":{"type":"object","required":["count","results","size"],"properties":{"count":{"type":"integer","example":123,"description":"Total number of items in the collection"},"next":{"type":"integer","nullable":true,"example":2,"description":"Next page number"},"prev":{"type":"integer","nullable":true,"example":1,"description":"Previous page number"},"size":{"type":"integer","example":30,"description":"Number of items on the current page"},"results":{"type":"array","items":{"$ref":"#/components/schemas/MCPHeaderList"}}}},"PaginatedMCPPeriodListList":{"type":"object","required":["count","results","size"],"properties":{"count":{"type":"integer","example":123,"description":"Total number of items in the collection"},"next":{"type":"integer","nullable":true,"example":2,"description":"Next page number"},"prev":{"type":"integer","nullable":true,"example":1,"description":"Previous page number"},"size":{"type":"integer","example":30,"description":"Number of items on the current page"},"results":{"type":"array","items":{"$ref":"#/components/schemas/MCPPeriodList"}}}},"PaginatedMCPProductListList":{"type":"object","required":["count","results","size"],"properties":{"count":{"type":"integer","example":123,"description":"Total number of items in the collection"},"next":{"type":"integer","nullable":true,"example":2,"description":"Next page number"},"prev":{"type":"integer","nullable":true,"example":1,"description":"Previous page number"},"size":{"type":"integer","example":30,"description":"Number of items on the current page"},"results":{"type":"array","items":{"$ref":"#/components/schemas/MCPProductList"}}}},"PaginatedMCPPurchaseInvoiceListList":{"type":"object","required":["count","results","size"],"properties":{"count":{"type":"integer","example":123,"description":"Total number of items in the collection"},"next":{"type":"integer","nullable":true,"example":2,"description":"Next page number"},"prev":{"type":"integer","nullable":true,"example":1,"description":"Previous page number"},"size":{"type":"integer","example":30,"description":"Number of items on the current page"},"results":{"type":"array","items":{"$ref":"#/components/schemas/MCPPurchaseInvoiceList"}}}},"PaginatedMCPSalesInvoiceListList":{"type":"object","required":["count","results","size"],"properties":{"count":{"type":"integer","example":123,"description":"Total number of items in the collection"},"next":{"type":"integer","nullable":true,"example":2,"description":"Next page number"},"prev":{"type":"integer","nullable":true,"example":1,"description":"Previous page number"},"size":{"type":"integer","example":30,"description":"Number of items on the current page"},"results":{"type":"array","items":{"$ref":"#/components/schemas/MCPSalesInvoiceList"}}}},"PaginatedMCPTagListList":{"type":"object","required":["count","results","size"],"properties":{"count":{"type":"integer","example":123,"description":"Total number of items in the collection"},"next":{"type":"integer","nullable":true,"example":2,"description":"Next page number"},"prev":{"type":"integer","nullable":true,"example":1,"description":"Previous page number"},"size":{"type":"integer","example":30,"description":"Number of items on the current page"},"results":{"type":"array","items":{"$ref":"#/components/schemas/MCPTagList"}}}},"PaginatedMCPVatPeriodListList":{"type":"object","required":["count","results","size"],"properties":{"count":{"type":"integer","example":123,"description":"Total number of items in the collection"},"next":{"type":"integer","nullable":true,"example":2,"description":"Next page number"},"prev":{"type":"integer","nullable":true,"example":1,"description":"Previous page number"},"size":{"type":"integer","example":30,"description":"Number of items on the current page"},"results":{"type":"array","items":{"$ref":"#/components/schemas/MCPVatPeriodList"}}}},"PaginatedPeriodList":{"type":"object","required":["count","results","size"],"properties":{"count":{"type":"integer","example":123,"description":"Total number of items in the collection"},"next":{"type":"integer","nullable":true,"example":2,"description":"Next page number"},"prev":{"type":"integer","nullable":true,"example":1,"description":"Previous page number"},"size":{"type":"integer","example":30,"description":"Number of items on the current page"},"results":{"type":"array","items":{"$ref":"#/components/schemas/Period"}}}},"PaginatedProductList":{"type":"object","required":["count","results","size"],"properties":{"count":{"type":"integer","example":123,"description":"Total number of items in the collection"},"next":{"type":"integer","nullable":true,"example":2,"description":"Next page number"},"prev":{"type":"integer","nullable":true,"example":1,"description":"Previous page number"},"size":{"type":"integer","example":30,"description":"Number of items on the current page"},"results":{"type":"array","items":{"$ref":"#/components/schemas/Product"}}}},"PaginatedPurchaseInvoiceListList":{"type":"object","required":["count","results","size"],"properties":{"count":{"type":"integer","example":123,"description":"Total number of items in the collection"},"next":{"type":"integer","nullable":true,"example":2,"description":"Next page number"},"prev":{"type":"integer","nullable":true,"example":1,"description":"Previous page number"},"size":{"type":"integer","example":30,"description":"Number of items on the current page"},"results":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseInvoiceList"}}}},"PaginatedSalesPayoutList":{"type":"object","required":["count","results","size"],"properties":{"count":{"type":"integer","example":123,"description":"Total number of items in the collection"},"next":{"type":"integer","nullable":true,"example":2,"description":"Next page number"},"prev":{"type":"integer","nullable":true,"example":1,"description":"Previous page number"},"size":{"type":"integer","example":30,"description":"Number of items on the current page"},"results":{"type":"array","items":{"$ref":"#/components/schemas/SalesPayout"}}}},"PaginatedTagList":{"type":"object","required":["count","results","size"],"properties":{"count":{"type":"integer","example":123,"description":"Total number of items in the collection"},"next":{"type":"integer","nullable":true,"example":2,"description":"Next page number"},"prev":{"type":"integer","nullable":true,"example":1,"description":"Previous page number"},"size":{"type":"integer","example":30,"description":"Number of items on the current page"},"results":{"type":"array","items":{"$ref":"#/components/schemas/Tag"}}}},"PaginatedVatPeriodList":{"type":"object","required":["count","results","size"],"properties":{"count":{"type":"integer","example":123,"description":"Total number of items in the collection"},"next":{"type":"integer","nullable":true,"example":2,"description":"Next page number"},"prev":{"type":"integer","nullable":true,"example":1,"description":"Previous page number"},"size":{"type":"integer","example":30,"description":"Number of items on the current page"},"results":{"type":"array","items":{"$ref":"#/components/schemas/VatPeriod"}}}},"PaginatedWebhookSubscriptionList":{"type":"object","required":["count","results","size"],"properties":{"count":{"type":"integer","example":123,"description":"Total number of items in the collection"},"next":{"type":"integer","nullable":true,"example":2,"description":"Next page number"},"prev":{"type":"integer","nullable":true,"example":1,"description":"Previous page number"},"size":{"type":"integer","example":30,"description":"Number of items on the current page"},"results":{"type":"array","items":{"$ref":"#/components/schemas/WebhookSubscription"}}}},"PaginatedWorkflowListList":{"type":"object","required":["count","results","size"],"properties":{"count":{"type":"integer","example":123,"description":"Total number of items in the collection"},"next":{"type":"integer","nullable":true,"example":2,"description":"Next page number"},"prev":{"type":"integer","nullable":true,"example":1,"description":"Previous page number"},"size":{"type":"integer","example":30,"description":"Number of items on the current page"},"results":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowList"}}}},"PaginatedWorkflowRunListList":{"type":"object","required":["count","results","size"],"properties":{"count":{"type":"integer","example":123,"description":"Total number of items in the collection"},"next":{"type":"integer","nullable":true,"example":2,"description":"Next page number"},"prev":{"type":"integer","nullable":true,"example":1,"description":"Previous page number"},"size":{"type":"integer","example":30,"description":"Number of items on the current page"},"results":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowRunList"}}}},"PatchedAccountRequest":{"type":"object","properties":{"number":{"type":"string","minLength":1,"pattern":"^\\d+$","maxLength":7},"name_translations":{"type":"array","description":"List of translations. Each item maps one language code to the translated text.","items":{"type":"object","properties":{"key":{"type":"string","description":"Language code for this translation"},"value":{"type":"string","description":"Translated text in the language defined by `key`."}},"required":["key","value"]}},"header_id":{"type":"integer","nullable":true,"description":"Optional header ID for account grouping in countries/setups that use headers. Field may be omitted when the business has no header models."},"description":{"type":"string","nullable":true,"maxLength":8192},"type":{"$ref":"#/components/schemas/AccountTypeEnum"},"default_vat_code":{"allOf":[{"$ref":"#/components/schemas/VatCodeEnum"}],"description":"Default VAT code. See `constants.vat_codes.retrieve` (MCP component `constants_vat_codes_retrieve`, endpoint `GET /business/{business_slug}/constants/vat_codes/`) for business-specific allowed values.\n\n* `1` - Kotimaan verollinen myynti\n* `2` - Kotimaan verollinen osto\n* `3` - Veroton\n* `4` - Nollaverokannan myynti\n* `5` - Tavaroiden myynti EU-maihin\n* `6` - Palveluiden myynti EU-maihin\n* `7` - Tavaroiden ostot EU-maista\n* `8` - Palveluiden ostot EU-maista\n* `9` - Tavaroiden maahantuonti EU:n ulkopuolelta\n* `15` - Tavaroiden maahantuonti EU:n ulkopuolelta\n* `14` - Palveluostot EU:n ulkopuolelta\n* `10` - Rakennuspalveluiden myynti\n* `11` - Rakennuspalveluiden osto\n* `12` - Palvelumyynnit EU:n ulkopuolelle\n* `13` - Tavaroiden myynti EU:n ulkopuolelle","minimum":0,"maximum":2147483647},"default_vat_rate_label":{"$ref":"#/components/schemas/DefaultVatRateLabelEnum"},"opening_balance":{"type":"number","format":"float"}}},"PatchedAttachmentInstanceRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256},"folder_id":{"type":"integer","nullable":true},"analysis_status":{"$ref":"#/components/schemas/AnalysisStatusEnum"},"notes":{"type":"string","nullable":true}}},"PatchedBusinessIdentifierRequest":{"type":"object","properties":{"type":{"allOf":[{"$ref":"#/components/schemas/BusinessIdentifierTypeEnum"}],"description":"Identifier type enum. Allowed values: `y_tunnus`, `vat_code`, `steuernummer`.\n\n* `y_tunnus` - Y_TUNNUS\n* `vat_code` - VAT_CODE\n* `steuernummer` - STEUERNUMMER\n* `handelsregisternummer` - HANDELSREGISTERNUMMER"},"value":{"type":"string","minLength":1,"description":"Identifier value string validated by country-specific rules.","maxLength":64}}},"PatchedBusinessRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256},"slug":{"type":"string","minLength":1,"maxLength":16,"pattern":"^[-a-zA-Z0-9_]+$"},"business_id":{"type":"string","minLength":1},"vat_posting_method":{"$ref":"#/components/schemas/VatPostingMethodEnum"},"vat_reporting_method":{"$ref":"#/components/schemas/VatReportingMethodEnum"},"form":{"$ref":"#/components/schemas/FormEnum"},"default_vat_period":{"allOf":[{"$ref":"#/components/schemas/DefaultVatPeriodEnum"}],"minimum":-2147483648,"maximum":2147483647},"has_dauerfristverlaengerung":{"type":"boolean","description":"DE only: Dauerfristverlängerung shifts UStVA due dates by one month."},"finanzamtsnummer":{"type":"string","nullable":true,"description":"DE only: four-digit Bundesfinanzamtsnummer (Empfänger) for UStVA due dates and ELSTER filings.","maxLength":4},"invoicing_default_penalty_interest":{"type":"number","format":"double"},"invoicing_default_payment_condition_days":{"type":"integer","maximum":999,"minimum":0},"invoicing_default_email_subject":{"type":"string","nullable":true},"invoicing_default_email_content":{"type":"string","nullable":true},"invoicing_vat_exemption_reason":{"type":"string","nullable":true},"has_accrual_based_entries_for_invoicing":{"type":"boolean"},"has_history_before_nocfo":{"type":"boolean"},"fiscal_period_needs_review":{"type":"boolean"},"vat_period_needs_review":{"type":"boolean"},"contact_phone":{"type":"string","nullable":true,"pattern":"^[+]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\\s\\./0-9]*$","maxLength":32},"invoicing_email":{"type":"string","format":"email","nullable":true,"maxLength":254},"invoicing_electronic_address":{"type":"string","nullable":true,"description":"Electronic address used for EN16931/XRechnung EndpointID.","maxLength":256},"invoicing_electronic_address_scheme":{"type":"string","nullable":true,"description":"EndpointID EAS scheme code (for example EM, 0204, 0088).","maxLength":16},"invoicing_iban":{"type":"string","nullable":true,"maxLength":34},"finanzkasse_iban":{"type":"string","nullable":true,"description":"German Finanzkasse IBAN used to pay UStVA (Kz83).","maxLength":34},"finanzkasse_recipient_name":{"type":"string","nullable":true,"description":"SEPA Empfängername for the Finanzkasse IBAN (VoP).","maxLength":70},"invoicing_bic":{"type":"string","nullable":true,"maxLength":11},"invoicing_contact":{"type":"string","nullable":true,"maxLength":64},"invoicing_street":{"type":"string","nullable":true,"maxLength":64},"invoicing_city":{"type":"string","nullable":true,"maxLength":32},"invoicing_postal_code":{"type":"string","nullable":true,"maxLength":8},"invoicing_country":{"type":"string","nullable":true,"maxLength":2},"business_street":{"type":"string","nullable":true,"maxLength":64},"business_city":{"type":"string","nullable":true,"maxLength":32},"business_postal_code":{"type":"string","nullable":true,"maxLength":8},"business_country":{"type":"string","nullable":true,"maxLength":2},"account_yle_tax":{"type":"integer","nullable":true},"account_tax_deferrals":{"type":"integer","nullable":true},"account_income_tax_rec":{"type":"integer","nullable":true},"account_income_tax_lia":{"type":"integer","nullable":true},"account_previous_profit":{"type":"integer","nullable":true},"account_vat_receivables":{"type":"integer","nullable":true},"account_vat_liabilities":{"type":"integer","nullable":true},"account_vat_accrual_adjustment":{"type":"integer","nullable":true},"account_trade_receivables":{"type":"integer","nullable":true},"account_payables":{"type":"integer","nullable":true},"account_cash_payment":{"type":"integer","nullable":true},"credit_cap":{"type":"integer","minimum":0,"nullable":true},"onboarding_updated_invoicing_settings":{"type":"boolean"},"onboarding_created_invoicing_contact":{"type":"boolean"},"onboarding_created_invoicing_product":{"type":"boolean"},"onboarding_registered_to_kravia":{"type":"boolean"},"holvi_nocfo_connection_enabled":{"type":"boolean"},"verohallinto_latest_reporter_full_name":{"type":"string","nullable":true,"maxLength":300},"verohallinto_latest_reporter_phone_number":{"type":"string","nullable":true,"maxLength":32},"is_automatic_debt_collection_enabled":{"type":"boolean"}}},"PatchedContactRequest":{"type":"object","properties":{"customer_id":{"type":"string","nullable":true,"description":"Optional business-specific customer identifier. Must be unique within the business when provided.","maxLength":32},"type":{"allOf":[{"$ref":"#/components/schemas/ContactTypeEnum"}],"description":"Contact type. Use BUSINESS for companies or PERSON for individuals.\n\n* `UNSET` - Ei asetettu\n* `PERSON` - Yksityishenkilö\n* `BUSINESS` - Yritys"},"name":{"type":"string","minLength":1,"description":"Contact display name.","maxLength":256},"name_aliases":{"type":"array","items":{"type":"string","minLength":1,"maxLength":256},"description":"Optional alternative names used for search and matching."},"contact_business_id":{"type":"string","nullable":true,"description":"Optional business ID for business contacts. Required for invoicing when contact type is BUSINESS.","maxLength":16},"xrechnung_buyer_reference":{"type":"string","nullable":true,"maxLength":64},"notes":{"type":"string","nullable":true,"description":"Optional internal notes for this contact.","maxLength":8192},"phone_number":{"type":"string","nullable":true,"description":"Optional phone number for this contact.","maxLength":32},"is_invoicing_enabled":{"type":"boolean","description":"Whether invoicing is enabled for this contact."},"invoicing_email":{"type":"string","format":"email","nullable":true,"description":"Email address used when sending invoices by email.","maxLength":254},"invoicing_electronic_address":{"type":"string","nullable":true,"description":"Electronic address used for EN16931/XRechnung EndpointID.","maxLength":256},"invoicing_electronic_address_scheme":{"type":"string","nullable":true,"description":"EndpointID EAS scheme code (for example EM, 0204, 0088).","maxLength":16},"invoicing_einvoice_address":{"type":"string","nullable":true,"description":"E-invoice receiver address (OVT/e-invoice address).","maxLength":32},"invoicing_einvoice_operator":{"type":"string","nullable":true,"description":"E-invoice operator code for routing e-invoices.","maxLength":32},"invoicing_tax_code":{"type":"string","nullable":true,"description":"VAT/tax identifier for invoicing. Used for tax-sensitive invoicing scenarios.","maxLength":16},"invoicing_street":{"type":"string","nullable":true,"description":"Invoice recipient street address.","maxLength":64},"invoicing_city":{"type":"string","nullable":true,"description":"Invoice recipient city.","maxLength":32},"invoicing_postal_code":{"type":"string","nullable":true,"description":"Invoice recipient postal code.","maxLength":8},"invoicing_country":{"type":"string","nullable":true,"description":"Invoice recipient country code (ISO 3166-1 alpha-2).","maxLength":2},"invoicing_language":{"allOf":[{"$ref":"#/components/schemas/InvoicingLanguageEnum"}],"description":"Preferred invoicing language for this contact.\n\n* `fi` - Suomi\n* `en` - Englanti\n* `sv` - Ruotsi\n* `de` - Saksa"},"buyer_postal_address_details_xml_override":{"type":"string","nullable":true,"description":"Optional legacy XML override for Finvoice BuyerPostalAddressDetails block."}}},"PatchedCurrentUserRequest":{"type":"object","properties":{"first_name":{"type":"string","title":"Etunimi","maxLength":150},"last_name":{"type":"string","title":"Sukunimi","maxLength":150},"show_get_started_info":{"type":"boolean"},"language":{"nullable":true,"oneOf":[{"$ref":"#/components/schemas/LanguageEnum"},{"$ref":"#/components/schemas/BlankEnum"},{"$ref":"#/components/schemas/NullEnum"}]},"ui_preferences":{"description":"Per-user UI preferences, e.g. the column configuration of the businesses table on the start page."}}},"PatchedDocumentInstanceRequest":{"type":"object","properties":{"is_flagged":{"type":"boolean","description":"Indicates whether the document is flagged for review or attention."},"is_draft":{"type":"boolean","description":"Indicates whether the document is a draft. Draft documents are not yet finalized."},"date":{"type":"string","format":"date","description":"The date of the document. This is the date when the document was created or issued."},"description":{"type":"string","description":"A brief description of the document.","maxLength":256},"contact_id":{"type":"integer","nullable":true,"description":"Contact ID associated with this document."},"attachment_ids":{"type":"array","items":{"type":"integer"},"description":"IDs of attachments associated with this document."},"type":{"allOf":[{"$ref":"#/components/schemas/DocumentTypeEnum"}],"description":"The type of the document.\n\n* `0` - Normaali kirjaus\n* `3` - Arvonlisäverokirjaus\n* `4` - Poisto\n* `6` - YLE-vero\n* `7` - Tulovero","minimum":-2147483648,"maximum":2147483647},"blueprint":{"allOf":[{"$ref":"#/components/schemas/BlueprintRequest"}],"description":"Accounting blueprint used to generate document entries. Whenever this payload changes, entries are recalculated from it. See MCP resource `docs_blueprint` for full field-level guidance."},"tag_ids":{"type":"array","items":{"type":"integer"},"description":"List of tag IDs associated with this document."}}},"PatchedDocumentRelationRequest":{"type":"object","properties":{"related_document":{"type":"integer","description":"The related document of this relation."},"role":{"allOf":[{"$ref":"#/components/schemas/RoleEnum"}],"description":"Semantic role of the current document within this relation.\n\n* `ACCRUAL` - ACCRUAL\n* `SETTLEMENT` - SETTLEMENT"},"type":{"allOf":[{"$ref":"#/components/schemas/DocumentRelationTypeEnum"}],"description":"Type of relation that links the documents. For `ACCRUAL_PAIR`, supported roles are `ACCRUAL` and `SETTLEMENT`.\n\n* `ACCRUAL_PAIR` - ACCRUAL_PAIR"}}},"PatchedInvoiceRequest":{"type":"object","properties":{"receiver":{"type":"integer","description":"Receiver contact ID. Must belong to the selected business and be eligible for invoicing."},"contact_person":{"type":"string","nullable":true,"description":"Optional receiver contact person for the invoice.","maxLength":64},"invoicing_date":{"type":"string","format":"date","description":"Invoice issue date."},"payment_condition_days":{"type":"integer","maximum":999,"minimum":0,"description":"Payment term in days."},"reference":{"type":"string","nullable":true,"description":"Optional payment reference number. Supports Finnish references and RF references based on the business country configuration.","maxLength":20},"penalty_interest":{"type":"number","format":"double","description":"Late-payment interest percentage. If omitted, business default is used. Example values: 0, 7.0, 8.5."},"description":{"type":"string","nullable":true,"description":"Optional invoice-level description.","maxLength":512},"is_credit_note_for":{"type":"integer","nullable":true,"description":"Optional original invoice ID when creating a credit note."},"rows":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceRowRequest"},"description":"Invoice rows. Each row defines product/quantity/amount and VAT."},"is_active_recurrence_template":{"type":"boolean","description":"Whether this invoice is an active recurrence template."},"delivery_method":{"nullable":true,"description":"Selected invoice delivery channel. Check available methods first with `invoicing.sales_invoice.delivery_methods`.\n\n* `EMAIL` - Email\n* `EMAIL_XRECHNUNG` - Email Xrechnung\n* `EINVOICE` - Einvoice\n* `ELASKU` - Elasku\n* `PAPER` - Paper\n* `SELF_PRINT` - Self Print","oneOf":[{"$ref":"#/components/schemas/DeliveryMethodEnum"},{"$ref":"#/components/schemas/NullEnum"}]},"last_delivery_at":{"type":"string","format":"date-time","nullable":true,"description":"Timestamp of the latest successful invoice delivery."},"recurrence_rule":{"nullable":true,"description":"Optional recurrence definition. Provide `rule.frequency` (0=yearly, 1=monthly), optional `rule.interval` (monthly only, default 1), `rule.by_month`, `rule.by_month_day`, `start`."},"recurrence_reference_method":{"nullable":true,"description":"Reference strategy for recurring invoices. `KEEP` keeps contact-based reference progression, `ROLL` generates reference per invoice.\n\n* `KEEP` - Keep\n* `ROLL` - Roll","oneOf":[{"$ref":"#/components/schemas/RecurrenceReferenceMethodEnum"},{"$ref":"#/components/schemas/BlankEnum"},{"$ref":"#/components/schemas/NullEnum"}]},"recurrence_email_subject":{"type":"string","nullable":true,"description":"Optional custom email subject for recurrence-generated invoices."},"recurrence_email_content":{"type":"string","nullable":true,"description":"Optional custom email content for recurrence-generated invoices."},"recurrence_end":{"type":"string","format":"date","nullable":true,"description":"Optional end date for recurrence generation."},"attachments":{"type":"array","items":{"type":"integer"},"description":"Optional attachment IDs linked to this invoice."},"settlement_date":{"type":"string","format":"date","nullable":true,"description":"Settlement date used in accrual accounting workflows. Required when accrual-based invoicing accounting is enabled."},"seller_reference":{"type":"string","nullable":true,"description":"Optional seller reference (your reference / Viiteemme).","maxLength":32},"buyer_reference":{"type":"string","nullable":true,"description":"Optional buyer reference (customer reference / Viitteenne).","maxLength":64},"is_automatic_debt_collection_enabled":{"type":"boolean","description":"Enable automatic debt collection for this invoice. Cannot be enabled for credit notes and has recurrence constraints."},"tag_ids":{"type":"array","items":{"type":"integer"},"description":"List of tag IDs associated with this invoice."}}},"PatchedMCPDocumentRequest":{"type":"object","properties":{"date":{"type":"string","format":"date","description":"The date of the document. This is the date when the document was created or issued."},"description":{"type":"string","description":"A brief description of the document.","maxLength":256},"contact_id":{"type":"integer","nullable":true,"description":"Contact ID associated with this document."},"attachment_ids":{"type":"array","items":{"type":"integer"},"description":"IDs of attachments associated with this document."},"blueprint":{"allOf":[{"$ref":"#/components/schemas/BlueprintRequest"}],"description":"Accounting blueprint used to generate document entries. Whenever this payload changes, entries are recalculated from it. See MCP resource `docs_blueprint` for full field-level guidance."},"tag_ids":{"type":"array","items":{"type":"integer"},"description":"List of tag IDs associated with this document."}}},"PatchedPeriodRequest":{"type":"object","properties":{"start_date":{"type":"string","format":"date","description":"Accounting period start date (inclusive)."},"end_date":{"type":"string","format":"date","description":"Accounting period end date (inclusive)."}}},"PatchedProductRequest":{"type":"object","properties":{"code":{"type":"string","nullable":true,"description":"Optional product code. Must be unique within a business, so two products in the same business cannot share the same code.","maxLength":25},"name":{"type":"string","minLength":1,"description":"Product name.","maxLength":64},"unit":{"type":"string","minLength":1,"description":"Unit label, for example pcs or h.","maxLength":8},"amount":{"type":"number","format":"float","description":"Product unit price."},"vat_rate":{"type":"number","format":"double","description":"VAT percentage for the product."},"vat_code":{"allOf":[{"$ref":"#/components/schemas/VatCodeSalesEnum"}],"description":"VAT code for the product. See `constants_vat_codes_retrieve` for business-specific allowed values.\n\n* `1` - Kotimaan verollinen myynti\n* `3` - Veroton\n* `4` - Nollaverokannan myynti\n* `5` - Tavaroiden myynti EU-maihin\n* `6` - Palveluiden myynti EU-maihin\n* `10` - Rakennuspalveluiden myynti\n* `12` - Palvelumyynnit EU:n ulkopuolelle\n* `13` - Tavaroiden myynti EU:n ulkopuolelle"},"is_vat_inclusive":{"type":"boolean","description":"Defines how amount is interpreted: if true, amount already includes VAT; if false, VAT is added on top of amount."},"account_id":{"type":"integer","nullable":true,"description":"Optional account ID for automatic accounting entries. When set, product sales are posted to this account."},"description":{"type":"string","nullable":true,"description":"Optional free-text product description.","maxLength":128}}},"PatchedPurchaseInvoiceRequest":{"type":"object","properties":{"invoice_number":{"type":"string","nullable":true,"maxLength":32},"invoicing_date":{"type":"string","format":"date"},"due_date":{"type":"string","format":"date","nullable":true},"sender_vat":{"type":"string","nullable":true,"maxLength":32},"sender_name":{"type":"string","nullable":true,"maxLength":128},"sender_bank_account":{"type":"string","nullable":true,"maxLength":64},"sender_bank_bic":{"type":"string","nullable":true,"maxLength":16},"receiver_vat":{"type":"string","nullable":true,"maxLength":32},"receiver_name":{"type":"string","nullable":true,"maxLength":128},"reference":{"type":"string","nullable":true,"maxLength":32},"message":{"type":"string","nullable":true,"maxLength":140},"original_attachment":{"allOf":[{"$ref":"#/components/schemas/AttachmentInstanceRequest"}],"nullable":true,"description":"Original imported invoice file attachment, when available."},"amount":{"type":"number","format":"float","description":"Invoice total amount."},"currency":{"type":"string","maxLength":16},"is_paid":{"type":"boolean"},"import_source":{"allOf":[{"$ref":"#/components/schemas/ImportSourceEnum"}],"description":"Tells the source where the invoice was imported from.\n\n* `APIX` - Apix\n* `EMAIL` - Email\n* `UPLOAD` - Lataus\n* `VAT_PURCHASE_INVOICE` - ALV-ostolasku"},"tag_ids":{"type":"array","items":{"type":"integer"},"description":"List of tag IDs associated with this purchase invoice."}}},"PatchedTagRequest":{"type":"object","properties":{"name":{"type":"string","nullable":true,"minLength":1,"maxLength":32},"description":{"type":"string","nullable":true,"maxLength":256},"color":{"type":"string","nullable":true,"maxLength":16}}},"PatchedVatPeriodRequest":{"type":"object","properties":{"start_date":{"type":"string","format":"date","description":"VAT period start date (inclusive)."},"period":{"type":"integer","nullable":true,"description":"VAT cadence value used by this VAT period."}}},"PatchedWebhookSubscriptionRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"target_url":{"type":"string","format":"uri","minLength":1,"maxLength":2048},"is_active":{"type":"boolean"},"basic_auth_username":{"type":"string","minLength":1,"maxLength":255},"basic_auth_password":{"type":"string","writeOnly":true,"minLength":1}}},"PatchedWorkflowRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256},"react_flow_data":{},"enabled":{"type":"boolean"}}},"PaymentAmount":{"type":"object","properties":{"amount":{"type":"number","format":"float"},"currency":{"type":"string"}},"required":["amount","currency"]},"PaymentAmountRequest":{"type":"object","properties":{"amount":{"type":"number","format":"float"},"currency":{"type":"string","minLength":1}},"required":["amount","currency"]},"PaymentDetails":{"type":"object","properties":{"requested_execution_date":{"type":"string","format":"date"},"holvi_account":{"type":"integer"},"creditor":{"$ref":"#/components/schemas/CreditorInfo"},"amount":{"$ref":"#/components/schemas/PaymentAmount"},"reference":{"type":"string","maxLength":35,"minLength":3},"message":{"type":"string","maxLength":140,"minLength":3}},"required":["amount","creditor","holvi_account","requested_execution_date"]},"PaymentDetailsRequest":{"type":"object","properties":{"requested_execution_date":{"type":"string","format":"date"},"holvi_account":{"type":"integer"},"creditor":{"$ref":"#/components/schemas/CreditorInfoRequest"},"amount":{"$ref":"#/components/schemas/PaymentAmountRequest"},"reference":{"type":"string","minLength":3,"maxLength":35},"message":{"type":"string","minLength":3,"maxLength":140}},"required":["amount","creditor","holvi_account","requested_execution_date"]},"PaymentInstruction":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was created."},"statuses":{"type":"array","items":{"$ref":"#/components/schemas/PaymentInstructionStatus"},"readOnly":true}},"required":["created_at","id","statuses"]},"PaymentInstructionRequest":{"type":"object","properties":{"payment_details":{"allOf":[{"$ref":"#/components/schemas/PaymentDetailsRequest"}],"writeOnly":true}},"required":["payment_details"]},"PaymentInstructionStatus":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"message_id":{"type":"string","maxLength":255},"status":{"type":"string","description":"Status of the payment instruction","maxLength":8},"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was created."}},"required":["created_at","id","message_id"]},"PaymentInstructionStatusRequest":{"type":"object","properties":{"message_id":{"type":"string","minLength":1,"maxLength":255},"status":{"type":"string","minLength":1,"description":"Status of the payment instruction","maxLength":8}},"required":["message_id"]},"Period":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was created."},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was last updated."},"start_date":{"type":"string","format":"date","description":"Accounting period start date (inclusive)."},"end_date":{"type":"string","format":"date","description":"Accounting period end date (inclusive)."},"has_began":{"type":"boolean","readOnly":true,"description":"True when the accounting period start date is in the past."},"has_ended":{"type":"boolean","readOnly":true,"description":"True when the accounting period end date is in the past."},"is_ensured":{"type":"boolean","readOnly":true,"description":"Whether accounting period checks have been marked as ensured."},"is_depreciations_recorded":{"type":"boolean","readOnly":true,"description":"Whether depreciation entries have been recorded for this accounting period."},"is_depreciations_ensured":{"type":"boolean","readOnly":true,"description":"Whether depreciation checks have been marked as ensured."},"is_deferrals_recorded":{"type":"boolean","readOnly":true,"description":"Whether deferral entries have been recorded for this accounting period."},"is_taxed":{"type":"boolean","readOnly":true,"description":"Whether period tax entries have been recorded."},"is_deducted":{"type":"boolean","readOnly":true,"description":"Whether deductions have been processed for this accounting period."},"is_locked":{"type":"boolean","readOnly":true,"description":"Whether documents in this accounting period are locked."},"is_reported":{"type":"boolean","readOnly":true,"description":"Whether this accounting period has been reported/closed."}},"required":["created_at","has_began","has_ended","id","is_deducted","is_deferrals_recorded","is_depreciations_ensured","is_depreciations_recorded","is_ensured","is_locked","is_reported","is_taxed","updated_at"]},"PeriodRequest":{"type":"object","properties":{"start_date":{"type":"string","format":"date","description":"Accounting period start date (inclusive)."},"end_date":{"type":"string","format":"date","description":"Accounting period end date (inclusive)."}}},"PermissionGroupEnum":{"enum":["admin","read_only","bookkeeping","invoicing","custom"],"type":"string","description":"* `admin` - Pääkäyttäjä\n* `read_only` - Lukuoikeus\n* `bookkeeping` - Kirjanpito\n* `invoicing` - Laskutus\n* `custom` - Omavalinta"},"PermissionValue":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"boolean"},"explanation":{"type":"string"}},"required":["explanation","name","value"]},"PermissionValueRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1},"value":{"type":"boolean"},"explanation":{"type":"string","minLength":1}},"required":["explanation","name","value"]},"PermissionsEnum":{"enum":["admin","bookkeeping_read","bookkeeping_admin","bookkeeping_editor","bookkeeping_attachment","accounts_read","accounts_editor","files_read","files_editor","invoicing_read","invoicing_admin","invoicing_editor","contact_read","contact_editor","reporting_read","reporting_admin","reporting_editor","salary","integration_admin"],"type":"string","description":"* `admin` - Pääkäyttäjä\n* `bookkeeping_read` - Kirjanpidon katselu\n* `bookkeeping_admin` - Kirjanpidon pääkäyttäjä\n* `bookkeeping_editor` - Kirjanpidon muokkaus\n* `bookkeeping_attachment` - Kirjanpidon liitteet\n* `accounts_read` - Tilien katselu\n* `accounts_editor` - Tilien muokkaus\n* `files_read` - Tiedostojen katselu\n* `files_editor` - Tiedostojen muokkaus\n* `invoicing_read` - Laskujen ja tuotteiden katselu\n* `invoicing_admin` - Laskutuksen pääkäyttäjä\n* `invoicing_editor` - Laskujen ja tuotteiden muokkaus\n* `contact_read` - Kontaktien katselu\n* `contact_editor` - Kontaktien muokkaus\n* `reporting_read` - Raportoinnin katselu\n* `reporting_admin` - Raportoinnin pääkäyttäjä\n* `reporting_editor` - Raportoinnin muokkaus\n* `salary` - Palkat\n* `integration_admin` - Yhteydet"},"PointInTimeReportColumnSchemaRequest":{"type":"object","properties":{"name":{"type":"string","description":"Optional column label shown in report output."},"date_at":{"type":"string","format":"date","description":"Point-in-time date for balance-sheet style reports (YYYY-MM-DD)."}},"required":["date_at"]},"PointInTimeTypedReportRequestSchemaRequest":{"type":"object","properties":{"extend_accounts":{"type":"boolean","description":"When true, include account-level drill-down rows for supported reports."},"append_comparison_columns":{"type":"boolean","description":"When true and column count is small enough, add comparison columns."},"comparison_mode":{"allOf":[{"$ref":"#/components/schemas/ComparisonModeEnum"}],"description":"How interleaved Change columns are expressed when comparison is on: `amount` (default, cents difference) or `percent` ((left - right) / right * 100). Null when the right-hand period is 0.\n\n* `amount` - amount\n* `percent` - percent"},"tag_ids":{"type":"array","items":{"type":"integer"},"description":"Optional tag filters. Only entries/documents matching these tags are included in report calculations."},"account_number":{"type":"string","minLength":1,"description":"When set, return entry lines only for this account (ledger/reconciliation)."},"document_number":{"type":"string","minLength":1,"description":"When set, return entry lines only for this journal voucher."},"vat_entry_group":{"type":"string","minLength":1,"description":"When set, return paginated entry lines for this VAT summary line id."},"entries_page":{"type":"integer","minimum":1,"default":1,"description":"1-based page index for scoped entry-line requests."},"entries_page_size":{"type":"integer","maximum":200,"minimum":1,"default":8,"description":"Page size for scoped entry-line requests. Capped at 200."},"include_entry_lines":{"type":"boolean","default":true,"description":"When false, omit entry line arrays from JSON responses and include `entries_count` instead. Scoped entry requests always return lines."},"columns":{"type":"array","items":{"$ref":"#/components/schemas/PointInTimeReportColumnSchemaRequest"},"description":"Columns for point-in-time reports. Use `date_at` for each column."}},"required":["columns"]},"PreferredActionEnum":{"enum":["edit_document","finalize_active_suggestion"],"type":"string","description":"* `edit_document` - edit_document\n* `finalize_active_suggestion` - finalize_active_suggestion"},"Product":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was created."},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was last updated."},"code":{"type":"string","nullable":true,"description":"Optional product code. Must be unique within a business, so two products in the same business cannot share the same code.","maxLength":25},"name":{"type":"string","description":"Product name.","maxLength":64},"unit":{"type":"string","description":"Unit label, for example pcs or h.","maxLength":8},"amount":{"type":"number","format":"float","description":"Product unit price."},"vat_exclusive_amount":{"type":"number","format":"float","readOnly":true,"description":"Unit price excluding VAT."},"vat_inclusive_amount":{"type":"number","format":"float","readOnly":true,"description":"Unit price including VAT."},"vat_amount":{"type":"number","format":"float","readOnly":true,"description":"VAT amount per unit."},"vat_rate":{"type":"number","format":"double","description":"VAT percentage for the product."},"vat_code":{"allOf":[{"$ref":"#/components/schemas/VatCodeSalesEnum"}],"description":"VAT code for the product. See `constants_vat_codes_retrieve` for business-specific allowed values.\n\n* `1` - Kotimaan verollinen myynti\n* `3` - Veroton\n* `4` - Nollaverokannan myynti\n* `5` - Tavaroiden myynti EU-maihin\n* `6` - Palveluiden myynti EU-maihin\n* `10` - Rakennuspalveluiden myynti\n* `12` - Palvelumyynnit EU:n ulkopuolelle\n* `13` - Tavaroiden myynti EU:n ulkopuolelle"},"is_vat_inclusive":{"type":"boolean","description":"Defines how amount is interpreted: if true, amount already includes VAT; if false, VAT is added on top of amount."},"account_id":{"type":"integer","nullable":true,"description":"Optional account ID for automatic accounting entries. When set, product sales are posted to this account."},"description":{"type":"string","nullable":true,"description":"Optional free-text product description.","maxLength":128}},"required":["amount","created_at","id","name","unit","updated_at","vat_amount","vat_code","vat_exclusive_amount","vat_inclusive_amount","vat_rate"]},"ProductRequest":{"type":"object","properties":{"code":{"type":"string","nullable":true,"description":"Optional product code. Must be unique within a business, so two products in the same business cannot share the same code.","maxLength":25},"name":{"type":"string","minLength":1,"description":"Product name.","maxLength":64},"unit":{"type":"string","minLength":1,"description":"Unit label, for example pcs or h.","maxLength":8},"amount":{"type":"number","format":"float","description":"Product unit price."},"vat_rate":{"type":"number","format":"double","description":"VAT percentage for the product."},"vat_code":{"allOf":[{"$ref":"#/components/schemas/VatCodeSalesEnum"}],"description":"VAT code for the product. See `constants_vat_codes_retrieve` for business-specific allowed values.\n\n* `1` - Kotimaan verollinen myynti\n* `3` - Veroton\n* `4` - Nollaverokannan myynti\n* `5` - Tavaroiden myynti EU-maihin\n* `6` - Palveluiden myynti EU-maihin\n* `10` - Rakennuspalveluiden myynti\n* `12` - Palvelumyynnit EU:n ulkopuolelle\n* `13` - Tavaroiden myynti EU:n ulkopuolelle"},"is_vat_inclusive":{"type":"boolean","description":"Defines how amount is interpreted: if true, amount already includes VAT; if false, VAT is added on top of amount."},"account_id":{"type":"integer","nullable":true,"description":"Optional account ID for automatic accounting entries. When set, product sales are posted to this account."},"description":{"type":"string","nullable":true,"description":"Optional free-text product description.","maxLength":128}},"required":["amount","name","unit","vat_code","vat_rate"]},"PurchaseInvoice":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was created."},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was last updated."},"invoice_number":{"type":"string","nullable":true,"maxLength":32},"invoicing_date":{"type":"string","format":"date"},"due_date":{"type":"string","format":"date","nullable":true},"sender_vat":{"type":"string","nullable":true,"maxLength":32},"sender_name":{"type":"string","nullable":true,"maxLength":128},"sender_bank_account":{"type":"string","nullable":true,"maxLength":64},"sender_bank_bic":{"type":"string","nullable":true,"maxLength":16},"receiver_vat":{"type":"string","nullable":true,"maxLength":32},"receiver_name":{"type":"string","nullable":true,"maxLength":128},"reference":{"type":"string","nullable":true,"maxLength":32},"message":{"type":"string","nullable":true,"maxLength":140},"original_invoice_xml":{"type":"string","format":"uri","readOnly":true,"nullable":true,"description":"Original invoice XML payload when available."},"original_attachment":{"allOf":[{"$ref":"#/components/schemas/AttachmentInstance"}],"nullable":true,"description":"Original imported invoice file attachment, when available."},"amount":{"type":"number","format":"float","description":"Invoice total amount."},"currency":{"type":"string","maxLength":16},"virtuaaliviivakoodi":{"type":"string","readOnly":true,"nullable":true,"description":"Finnish virtual barcode generated from invoice payment details."},"is_paid":{"type":"boolean"},"is_past_due":{"type":"boolean","readOnly":true,"description":"Whether today is after the invoice due date."},"is_deletable":{"type":"boolean","readOnly":true,"description":"Whether this purchase invoice can be deleted."},"attachments":{"type":"array","items":{"type":"integer"},"readOnly":true,"description":"Attachments linked to this purchase invoice."},"import_source":{"allOf":[{"$ref":"#/components/schemas/ImportSourceEnum"}],"description":"Tells the source where the invoice was imported from.\n\n* `APIX` - Apix\n* `EMAIL` - Email\n* `UPLOAD` - Lataus\n* `VAT_PURCHASE_INVOICE` - ALV-ostolasku"},"payment":{"allOf":[{"$ref":"#/components/schemas/PaymentInstruction"}],"readOnly":true,"nullable":true,"description":"Payment instruction generated for this invoice, when available."},"payment_date":{"type":"string","format":"date","readOnly":true,"nullable":true,"description":"Date when this purchase invoice was marked as paid."},"bank_transaction":{"allOf":[{"$ref":"#/components/schemas/DocumentImport"}],"readOnly":true,"nullable":true,"description":"Imported bank transaction linked to this purchase invoice."},"document":{"allOf":[{"$ref":"#/components/schemas/DocumentList"}],"readOnly":true,"nullable":true,"description":"Accounting document linked through the related bank transaction."},"tag_ids":{"type":"array","items":{"type":"integer"},"description":"List of tag IDs associated with this purchase invoice."},"pis_payment":{"type":"object","nullable":true,"readOnly":true,"description":"Latest linked PIS payment details, when available."}},"required":["amount","attachments","bank_transaction","created_at","document","id","import_source","invoicing_date","is_deletable","is_past_due","original_invoice_xml","payment","payment_date","pis_payment","updated_at","virtuaaliviivakoodi"]},"PurchaseInvoiceList":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was created."},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was last updated."},"invoice_number":{"type":"string","nullable":true,"maxLength":32},"invoicing_date":{"type":"string","format":"date"},"due_date":{"type":"string","format":"date","nullable":true},"sender_vat":{"type":"string","nullable":true,"maxLength":32},"sender_name":{"type":"string","nullable":true,"maxLength":128},"sender_bank_account":{"type":"string","nullable":true,"maxLength":64},"sender_bank_bic":{"type":"string","nullable":true,"maxLength":16},"receiver_vat":{"type":"string","nullable":true,"maxLength":32},"receiver_name":{"type":"string","nullable":true,"maxLength":128},"reference":{"type":"string","nullable":true,"maxLength":32},"message":{"type":"string","nullable":true,"maxLength":140},"original_invoice_xml":{"type":"string","format":"uri","readOnly":true,"nullable":true,"description":"Original invoice XML payload when available."},"original_attachment":{"allOf":[{"$ref":"#/components/schemas/AttachmentInstance"}],"nullable":true,"description":"Original imported invoice file attachment, when available."},"amount":{"type":"number","format":"float","description":"Invoice total amount."},"currency":{"type":"string","maxLength":16},"virtuaaliviivakoodi":{"type":"string","readOnly":true,"nullable":true,"description":"Finnish virtual barcode generated from invoice payment details."},"is_paid":{"type":"boolean"},"is_past_due":{"type":"boolean","readOnly":true,"description":"Whether today is after the invoice due date."},"is_deletable":{"type":"boolean","readOnly":true,"description":"Whether this purchase invoice can be deleted."},"attachments":{"type":"array","items":{"type":"integer"},"readOnly":true,"description":"Attachments linked to this purchase invoice."},"import_source":{"allOf":[{"$ref":"#/components/schemas/ImportSourceEnum"}],"description":"Tells the source where the invoice was imported from.\n\n* `APIX` - Apix\n* `EMAIL` - Email\n* `UPLOAD` - Lataus\n* `VAT_PURCHASE_INVOICE` - ALV-ostolasku"},"payment":{"allOf":[{"$ref":"#/components/schemas/PaymentInstruction"}],"readOnly":true,"nullable":true,"description":"Payment instruction generated for this invoice, when available."},"payment_date":{"type":"string","format":"date","readOnly":true,"nullable":true,"description":"Date when this purchase invoice was marked as paid."},"bank_transaction":{"allOf":[{"$ref":"#/components/schemas/DocumentImport"}],"readOnly":true,"nullable":true,"description":"Imported bank transaction linked to this purchase invoice."},"document":{"allOf":[{"$ref":"#/components/schemas/DocumentList"}],"readOnly":true,"nullable":true,"description":"Accounting document linked through the related bank transaction."},"tag_ids":{"type":"array","items":{"type":"integer"},"description":"List of tag IDs associated with this purchase invoice."}},"required":["amount","attachments","bank_transaction","created_at","document","id","import_source","invoicing_date","is_deletable","is_past_due","original_invoice_xml","payment","payment_date","updated_at","virtuaaliviivakoodi"]},"PurchaseInvoiceRequest":{"type":"object","properties":{"invoice_number":{"type":"string","nullable":true,"maxLength":32},"invoicing_date":{"type":"string","format":"date"},"due_date":{"type":"string","format":"date","nullable":true},"sender_vat":{"type":"string","nullable":true,"maxLength":32},"sender_name":{"type":"string","nullable":true,"maxLength":128},"sender_bank_account":{"type":"string","nullable":true,"maxLength":64},"sender_bank_bic":{"type":"string","nullable":true,"maxLength":16},"receiver_vat":{"type":"string","nullable":true,"maxLength":32},"receiver_name":{"type":"string","nullable":true,"maxLength":128},"reference":{"type":"string","nullable":true,"maxLength":32},"message":{"type":"string","nullable":true,"maxLength":140},"original_attachment":{"allOf":[{"$ref":"#/components/schemas/AttachmentInstanceRequest"}],"nullable":true,"description":"Original imported invoice file attachment, when available."},"amount":{"type":"number","format":"float","description":"Invoice total amount."},"currency":{"type":"string","maxLength":16},"is_paid":{"type":"boolean"},"import_source":{"allOf":[{"$ref":"#/components/schemas/ImportSourceEnum"}],"description":"Tells the source where the invoice was imported from.\n\n* `APIX` - Apix\n* `EMAIL` - Email\n* `UPLOAD` - Lataus\n* `VAT_PURCHASE_INVOICE` - ALV-ostolasku"},"tag_ids":{"type":"array","items":{"type":"integer"},"description":"List of tag IDs associated with this purchase invoice."}},"required":["amount","import_source","invoicing_date"]},"RecurrenceReferenceMethodEnum":{"enum":["KEEP","ROLL"],"type":"string","description":"* `KEEP` - Keep\n* `ROLL` - Roll"},"RelationEntrySignals":{"type":"object","description":"Document-local entry fingerprints used for link-kind / suggestion inputs.","properties":{"due_account_effect":{"type":"number","format":"float","nullable":true},"due_account_types":{"type":"array","items":{"type":"string"}},"has_ass_pay_entries":{"type":"boolean"}},"required":["due_account_effect","due_account_types","has_ass_pay_entries"]},"ReportEntryAttachmentSchema":{"type":"object","properties":{"id":{"type":"integer","description":"Attachment (file) ID."},"name":{"type":"string","description":"Original file name of the attachment."},"type":{"type":"string","description":"Content type of the attachment, for example application/pdf."}},"required":["id","name","type"]},"ReportRowAccountSchema":{"type":"object","properties":{"number":{"type":"string","description":"Account number for this account-level drill-down row."},"name":{"type":"string","description":"Human-readable account name for this drill-down row."},"values":{"type":"array","items":{"type":"number","format":"double","nullable":true},"description":"Numeric values for this account in the same order as response `labels`. Change columns may be null in percent mode when the base period is 0."},"labels":{"type":"array","items":{"type":"string"},"description":"Column labels repeated on this row for self-contained parsing. Label order matches `values`."}},"required":["name","number","values"]},"ReportRowSchema":{"type":"object","properties":{"name":{"type":"string","description":"Row title shown in the report tree (for example Revenue, Expenses)."},"level":{"type":"integer","description":"Hierarchy depth of this row. Lower values are higher-level summary rows."},"is_sum_row":{"type":"boolean","description":"True when the row is a calculated summary/subtotal; false for regular rows."},"values":{"type":"array","items":{"type":"number","format":"double","nullable":true},"description":"Row values in the same order as this output object's `labels`."},"labels":{"type":"array","items":{"type":"string"},"description":"Column labels repeated on this row for self-contained parsing. Label order matches `values`."},"accounts":{"type":"array","items":{"$ref":"#/components/schemas/ReportRowAccountSchema"},"description":"Optional account-level drill-down rows for this report row. Usually present when `extend_accounts=true` is requested."}},"required":["accounts","is_sum_row","level","name","values"]},"RoleEnum":{"enum":["ACCRUAL","SETTLEMENT"],"type":"string","description":"* `ACCRUAL` - ACCRUAL\n* `SETTLEMENT` - SETTLEMENT"},"SalesPayout":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was created."},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was last updated."},"external_id":{"type":"string","description":"Partner payout id, unique per business. A repeat of the same external_id is a duplicate ingest.","maxLength":255},"end_to_end_id":{"type":"string","nullable":true,"description":"Reference copied onto the bank statement for this payout. Later matching uses this value, not external_id.","maxLength":64},"source":{"type":"string","nullable":true,"description":"Optional provider name, e.g. sumup, stripe, viva.","maxLength":64},"date":{"type":"string","format":"date"},"amount":{"type":"number","format":"float","description":"Net payout amount expected on the bank."},"currency":{"type":"string","maxLength":3},"description":{"type":"string","nullable":true,"maxLength":256},"attachments":{"type":"array","items":{"type":"integer"},"readOnly":true,"description":"Stored attachment IDs downloaded from attachment_urls."},"items":{"type":"array","items":{"$ref":"#/components/schemas/SalesPayoutItem"}}},"required":["amount","attachments","created_at","date","external_id","id","items","updated_at"]},"SalesPayoutItem":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was created."},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was last updated."},"amount":{"type":"number","format":"float","description":"Signed item amount. Positive for sales or tips, negative for fees or refunds."},"description":{"type":"string","nullable":true,"maxLength":256},"vat_code":{"nullable":true,"description":"Optional VAT code for this payout item. See `constants_vat_codes_retrieve` for business-specific allowed values.\n\n* `1` - Kotimaan verollinen myynti\n* `2` - Kotimaan verollinen osto\n* `3` - Veroton\n* `4` - Nollaverokannan myynti\n* `5` - Tavaroiden myynti EU-maihin\n* `6` - Palveluiden myynti EU-maihin\n* `7` - Tavaroiden ostot EU-maista\n* `8` - Palveluiden ostot EU-maista\n* `9` - Tavaroiden maahantuonti EU:n ulkopuolelta\n* `15` - Tavaroiden maahantuonti EU:n ulkopuolelta\n* `14` - Palveluostot EU:n ulkopuolelta\n* `10` - Rakennuspalveluiden myynti\n* `11` - Rakennuspalveluiden osto\n* `12` - Palvelumyynnit EU:n ulkopuolelle\n* `13` - Tavaroiden myynti EU:n ulkopuolelle","oneOf":[{"$ref":"#/components/schemas/VatCodeEnum"},{"$ref":"#/components/schemas/NullEnum"}]},"vat_rate":{"type":"string","format":"decimal","pattern":"^-?\\d{0,3}(?:\\.\\d{0,2})?$","nullable":true,"description":"Optional VAT percentage for this payout item. When set, must match the business country rates for the payout date. See `constants_vat_rates_retrieve`."},"account_number":{"type":"string","nullable":true,"description":"Optional chart-of-accounts number hint for later booking.","maxLength":32}},"required":["amount","created_at","id","updated_at"]},"SalesPayoutItemRequest":{"type":"object","properties":{"amount":{"type":"number","format":"float","description":"Signed item amount. Positive for sales or tips, negative for fees or refunds."},"description":{"type":"string","nullable":true,"maxLength":256},"vat_code":{"nullable":true,"description":"Optional VAT code for this payout item. See `constants_vat_codes_retrieve` for business-specific allowed values.\n\n* `1` - Kotimaan verollinen myynti\n* `2` - Kotimaan verollinen osto\n* `3` - Veroton\n* `4` - Nollaverokannan myynti\n* `5` - Tavaroiden myynti EU-maihin\n* `6` - Palveluiden myynti EU-maihin\n* `7` - Tavaroiden ostot EU-maista\n* `8` - Palveluiden ostot EU-maista\n* `9` - Tavaroiden maahantuonti EU:n ulkopuolelta\n* `15` - Tavaroiden maahantuonti EU:n ulkopuolelta\n* `14` - Palveluostot EU:n ulkopuolelta\n* `10` - Rakennuspalveluiden myynti\n* `11` - Rakennuspalveluiden osto\n* `12` - Palvelumyynnit EU:n ulkopuolelle\n* `13` - Tavaroiden myynti EU:n ulkopuolelle","oneOf":[{"$ref":"#/components/schemas/VatCodeEnum"},{"$ref":"#/components/schemas/NullEnum"}]},"vat_rate":{"type":"string","format":"decimal","pattern":"^-?\\d{0,3}(?:\\.\\d{0,2})?$","nullable":true,"description":"Optional VAT percentage for this payout item. When set, must match the business country rates for the payout date. See `constants_vat_rates_retrieve`."},"account_number":{"type":"string","nullable":true,"description":"Optional chart-of-accounts number hint for later booking.","maxLength":32}},"required":["amount"]},"SalesPayoutRequest":{"type":"object","properties":{"external_id":{"type":"string","minLength":1,"description":"Partner payout id, unique per business. A repeat of the same external_id is a duplicate ingest.","maxLength":255},"end_to_end_id":{"type":"string","nullable":true,"minLength":1,"description":"Reference copied onto the bank statement for this payout. Later matching uses this value, not external_id.","maxLength":64},"source":{"type":"string","nullable":true,"description":"Optional provider name, e.g. sumup, stripe, viva.","maxLength":64},"date":{"type":"string","format":"date"},"amount":{"type":"number","format":"float","description":"Net payout amount expected on the bank."},"currency":{"type":"string","minLength":1,"maxLength":3},"description":{"type":"string","nullable":true,"maxLength":256},"attachment_urls":{"type":"array","items":{"type":"string","format":"uri","minLength":1},"writeOnly":true,"description":"Partner PDF or report URLs. Files are downloaded and stored."},"items":{"type":"array","items":{"$ref":"#/components/schemas/SalesPayoutItemRequest"}}},"required":["amount","date","external_id","items"]},"ScheduledTriggerPreview":{"type":"object","properties":{"frequency":{"type":"string"},"hour":{"type":"integer","maximum":23,"minimum":0},"minute":{"type":"integer","maximum":0,"minimum":0,"default":0},"day_of_week":{"type":"integer","maximum":7,"minimum":1,"nullable":true},"day_of_month":{"type":"integer","maximum":28,"minimum":1,"nullable":true}},"required":["frequency","hour"]},"ScheduledTriggerPreviewRequest":{"type":"object","properties":{"frequency":{"type":"string","minLength":1},"hour":{"type":"integer","maximum":23,"minimum":0},"minute":{"type":"integer","maximum":0,"minimum":0,"default":0},"day_of_week":{"type":"integer","maximum":7,"minimum":1,"nullable":true},"day_of_month":{"type":"integer","maximum":28,"minimum":1,"nullable":true}},"required":["frequency","hour"]},"ScopedEntriesMetaSchema":{"type":"object","properties":{"account_number":{"type":"string","nullable":true,"description":"Requested account number, if account-scoped."},"account_name":{"type":"string","nullable":true,"description":"Name of the requested account."},"document_number":{"type":"string","nullable":true,"description":"Requested document number, if document-scoped."},"opening_balance":{"type":"number","format":"double","nullable":true,"description":"Account balance before the first entry in the window."},"page_opening_balance":{"type":"number","format":"double","nullable":true,"description":"Running balance immediately before the oldest entry on this page. Equals `opening_balance` on the last page. Null when document-scoped."},"closing_balance":{"type":"number","format":"double","nullable":true,"description":"Account balance after the last entry in the window, across all pages."},"debet_total":{"type":"number","format":"double","description":"Sum of debits over the whole window, not just this page."},"credit_total":{"type":"number","format":"double","description":"Sum of credits over the whole window, not just this page."},"date_from":{"type":"string","format":"date","description":"Window start actually applied."},"date_to":{"type":"string","format":"date","nullable":true,"description":"Window end actually applied, null when unbounded."}},"required":["account_name","account_number","closing_balance","credit_total","date_from","date_to","debet_total","document_number","opening_balance","page_opening_balance"]},"ScopedEntriesResponse":{"type":"object","properties":{"count":{"type":"integer","description":"Total number of entries matching the request across all pages."},"next":{"type":"integer","nullable":true,"description":"Next page number, or null on the last page."},"prev":{"type":"integer","nullable":true,"description":"Previous page number, or null on the first page."},"size":{"type":"integer","description":"Number of entries on this page."},"page":{"type":"integer","description":"Page actually returned, clamped to the last page when out of range."},"page_count":{"type":"integer","description":"Total number of pages, at least 1."},"page_size":{"type":"integer","description":"Page size actually applied after capping."},"results":{"type":"array","items":{"$ref":"#/components/schemas/ScopedEntrySchema"},"description":"Entries for the requested page, newest first."},"meta":{"allOf":[{"$ref":"#/components/schemas/ScopedEntriesMetaSchema"}],"description":"Scope context shared by every entry on the page."},"attachments_by_document":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/ReportEntryAttachmentSchema"}},"description":"Attachments keyed by document ID as a string, covering only the documents referenced by this page. Documents without attachments are omitted."}},"required":["attachments_by_document","count","meta","next","page","page_count","page_size","prev","results","size"]},"ScopedEntrySchema":{"type":"object","properties":{"id":{"type":"integer","description":"Entry ID."},"number":{"type":"string","description":"Document number the entry was booked under."},"date":{"type":"string","format":"date","description":"Posting date of the entry."},"description":{"type":"string","description":"Entry description, falling back to the document description."},"account_number":{"type":"string","description":"Account number of the entry."},"account_name":{"type":"string","description":"Account name of the entry."},"debet":{"type":"number","format":"double","description":"Debit amount in report currency."},"credit":{"type":"number","format":"double","description":"Credit amount in report currency."},"amount":{"type":"number","format":"double","nullable":true,"description":"Movement signed by the account's normal balance side. Null for document-scoped requests, which span several accounts."},"balance_csum":{"type":"number","format":"double","nullable":true,"description":"Running account balance after applying this entry, seeded from the opening balance. Null for document-scoped requests."},"document_id":{"type":"integer","nullable":true,"description":"Document ID, used to look attachments up in `attachments_by_document`."}},"required":["account_name","account_number","amount","balance_csum","credit","date","debet","description","document_id","id","number"]},"SendInvoiceRequest":{"type":"object","properties":{"delivery_method":{"allOf":[{"$ref":"#/components/schemas/DeliveryMethodEnum"}],"description":"Delivery method to use for sending the invoice. Check available methods first with `invoicing.sales_invoice.delivery_methods`.\n\n* `EMAIL` - Email\n* `EMAIL_XRECHNUNG` - Email Xrechnung\n* `EINVOICE` - Einvoice\n* `ELASKU` - Elasku\n* `PAPER` - Paper\n* `SELF_PRINT` - Self Print"},"data":{"allOf":[{"$ref":"#/components/schemas/SendInvoiceViaEmailRequest"}],"nullable":true,"description":"Optional delivery-method-specific payload. For EMAIL delivery, include `email_subject` and optional `email_content`."}},"required":["delivery_method"]},"SendInvoiceViaEmailRequest":{"type":"object","properties":{"email_subject":{"type":"string","minLength":1,"description":"Email subject used when delivery method is EMAIL."},"email_content":{"type":"string","nullable":true,"description":"Optional email body content used when delivery method is EMAIL."}},"required":["email_content","email_subject"]},"Shortcut":{"type":"object","properties":{"key":{"type":"string","description":"Unique key identifying the shortcut."},"is_promoted":{"type":"boolean","description":"Indicates whether the shortcut is promoted."}},"required":["is_promoted","key"]},"StateEnum":{"enum":["active"],"type":"string","description":"* `active` - active"},"Status2d8Enum":{"enum":["pending","running","succeeded","failed","cancelled"],"type":"string","description":"* `pending` - Odottaa\n* `running` - Käynnissä\n* `succeeded` - Onnistui\n* `failed` - Epäonnistui\n* `cancelled` - Peruutettu"},"Tag":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was created."},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was last updated."},"name":{"type":"string","nullable":true,"maxLength":32},"description":{"type":"string","nullable":true,"maxLength":256},"color":{"type":"string","nullable":true,"maxLength":16}},"required":["created_at","id","updated_at"]},"TagRequest":{"type":"object","properties":{"name":{"type":"string","nullable":true,"minLength":1,"maxLength":32},"description":{"type":"string","nullable":true,"maxLength":256},"color":{"type":"string","nullable":true,"maxLength":16}}},"TagsEnum":{"enum":["entrepreneur"],"type":"string","description":"* `entrepreneur` - ENTREPRENEUR"},"ToolNameEnum":{"enum":["bookkeeping_document_update","bookkeeping_document_finalize_active_suggestion"],"type":"string","description":"* `bookkeeping_document_update` - bookkeeping_document_update\n* `bookkeeping_document_finalize_active_suggestion` - bookkeeping_document_finalize_active_suggestion"},"VatCodeEnum":{"enum":[1,2,3,4,5,6,7,8,9,15,14,10,11,12,13],"type":"integer","description":"* `1` - Kotimaan verollinen myynti\n* `2` - Kotimaan verollinen osto\n* `3` - Veroton\n* `4` - Nollaverokannan myynti\n* `5` - Tavaroiden myynti EU-maihin\n* `6` - Palveluiden myynti EU-maihin\n* `7` - Tavaroiden ostot EU-maista\n* `8` - Palveluiden ostot EU-maista\n* `9` - Tavaroiden maahantuonti EU:n ulkopuolelta\n* `15` - Tavaroiden maahantuonti EU:n ulkopuolelta\n* `14` - Palveluostot EU:n ulkopuolelta\n* `10` - Rakennuspalveluiden myynti\n* `11` - Rakennuspalveluiden osto\n* `12` - Palvelumyynnit EU:n ulkopuolelle\n* `13` - Tavaroiden myynti EU:n ulkopuolelle"},"VatCodeSalesEnum":{"enum":[1,3,4,5,6,10,12,13],"type":"integer","description":"* `1` - Kotimaan verollinen myynti\n* `3` - Veroton\n* `4` - Nollaverokannan myynti\n* `5` - Tavaroiden myynti EU-maihin\n* `6` - Palveluiden myynti EU-maihin\n* `10` - Rakennuspalveluiden myynti\n* `12` - Palvelumyynnit EU:n ulkopuolelle\n* `13` - Tavaroiden myynti EU:n ulkopuolelle"},"VatMethodEnum":{"enum":[0,1],"type":"integer","description":"* `0` - Bruttokirjaus\n* `1` - Nettokirjaus"},"VatPeriod":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was created."},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was last updated."},"start_date":{"type":"string","format":"date","description":"VAT period start date (inclusive)."},"end_date":{"type":"string","format":"date","readOnly":true,"description":"VAT period end date (inclusive)."},"due_date":{"type":"string","format":"date","readOnly":true,"description":"Due date for VAT reporting/payment of this VAT period."},"period":{"type":"integer","nullable":true,"description":"VAT cadence value used by this VAT period."},"has_began":{"type":"boolean","readOnly":true,"description":"True when the VAT period start date is in the past."},"has_ended":{"type":"boolean","readOnly":true,"description":"True when the VAT period end date is in the past."},"has_due_passed":{"type":"boolean","readOnly":true,"description":"True when the VAT due date has passed."},"is_locked":{"type":"boolean","readOnly":true,"description":"Whether documents in this VAT period are locked."},"is_reported":{"type":"boolean","readOnly":true,"description":"Whether this VAT period has been reported."},"is_recapitulative_reported":{"type":"boolean","readOnly":true,"description":"Whether the EU recapitulative statement for this VAT period has been marked as filed."},"has_eu_sales":{"type":"boolean","readOnly":true,"description":"True when this VAT period has intra-community sales of goods or services."},"recapitulative_due_date":{"type":"string","format":"date","nullable":true,"readOnly":true},"has_locked_accounting_period":{"type":"boolean","readOnly":true,"description":"True when a locked accounting period contains this VAT period start date."},"filing_tax_to_be_paid":{"type":"integer","nullable":true,"readOnly":true},"filing_accepted_at":{"type":"string","format":"date-time","nullable":true,"readOnly":true},"purchase_invoice_id":{"type":"integer","nullable":true,"readOnly":true}},"required":["created_at","due_date","end_date","filing_accepted_at","filing_tax_to_be_paid","has_began","has_due_passed","has_ended","has_eu_sales","has_locked_accounting_period","id","is_locked","is_recapitulative_reported","is_reported","purchase_invoice_id","recapitulative_due_date","updated_at"]},"VatPeriodRequest":{"type":"object","properties":{"start_date":{"type":"string","format":"date","description":"VAT period start date (inclusive)."},"period":{"type":"integer","nullable":true,"description":"VAT cadence value used by this VAT period."}}},"VatPostingMethodEnum":{"enum":["NET","SPLIT"],"type":"string","description":"* `NET` - ALV netotus\n* `SPLIT` - ALV jaettu kirjaus"},"VatRateOption":{"type":"object","properties":{"label":{"type":"string","description":"VAT rate label key (standard|reduced_a|reduced_b|zero)."},"rate":{"type":"string","format":"decimal","pattern":"^-?\\d{0,4}(?:\\.\\d{0,2})?$","description":"VAT rate percentage value."}},"required":["label","rate"]},"VatRatesResponse":{"type":"object","properties":{"effective_from":{"type":"string","format":"date","description":"Date from which this VAT configuration is effective."},"default_vat_rate_label":{"type":"string","description":"Default VAT rate label for the selected date."},"default_vat_rate":{"type":"string","format":"decimal","pattern":"^-?\\d{0,4}(?:\\.\\d{0,2})?$","description":"Default VAT rate percentage for the selected date."},"vat_rate_options":{"type":"array","items":{"$ref":"#/components/schemas/VatRateOption"},"description":"VAT rate options available for the selected date."}},"required":["default_vat_rate","default_vat_rate_label","effective_from","vat_rate_options"]},"VatReportJsonResponse":{"type":"object","properties":{"report_type":{"type":"string","description":"Internal report type identifier that tells which report payload was generated."},"date_from":{"type":"string","format":"date","nullable":true,"description":"Start date used for the report range when applicable. Null for point-in-time reports."},"date_to":{"type":"string","format":"date","nullable":true,"description":"End date used for the report range when applicable. For point-in-time reports, this may match the reporting date or be null."},"totals":{"type":"object","additionalProperties":{"type":"number","format":"double"},"description":"DE VAT totals keyed by total name. Values are numeric totals used for ELSTER reporting."},"totals_labels":{"type":"object","additionalProperties":{"type":"string"},"description":"Translated DE VAT total labels keyed like `totals` (output/input/payable)."},"de_sections":{"type":"array","items":{},"description":"DE VAT PDF section order: `{ id, label, codes, always_visible, totals }`."},"summary":{"type":"object","additionalProperties":{},"description":"FI VAT summary payload. Scalar keys such as `tax_to_be_paid` are numbers. Drillable lines (and each `domestic_sales` rate) are objects `{ amount: number, entries: VatReportEntry[] }`. `domestic_sales_for_verohallinto` remains a flat rate→amount map."},"mapping":{"type":"object","additionalProperties":{},"description":"DE ELSTER mapping keyed by Kennzahl as string. Values are summary lines `{ amount, label, code, entries, entries_count }` (same shape as FI VAT)."},"recapitulative_statement_required":{"type":"boolean","description":"True when the period includes EU sales of goods or services and a separate recapitulative statement must be filed."}},"required":["recapitulative_statement_required","report_type"]},"VatReportingMethodEnum":{"enum":["DEFAULT","DE_CASH_BASIS"],"type":"string","description":"* `DEFAULT` - ALV kirjanpidon päivälle\n* `DE_CASH_BASIS` - ALV maksupäivänä (DE maksu)"},"WebhookSubscription":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"name":{"type":"string","maxLength":128},"target_url":{"type":"string","format":"uri","maxLength":2048},"is_active":{"type":"boolean"},"basic_auth_username":{"type":"string","maxLength":255},"created_at":{"type":"string","format":"date-time","readOnly":true},"updated_at":{"type":"string","format":"date-time","readOnly":true}},"required":["basic_auth_username","created_at","id","name","target_url","updated_at"]},"WebhookSubscriptionRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"target_url":{"type":"string","format":"uri","minLength":1,"maxLength":2048},"is_active":{"type":"boolean"},"basic_auth_username":{"type":"string","minLength":1,"maxLength":255},"basic_auth_password":{"type":"string","writeOnly":true,"minLength":1}},"required":["basic_auth_username","name","target_url"]},"Workflow":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was created."},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was last updated."},"name":{"type":"string","maxLength":256},"react_flow_data":{},"enabled":{"type":"boolean"},"latest_saved_version_number":{"type":"integer","nullable":true,"readOnly":true}},"required":["created_at","id","latest_saved_version_number","name","updated_at"]},"WorkflowList":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was created."},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was last updated."},"name":{"type":"string","maxLength":256},"react_flow_data":{},"enabled":{"type":"boolean"}},"required":["created_at","id","name","updated_at"]},"WorkflowRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256},"react_flow_data":{},"enabled":{"type":"boolean"}},"required":["name"]},"WorkflowRunDetail":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was created."},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was last updated."},"version_number":{"type":"integer","readOnly":true},"status":{"$ref":"#/components/schemas/Status2d8Enum"},"trigger_node_uuid":{"type":"string","maxLength":64},"event_id":{"type":"integer","maximum":2147483647,"minimum":-2147483648,"nullable":true},"started_at":{"type":"string","format":"date-time","nullable":true},"finished_at":{"type":"string","format":"date-time","nullable":true},"last_error":{"type":"string","nullable":true},"node_runs":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{}},"readOnly":true},"react_flow_data":{"type":"object","additionalProperties":{},"readOnly":true}},"required":["created_at","id","node_runs","react_flow_data","trigger_node_uuid","updated_at","version_number"]},"WorkflowRunDetailRequest":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/Status2d8Enum"},"trigger_node_uuid":{"type":"string","minLength":1,"maxLength":64},"event_id":{"type":"integer","maximum":2147483647,"minimum":-2147483648,"nullable":true},"started_at":{"type":"string","format":"date-time","nullable":true},"finished_at":{"type":"string","format":"date-time","nullable":true},"last_error":{"type":"string","nullable":true}},"required":["trigger_node_uuid"]},"WorkflowRunList":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was created."},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"The date and time when the record was last updated."},"version_number":{"type":"integer","readOnly":true},"status":{"$ref":"#/components/schemas/Status2d8Enum"},"trigger_node_uuid":{"type":"string","maxLength":64},"event_id":{"type":"integer","maximum":2147483647,"minimum":-2147483648,"nullable":true},"started_at":{"type":"string","format":"date-time","nullable":true},"finished_at":{"type":"string","format":"date-time","nullable":true},"last_error":{"type":"string","nullable":true}},"required":["created_at","id","trigger_node_uuid","updated_at","version_number"]},"WorkflowStatusEnum":{"enum":["finalized","draft_without_active_suggestion","draft_with_active_suggestion"],"type":"string","description":"* `finalized` - finalized\n* `draft_without_active_suggestion` - draft_without_active_suggestion\n* `draft_with_active_suggestion` - draft_with_active_suggestion"}}},"x-tagGroups":[{"name":"General","tags":["Businesses","User"]},{"name":"Bookkeeping","tags":["Documents","Files","Accounts","Reports","Tags","Sales payouts","Workflows"]},{"name":"Invoicing","tags":["Contacts","Products","Invoices"]},{"name":"Auth","tags":["JWT"]}],"servers":[{"url":"https://api-tst.nocfo.io","description":"NoCFO API - Testing environment"},{"url":"https://api.nocfo.io","description":"NoCFO API - Production"}]}