Rováš poskytuje REST API, cez ktoré partneri, doplnky a aplikácie môžu zakladať účty, podávať pracovné výkazy, čítať Merity a napojiť sa na produkty NeoFund (napríklad Civic).
| Prostredie | Základná URL |
|---|---|
| Produkcia | https://rovas.app |
| Vývoj | https://dev.rovas.app |
Cesty služieb majú predponu /rovas. OAuth protokol používa /oauth2.
Posielajte Accept: application/json a pri tele POST/PUT aj Content-Type: application/json.
Ak plánujete integráciu, kontaktujte nás — radi zabezpečíme partnerský prístup a prejdeme váš prípad použitia.
Riešenia postavené na API
Aplikácie a doplnky, ktoré prepojujú nástroje tretích strán s Rovášom, sú uvedené na stránke Rováš konektory.
Ktoré API použiť?
| Model | Autentifikácia | Najlepšie pre |
|---|---|---|
| Klasické | HTTP hlavičky API-KEY a TOKEN |
Partnerské backendy, doplnky na webe, server–server |
| OAuth 2 (Bearer) | Authorization: Bearer <access_token> |
Mobil / SPA s prihlásením v prehliadači (napr. Civic) |
Na jednom volaní tieto modely nemiešajte. Klasické endpointy očakávajú API kľúče; Civic/OAuth zdroje majú API-key auth vypnutú a očakávajú Bearer (alebo sú verejné).
Označenia autentifikácie v tejto referencii
| Označenie | Význam |
|---|---|
| API-KEY | Hlavičky API-KEY + TOKEN (klasické) |
| Bearer | Authorization: Bearer so scope user_profile |
| Verejné | Bez poverení (API-key auth na zdroji vypnutá) |
| Voliteľný Bearer | Verejné čítanie; Bearer pridá polia špecifické pre používateľa |
Klasické API — ako ho používať
Prihlasovacie údaje
- Prihláste sa do Rováša a otvorte Môj účet → Rováš API.
- Skopírujte API key a Token.
- Pri každom autentifikovanom volaní pošlite:
API-KEY: <váš api kľúč>
TOKEN: <váš token>
Každý pár kľúčov patrí jednému používateľovi Rováša. Volania bežia v jeho mene.
Partnerská registrácia (vytvorenie alebo prepojenie koncového používateľa)
Partneri (napr. neziskovky), ktorí zakladajú účty darcom alebo členom, potrebujú technický účet s rolou api client (pridelí NeoFund/Rováš). API kľúč tohto účtu slúži len na zakladanie / prepojenie účtov.
Odporúčaný endpoint
POST /rovas/rovas_partner_user
Starší ekvivalent: POST /rovas/rules/rules_create_user (rovnaké telo a odpoveď).
Telo požiadavky (povinné polia)
| Pole | Popis |
|---|---|
user_name |
Zobrazované meno |
user_id |
Vaše externé číselné ID používateľa |
user_email |
E-mail (na nájdenie existujúceho účtu v Rováši) |
user_country |
ISO 3166-1 alpha-2, veľké písmená (napr. SK) |
user_language |
Kód jazyka (napr. sk, en) |
server_url |
Základná URL vášho webu (napr. https://partner.example/) |
Voliteľné: hybridauth_provider (ak prázdne, predvolené Nabezky), partner_client_id.
Zoznam povolených poskytovateľov: GET /rovas/rovas_hybridauth_providers.json (zvyčajne verejné).
Úspešná odpoveď
{
"rovas_uid": 123,
"api_key": "…",
"token": "…"
}
Uložte vrátené api_key / token a používajte ich ako API-KEY / TOKEN pri ďalších volaniach v mene tohto koncového používateľa.
Príklad
curl -sS -X POST "https://rovas.app/rovas/rovas_partner_user" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "API-KEY: $PARTNER_API_KEY" \
-H "TOKEN: $PARTNER_TOKEN" \
-d '{
"user_name": "Jana Partnerská",
"user_id": 12345,
"user_email": "jana@example.com",
"user_country": "SK",
"user_language": "sk",
"server_url": "https://partner.example/",
"hybridauth_provider": "Nabezky"
}'
Typické chyby: 400 validácia, 401 zlé údaje, 403 chýba oprávnenie api client.
Pracovné výkazy (klasické)
POST /rovas/rules/rules_proxy_create_work_report prijíma voliteľné reward_kind (merits | chrons, predvolené chrons), aby aplikácie tretích strán mohli po schválení požiadať o merity — rovnaké úložisko preferencie ako Civic OAuth. Pri zlúčení výkazov v ten istý deň je merits lepivé.
Voliteľný odložený poplatok aplikácie: usage_fee_project_id + usage_fee_rate (oba alebo žiadny). Pri schválení Rováš strhne poplatok z chron výnosu výkazu a (pri reward_kind=merits) konvertuje na merity grant − 1 % Rováš − poplatok aplikácie. Pri voľbe meritov uprednostnite toto pred samostatným volaním rules_proxy_create_aur. Úplná schéma požiadavky je v OpenAPI referencii nižšie.
OAuth 2 / Bearer — ako ho používať
OAuth používa aplikácia Civic a ďalší klienti, ktorých registrujeme. Nové produkty potrebujú vlastný OAuth klient — z tretích strán nepoužívajte Civic client_id.
Protokolové endpointy
| Metóda | Cesta | Auth | Poznámky |
|---|---|---|---|
GET |
/oauth2/authorize |
session prehliadača | PKCE; Civic podporuje lang, intent |
POST |
/oauth2/token |
verejný klient + PKCE | authorization_code / refresh_token |
POST |
/oauth2/revoke |
token | Odvolať access/refresh |
GET |
/oauth2/tokens/{access_token} |
— | Introspekcia → user_id, client_id, expires, scope (404 ak neplatný) |
Civic klient (referencia)
| Nastavenie | Hodnota |
|---|---|
client_id |
civic |
| Typ klienta | Verejný (bez secretu) |
| Granty | Authorization code + refresh token |
| PKCE | Povinné (S256) |
| Scope | user_profile |
| Redirect | civic://oauth/callback |
Dodatočné parametre authorize: lang=sk|en, intent=login|register.
Výmena tokenu (authorization code + PKCE)
curl -sS -X POST "https://rovas.app/oauth2/token" \
-d grant_type=authorization_code \
-d client_id=civic \
-d redirect_uri=civic://oauth/callback \
-d code=PASTE_CODE \
-d code_verifier=$VERIFIER
Volanie API s Bearer
curl -sS "https://rovas.app/rovas/me" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN"
Príklad odpovede GET /rovas/me:
{
"uid": 42,
"username": "sano",
"display_name": "Alexander Žaťko",
"total_me": 1248.35,
"total_chr": 320.0,
"created": "2019-03-12T14:22:01+00:00",
"language": "sk",
"receipt_history_retention": null
}
Podpora
Otázky alebo nový OAuth klient: kontaktujte NeoFund.
Úplná referencia endpointov (z OpenAPI) nasleduje nižšie.
Referencia endpointov
Súhrny, popisy a schémy operácií nižšie sú v angličtine (zo zdroja OpenAPI).
Klasické API endpointy
Classic API — accounts and identity (API-KEY + TOKEN)
/rovas/rules/rules_create_userAPI-KEYCreate or link a Rovas user (third-party integration)
For partner backends using an api client Rovas account: creates a new user or links
HybridAuth identity when the email already exists. Requires permissionaccess services_rules rules_create_user (api client / administrator roles).
JSON keys match Rules variables; optional hybridauth_provider defaults to Nabezky if empty.
Use GET /rovas/rovas_hybridauth_providers.json to list valid provider ids.
Telo požiadavky (povinné)
Rule parameters (see rovas_site_rules README).
Typ obsahu: application/json, application/xml
RulesCreateUserRequest
user_name: string (povinné) — Display name for the new or linked Rovas user. (príklad:Jane Partner User)user_id: integer (povinné) — External user id at the partner (HybridAuth provider_identifier). (príklad:12345)user_email: string (email) (povinné) — Used to find an existing Rovas account by mail.user_country: string (povinné) — ISO 3166-1 alpha-2 code (e.g. SK). Therovas_partner_userendpoint requires uppercase ASCII letters only; the legacy Rules endpoint did not enforce casing.user_language: string (povinné) — Language code; rule maps sk/cs to sk, default en. (príklad:en)server_url: string (uri) (povinné) — Partner base URL for HybridAuth profile link (e.g. trailing slash optional per client). (príklad:https://partner.example/)hybridauth_provider: string — HybridAuth provider machine name (e.g. Nabezky). Omit or empty for default Nabezky. Must be enabled on the site; use GET rovas_hybridauth_providers to list options.partner_client_id: string — Optional metadata stored on the user (rovas_partner_client_id).
Odpovede
200— Rovas user id androvas_endpointAPI credentials for that user.RulesCreateUserResponserovas_uid: integer — Rovas user id (new or existing).api_key: string — API key forrovas_endpointfor that user.token: string — Token forrovas_endpointfor that user.
401— Missing or invalid API credentials.403— Caller lacks permission to invoke this rule.
/rovas/rovas_partner_userAPI-KEYCreate or link a Rovas user (partner API, replaces rules_create_user)
Same purpose as POST /rovas/rules/rules_create_user, implemented as a native Services resource
for stricter validation and easier evolution. Requires permissionaccess services_rules rules_create_user and the same API client headers as other rovas_endpoint calls.
user_country must be two uppercase ASCII letters (ISO 3166-1 alpha-2) and must exist in the
site country list. user_language is normalized to an enabled Drupal interface language
(rovas_base_map_partner_user_language). Request body schema matches RulesCreateUserRequest.
Telo požiadavky (povinné)
Same fields as rules_create_user (see RulesCreateUserRequest).
Typ obsahu: application/json, application/xml
RulesCreateUserRequest
user_name: string (povinné) — Display name for the new or linked Rovas user. (príklad:Jane Partner User)user_id: integer (povinné) — External user id at the partner (HybridAuth provider_identifier). (príklad:12345)user_email: string (email) (povinné) — Used to find an existing Rovas account by mail.user_country: string (povinné) — ISO 3166-1 alpha-2 code (e.g. SK). Therovas_partner_userendpoint requires uppercase ASCII letters only; the legacy Rules endpoint did not enforce casing.user_language: string (povinné) — Language code; rule maps sk/cs to sk, default en. (príklad:en)server_url: string (uri) (povinné) — Partner base URL for HybridAuth profile link (e.g. trailing slash optional per client). (príklad:https://partner.example/)hybridauth_provider: string — HybridAuth provider machine name (e.g. Nabezky). Omit or empty for default Nabezky. Must be enabled on the site; use GET rovas_hybridauth_providers to list options.partner_client_id: string — Optional metadata stored on the user (rovas_partner_client_id).
Odpovede
200— Rovas user id androvas_endpointAPI credentials for that user.RulesCreateUserResponserovas_uid: integer — Rovas user id (new or existing).api_key: string — API key forrovas_endpointfor that user.token: string — Token forrovas_endpointfor that user.
400— Validation error (country code, language, URL, email, provider, etc.).401— Missing or invalid API credentials.403— Caller lacks permission.500— Server or registration failure.
/rovas/rules/rules_users_chronsAPI-KEYRetrieves user's Chron balances.
Odpovede
200— If succesfull, returns the total and available user's chron balancesUsersChronsResponsetotal_chrons: number (float) — The total Chrons balance.chrons_available: number (float) — The total Chrons balance minus all commitments to pay
/rovas/rules/rules_fetch_user_dataAPI-KEYRetrieves user's Rovas profile info.
Odpovede
200— If succesfull, returns information from the user profileFetchUserDataResponsecountry: string — 2-letter ISO country code in all capsuid: integer (int32) — User IDusername: string — User namelang_code: string — Two letter language codeemail: string — Emailcomp_score: integer (int32) — Compliance scorewhole_name: string — Full name if available. Might be 'nomen omen' for users wo did not set their full name.
/rovas/rules/rules_user_s_meritsAPI-KEYRetrieves user's total and taxonomy category-specific Merit balances. Set the nace_id param to 0 to return all Merits from the user's work reports. Retrieval error is indicated by value -1000000000.0000001 for either of the result parameters. Note that total_merits might differ from the term_merits when nace_id = 0 is passed to the endpoint.
Telo požiadavky (povinné)
use Rovas NACE term ID as a parameter
Typ obsahu: application/json, application/xml
UsersMerits
nace_id: RovasTerms (povinné) — node ID of the NACE taxonomy term in Rovas
Odpovede
200— returns total and taxonomy-category-specific Merit balancesUsersMeritsResponsetotal_merits: number (float) — The total Merits balance.term_merits: number (float) — The total Merit balance for the supplied term.
/rovas/rules/rules_check_enabled_languageAPI-KEYChecks that a language identified by its 2-letter code is enabled
Telo požiadavky (povinné)
Typ obsahu: application/json, application/xml
CheckEnabledLang
input: string (povinné) — two-letter language code in lower case (príklad:sk)
Odpovede
200— returns a 1 if the specified language is enabledCheckEnabledLangResponseoutput: integer (0 | 1) —0- "language is enabled"1- "language is not enabled"
/rovas/rovas_hybridauth_providers.jsonVerejnéList HybridAuth providers for account linking
Public endpoint: no API-KEY or TOKEN headers. Returns provider machine names
enabled in HybridAuth—the same values allowed as hybridauth_provider inrules_create_user. The Services endpoint must have Disable API keys authentication
enabled for this resource operation (rovas_endpoint → Resources →rovas_hybridauth_providers → index).
Parametre
Accept(header) — string (príklad:application/json)
Odpovede
200— Enabled providers for UI picker and forrules_create_user.hybridauth_provider.HybridAuthProvidersResponsestatus: stringproviders: array<HybridAuthProviderItem>
{ "status": "success", "providers": [ { "id": "Nabezky", "name": "Nabezky" } ] }
Classic API — projects, work reports, verification
/rovas/rules/rules_proxy_create_new_projectAPI-KEYCreate a project
Telo požiadavky (povinné)
Once a project is created, Rovas automatically creates also a new merit allocation document for the project owner.
Typ obsahu: application/json, application/xml
NewProject
project_name: string (povinné) (príklad:Test project title)project_url: string (príklad:https://nabezky.sk/node/388383)project_price: number (float) (príklad:2.3)project_status: integer (0 | 1 | 2 | 3) (povinné) — 0 unfinished, 1 for sale, 2 sold, 3 expiredproject_participation: integer (0 | 1 | 2) (povinné) — 0 - Private, 1 - Public, 2 - Public - dependent on parent projectproject_description: string (príklad:Report from a ski trip)
Odpovede
200— returns project/node ID of the created projectNewProjectResponsecreated_project_nid: integer — A greater than 0 new project ID.
/rovas/rules/rules_proxy_create_work_reportAPI-KEYCreate a work report in Rovas. Optional reward_kind and deferred usage fee for post-approval payout.
Telo požiadavky (povinné)
Only the Web URL is supported as work evidence. Optional reward_kind (merits|chrons) and optional usage_fee_project_id + usage_fee_rate (both or neither) are persisted for post-approval payout. Merits is sticky on same-day merges; prefer deferred fee over a separate create_aur call when electing merits so fees come from WR proceeds before CHR→ME.
Typ obsahu: application/json, application/xml
NewWorkReport
wr_classification: RovasTerms (povinné) — node ID of the NACE taxonomy term in Rovaswr_description: string — accepts HTML tags (príklad:Moved a big rock up the hill, but it fell back. Will continue rolling tomorrow.)wr_activity_name: string (povinné) — title of work report - activity summary (príklad:Rock moving)wr_hours: number (float) (povinné) — time in hours (príklad:2.5)wr_web_address: string (povinné) — URL of a proof for the work performed (príklad:https://nabezky.sk/node/3883)parent_project_nid: integer (int64) (povinné) — parent project node ID (príklad:28388348)date_started: integer (int64) (povinné) — the date and time in UNIX timestamp format; must be within the last 30 days (príklad:1594538979)access_token: string — A text string of sufficient length and complexity that - when presented as URL argument 'cbt' attached to the address in the wr_web_address field - will allow unauthenticated access to the proof of work in that web page (príklad:7JH_hdjd83%ks)publish_status: integer (int64) (povinné) — if greater than 0, the report will be published; unpublished otherwise. No verifiers are invited for unpublished reports (príklad:1)reward_kind: string ("merits" | "chrons") — Payout preference after approval (peer verify or Trusted auto-approve). merits converts the Chron grant net of Rovas 1% and any deferred app fee to Merits (A6); chrons keeps Chrons. Same semantics as Civic civic_create_work_report. On same-day merges into one WR, merits is sticky (any merits session wins for the whole node, including later Chron top-ups). Omitted or invalid → chrons. (príklad:merits)usage_fee_project_id: integer (int64) — Optional deferred app usage-fee beneficiary project nid. Must be paired with usage_fee_rate. Charged from WR Chron proceeds on approval (prefer this over rules_proxy_create_aur when reward_kind=merits). Invalid/unpublished → ignored (no fee). (príklad:1998)usage_fee_rate: number (float) — Optional deferred app usage-fee fraction in (0, 1], e.g. 0.03 for 3%. Must be paired with usage_fee_project_id. Merits conversion uses grant minus Rovas 1% minus this fee. (príklad:0.03)
Odpovede
200— returns the new work report node IDNewWReportResponsecreated_wr_nid: integer — A greater than 0 new work report ID, value 0 indicates the report is unpublished and no verifiers were invited; Error values: -1: author of the report is not a shareholder of the parent project; -2: the date_started is earlier that the date when the author registered in Rovas; -3: the report-filing author has more than one pending verification slot, so no verifiers were invited to verify the report; -4: date_started is more than 30 days before now;
/rovas/rules/rules_proxy_delete_work_reportAPI-KEYDelete a work report
Telo požiadavky (povinné)
If allowed, deletes a work report. Only own reports are deletable.
Typ obsahu: application/json, application/xml
DeleteWorkReport
wr_id: integer (int64) (povinné) — ID of the report (príklad:123)
Odpovede
200— Returns 1 if deleted succesfullyDeleteWorkReportResponseresult: integer (1 | -1) — returns: '1' if report deleted succesfully, '-1' not deleted - author of the report is different from the one making the call, or can not be deleted for other reason
/rovas/rules/rules_proxy_work_report_verifiabilityAPI-KEYFinds out if work report is verifiable by an user
Telo požiadavky (povinné)
The call finds out if report is verifiable and sets an environmental variable in Rovas that locks one of two/three verifiacation slots for 10 minutes.
Typ obsahu: application/json, application/xml
WorkReportVerifiability
wr_id: integer (int64) (povinné) — Rovas work report ID (príklad:123)
Odpovede
200— returns 1 or 0VerifiabilityResponseverifiable: boolean (1 | 0) —1- "if report is verifiable by the user"0- "if report is NOT verifiable"reason: integer (1 | -1) —1- "no problem found when checking"-1- "the work report can not be found"
/rovas/rules/rules_proxy_report_editabilityAPI-KEYFinds out if work report is editable by an user
Telo požiadavky (povinné)
The call determines if a report can be edited by the user identified by the API key and the token.
Typ obsahu: application/json, application/xml
Editability
wr_id: integer (int64) (povinné) — Rovas work report ID (príklad:123)
Odpovede
200— returns 1 or 0EditabilityResponseresult: integer (1 | -1) —1- "if report is editable by the user 0 if not editable"-1- "if the work report can not be found"
/rovas/rules/rules_create_verificationAPI-KEYCreate a verification record
Telo požiadavky (povinné)
Creates a verification record for the work report.
Typ obsahu: application/json, application/xml
CreateVerification
wr_id: integer (int64) (povinné) (príklad:123)verdict: integer (0 | 1) (povinné) — verification result; 0 - rejected, 1 - approved (príklad:1)
Odpovede
200— returns verification record ID if successful, -1 otherwiseVerificationResponseverification_id: integer — returns the new verification ID if succesfull, '-2' if the report can not be found, '-3' if the report is not verifiable by the user.
/rovas/rules/rules_create_verification_with_acccess_tokenVerejnéCreate a verification record
Telo požiadavky (povinné)
Creates a verification record for the work report using access token and Rovas user ID. No API-KEY and TOKEN are needed in header.
Typ obsahu: application/json, application/xml
CreateVerificationAT
access_token: string (povinné) — access token of the verified work report (príklad:143ac8d45c7b8a6cc020)uid: integer (povinné) — Rovas ID of the verifier (príklad:289)wr_id: integer (int64) (povinné) — The verified work report ID (príklad:123)verdict: integer (int32) (povinné) — verification result; 0 - rejected, 1 - approved (príklad:1)
Odpovede
200— returns verification record ID if successfulVerificationATResponseverification_id: integer (int64) — Returns the verification node ID if successful, '-1' if user does not exist with the supplied ID, '-2' if the access token supplied is invalid, '-3' if there does not exist a verification slip for the access token and UID, or the supplied work report ID does not match the report ID found from the access token
/rovas/rules/rules_proxy_reward_work_reportAPI-KEYReward a work report
Telo požiadavky (povinné)
Rewards a work repor with merits equal to the chrons sent by the user identified by the API key and token sent in the header
Typ obsahu: application/json, application/xml
WorkReportReward
report_id: integer (int64) (povinné) — Rovas work report ID (príklad:123)reward_amount: number (float) (povinné) (príklad:2.3)description: string (povinné) — Any note related to the reward (príklad:A work report reward made by <REST client app name> user)
Odpovede
200— returns one of 0 or 1 as well as text explaining the ourcomeWorkReportRewardResponseresult: integer (int32) —1- "for success"0- "for failure"result_explain: string — the reason of failure in plain english
/rovas/rules/rules_proxy_delete_projectAPI-KEYDelete a project
Telo požiadavky (povinné)
Deletes a project and all related work reports, merit allocation shares and disputes.
Typ obsahu: application/json, application/xml
DeleteProject
project_id: integer (int64) (povinné) — ID of the project (príklad:123)
Odpovede
200— the 'result' parameter indicates the status of the operation - 0 for failure or 1 for success. The 'result_explain' parameter informs about the reason for failure if the project was not deleted.DeleteProjectResponseresult: integer (0 | 1 | null) —1- "success"0- "failure" *null- "returned if the API KEY and TOKEN supplied in the header do not belong to user with the 'api client' Rovas role "result_explain: integer (0 | 1 | 2) —0- "no error"1- "deleting project not allowed" *2- "project not found for the given ID"
/rovas/rules/rules_proxy_report_verification_statusAPI-KEYGet a work report verification status
Telo požiadavky (povinné)
Returns a count of verifications made and an integer indicating the number of approved verifications.
Typ obsahu: application/json, application/xml
GetVerifStatus
wr_id: integer (int64) (povinné) — Work report ID (príklad:123)
Odpovede
200— the count_total shows the number of verifications and the result parameter encodes the number of approved onesGetVerifStatusResponseresult: integer (0 | -1 | 1 | -3 | -4 | -5) —0- "0 approvals"-1- "one approval"1- "more than one approval"-3- "work report can not be found with the supplied ID"count_total: integer (-1 | 0 | 1 | 2 | 3) — the number of verifications made for the work report; a negative number indicates an error during processing of the request, explained by the 'result' parameter;
/rovas/rules/rules_proxy_check_verifier_by_access_tokensAPI-KEYgiven access token and verifier ID, determines verifiability of a work report
Telo požiadavky (povinné)
Returns TRUE if a verification slip exists for the tokens supplied
Typ obsahu: application/json, application/xml
CheckVerifAccessTokens
access_token: string (povinné) — access token of the verified report (príklad:143ac8d45c7b8a6ac054)uid: integer (povinné) — Verifier Rovas user ID (príklad:289)
Odpovede
200— returns 1 if user can verify the contentCheckVerifAccessTokensResponseverify_allow: integer (1 | 0) —1- "user can verify the content"0- "user can not verify the content"
/rovas/rovas_verifications.jsonAPI-KEYGet list of work report verifications
Parametre
Accept(header) — string — Expected response format. (príklad:application/json)Content-Type(header) — string — Content type of the request. (príklad:application/json)
Odpovede
200— JSON encoded array of verificationsVerificationsResponsestatus: stringcount: integerverifications: array<VerificationItem>
{ "status": "success", "count": 41, "verifications": [ { "report_nid": "429357", "report_title": "Creating map data with JOSM", "verify_date": "1753086074", "verify_date_formatted": "Mon, 07/21/2025 - 10:21", "report_url": "https://dev.rovas.app/node/429357" }, { "report_nid": "429454", "report_title": "Creating map data with JOSM", "verify_date": "1753086073", "verify_date_formatted": "Mon, 07/21/2025 - 10:21", "report_url": "https://dev.rovas.app/node/429454" } ] }
/rovas/rovas_comment_notices.jsonAPI-KEYGet pending watched-comment notices
Pending in-app/API notices for new comments on nodes the key owner is watching
(same Comment Notify audience as follow-up email). Poll-based; not an outbound
webhook. Twin of Bearer GET /rovas/civic_pending_comment_notices (different
response envelope). Requires module rovas_comment_watch. Path is/rovas/rovas_comment_notices (not under /rovas/rules/).
Parametre
Accept(header) — string — Expected response format. (príklad:application/json)
Odpovede
200— JSON list of pending comment notices for the authenticated userCommentNoticesResponsestatus: stringcount: integernotices: array<CommentNoticeItem>
{ "status": "success", "count": 1, "notices": [ { "nid": 123, "node_title": "Example post", "cid": 456, "comment_url": "https://dev.rovas.app/comment/456", "created": 1729100000 } ] }401— Missing or invalid API-KEY / TOKEN500— Comment watch module unavailable or query failure
Classic API — shares, purchases, conversions
/rovas/rules/rules_proxy_create_aurAPI-KEY[Deprecated] Create an asset usage record (app/product usage fee)
Deprecated for work-report app fees. Prefer deferred usage_fee_project_id +usage_fee_rate on POST /rovas/rules/rules_proxy_create_work_report (one call).
That charges the fee from WR Chron proceeds on approval and, whenreward_kind=merits, subtracts it before CHR→ME — so merits-only reporters
are not left with a negative Chron balance. A separate create_aur after a
Merits payout debits the Chron wallet and can go negative.
Still valid for non-WR / legacy AUR charges.
Telo požiadavky (povinné)
Creates an asset usage record charging the work-report author (Chron wallet).
Typ obsahu: application/json, application/xml
CreateAUR
project_id: integer (int64) (povinné) — The beneficiary project ID (príklad:123)wr_id: integer (int64) (povinné) — The ID of a work report that uses the product or service delivered by the beneficiary project (príklad:123)usage_fee: string (povinné) — the fee paid by the work report creator for usage of the product or service described in the beneficiary project (príklad:9.23)note: string — an optional note (príklad:3% fee levied by the 'Obsidian hand axe' project for using the axe)
Odpovede
200— returns AUR record ID if successful, 0 or -1 otherwiseCreateAURResponseresult: integer (int32) — success: an integer greater than 0 denoting the AUR ID. 'null' is returned if entities do not exist for the supplied IDs, or the usage fee is empty; '0' if work report was not found for the supplied ID; '-1' if the work report owner is not the same as the user;
/rovas/rules/rules_proxy_purchase_productAPI-KEYProcess purchase of a product.
Telo požiadavky (povinné)
Creates purchase receipts, processes Chron transactions, distributes Merits to shareholders and (optionally Chrons to the project owner).
Typ obsahu: application/json, application/xml
NewPurchase
product_id: integer (int64) (povinné) — Rovas product ID (príklad:123)amount_paid: number (float) (povinné) (príklad:2.3)note: string (povinné) — Any note related to purchase (príklad:Purchase made by <REST client app name> user)
Odpovede
200— returns an integer indicating the operation outcomePurchaseResponseresult: integer (1 | -1 | -2 | -3) —1- "for success"-1- "the amount paid is negative or 0 (no purchase was made)"-2- "no enough funds to buy the product"-3- "product not found for the supplied ID"
/rovas/rules/rules_get_merits_for_projectsAPI-KEYTakes a list of Rovas project IDs separated by pipe and returns current merit value for each of the projects.
Telo požiadavky (povinné)
Typ obsahu: application/json, application/xml
ProjectMerits
project_ids: string (povinné) — pipe separated project IDs (príklad:2410|2421)
Odpovede
200— returns a json-encoded string of project IDs and their merits;ProjectMeritsResponseproject_merits: string — json-encoded string containig rovas project IDs and their current merit rating. Error states: '-1' - the supplied IDs are in an incorrect format; empty set is returned if no projects were found for the supplied IDs
/rovas/rules/rules_convert_euros_to_chronsAPI-KEYReturns the amount of Chrons one can buy with the given Euros.
Telo požiadavky (povinné)
Typ obsahu: application/json, application/xml
ConvertChrons
euros: number (float) (povinné) — The Euro amount (príklad:3.14159)
Odpovede
200— returns a decimal representing the Chron amountConvertChronsResponsechrons: number (float) — The amount of Chrons converted to Euros. Negative values are made positive and subsequently converted.
/rovas/rules/rules_convert_euros_to_chrons_reverseAPI-KEYReturns the amount of Chrons one has to pay to receive the given Euros.
Telo požiadavky (povinné)
Typ obsahu: application/json, application/xml
ConvertChrons
euros: number (float) (povinné) — The Euro amount (príklad:3.14159)
Odpovede
200— returns a decimal representing the Chron amount, or -1 if user not found, or -2 if the euro amount exceeds the number of Euros available for exchange in Rovas;ConvertChronsResponsechrons: number (float) — The amount of Chrons converted to Euros. Negative values are made positive and subsequently converted.
/rovas/rules/rules_proxy_check_or_add_shareholderAPI-KEYChecks that user is shareholder in a project. If not and possible, makes the user a shareholder.
Telo požiadavky (povinné)
Typ obsahu: application/json, application/xml
CheckAddShareholder
project_id: integer (int64) (povinné) (príklad:838938)
Odpovede
200— returns the Merit allocation node ID if successfull and 0 or negative integer otherwiseCheckAddShareholResponseresult: integer (int32) — returns a Worker Merit Allocation node ID if the user is a shareholder, '0' if project is private and user can not add themselves, '-1' if project does not exist
/rovas/rules/rules_proxy_check_or_add_project_shareholderAPI-KEYChecks that a project is a shareholder in a project. If not and possible, creates time, or percentage-based share.
Telo požiadavky (povinné)
Typ obsahu: application/json, application/xml
CheckAddProjectShareholder
project_nid: integer (int64) (povinné) — project ID (príklad:838938)shareholder_proj_nid: integer (int64) (povinné) — shareholder project ID (príklad:838938)time_based: integer (1 | 0) (povinné) — 1 - time-based; 0 - percent-based (príklad:1)merit_share: number (float) (povinné) — the desired merit share in % (príklad:3.14159)
Odpovede
200— returns the Merit allocation node ID if successfull and a negative integer otherwiseCheckAddProjectShareholResponseresult: integer (int32) — returns the Project Merit Allocation node ID for the shareholder project, '-1' if the project author is not the API and Token owner, '-2' if a project does not exist with the project_nid given, '-3' if a project does not exist with the shareholder_proj_nid given, '-4' if the project shareholder being added isn already a shareholder, or the total shares exceeds 100 for non-time-based shareholder
Classic API — leaderboard / feed Views
/rovas/views/top_10_workers_in_a_categoryAPI-KEYGet top x workers in a given category.
Parametre
display_id(query, required) — string — the view display ID.filters[tid_raw](query) — Rovas category node ID (príklad:1794)filters[field_web_address_value](query) — string — The work report source url (príklad:nabezky.sk)limit(query) — integer — the number of records to be returned. If omitted, 10 records are returned (príklad:10)
Odpovede
200— json encoded arraystring
/rovas/views/project_merits_feedAPI-KEYGet top x users, who rewarded a project
Parametre
display_id(query, required) — string — the view display ID.filters[project_id](query, required) — integer — Rovas project ID (príklad:12900)limit(query) — integer — the number of records to be returned. If omitted, 1 record is returned (príklad:10)
Odpovede
200— json encoded array of Rovas user ID, user name and the merits earnedstring
/rovas/views/projects_meritsAPI-KEYGet top x users, for projects from the same web site
Parametre
display_id(query, required) — string — the view display ID.filters[field_asset_web_address_value](query, required) — string — a part of the url the project refers to (príklad:nabezky.sk/node/)limit(query) — integer — the number of records to be returned. (príklad:10)
Odpovede
200— json encoded array of: rank in the hierarchy, Rovas user ID, merit score for the user and the number of projects that share the same field_asset_web_address_valuestring
Classic API — allowlisted node retrieve/update/delete
/rovas/node/{id}API-KEYRetrieve basic fields for an allowlisted node type
Returns a sanitized payload for types project, work_report,charity_organization, or dispute only. Other types (and missing
nids) return 404. Does not dump the full Drupal node object.
Project responses include is_public; work_report responses includeproject_nid when set.
Parametre
id(path, required) — integer — the node ID
Odpovede
200— Sanitized node summaryRetrieveNodeResponsenid: integertype: string ("project" | "work_report" | "charity_organization" | "dispute")title: stringstatus: integer — 1 = published, 0 = unpublisheduid: integer — Author Drupal uidcreated: string (date-time)changed: string (date-time)language: string — Drupal langcode; null when empty or undurl: string (uri)is_public: boolean — Present for type=project (participation Public or Public-dependent)project_nid: integer — Present for type=work_report; linked project nid when set
401— Missing or invalid API-KEY / TOKEN403— Authenticated but not allowed to view the node404— Missing nid or type not in the allowlist
/rovas/node/{id}API-KEYUpdates a node owned by the user whose credentials are supplied in the header
Parametre
id(path, required) — integer — the node ID
Telo požiadavky (povinné)
Updates a node with an ID given in the URL paramater.
Typ obsahu: application/json, application/xml
UpdateNode
field_hours_worked: UndSchema (povinné) — language of the field. 'und' stands for not specified
Odpovede
200— If succesfull returns the node ID and URL of the updated node.UpdateNodeResponsenid: integer — node ID of the updated nodeuri: string — URL of the updated node
/rovas/node/{id}API-KEYDeletes a node owned by the user whose credentials are supplied in the header
Parametre
id(path, required) — integer — the node ID
Odpovede
200— If succesfull returns the boolean TRUE.
OAuth / Civic endpointy
OAuth 2 protocol (authorize, token, revoke, introspect)
/oauth2/authorizeVerejnéOAuth 2 authorization endpoint (browser)
Browser authorization with PKCE. Civic supports query extras lang=sk|en and intent=login|register.
Civic client (reference): client_id=civic, public (no secret), grants authorization_code + refresh_token, PKCE S256, scope user_profile, redirect civic://oauth/callback.
Parametre
response_type(query, required) — stringclient_id(query, required) — stringredirect_uri(query, required) — stringscope(query) — stringstate(query) — stringcode_challenge(query, required) — stringcode_challenge_method(query, required) — stringlang(query) — stringintent(query) — string — Land on login vs register.
Odpovede
302— Redirect to login/consent or back to redirect_uri with code
/oauth2/tokenVerejnéExchange authorization code or refresh token
Public client + PKCE. Use application/x-www-form-urlencoded body.
Telo požiadavky (povinné)
Typ obsahu: application/x-www-form-urlencoded
OAuthTokenRequest
grant_type: string ("authorization_code" | "refresh_token") (povinné)client_id: string (povinné) (príklad:civic)redirect_uri: string (príklad:civic://oauth/callback)code: string — Required for authorization_codecode_verifier: string — PKCE verifier for authorization_coderefresh_token: string — Required for refresh_token
Odpovede
200— Token pairOAuthTokenResponseaccess_token: stringtoken_type: stringexpires_in: integerrefresh_token: stringscope: string
400— Invalid grant or request
/oauth2/revokeVerejnéRevoke access or refresh token
Telo požiadavky (povinné)
Typ obsahu: application/x-www-form-urlencoded
object
token: string (povinné)token_type_hint: string ("access_token" | "refresh_token")client_id: string (príklad:civic)
Odpovede
200— Revoked (or already invalid)
/oauth2/tokens/{access_token}VerejnéIntrospect access token
Returns user_id, client_id, expires, scope. 404 if invalid.
Parametre
access_token(path, required) — string
Odpovede
200— Token metadataOAuthTokenIntrospectionuser_id: integer — Drupal uidclient_id: stringexpires: integer — Unix expiryscope: string
404— Invalid or unknown token
OAuth / Civic — home, profile, preferences
/rovas/meBearerCurrent user profile (Bearer)
Profile for the OAuth-authenticated user. Includes Merit/Chron totals, receipt history retention, ME sources share preference, and Trusted user notify state.
Parametre
Accept(header) — string (príklad:application/json)
Odpovede
200— ProfileMeResponseuid: integerusername: stringdisplay_name: stringtotal_me: number (float)total_chr: number (float)created: string (date-time)language: stringreceipt_history_retention: string ("keep" | "policy") | null —null|keep|policyme_sources_share: string ("everyone" | "reciprocal" | "aggregate")trusted_user: booleantrusted_notify: integer (0 | 1 | 2) — 0=no banner, 1=show, 2=dismissed
{ "uid": 42, "username": "example_user", "display_name": "Example User", "total_me": 1248.35, "total_chr": 320, "created": "2019-03-12T14:22:01+00:00", "language": "sk", "receipt_history_retention": null, "me_sources_share": "everyone", "trusted_user": false, "trusted_notify": 0 }401— Missing or invalid Bearer
/rovas/contributions/aggregateVerejnéCommunity Merit total
Public aggregate community Merit total (+ category placeholders).
Parametre
Accept(header) — string (príklad:application/json)
Odpovede
200— Aggregate Merits JSON
/rovas/merit_distributionVoliteľný BearerMerit histogram
Public Merit distribution histogram. Optional Bearer adds user_* fields for the authenticated caller.
Parametre
Accept(header) — string (príklad:application/json)
Odpovede
200— Histogram JSON; may include user_* when Bearer present
/rovas/civic_receipt_history_preferenceBearerSet receipt history retention
Body: { "retention": "keep" | "policy" } (90-day policy when policy).
Telo požiadavky (povinné)
Typ obsahu: application/json
ReceiptHistoryPreferenceRequest
retention: string ("keep" | "policy") (povinné)
Odpovede
200— Updated preferenceReceiptHistoryPreferenceResponsereceipt_history_retention: string ("keep" | "policy")
401— Missing or invalid Bearer
/rovas/civic_me_sources_preferenceBearerSet ME sources share preference
Who may see detailed tax/gift ME mix: everyone | reciprocal | aggregate.
Telo požiadavky (povinné)
Typ obsahu: application/json
MeSourcesPreferenceRequest
share: string ("everyone" | "reciprocal" | "aggregate") (povinné)
Odpovede
200— Updated preferenceMeSourcesPreferenceResponseme_sources_share: string ("everyone" | "reciprocal" | "aggregate")
401— Missing or invalid Bearer
/rovas/civic_give_chronsBearerConvert Chrons to Merits 1:1 (A6)
Voluntary CHR→ME conversion. Body { "amount": <positive number> }.
Telo požiadavky (povinné)
Typ obsahu: application/json
GiveChronsRequest
amount: number (float) (povinné) — Positive Chrons to convert (1:1 to Merits)
Odpovede
200— Conversion resultGiveChronsResponsechrons_given: number (float)merits_gained: number (float)total_chr: number (float)total_me: number (float)
401— Missing or invalid Bearer422— Invalid amount or insufficient_chrons
/rovas/civic_dismiss_trusted_notifyBearerDismiss Trusted user congratulations banner
Sets trusted_notify to 2. Empty JSON body OK.
Telo požiadavky
Typ obsahu: application/json
object
Odpovede
200— Notify stateTrustedNotifyDismissResponsetrusted_user: booleantrusted_notify: integer (0 | 1 | 2)
401— Missing or invalid Bearer
/rovas/civic_merit_historyBearerCaller Merit ledger rows
Parametre
Accept(header) — string (príklad:application/json)
Odpovede
200— Merit history rows for the Bearer user401— Missing or invalid Bearer
OAuth / Civic — user search and community lookup
/rovas/users_searchBearerUser typeahead search
Param is query, not q (Drupal reserves $_GET['q'] for the request path). Users with total_me < 0 are omitted.
Parametre
Accept(header) — string (príklad:application/json)query(query, required) — string
Odpovede
200— Search hits (public fields)401— Missing or invalid Bearer
/rovas/users_lookupBearerCommunity profile by username
Exact username. Includes nace_expertise, tab aggregates (top_charities, top_volunteer_projects, …). ME-mix detail respects me_sources_share. Users with total_me < 0 → 404. Optional lang=sk|en.
Parametre
Accept(header) — string (príklad:application/json)username(query, required) — stringlang(query) — string
Odpovede
200— Public community profile401— Missing or invalid Bearer404— Unknown user or total_me < 0
OAuth / Civic — tax claims (Path 1) and national rate
/rovas/rules/rules_proxy_claim_vat_receiptBearerClaim eKasa VAT as donor Merits
Bearer-only Rules proxy. Split Merits across projects via shares[]. API-key auth is disabled on this resource.
Telo požiadavky (povinné)
Typ obsahu: application/json
ClaimVatReceiptRequest
receipt_uid: stringshares: array<object>
Odpovede
200— Claim resultClaimVatReceiptResponseclaimed: booleanreceipt_uid: stringmerits: number (float)
400— Validation error401— Missing or invalid Bearer
/rovas/civic_claimsBearerClaim lists or receipt status
With view=submitted|received: claim lists (optional merchant / date / VAT filters). With receipt_uid=: returns { claimed, receipt_uid } only.
Parametre
Accept(header) — string (príklad:application/json)view(query) — stringreceipt_uid(query) — stringmerchant(query) — stringdate_from(query) — stringdate_to(query) — string
Odpovede
200— Claim list or receipt status401— Missing or invalid Bearer
/rovas/civic_claims/summaryBearerClaim totals for caller
Parametre
Accept(header) — string (príklad:application/json)
Odpovede
200— Summary totals401— Missing or invalid Bearer
/rovas/civic_national_hourly_rateVerejnéNational hourly rate for ME formula
Parametre
Accept(header) — string (príklad:application/json)country(query, required) — string
Odpovede
200— Hourly rate for country
OAuth / Civic — project detail, charity catalog, gifts
/rovas/civic_project/{nid}VerejnéProject detail (Civic)
Includes donate_iban, org fields (org_id, country, website_url, iban_verified), … Anonymous allowed for NeoFund-approved public-benefit projects; otherwise Bearer / access rules apply. Optional lang=.
Parametre
Accept(header) — string (príklad:application/json)nid(path, required) — integerlang(query) — string
Odpovede
200— Project detail404— Not found or not readable
/rovas/civic_project_work_reportsVerejnéWork reports for a project
Anonymous allowed for approved public-benefit projects; otherwise Bearer. Optional lang=.
Parametre
Accept(header) — string (príklad:application/json)project_nid(query, required) — integerlang(query) — string
Odpovede
200— Work report list (may include photo_urls[])
/rovas/civic_project_shareholdersVerejnéProject shareholders
Anonymous allowed for approved public-benefit projects; otherwise Bearer.
Parametre
Accept(header) — string (príklad:application/json)project_nid(query, required) — integer
Odpovede
200— Shareholder list
/rovas/civic_charity_projectsVerejnéApproved public-benefit project catalog
Parametre
Accept(header) — string (príklad:application/json)
Odpovede
200— Charity project catalog
/rovas/civic_create_charity_orgBearerDonor submits a public-benefit organization
Bearer required. SK orgs may auto-verify; claim email flow applies.
Telo požiadavky (povinné)
Typ obsahu: application/json
object
Odpovede
200— Created org / project linkage401— Missing or invalid Bearer
OAuth / Civic — volunteer work reports
/rovas/civic_my_projectsBearerRecent projects the user reported on
Parametre
Accept(header) — string (príklad:application/json)
Odpovede
200— Project list401— Missing or invalid Bearer
/rovas/civic_projects_searchBearerSearch publishable projects
query must be at least 3 characters.
Parametre
Accept(header) — string (príklad:application/json)query(query, required) — string
Odpovede
200— Matching projects401— Missing or invalid Bearer
/rovas/civic_nace_treeVerejnéNACE activity tree
Parametre
Accept(header) — string (príklad:application/json)
Odpovede
200— NACE tree JSON
/rovas/civic_create_projectBearerCreate project (Bearer)
Body: name, description, optional url. Do not use classic API-KEY project rules from Civic.
Telo požiadavky (povinné)
Typ obsahu: application/json
CivicCreateProjectRequest
name: string (povinné)description: string (povinné)url: string
Odpovede
200— Created projectCivicCreateProjectResponsenid: integer
401— Missing or invalid Bearer
/rovas/civic_create_work_reportBearerCreate work report (Bearer)
Proof required: URL and/or photos and/or map (field_location GeoJSON Point, LineString, Polygon, or GeometryCollection). Clients should redact photos before upload; photo_redact_mode is ignored if present.
Telo požiadavky (povinné)
Typ obsahu: application/json
CivicCreateWorkReportRequest
project_nid: integer (povinné)date_started: string (povinné) — Work start datehours: number (float) (povinné)description: string (povinné)nace_tid: integer (povinné)title: stringweb_url: string — Work evidence URLphotos: array<string> — Base64 proof photos (client-redacted)reward_kind: string — merits or chrons after approval (Trusted auto-approve or peer verify); merits sticky if WR is mergedfield_location: object — GeoJSON geometry: Point, LineString, Polygon, or GeometryCollectionusage_fee_project_id: integerusage_fee_rate: number (float)photo_redact_mode: string — Ignored if present; redact on the client before upload
Odpovede
200— Created work reportCivicCreateWorkReportResponsenid: integer
400— Validation error401— Missing or invalid Bearer
/rovas/civic_work_report_map_configBearerMap widget config for location proof
Parametre
Accept(header) — string (príklad:application/json)
Odpovede
200— Basemap / centre / geometry types401— Missing or invalid Bearer
/rovas/civic_ai_naceBearerAI NACE + title suggestion
Optional rovas_ai module. Clients should fall back to NACE tree when unavailable.
Telo požiadavky (povinné)
Typ obsahu: application/json
object
Odpovede
200— Suggestion or unavailable401— Missing or invalid Bearer
OAuth / Civic — verification and notifications
/rovas/civic_pending_verificationsBearerWork reports assigned to caller to verify
Parametre
Accept(header) — string (príklad:application/json)lang(query) — string
Odpovede
200— Pending verification slots401— Missing or invalid Bearer
/rovas/civic_work_report/{nid}BearerVerifier-facing work-report detail
Parametre
Accept(header) — string (príklad:application/json)nid(path, required) — integerlang(query) — string
Odpovede
200— Work report detail for verifier401— Missing or invalid Bearer403— No assigned verification slot
/rovas/civic_submit_verificationBearerApprove / reject / decline verification
Telo požiadavky (povinné)
Typ obsahu: application/json
CivicSubmitVerificationRequest
work_report_nid: integerdecision: string ("approve" | "reject" | "decline")comment: string
Odpovede
200— Verification submitted401— Missing or invalid Bearer
/rovas/civic_pending_comment_noticesBearerPolled watched-comment notices
Same Comment Notify audience as email; poll-based (rovas_comment_watch). Classic twin: GET /rovas/rovas_comment_notices.json.
Parametre
Accept(header) — string (príklad:application/json)
Odpovede
200— Pending notices401— Missing or invalid Bearer
OAuth / Civic — Merit index and spotlight (public)
/rovas/civic_merit_indexVerejnéSnapshot Merit leaderboard
Includes by_category, by_source, … Snapshot rebuilt periodically (cron).
Parametre
Accept(header) — string (príklad:application/json)
Odpovede
200— Leaderboard snapshot
/rovas/civic_merit_index_countriesVerejnéCountry filter options for Merit index
Parametre
Accept(header) — string (príklad:application/json)
Odpovede
200— Country list
/rovas/civic_merit_spotlightVerejnéPeriod leads by Civic area
Parametre
Accept(header) — string (príklad:application/json)period(query) — string
Odpovede
200— Spotlight leads
/rovas/civic_merit_period_indexVerejnéME•ter period leaderboard
Parametre
Accept(header) — string (príklad:application/json)
Odpovede
200— Period leaderboard