Gamification 0.9.94 / Developers
REST, PHP APIs, and hooks
Integrate safely with the Gamification domain boundary.
REST namespace: /wp-json/cointacted-gamification/v1.
Free routes include point types, /me/balances, /me/summary, /me/ledger, /me/views/{view}, /me/privacy, /surfaces, privacy-filtered /profiles/{username}, transaction mutations, and canonical events. Ledger/history items expose both the stored exact amount and an exact-decimal formatted display value. The overview member view applies the configured point-type allow-list and section toggles, including private owner activity when enabled. Pro definitions and earned records remain readable after expiry; Pro definition/mutation permissions additionally require an active entitlement. See route discovery in WordPress for exact methods and argument schemas.
The optional Social Terminal integration registers only native Cointacted Gamification commands and resolves them through the same member presenter, achievement, leaderboard, and ledger services. Provider adapters do not register commands and cannot become command execution backends.
Core PHP helpers are cointacted_gamification_award(), cointacted_gamification_deduct(), cointacted_gamification_transfer(), cointacted_gamification_reverse(), and cointacted_gamification_record_event(). Pro helpers cover achievement grants/revocation/progress and rank assignment. cointacted_gamification_project_leaderboards() returns a provider-neutral, read-only projection for host surfaces; its arguments support an include identifier list, a bounded limit, and a diagnostic surface name. Pass exact decimal strings and stable idempotency keys to mutation helpers.
Important extension hooks include cointacted_gamification_loaded, cointacted_gamification_event_received, cointacted_gamification_transaction_posted, cointacted_gamification_achievement_revoked, cointacted_gamification_adapter_error, cointacted_gamification_integration_catalog, and the read-only cointacted_gamification_leaderboard_projection filter.
Native applications consume Cointacted_Gamification_Member_Presenter::surface_descriptors() or GET /surfaces; the cointacted_gamification_surface_descriptors filter can add portable host metadata. Installed presentation adapters register their administrator-facing paths through cointacted_gamification_display_references. A route entry contains host, label, path, and enabled. This is the extension boundary intended for SnapWeb, FluentCommunity, and future SnapCommunity adapters; adapters own routing and layout while Gamification continues to own data, privacy, exact balances, and rendering contracts.
