Skip to main content
Version: 1.0.0

FanX - Rewards Service

Overview

Collection to manage Rewards Service. It also provides public-facing endpoints to retrieve information from Rules Engine.

Operations

Rewards

  • Retrieve rewards obtained by a user.
  • Admin endpoints for creating, reading, updating, and deleting rewards such as badges and themes.

User Balances

  • Current Balances of the user. Balances could be :
    • Points
    • Experience
    • Scores (i.e. amount of correct answers)
    • Any other numeric value

Transaction

  • Get User Timeline endpoint (transaction history).
    • WebSocket is also supported for Get User Timeline.
  • Admin endpoint to manually create Transactions.
  • Admin endpoint to manually revert an already created Transactions.

Leaderboards

  • Get Leaderboards by a combination of:
    • clientID
    • leaderboard key (i.e. competition_id, season_id, round_id or question_id)
    • features (i.e. POINTS, EXPERIENCE or SCORES)
    • dimensions (i.e. GLOBAL, EUROPE, or AUTHENTICATED)
  • Get Leaderboard User Rank for a given leaderboard (all previous parameters can be provided)
  • Admin endpoint to manually Reset Leaderboards (useful to re-calculate after some weird issue).
  • Upsert/Get Leaderboards Metadata (i.e. useful to calculate the percentage of correct answers given the total amount of questions for some leaderboard)

Rewards Service Users

  • Admin endpoint to re-sync rewards service Users table. (This shouldn't be needed as we are consuming updates from fanscore-profile)

Flows

  • Parent flows for a user

User Progress

  • Latest Progress in a flow for a user
  • Current Progress in a flow for a user