ONRC trade register

v0.1.4
com.foreverworks/onrc Checked 3 days ago Published 6 days ago

Follow your filings at Romania's trade register, with their documents, fee notes and invoices.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

begin_login Begin login

Start signing in: answers with a URL the USER opens in the browser where they are already signed in to myportal.onrc.ro (Keycloak answers from that sign-in; no password or code is typed), and the redirect it ends on. Pass that address to complete_login. Open for 15 minutes; beginning again replaces it. Call this whenever a tool answers needs_login.

complete_login Complete login

Finish a begun login from the address the browser landed on (it carries code=... and state=...). Exchanges the code and stores the session in the service's own state; answers with who signed in and when the session expires. The code dies within a minute of being issued, so pass it at once.

ParameterTypeDescription
redirect_url *stringThe whole address the browser landed on after the login.

get_request Get filing

One filing: its status in the office's words, the two terms (resolutionDue: by when the registrar decides; releaseDue: when the documents are released), whether files are ready to download, and the documents in its file (the signed application, resolutions, certificates once issued).

ParameterTypeDescription
id *stringThe filing's id (a UUID), from list_requests.

health Health

Whether this server is configured and holds a portal session (none, present, expired). No network. Run it before concluding the server is broken.

list_calculation_notes List calculation notes

"Notele mele de calcul": the fee notes the office issued for the filings, with amount, status and the date to pay by. A filing with no fee has none.

ParameterTypeDescription
fromstringFirst day of the window, YYYY-MM-DD (Bucharest). Default: 365 days ago.
pageintegerPage, from 0, newest first.
sizeinteger
tostringLast day of the window, YYYY-MM-DD (Bucharest). Default: today in Bucharest.

list_invoices List invoices

"Facturile mele": the invoices the office issued for paid fees, with total, what was paid and what is outstanding.

ParameterTypeDescription
fromstringFirst day of the window, YYYY-MM-DD (Bucharest). Default: 365 days ago.
pageintegerPage, from 0, newest first.
sizeinteger
tostringLast day of the window, YYYY-MM-DD (Bucharest). Default: today in Bucharest.

list_requests List filings

"Cererile mele": the filings made from this portal account (a mențiune, an înmatriculare, a certificat constatator), newest first, with the portal number, the trade register number, the status (WORKING: still at the office), the company and whether a calculation note or an invoice exists. The id is what get_request takes.

ParameterTypeDescription
fromstringFirst day of the window, YYYY-MM-DD (Bucharest). Default: 365 days ago.
pageintegerPage, from 0, newest first.
sizeinteger
tostringLast day of the window, YYYY-MM-DD (Bucharest). Default: today in Bucharest.

logout Logout

Forget the stored session and tell Keycloak it is over. The user's own browser sign-in is not touched. Reads will answer needs_login until the next login.

session_status Session status

Is a portal account signed in through this server: who, when the access and refresh tokens expire, and what to do if not. With probe, refreshes once to prove the session is still honoured by Keycloak. Never shows a token.

ParameterTypeDescription
probebooleanRefresh once to prove the session still works.