Developers

Changelog

Every change to the public contract, by version.

Every change to the public contract — the API, the webhook events, the MCP tools, the error codes — newest first. A version is a date; send it as AlphaCount-Version to pin it. A breaking change only comes with a new version, and the previous one keeps working for at least 90 days after the new one is announced here.

2026-12-04

New version 2026-12-04. A product's kind may carry the supply kinds from 2026-12-03 (electronic, catalog_service, other_service, located_service). They were published as additive; a client that checks the values it reads breaks on a value it never saw, so they belong to a new version. Pinned to 2026-11-17 or older, such a product reads service, as before 2026-12-03. 2026-11-17 stays supported until at least 04.03.2027; 2026-11-05 and 2026-10-19 keep their dates.

Also in this version:

  • A PDF is at most 25 MB — POST /invoices/import (pdf_base64) and PUT /commission-statements/by-ref/{source}/{external_ref} refuse a larger one with 413 documents.file_too_large (args.limit_mb), the same limit as every other way a file comes into AlphaCount. Before, the commission statement took up to 10 MB and the import had no limit.
  • A full storage refuses new files — both routes answer 403 billing.storage_limit_reached (args.limit_gb) when the organisation's storage is full. Nothing stored is deleted; every reading route keeps working.

2026-12-03

Additive apart from kind (see 2026-12-04).

  • A product's kind says what it supplies — four more values beside goods and the building blocks: electronic (§ 3a Abs. 5 UStG), catalog_service (§ 3a Abs. 4 Satz 2: advice, rights, advertising, data processing …), other_service (§ 3a Abs. 1) and located_service (land, an event — § 3a Abs. 3). An invoice line of such a product to a private customer outside the EU is taxed by it: catalog_service and electronic not here, other_service with German VAT. service (the default) and sla leave it open, as before — such an invoice is held for review. PUT /products/by-ref/… takes the new values; kind in the answer may carry them.
  • PUT /products/by-ref/{source}/{external_ref} takes over the one product of the same name that has no reference of its own yet (one made in the app, or from Stripe) and answers 200 instead of creating a second one beside it. Two of that name: a new product, as before.
  • POST /tax/quote reads the customer's VAT id as the BZSt or VIES confirmed it on the day of the sale, the same way the invoice does: an id known not to be valid counts as none — no reverse charge and no intra-Community supply, German VAT instead. An id not yet checked is read as before, and review names it.
  • PUT /customers/by-ref/{source}/{external_ref} creates a customer through the same door as the app: its tax status (business or private, country, VAT id) is clarified like that of every new customer. A customer of the app with the same VAT id is never taken over — only your reference identifies it. The answer is unchanged.
  • A cancellation invoice is booked when it reaches the customer. POST /invoices/{id}/cancel hands it to you, and it is booked on the day it is made, as before. POST /invoices/{id}/corrections with send: true books it on the day the mail goes; if the mail fails (send_error), it waits unbooked until it is sent (POST /invoices/{id}/send) or marked handed over in the app (§ 31 Abs. 5 UStDV, § 17 Abs. 1 UStG). The answers are unchanged.

For the MCP tools:

  • invoice.create_storno and document.rectify_invoice take a reason — vat_wrong drafts the new invoice with the tax the engine finds for the customer, never the cancelled one's; invoice.create_storno also takes replacement. invoice.send takes handed_over_on for a cancellation invoice handed over in person. document.rectify_invoice now also cancels an invoice Stripe, a shop or a marketplace issued — with our own cancellation invoice; nothing is written to the provider.
  • document.find_correction_candidates (new, reads) names the uploaded papers that may be the corrected invoice of an incoming invoice — or the invoice a correction corrects — with the reason (number_reference, number_suffix, same_net, same_period, same_number) and whether the supplier is the same. document.decide_correction links such a pair: other_is: "correction", korrektur_art (rueckgaengig | fehlerkorrektur) and accept_other_party for a paper of another supplier the user confirmed; new codes correction_party_differs and correction_kind_unknown. For a supplier abroad whose VAT on a § 13b invoice stood as a claim, the correction settles that claim; the § 13b tax stays.
  • product.create refuses a duplicate — the same name, price and interval, or the same Stripe product — with product_exists and the number, name and id of the product that is there. product.import creates no row twice. product.search names a Stripe product's stripe_product_id, its stripe_prices and whether it is active (archived in Stripe: kept, inactive).

2026-12-02

Nothing breaking for the API, the version stays.

  • After the contract ended, read-only: in the 30 days after an organization's contract ended — a trial that ended without a plan, or a subscription once its cancellation took effect — every write of a key is refused with the new code 403 billing.contract_ended_read_only (since, reason: trial | canceled, delete_on); reads and exports keep working until the data are deleted on delete_on. Every operation lists the code.

For the MCP tools:

  • Filings to the tax office need a person. What AlphaCount transmits with its own ELSTER certificate on the company's behalf (UStVA, ZM, EÜR, USt, GewSt, KSt, E-Bilanz, Dauerfristverlängerung, Lohnsteuer-Anmeldung, ELStAM), and every income tax return, is approved only by a person in the AlphaCount app — approve:agent no longer covers it. alphacount_act names the approve_url for it, and alphacount_approve answers filing.human_approval_required with the approve_url. With the company's own certificate a key with approve:agent still approves.
  • Payroll and HR closed to assistants by default. Read and act and Read only of a sign-in no longer carry read:payroll/write:payroll; an admin allows them for one connection. Connections signed in before lose payroll until an admin allows it. For a key, only an admin ticks the payroll scopes (api_key_payroll_admin_only); keys made before keep theirs.

2026-11-30

Nothing breaking, the version stays.

  • 503 service_busy on every operation (02.12.2026): when the server is overloaded or its database does not answer in time, the answer is 503 with {"detail": {"code": "service_busy"}} and Retry-After — no longer a bare 500. Wait and repeat; a write with its Idempotency-Key is safe to repeat.
  • Rate limits per organization and plan: all keys of an organization share one allowance, reading and writing apart, per ten seconds — trial 50/10, indie_hacker 100/25, indie_team 200/50, individual 400/100. The headers are unchanged.
  • POST /fee-statements also states the fees of partners abroad when stripe_platform.fee_statements is on: reverse charge to an EU business with its VAT id (EC sales list), not taxable outside the EU; booked with the statement and paid from the liability the payout kept them on. New refusal fee_statement.mixed_cases.

2026-11-29

Nothing breaking, the version stays. New operations and scopes for platforms and for moving in (docs/technical/MARKTPLATZ_PLAN.md):

  • POST /invoices/{id}/corrections (new): correct an issued invoice, also a paid one — a cancellation invoice and, with lines, a corrected invoice; what was paid moves over, the rest becomes the customer's credit, refund gives it back. Refusals: invoice_not_correctable with reasons.
  • POST /invoices/import (new): take over an invoice another system issued, with its own number, date, payments and original PDF. invoice_number_exists, invoice_not_importable, invoice_pdf_invalid, import_failed.
  • GET /invoices/{id}/xml (new): the e-invoice XML (ZUGFeRD or XRechnung); invoice_xml_missing.
  • POST /tax/quote (new): the tax of a sale before checkout, by the engine that issues the invoice.
  • GET /events (new, scope partner:events:read): the events of the last 30 days, the same envelopes as the webhooks.
  • GET /receivables, GET /reports/summary, GET /tasks (new, scope partner:reports:read): open items with dunning level, the company's figures and deadlines, what waits for a person. invalid_date_range.
  • POST /fee-statements (new, scope partner:fees:write): a Stripe Connect platform's monthly invoice to a partner over the fees already kept — paid by retention, booked nothing twice. fee_statement.nothing_to_state, fee_statement.fee_abroad.
  • Rate limits on every operation: 100 reading and 25 writing requests per key and ten seconds; RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset on every answer, 429 rate_limited with Retry-After above it.
  • A read-only organisation is read-only through its key too. When a payment of the subscription has been open for 14 days (or was disputed), AlphaCount lets the organisation read and export but not change anything. The API now holds that line as the app does: a POST, PUT, PATCH or DELETE answers billing.read_only (403) with since and reason; reads keep working. Until now a key kept writing — issuing invoices included.

2026-11-20

Nothing breaking, the version stays.

  • A refused invoice says why as codes, not only as sentences. invoice_not_issuable, invoice_not_payable and invoice_not_cancellable carry reasons (new): one entry per reason, {"code": "invoicing.…", "args": {…}}, in the order found — every code and its arguments are listed under the error in the error reference. Amounts in args are decimal strings: a payment above what is open names invoicing.payment_exceeds_open with {"amount": "2000.00", "payable": "1412.50", "excess": "587.50"}. messages and message stay as they were — German prose for people, not to be parsed; removing them would break clients that show them, so that waits for a new version.
  • A key works only while its person may sign in to AlphaCount. A key whose creator's account was not admitted (rejected, still waiting for approval) or taken off the access list is refused with api_key_user_inactive (401) on every route — as a key of a person switched off already was. Until now such a key kept working.

2026-11-17

Breaking — new version. A partner's tax_status can be unknown in an answer (PUT and GET /commission-partners/by-ref/{source}/{external_ref}): a partner created without one starts so (see below). A client that checks the values it reads breaks on one it never saw.

  • Asked for in 2026-11-05 or 2026-10-19, such a partner reads domestic_regular, which is what an unset status meant until now. issue_blockers still names commission.partner_tax_status_unknown, and a settlement is refused with it. Both versions keep working until at least 2027-02-16.
  • Without the header, or with 2026-11-17, you get unknown.

A statement now needs what an invoice needs — settlements that went through until today can be refused. Apart from tax_status above, nothing in the shape of requests or answers breaks; what changes is that POST /commission-statements and PUT /commission-statements/by-ref/… answer 409 where a Gutschrift would have gone out without what the law asks for. Check issue_blockers on your partners before the next run.

  • issue_blockers on a partner lists what is missing before a statement can be issued to it — the codes the settlement would refuse with, in the order to fix them. Empty: nothing is in the way. The settlement's 409 names them all in missing.
  • The partner's and the company's full address are required (street, postal code, city): commission.partner_address_missing, commission.issuer_address_missing (§ 14 Abs. 4 Nr. 1 UStG, § 34a UStDV — without them the statement carries no input tax). Not for a commission notice (partner_invoice).
  • A small business needs a tax number or VAT ID too (commission.partner_tax_id_missing, § 34a Nr. 2 UStDV).
  • tax_status has no default any more. A partner created without one is unknown — a new value of the field — and is issued nothing (commission.partner_tax_status_unknown) until you set it. Until today it was treated as taxed regularly and got 19 % VAT shown. Partners that exist keep their status.
  • self_billing_agreed_on may not lie in the future (commission.self_billing_agreement_date_in_future, 422), and setting it is recorded with the key's user as confirmed "through the API".
  • phone on a partner (new, optional): an XRechnung must name the partner's telephone and e-mail — commission.partner_contact_missing says so before the file is refused.
  • commission.statement_below_minimum (409): what is open fell below the partner's minimum since the draft.
  • GET /commission-statements/{id}/xml (new) returns the XRechnung of a statement issued in that format; commission.statement_has_no_xml (404) otherwise.
  • GET /commission-statements says how many there are: header X-Total-Count, with limit (≤ 500) and offset. Until today the list ended at 500 without a word.
  • A registered Gutschrift sent again is the same only if partner, period and lines agree too — otherwise commission.statement_frozen (409), as for other figures.
  • send_error after a request that never finished: the answer replayed for an Idempotency-Key carries commission.send_not_confirmed when send: true was asked and the first request ended before the mail server answered. The codes send_error can carry are now in the error reference.
  • Every e-invoice of a statement is checked against the EN 16931 / XRechnung rules before it is issued; one that fails stops the issue with commission.e_invoice_failed and the rule ids in args.rules. The statement names its service and its service period; a cancellation says so in mail, PDF and XML, with the original's number and date.
  • A Stripe Connect payment reported for a commission notice whose invoice has not arrived is booked (gross, without input VAT, waiting for the invoice) instead of being left out of the books.

Also on 2026-11-17 — three answers that were wrong, none of them breaking.

  • POST /commission-statements/{id}/payment refuses a cancellation with commission.statement_not_payable (409). A cancellation is a negative document; until now it could be reported paid and sent commission_statement.paid.
  • commission_statement.paid carries the day you named. With paid_on, the webhook's paid_at is that day — as the statement says — not the moment of the call.
  • A repeat of the payment call while the first is still running books nothing twice. The second call waits and answers the statement as paid.
  • A Gutschrift is dated in German time, and a partner marked as "EU" whose VAT id is German is refused with commission.partner_tax_status_mismatch (409) instead of getting a reverse-charge Gutschrift.

2026-11-16

The MCP server shows a short, fixed list of tools with a catalog behind it. Nothing an assistant could do with your books is taken away; how it is found changed. The API and its version are untouched.

  • A catalog instead of a tool per read. tools/list answers about a dozen tools. New: alphacount_search (finds actions by words, German or English), alphacount_describe (an action's description and its parameters as a JSON schema) and alphacount_read (runs an action that only reads; arguments is an object). alphacount_act is for actions that write. Every read is still callable by its own tool name; a client that wants them listed as before connects to /mcp?tools=all.

  • alphacount_capabilities answers the map, not every action at once: the areas of the app with their groups and counts — and with area or group the actions in it. The answer no longer has a capabilities list; read an action's parameters with alphacount_describe.

  • Every tool has a title and annotations — readOnlyHint, destructiveHint, idempotentHint, openWorldHint — and the server says how to work with it in instructions at initialize.

  • Errors of the MCP tools are codes: {"error": {"code": …}} — new agent.unknown_tool, agent.action_writes, agent.tool_failed, agent.action_failed, agent.action_other_company, agent.run_failed, agent.thread_unknown, agent.decisions_invalid, agent.unknown_group, agent.query_missing, agent.action_ids_missing. A failure's text is no longer returned.

  • An approved action runs once and in the company it was asked in. A second call for the same action answers {"status": "already_taken"}; an action of a company the connection no longer reaches fails with agent.action_other_company.

  • No longer reachable from outside — they are AlphaCount's own agent's: its working list (agent_task.*, agent_run.*), its memory (agent_knowledge.*), writing its skills (agent_skill.create_personal, .update_draft, .publish), starting its autopilot (agent_autonomy.work_now, .run_routine), and web.search, math.run_python, conversation.ask, conversation.plan, reasoning.show, context.get. Reading skills, the journal, the autopilot's status and its stop stay.

  • Signing in instead of a key (claude.ai, Claude Desktop, ChatGPT — where it is switched on): "read and act" never includes approving the assistant's own actions; that stays a key's scope approve:agent. A connection is bound to the organization it was first used in and can be limited to companies; the sign-in hands the assistant no e-mail address and no name.

  • A key or sign-in of an account that may not sign in to AlphaCount is refused: 403 account_not_listed or account_pending / account_rejected. Corrections found in a review of the whole API; the version stays. Three of them change what a request that was wrong before now gets — none changes a request that was right.

  • Six answers that said something other than what had happened. PUT /commission-attributions/by-ref/… for a customer who was attributed to that agreement already (in the app, or by an invoice's attribution) now answers 200 and keeps your reference; it answered 201 every time and stored nothing. The same attribution under a second reference answers 409 commission.attribution_reference_mismatch. PUT /commission-agreements/by-ref/… with the same tiers in another order is the same agreement (200), no longer 409 commission.agreement_terms_frozen. PUT /commission-statements/by-ref/… again with other amounts or another issue date answers 409 commission.statement_frozen; only number and PDF were compared. GET /commission-entries and GET /commission-statements with only one of partner_source and partner_ref answer 422 partner_filter_incomplete; the source alone was ignored and every partner's rows came back. POST /invoices/{id}/payment answers 500 payment_failed for a fault on our side — nothing booked, the Idempotency-Key free again — instead of 409 conflict_retry, whose advice was to repeat it. The PDF downloads answer 503 file_unavailable when storage cannot deliver, instead of a 500 without a code.

  • POST /invoices/{id}/payment settles what it could not settle before. A payment less the cash discount the invoice offers, received inside its window, now answers the invoice as paid (it stayed partially_paid until someone confirmed the discount). A payment that misses the open amount by no more than the company's tolerance (EUR 1.00 unless set otherwise, never more than 2 % of the invoice) settles it as well. And a payment may cover what a dunning notice that was sent claims beyond the invoice — fee, flat charge, interest; amount_paid stays the invoice's part. More than that still answers 422 invoice_not_payable. Instalments are split to the cent.

  • POST /invoices/{id}/payment: the invoice is part of the request. An Idempotency-Key used for one invoice's payment and sent again to another invoice now answers 409 idempotency_key_reused. Before, it answered the first invoice's stored answer with Idempotent-Replayed: true and booked nothing on the second. Use one key per payment.

  • Invoices a Stripe account synchronises are not the API's. They were listed in GET /invoices, readable under /invoices/by-ref/stripe/…, and could be paid, mailed and cancelled. They now answer 404 invoice_not_found like any invoice the API did not create.

  • attribution on POST /invoices needs partner:commissions:write. It writes to the revenue share; a key with the invoice scope alone now gets 403 api_key_scope_missing.

  • Every answer carries AlphaCount-Version, and AlphaCount-Sandbox for a test company — refusals too. Until now only successful answers did.

  • send_error on a commission statement always has message (null when there is none), as its schema says; and a mail server that fails after the statement was issued now answers 201 with send_error.code = "commission.send_failed" instead of a bare 500.

  • Codes that were returned but not declared: commission.partner_not_found on POST /invoices; commission.tier_incomplete, commission.tier_month_range_invalid, commission.tier_percent_invalid, commission.tiers_overlap and commission.partner_archived on PUT /commission-agreements/by-ref/…; commission.partner_name_implausible on PUT /commission-partners/by-ref/….

2026-11-10

Additions; nothing breaking, the version stays.

  • MCP tool calculate takes a batch: tasks, up to 30 in one call, each {expression, name?, values?, op?, decimals?, rounding?, tolerance?, variable?}. A name keeps the result for the tasks after it (netto → netto * 1.19), values brings in given numbers, rounding is half_up (default), half_even, down or up. op: "check" answers whether left = right (true, left, right, difference), op: "solve" the unknown of a linear equation (x * 1.19 = 1190 → 1000.00). The answer is {"results": [...]}, each with task and result (exact and fraction where the value has more digits) or an error code (new: not_linear, too_many_unknowns, no_solution, every_value, unknown_rounding, too_many_tasks, bad_name).
  • calculate answers in euros on the cent. result has two decimals, rounded half up (10.50 * 19% → 2.00), unless decimals — or round(x, n) around the whole expression — asks for other places; the unrounded value is in exact. A named result goes on with the shown value, and check compares both sides rounded to the cent (839.50 * 1.19 = 999.01 is true). A single expression still carries cents; its result was the unrounded value until now and is the cent value from today — read exact for every digit.

2026-11-07

Additions; nothing breaking, the version stays. New refusals where a Gutschrift would have shown the wrong tax — a request that succeeded before with a contradicting partner is now refused instead of issuing a wrong document.

  • commission.partner_tax_status_mismatch (409) on POST /commission-statements and PUT /commission-statements/by-ref/…: the partner's tax status contradicts its country (a domestic status abroad, reverse charge in Germany or outside the EU, third country inside the EU).
  • commission.issuer_vat_id_missing (409) on the same two routes: a Gutschrift to a partner elsewhere in the EU (reverse charge) needs the company's VAT ID (§ 14a UStG).
  • PUT /commission-statements/by-ref/… checks the self-billing agreement against the Gutschrift's own issue_date, not today: one dated before the agreement answers commission.self_billing_not_agreed.
  • POST /commission-statements now lists commission.e_invoice_failed (422) and commission.partner_country_missing (409), which it could already answer.
  • Shares of revenue in another currency are counted in euro, at the ECB reference rate of the day the revenue came in; until a rate is known the revenue waits. Before, a USD amount was taken as euro cents.

2026-11-06

Additions; nothing breaking, the version stays.

  • MCP tool calculate (math.calculate) — exact arithmetic for your agent, so it never works out an amount in its head: + - * / **, a percent sign after a number (19%), round (half up), sum, min, max, abs over Decimal; decimals with a point. Answers result, cents and the expression, or an error code (syntax_error, name_not_allowed, division_by_zero, result_too_large …). Read-only, no scope and no selected company needed.

2026-11-05

Breaking — new version. A product's kind can be goods in an answer (PUT /products/by-ref/{source}/{external_ref}). The entry of 2026-10-31 called that an addition; it is not: a client that checks the values it reads breaks on one it never saw.

  • Asked for in 2026-10-19 (AlphaCount-Version: 2026-10-19), a goods product reads service, as before. That version keeps working until at least 2027-02-03.
  • Without the header, or with 2026-11-05, you get goods.

2026-10-31

Additions; nothing breaking, the version stays.

  • goods as a product kind: a line of an invoice with such a product is a delivery of goods. To a customer abroad that makes it an intra-Community supply or an export rather than a service.

2026-10-30

Additions; nothing breaking, the version stays.

  • PUT /commission-statements/by-ref/{source}/{external_ref} — register a self-billed invoice (Gutschrift) you issued and mailed yourself: number, figures and PDF are taken as they are and booked like a statement of AlphaCount's own. New error codes commission.statement_not_self_billing, commission.statement_pdf_invalid, commission.statement_tax_mismatch, commission.statement_number_taken, commission.statement_frozen.
  • stripe_transfer_ids on POST /commission-statements/{id}/payment — a Stripe Connect payment leaves the Stripe balance and no bank row shows it, so it is booked here, against that balance.
  • Commission statements answer with external_ref and stripe_transfer_ids.

2026-10-28

Additions; nothing breaking, the version stays.

  • POST /invoices/{invoice_id}/payment — record a payment you collected elsewhere (PSP charge, direct debit, cash) on an issued invoice. Requires an Idempotency-Key; books the payment, updates status/amount_paid, stops dunning for what is paid; invoice.paid fires when the invoice is settled. New error code invoice_not_payable.
  • Test mode. A company can be created as a test company (sandbox): its mails are simulated, nothing is ever filed with the tax authorities, and a key bound to it answers every request with the header AlphaCount-Sandbox: true.
  • livemode in the webhook envelope — false for events of a test company, true otherwise. Receivers that ignore unknown fields see no change.
  • POST /commission-statements — settle a partner now: everything open before period_end becomes an issued statement (Gutschrift, settlement or notice), optionally mailed (send). Requires an Idempotency-Key; nothing open answers commission.nothing_to_settle without using up the key. The statement answer gained an optional send_error field.
  • POST /commission-statements/{id}/payment — mark a statement paid outside AlphaCount (a Stripe Connect transfer, say): closes a waiting external payout, fires commission_statement.paid; a repeat answers 200 unchanged. Refused with commission.payout_open while a SEPA payout is in flight.

2026-10-19

The first published version of the contract. Nothing changed for existing integrations; what is new is that it is written down:

  • An OpenAPI 3.1 document of every operation — summary, description, the scope its key needs, answer schemas, examples and the error codes it can return — at /openapi.json.
  • The AlphaCount-Version header: optional on requests, present on every answer; an unknown version is refused with api_version_unknown.
  • An error reference with every code, in English and German.
  • Idempotency-Key on POST /invoices is documented as what it always was: required.

Operations at this version: customers, products, invoices (create, list, retrieve, PDF, send, cancel), contracts and usage, and revenue share (partners, agreements, attributions, revenue events, entries, statements).

On this page