Main routes
GET /api/v1/engage/rep/breakdownGET /api/v1/engage/rep/ledgerPOST /api/v1/engage/rep/earnGET /api/v1/engage/rep/meGET /api/v1/engage/rep/player/mePOST /api/admin/users/{userId}/rep
isAdmin.
Runtime behavior highlights
- Breakdown returns
totalFanRep,fanAmpRep,clubRep,playerAmpRep,dsportsDirectRep, andclubRepByTeam. dsportsDirectRepis the sum ofrepType = Directrows. It is no longer hardcoded to0.- Ledger uses keyset pagination on
(createdAt DESC, id DESC). - Ledger
sourceisfanAmp|club|playerAmp|dsportsDirect. - Earn accepts only
reaction,message,pollVote, andshare. - Direct kinds on
/earn(adminGrant,referralBonus,eventReward) return403. - Arena check-in and daily-quest completion write Rep on their own routes. Do not also call
/earnfor those events.
Direct grant behavior
- Body:
{ amount: integer 1–100000, reason?: string max 200 }. - Non-integer or out-of-range amounts return
400. - Non-admin callers return
403. Missing users return404. - Success returns
{ userId, amount, reason, entryId }. - The grant writes
repType = DirectandearnKind = adminGrant.
Common outputs and side effects
- New
RepLedgerEntryrows for accepted earns and grants - Updated breakdown totals on the next read, including
dsportsDirectRep - No leaderboard or
PointsHistorywrites from the generic earn route
Known caveats
referralBonusandeventRewardare reserved. They do not appear until a producer exists.- Club totals can be larger than the sum of
clubRepByTeamwhen some ClubtargetIds are not teams.
Exclusions
- Admin UI wiring and grant-audit dashboards are out of scope here.
