Skip to content

Point the Handelsregister adapter at the handelsregister.ai v1 API - #1606

Merged
helpcodeai merged 4 commits into
mainfrom
fix/handelsregister-api-v1
Nov 9, 2026
Merged

helpcodeai merged 4 commits into
mainfrom
fix/handelsregister-api-v1

Conversation

@helpcodeai

@helpcodeai helpcodeai commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The Handelsregister (handelsregister.ai) catalog adapter never worked: every call answered 404 since it was added in April. It used /search and /companies/{company_id}, which handelsregister.ai does not have. A paying Cloud customer reported it today (search and company lookups both 404). Production confirms it: the 2 calls ever made on the 2 installed connectors both failed with 404.

The documented API (https://handelsregister.ai/en/documentation) is /v1/search-organizations, /v1/fetch-organization (with optional features) and /v1/fetch-document, with the API key in the x-api-key header. Checked without a key: the old /search answers 404, the three new paths answer 401 "provide a valid API key (via x-api-key header ...)".

Changes

  • Auth: x-api-key: {{HANDELSREGISTER_API_KEY}} instead of Authorization: Bearer (Bearer is for scoped tokens, not API keys).
  • 12 tools, one per endpoint an API key can call, renamed to the handelsregister_ prefix (the old hr_ names gave validator warnings; they never worked, and installed connectors need a reinstall for the new auth header anyway):
    • handelsregister_search_companies → GET /search-organizations (q, filters JSON, limit max 30, skip, sort, order, match_context)
    • handelsregister_get_company → GET /fetch-organization (company_id as q, comma-separated features, financial_statement_type, financial_years, realtime_mode, ai_search)
    • handelsregister_get_shareholders → fetch-organization with features=shareholders
    • handelsregister_fetch_document → GET /fetch-document (AD, CD, SI, shareholders_list, articles_of_association); replaces hr_get_documents, there is no list endpoint
    • handelsregister_fetch_person → GET /fetch-person (person_q, organization_q, feature)
    • handelsregister_list_signals, handelsregister_get_signal, handelsregister_list_signal_topics → /signals, /signals/{id}, /signals/catalog (only the 5 list parameters the API accepts; any other answers 422)
    • handelsregister_get_account, _get_credits, _get_usage, _get_subscription → the free /account endpoints
  • Not covered: monitoring/webhooks (creating a webhook endpoint needs an admin Bearer token, not an API key). Said so in the instructions.
  • Instructions: workflow, credit cost per call and feature, plan-gated features (403 at no cost), 404/408/422/504 meanings. docsUrl updated.
  • New de/handelsregister.live.spec.ts: static checks of auth, every path and the signals parameters; live check of /account (0 credits) behind RUN_HANDELSREGISTER_LIVE=1.

Type

  • Bug fix
  • New feature
  • Documentation
  • Refactoring
  • Performance improvement
  • Other (describe below)

Testing

  • Added/updated unit tests
  • Tested manually (describe steps below)
  • No tests needed (explain why)

From the root: node scripts/validate-adapters.mjs --warn (0 warnings for this adapter; before: 5), node scripts/regenerate-catalog.mjs (no diff), node scripts/adapter-count.mjs --check OK (715 adapters, 12,924 tools), node scripts/generate-llms-txt.mjs (no diff). In packages/backend: npx jest src/adapters 722 suites passed, 25,716 tests passed (live specs skipped), eslint clean on the spec. Manual, at zero credit cost: without a key the old /search answers 404 and all 11 new paths answer 401; with the reporting customer's key (decrypted only inside the Cloud backend, never printed) one GET /account in x-api-key answered 200 with request_credit_cost: 0. The paid endpoints were not called with a key.

Checklist

  • My code follows the existing code style
  • I have tested my changes locally
  • I have updated documentation (if applicable)
  • All existing tests pass (npm test)
  • This PR has a descriptive title

Related Issues

None. Customer support request, 2026-11-09.

Cloud and self-hosted: same adapter. endpointMapping and auth changes are structural, so installed connectors get them after "Apply update" in the "Catalog update available" box on the connector page.

The adapter called /search and /companies/{id}, which do not exist
(404 on every call since the adapter was added), and sent the key as
Authorization: Bearer. The API documents /search-organizations,
/fetch-organization and /fetch-document with the key in x-api-key.
Shareholders come from fetch-organization's shareholders feature, and
hr_get_documents becomes hr_fetch_document (one document per call).
@helpcodeai
helpcodeai requested a review from D3nisty as a code owner November 9, 2026 09:33
@helpcodeai
helpcodeai enabled auto-merge (squash) November 9, 2026 09:34
Add fetch-person, signals (list, one, topic catalog) and the free
account endpoints (profile, credits, usage, subscription), the
realtime_mode/ai_search options of fetch-organization and
match_context in search. Rename the tools to the handelsregister_
prefix the validator asks for: they never worked, and installed
connectors need a reinstall for the new auth header anyway.
@helpcodeai
helpcodeai merged commit 1779629 into main Nov 9, 2026
16 checks passed
@helpcodeai
helpcodeai deleted the fix/handelsregister-api-v1 branch November 9, 2026 10:08
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant