Getting Started with the APIs

This page will help you get started with Fans United APIs.

Fans United is a headless platform, meaning the content and functionality are decoupled from the presentation.
What this means in practical terms is that we expose APIs and SDKs primarily, and it's up to the client
to choose how to integrate those in their website/app/platform.

This page will provide an overview of all APIs available in the Fans United platform.

API Map

We have 2 groups of APIs. The first one, we refer to as Core, the second one as Feature.

The Core APIs are responsible for the operation of the platform. Here you will find functionality such as
feature configuration, staff management and ACL, users with their profiles and interests, reporting data and sports data.

The Feature APIs are responsible for the user engagement. Think of them as "what can users do?".
They can play games, make predictions, compete with each other, leave comments, vote, etc. The Feature APIs depend
heavily on the Core APIs for configuration, access and reports.

Core APIs:

  • Client API
  • Reporting API
  • Profile API
  • Sports APIs

Feature APIs:

  • Prediction API
  • Discussion API
  • Mini Games API
  • Private Leagues API
  • Loyalty API

Client API

The Client API allows a client to manage their staff and access and configure different features.
The API also exposes the feature configuration for other APIs to use. This allows the same feature to be
configured differently for different clients. For instance, one client can configure a correct 1X2 prediction to
be rewarded with 10 points, while another will reward it with 5.

This is an API that is intended primarily for internal use. You will be mostly accessing
it via the Management Panel.

Reporting API

The Reporting API exposes data collected from the usage of all other APIs. Here you can find profiling
data
such as users breakdown by gender and country, engagement data such as success rates and interactions and
consumption data such as how many requests you have made to the platform, what were their statuses, breakdown by API, etc.

This is an API that is intended primarily for internal use. You will be mostly accessing
it via the Management Panel unless you want to create custom reports.

Profile API

The Profile API sits atop and extends Firebase Authentication. It allows users to manage their profiles and interests.

Sports APIs

Fans United relies heavily on sport data for pretty much everything. Each sport is, and future sports will be, a separate API.
Sports data is utilized for user interests, reporting and Feature APIs such as predictions.

The Football API exposes football data for the following entities: countries, competitions and their participants, players, teams and their squads, past, live and upcoming matches with stats, lineups and event timeline.

The ID Mapping API holds a map of different sports entities and the respective IDs in 3rd-party data providers.
For instance, Manchester United has a Fans United ID fb:t:8102. The same team has ID 10260 in Enetpulse and ID 102 in Sportal365.
This API allows us to work with our clients' data providers seamlessly without any migration or integration.

Currently supported data providers include:

  • Native (Fans United native IDs)
  • Enetpulse
  • Sportal365
  • SportRadar (partial)

Prediction API

The Prediction API is actually and engine that accepts and resolves different predictions for sports outcomes (referred to as markets).
The API serves as a foundation for 3 of our main features:

  • Predictor - allows users to predict single outcomes
  • Top X - a game that allows users to guess the correct scores of X number of matches for a prize
  • Match Quiz - a game that allows users to guess different markets in a game for a prize

Loyalty API

The Loyalty API is an engine that collects data from everywhere in the Platform or 3rd-party sources and is responsible for things like:

  • Leaderboards (a.k.a. rankings) - allows the creation of a leaderboard based on a specified criteria such as time-frame, teams, competitions, matches, etc.
  • Points awarding, Tiers, Badges
  • Activity log - allows clients to send custom events to the Platform