Introduction

The Altius API allows you to read data from tenant databases using a simple REST API.

BETA

This is currently a BETA API. All efforts will be made to not have breaking changes. New endpoints and additional data being added to endpoints will not be considered breaking changes

The BETA period is expected to end on July 31st, 2024

Please review the CHANGE LOG below

Authentication

In order to use the API, you should authenticate your request by including your API Key as a Request Header with key X-API-KEY

Header: X-API-KEY:secret-key

Your API Key can be generated in the Altius Admin System. Please request an API Key from your system administrator.

Headers

Make sure you have the following content type headers are set on every request:

Accept: application/json Content-Type: application/json

All API endpoints with return valid JSON including error messages.

URI

The Altius API is hosted on the following base URI:

https://api.altius.live/v2/

Errors

Error Message Response:


{
    message:  "Unauthorized API Key"
}

Altius uses conventional HTTP response codes to indicate the success or failure of an API request. The table below contains a summary of the typical response codes:

Error Code Meaning
200 Everything is OK
400 Valid data was given but the request has vailed
401 No valid API Key was given.
404 The requested resource could not be found.
429 Too many attempts. See Rate Limiting.
5xx There is an internal error with the Altius systems. This will be resolved soon.
5xx error messages typically do not display as JSON messages.

Rate Limiting

For the BETA period The API is rate limited to 1200 requests per miniute per API Key across all end points. All responses include headers describing the current rate limit status:

Header Sample Value Meaning
X-RateLimit-Limit 1200 Total requests for the current period
X-RateLimit-Remaining 1194 Remaining requests for the current period

Certain endpoints are used for real-time streaming, broadcast and scoreboard requirements. These endpoints will be either exempt from Rate Limiting or have a separate limit associated with them. This will be indicated on a per endpoint basis.

Collections

Sample Collection


{
    "data": [
                {   id: 33,
                    name:  'John Smith'
                },
                {
                    id: 34,
                    name: 'Jane Doe'
                },
                ...
             ],
    links:  {...},
    meta:   {...}
}


Endpoints that return a collection will return an array of records in a data top-level key.
Other top-level keys will be added for pagination and metadata as required.

Pagination

Requests for collections return a maximum of 10 results. Subsequent pages of results can be accessed using the page query parameter

GET /v2/competitions?page=3

QUERY PARAMETERS

Field Type Description
page Integer The page number being requested.
Optional - default 1

In addition to the data key, collections will also include meta and links that provide information on the paginated results.

PAGINATION METADATA

Key Description
links.firstURI of the first page of the result set
links.lastURI of the last page of the result set
links.prefURI of the previous page of the result set.
NULL if this is the first page.
links.nextURI of the next page of the result set.
NULL if this is the last page.
meta.current_pageCurrent page of the result set
meta.last_pageLast page of the the query
meta.per_pageNumber of results per page
meta.fromIndex of the first record in the page
meta.toIndex of the last record in the page
meta.totalTotal number of records in the query
meta.pathBase URI for this collection endoint

Sorting

Requests for collections can be sorted based on one or more fields. The sort query parameter is used to determine by which property the collection will be sorted.

The default sort order along with optional sort properties are documented with each collection endpoint.

One or more properties can be included in the sort query parameter, separated by a comma. Sorting is ascending by default and can be reversed by adding a hyphen (-) to the start of the property name.

EXAMPLES

Request Description
GET /v2/competitions Default sort order for the endpoint
GET /v2/competitions?sort=name Sort by name ascending
GET /v2/competitions?sort=-startdate Sort by startdate descending
GET /v2/competitions?sort=location,-startdate Sort by location then startdate

Records

Sample Record


{
    "data":  {   id:                33,
                 name:              'John Smith',
                 'date_of_birth':   '1980/02/33'
                 ...
             },

}


Endpoints that return a single record will return a json object in the data key.

A list of properties and datatypes for each table are documented in the Tables section.

Including

Sample Record with includes


{
    "data":  {   id:                33,
                 name:              'John Smith',
                 'date_of_birth':   '1980/02/33'
                 'country'      :   {
                                        'name' => 'Canada',
                                        'code'


                 }
                 ...
             },

}


Requests for single records can have modifiers that automatically include related records and collections.

These includes will return with the main record properties in sub keys in the JSON hierarchy.

A description of the includes and relationships for each table are documented in the Tables section.

Endpoints

API Endpoints are listed below. These will be added to as nescessary during the BETA period.

Competition Collection

GET /v2/competitions

Returns a collection of Competitions

SORTING OF COLLECTION

SortDescription
id descDefault Sort
id Sort by id
name Sort by name
startdate Sort by startdate
enddate Sort by enddate

Competition Record

GET /v2/competitions/{id}
Returns a single competition record by ID

PROPERTIES

Property Type Description
id Integer Primary Key for this table
name String Name of this Competition
location String Competition Location Description
startdate date Competition Start Date
enddate date Competition End Date
timezone string Primary Competition Timezone
event_id Integer Reference to the Event for this Competition. Could be NULL
gender String Competition Gender (M,F,C)
age_id Integer Reference to the Age Level for this Competition
discipline_id Integer Reference to the Discipline for this Competition

Competition Summary

GET /v2/competitions/{id}
Returns a single competition record by ID with summary data included

PROPERTIES

Property Type Description
id Integer Primary Key for this table
name String Name of this Competition
location String Competition Location Description
startdate date Competition Start Date
enddate date Competition End Date
timezone string Primary Competition Timezone
event_id Integer Reference to the Event for this Competition. Could be NULL
gender String Competition Gender (M,F,C)
age_id Integer Reference to the Age Level for this Competition
discipline_id Integer Reference to the Discipline for this Competition

Included Relations

Property Type Description
event Record Associated Event record
age Record Associated Age record
discipline Record Associated Discipline record
pools Collection Collection of Pools
teams Collection Collection of Teams
matches Collection Collection of Matches

Competition All

GET /v2/competitions/{id}/all
Returns a single competition record by ID with complete data included

PROPERTIES

Property Type Description
id Integer Primary Key for this table
name String Name of this Competition
location String Competition Location Description
startdate date Competition Start Date
enddate date Competition End Date
timezone string Primary Competition Timezone
event_id Integer Reference to the Event for this Competition. Could be NULL
gender String Competition Gender (M,F,C)
age_id Integer Reference to the Age Level for this Competition
discipline_id Integer Reference to the Discipline for this Competition

Included Relations

Property Type Description
event Record Associated Event record
age Record Associated Age record
discipline Record Associated Discipline record
matches.hometeam, matches.awayteam Collection Collection of Matches with Team detail
matches.pitch.location Record Pitch and Location records
teams.players, teams.teamstaff Collection Collection of Teams with Player and Staff detail
pools.teams Collection Collection of Pools with Team standings
goals Collection Collection of all Goals in the Competition
cards Collection Collection of all Cards in the Competition
shootouts Collection Collection of all Shootouts in the Competition

Match Record

GET /v2/Matches/{id}

Returns a single match record by ID

PROPERTIES

Property Type Description
id Integer Primary Key for this table
competition_id Integer Reference to the Competition of this Match
number String Match Number
title String Title of this match (eg: Semi Final, 3rd Place)
poolstext String Text describing the Pool(s) this match is in
date Date Date of the match in Local Time
time Time Time of the match in Local Time
datetimeutd DateTime Date and Time of the match in UTC
status String Status of the match
period String Period of the match
hometeam_id Integer Reference to the Home Team in this Match
awayteam_id Integer Reference to the Away Team in this Match
homescore Integer Current score for the Home Team
awayscore Integer Current score for the Away Team
homeps Integer Current shootout score for the Home Team
awayps Integer Current shootout score for the Away Team

Match Timing

GET /v2/matches/{id}/timing

Returns match timing record match record by ID

The timing endpoint is a high performance endpoint providing real-time clock information for a specific match.

Following the BETA period this endpoint will be exempt from standard Rate Limits. It is being designed to be accessed every 500ms per API Key.
Data supplied by this endpoint is subject to change in the BETA period.

The following data properties are available in the match timing endpoint:

PropertyTypeDescription
home_scoreIntegerHome Team Score
away_scoreIntegerAway Team Score
home_shootoutIntegerHome Team Shootout
away_shootoutIntegerAway Team Shootout
period_labelStringCurrent Period Label
period_shortStringCurrent Period Short Code (Q1, HT)
period_lengthIntegerCurrent Period Length in minutes
remain_displayStringRemaining time in MM:SS format
remain_secondsIntegerRemaining time in seconds

Match Summary

GET /v2/matches/{id}/summary
Returns a single Match record by ID with summary data included

PROPERTIES

Property Type Description
id Integer Primary Key for this table
competition_id Integer Reference to the Competition of this Match
number String Match Number
title String Title of this match (eg: Semi Final, 3rd Place)
poolstext String Text describing the Pool(s) this match is in
date Date Date of the match in Local Time
time Time Time of the match in Local Time
datetimeutd DateTime Date and Time of the match in UTC
status String Status of the match
period String Period of the match
hometeam_id Integer Reference to the Home Team in this Match
awayteam_id Integer Reference to the Away Team in this Match
homescore Integer Current score for the Home Team
awayscore Integer Current score for the Away Team
homeps Integer Current shootout score for the Home Team
awayps Integer Current shootout score for the Away Team

Included Relations

Property Type Description
hometeam Record Team record for the Home Team in this Match
awayteam Record Team record for the Away team in this Match
officials Collection Collection of Officials assigned to this Match

Match All

GET /v2/matches/{id}/all
Returns a single Match record by ID with full data included

PROPERTIES

Property Type Description
id Integer Primary Key for this table
competition_id Integer Reference to the Competition of this Match
number String Match Number
title String Title of this match (eg: Semi Final, 3rd Place)
poolstext String Text describing the Pool(s) this match is in
date Date Date of the match in Local Time
time Time Time of the match in Local Time
datetimeutd DateTime Date and Time of the match in UTC
status String Status of the match
period String Period of the match
hometeam_id Integer Reference to the Home Team in this Match
awayteam_id Integer Reference to the Away Team in this Match
homescore Integer Current score for the Home Team
awayscore Integer Current score for the Away Team
homeps Integer Current shootout score for the Home Team
awayps Integer Current shootout score for the Away Team

Included Relations

Property Type Description
hometeam Record Team record for the Home Team in this Match
awayteam Record Team record for the Away team in this Match
homeplayers Collection Collection of MatchPlayers on the Home Team for this match
awayplayers Collection Collection of MatchPlayers on the Away Team for this Match
officials Collection Collection of Officials assigned to this Match
goals Collection Collection of goals in this Match
cards Collection Collection of cards in this Match
shootouts Collection Collection of shootouts in this Match
stats Collection Collection of statistics in this Match (PS, PC, Circle, Shot)

Tables

The following property definitions are supplied for all tables acccessible from the API.
Some tables have direct endpoints, while other tables are accessed via includes.

Ages

Age Levels for Competitions

Properties

Property Type Description
id Integer Primary Key for this table
name String Name of this Age Level

Competitions

Competitions in this system

Properties

Property Type Description
id Integer Primary Key for this table
name String Name of this Competition
location String Competition Location Description
startdate date Competition Start Date
enddate date Competition End Date
timezone string Primary Competition Timezone
event_id Integer Reference to the Event for this Competition. Could be NULL
gender String Competition Gender (M,F,C)
age_id Integer Reference to the Age Level for this Competition
discipline_id Integer Reference to the Discipline for this Competition

Disciplines

Disciplines for Competitions

Properties

Property Type Description
id Integer Primary Key for this table
name String Name of this Discipline

Events

Event grouping for Competitions

Properties

Property Type Description
id Integer Primary Key for this table
name String Name of this Event

Locations

Locations of Competitions

Properties

Property Type Description
id Integer Primary Key for this table
name String Name of this Location
address String Address of this location
latitude Float Latitude of this Location
longitude Float Longitude of this Location
altitude Float Altitude of this Location in metres
timezone string Location Timezone

Matches

Matches within a Competition

Properties

Property Type Description
id Integer Primary Key for this table
competition_id Integer Reference to the Competition of this Match
number String Match Number
title String Title of this match (eg: Semi Final, 3rd Place)
poolstext String Text describing the Pool(s) this match is in
date Date Date of the match in Local Time
time Time Time of the match in Local Time
datetimeutd DateTime Date and Time of the match in UTC
status String Status of the match
period String Period of the match
hometeam_id Integer Reference to the Home Team in this Match
awayteam_id Integer Reference to the Away Team in this Match
homescore Integer Current score for the Home Team
awayscore Integer Current score for the Away Team
homeps Integer Current shootout score for the Home Team
awayps Integer Current shootout score for the Away Team

Pitches

Pitches for Matches

Properties

Property Type Description
id Integer Primary Key for this table
location_id Integer Reference to the Location for this Pitch
name String Name of this Pitch
latitude Float Latitude of this Pitch
longitude Float Longitude of this Pitch

Pools

Pools within a Competition

Properties

Property Type Description
id Integer Primary Key for this table
competition_id Integer Reference to Competition of this Pool
name String Name of this Pool

Teams

Teams within a Competition

Properties

Property Type Description
id Integer Primary Key for this table
competition_id Integer Reference to Competition of this Team
name String Name of this Team
code String Unique Code for this Team
standing Integer Final Standings in this competition
ranking Integer Team Ranking entering competition
pool_id Integer Reference to Pool when Team accessed in Context
rank Integer Rank in Pool
played Integer Games played in Pool
wins Integer Wins in Pool
draws Integer Draws in Pool
losses Integer Losses in Pool
windraws Integer Windraws in Pool
lossdraws Integer Lossdraws in Pool
goalsfor Integer Goals For in Pool
goalsagainst Integer Goals Against in Pool
points Integer Points in Pool

Change Log

Changes to the API are detailed here

Date Description Breaking
16 DEC 2024 Added stats relation to the matches/{id}/all endpoint.  
11 NOV 2024 Added State and Minute to homeplayers and awayplayers records for matches.
Added outcome to shootout details
 
06 SEP 2024 Added Match Pitch and Location information into the competitions/{id}/all endpoint.  
01 JUL 2024 Beta endpoints starting with https://api.altius.live/api/v2/... deprecated YES
12 JUN 2024 Added endpoints and documentation for
  • Competition Summary
  • Competition All
  • Match Summary
  • Match All
 
11 JUN 2024 First release of documentation for BETA API