November 15, 2026 — Optima accounting in the Sancho API, Optima's messages on errors
Changes since November 9.
Comarch Optima accounting in the Sancho API
Section titled “Comarch Optima accounting in the Sancho API”A program, for example a document workflow with invoice approval, writes approved documents into Comarch Optima through the Sancho API. The accountant doesn’t retype them.
The API reads the company’s accounting profile, fiscal years, the chart of accounts, journals, VAT registers, cash and bank registers, payment methods and categories. It also reads accounting documents, payments with their settlement status, cash reports and bank statements with their transactions, and settlements. Change lists return what changed since the last read, so a program doesn’t fetch everything each time.
The API writes purchase and sales documents into the VAT register together with a proposed journal entry, and posts them by that entry. It adds cash and bank transactions and settles them against payments. It opens analytic accounts and a business partner’s settlement account. It also creates and updates business partner cards, and in Optima it deletes a card as long as nothing in Optima points to it.
Optima decides what may change. You can change and delete any unposted document, including one the accountant entered. Optima won’t let you touch a document that is posted, exported to an accounting office, or dated in a month with an approved VAT return, and the API passes its refusal on.
The API key needs accounting permissions. Opening accounts, the proposed journal entry and posting need the Księga Handlowa module in the integration’s login. Cash and bank also work in a company on KPiR. The MCP server reads the same accounting data. Today only the Comarch Optima integration has accounting. ERPNext and Fakturownia don’t support it. The Accounting page covers the methods and Optima’s rules.
Assets in the Sancho API and the MCP server
Section titled “Assets in the Sancho API and the MCP server”The API and the MCP server read the Assets list and a single asset: fixed assets, equipment and tools. A key sees only the assets of its own integrations. The list returns at most 100 assets per page.
The API also writes fixed assets and equipment in Comarch Optima. It creates a card, updates it, disposes of or sells it, and deletes it. One update saves the card together with the asset’s tags and photos. Disposing of a fixed asset creates an unposted LT document in Optima, and you can undo it only in Optima. Optima won’t delete a card that something in Optima refers to. A tool’s card belongs to the DMS system, so for a tool the API changes only tags and photos.
A write needs the permission on the key and the same permission in the Optima integration’s settings.
In the web app and on the phone you change tags and photos only on an asset that is In use. An asset that is Disposed of or Sold is read-only.
API reference in four languages
Section titled “API reference in four languages”The docs have an API reference in Polish, English, German and Ukrainian. Method groups are named and ordered like the app menu. Method descriptions stay in English, because they come from the OpenAPI file.
The docs language picker shows Polski on Polish pages. Before, it showed English.
One answer for every write in the API
Section titled “One answer for every write in the API”Every create, update and action in the API answers the same way. The answer has the saved object, in the shape a read returns it, and a list of warnings. The list is empty when everything was saved. This covers goods receipts, goods issues and stock transfers including canceling, products, warehouses and a tag update. A delete answers as before.
A program that reads a write’s answer needs a fix. Schema names in the OpenAPI file changed too, so generate any client built from that file again. The document’s exchange rate and the source of a write conflict have new names, and the reference lists the current ones.
Optima’s message instead of a server error
Section titled “Optima’s message instead of a server error”When a save to Comarch Optima failed, an installation behind a proxy server such as Cloudflare showed Unexpected token ‘<’. The proxy replaced Sancho’s answer with its own error page. Now you see Optima’s message, for example Aplikacja pracuje w trybie tylko do odczytu.
The Comarch Optima integration recovers without a service restart. After Optima refuses a module at login, or after a login turns read-only, the next save logs in again.
A program gets the same errors under different codes. The API no longer answers 502 or 504. An integration failure and a timeout are 500. A write that never started is 503, and you can send it again. When the ERP limits the number of requests, the answer is 429. The Errors and limits page covers the codes.
Optima modules in the integration settings
Section titled “Optima modules in the integration settings”The Comarch Optima integration logs in to Optima with the modules you name. Sancho Agent has a Moduły Optimy field in the integration settings, and the installer asks for the modules during installation. The warehouse is MAG and KBP on a classic key, or PODSTAWOWY and LOGISTYKABASIC on a subscription key. Add KH or FINANSEPRO for Księga Handlowa, and KP or FINANSEBASIC for KPiR. The login holds a seat of every module while the service runs.
An installation from before this change logs in with MAG and KBP. On a subscription key, enter the modules yourself, because without them the integration can’t log in to Optima. The installation guide has the full module list.
Person confirming receipt on a goods issue
Section titled “Person confirming receipt on a goods issue”After you saved a goods issue and picked someone in Person confirming receipt, the Save changes button stayed on screen although the person was already saved. Leaving the document then asked about discarding changes that weren’t there. Now the button disappears after the save.
Under the hood
Section titled “Under the hood”- A long field label in the change history, for example a product name in quality control, wraps and takes at most half the row. Before, the value next to it broke one letter per line, in the Activity tab and in the notifications panel.
- A person who sees only the documents they take part in creates an MM stock transfer without an error. Before, the document was saved in the ERP and the app answered that it couldn’t find it.
- When Fakturownia limits the number of requests, Sancho reports the request limit. Before, it reported invalid data.
- The Comarch Optima integration stops when the Optima login and the SQL database point to different companies. The integration log names both databases.
- Every hour the DMS integration moves a tool’s tags to the asset in Optima once the tool card has an Optima number. Before, such a tag pointed to an asset that was no longer there. The move needs an API key in that integration’s settings.