Profixio Web Service Public API

Warning! This API is deprecated. Please use the new Rest API at https://www.profixio.com/app/docs

Introduction

This document describe the API for how to connect to Profixio to retrieve tournament data using Web Services. The document and the API is under development, and the information may change. The services are listed in chapter 2. The authentication and authorization for the services are based on different keys, see Authentication.

Choose the right web service

The webservices are located at three places:

  1. TX tournaments: Fetch match results and search for tournaments. Looking for tournaments? Click here
  2. For FX Group Activity / Group Training
  3. A mixture of webservices for TX and FX (this directory). (Old and not so good ones are here...)

If you want match results about one or more tournament, use 1. If you are not sure what you want, concact us.

Application Key

The authentication depends on what type of web service you use. But you need to register with us to get a Application Key to be able to connect and get anything at all!! With an Application Key, you may have access to:

  • search for tournaments
  • get match results from tournaments
  • set match results for a match
  • group training for an association

We will set the correct access level when setting up the application key.

Please consider using the rest API instead

The Rest API is the new and better way to get data from us. It is faster, more reliable and easier to use.

The Rest API is located at /app/docs and is the preferred way to get data from us.

The same application key is used for both the Rest API and the Soap API.

List of Web Services

getActivityByID

https://www.profixio.com/soap/services/getActivityByID.php?wsdl
     Returns  all the activity for given activityType.
     
     Used for Grouptraining only
     
     @param string $application_key
     @param string $association
     @param int $activityID
     
     @return activity
     

getActivityByType

https://www.profixio.com/soap/services/getActivityByType.php?wsdl
     Returns  all the activity for given activityType.
     
     Used for Grouptraining only
    
     @param string $application_key
     @param int $typeID
     @param int $seasonID
     @param string $association
     
      @return activity[]
     

getActivityByUser

https://www.profixio.com/soap/services/getActivityByUser.php?wsdl
     Returns  all the activities for given timePeriod.
     
     Used for Grouptraining only
     
     format weeknbr: YYYY.WW
     format date: YYYY-MM-DD
     Date may be empty. Overrides week if given
     
     @param string $application_key  
     @param string $association
     @param string $user
     @param string $password
     @param string $role
     @param string $fromWeekNbr
     @param string $toWeekNbr
     @param date $fromDate
     @param date $toDate
     
     @return userActivity[]
     

getActivityCalendar

https://www.profixio.com/soap/services/getActivityCalendar.php?wsdl
     Returns  all the activities for given timePeriod.
     
     Used for Grouptraining only
     
     format weeknbr: YYYY.WW
     format date: YYYY-MM-DD
     Date may be empty. Overrides week if given
     
     @param string $application_key
     @param string $fromWeekNbr
     @param string $toWeekNbr
     @param date $fromDate
     @param date $toDate
     @param int $activityID
     @param string $association
     @param int $singleSessionOnly
     
     @return calendar[]
     

getActivitySessions

https://www.profixio.com/soap/services/getActivitySessions.php?wsdl
     Returns  all the activities for given timePeriod.
     
     Used for Grouptraining only
     
     format weeknbr: YYYY.WW
     format date: YYYY-MM-DD
     Date may be empty. Overrides week if given
     
     @param string $application_key
     @param int $activityID
     @param string $fromWeekNbr
     @param string $toWeekNbr
     @param date $fromDate
     @param date $toDate
     @param string $association
     
     @return singleSession[]
     

getAllActivityTypesForAssociation

https://www.profixio.com/soap/services/getAllActivityTypesForAssociation.php?wsdl
     Returns  all the activityTypes that belongs to an association.
     
     Used for Grouptraining only
    
     @param string $application_key
     @param int $seasonID (optional)
     @param string $association (optional)
     
     @return activityTypes[]
     

getAllClubsForAssociation

https://www.profixio.com/soap/services/getAllClubsForAssociation.php?wsdl
    Returns the clubs that belong to an association.
    
    Used by Associations only
   
    @param string $application_key
    
    @return Club[]
    

getAllClubsForTournament

https://www.profixio.com/soap/services/getAllClubsForTournament.php?wsdl
     Returns the clubs that have teams playing matches in a Tournament.
    
     @param string $application_key
     @param int $tournamentID 
     @param string $password
     
     @return TournamentClub[]
     

getAllPlayersForAssociation

https://www.profixio.com/soap/services/getAllPlayersForAssociation.php?wsdl
    Returns the players - including ranking points if any - that belong to an association.
    
    Used by Associations only
    
    @param string $application_key
    
    @return Player[]
    

getAllPlayersForTournament

https://www.profixio.com/soap/services/getAllPlayersForTournament.php?wsdl
     Returns playerdetails including teamID for players in a Tournament.
     
     @param string $application_key
     @param int $tournamentID
     @param string $password
     
     @return TournamentPlayer[]
     

getAllRegionsForAssociation

https://www.profixio.com/soap/services/getAllRegionsForAssociation.php?wsdl
    Returns the regions that belong to an association.
    
    Used by Associations only
    
    @param  string $application_key
    
    @return Region[]
    
    

getAllTeamsForTournament

https://www.profixio.com/soap/services/getAllTeamsForTournament.php?wsdl
     Returns the teams that play matches in a Tournament.
     
     @param string $application_key
     @param int $tournamentID 
     @param string $password
     
     @return TournamentTeam[]
     

getClubLicenceKey

https://www.profixio.com/soap/services/getClubLicenceKey.php?wsdl
    Returns licence key for a club
   
    Used by Associations only
    
    @param string $application_key
    @param int    $club_id
    
    @return ClubLicence
    

getCompetition

https://www.profixio.com/soap/services/getCompetition.php?wsdl
     Returns the competitions/leagues that belong to an Association
     
     Used by Associations only.
                             
     @param string $application_key Required.
     @param string $associationId Required.
     @param string $teamSportId  Required. Two-tree letter code. For instance "vb" = volley ball
     @param boolean $onlyCurrentSeason If true, only fetches competitions for the active season.
     @param boolean $hasFinished If true, only fetches for finished seasons.
      
     @return Competition[]
     

getCompetitionsForClub

https://www.profixio.com/soap/services/getCompetitionsForClub.php?wsdl
     Get all competitions that a club has teams in.
    
    
     @param  string  $application_key
     @param  string  $clubId
    
     @return Competition[]
     

getLeagueTable

https://www.profixio.com/soap/services/getLeagueTable.php?wsdl
    Returns the League table for a League (competiton).
    
    Used by Associations only
    
    @param string $application_key
    @param int $competitionId
    
    @return LeagueTable[]
    

getMatchClassesForTournament

https://www.profixio.com/soap/services/getMatchClassesForTournament.php?wsdl
     Returns the MatchClasses in a tournament
                             
     @param string $application_key
     @param int $competitionId This is the id of the tournament
     
     @return MatchClass[]
     

getMatchDetails

https://www.profixio.com/soap/services/getMatchDetails.php?wsdl
    Returns the details - including results - that belong to a match.
                            
    @param string $application_key
    @param string $matchId
    
    @return MatchDetail[]
    

getMatchesAndTable

https://www.profixio.com/soap/services/getMatchesAndTable.php?wsdl
     Returns the matches and the tables for a tournament. 
     The result can be filteres by MatchGroup (pulje), 
     PlayoffId for finals etc, or by a team.
                             
     
     format date: YYYY-MM-DD
     leave fromDate and toDate empty to retrieve all matches 
     
     @param string $application_key  (required)
     @param int $competitionId    (required) This is the id of the tournament.
     @param string $fromDate          Fromdate and todate will only affect the matches. Not the tables returned.
     @param string $toDate            
     @param string $MatchGroupId      Get results for one MatchGroup 
     @param string $PlayoffId         Used to retrive playoffresults. 
     @param string $TournamentTeamId  Get all matches in the MatchGroup for this team.

     
     @return MatchesAndTable
     

getMatchesByCompetitionAndPeriod

https://www.profixio.com/soap/services/getMatchesByCompetitionAndPeriod.php?wsdl
     Returns the details - including results- for matches in given dateperiod.
                             
     format date: YYYY-MM-DD
     leave fromDate and toDate empty to retrieve all matches in tournament
     
     @param string $application_key Required.
     @param int $competitionId Required.
     @param string $fromDate Optional.
     @param string $toDate Optional.
     
     @return Matchinfo[]
     

getMatchesByUserAndRole

https://www.profixio.com/soap/services/getMatchesByUserAndRole.php?wsdl
     Returns the details - including results- for matches for given user in given dateperiod.
                             
     format date: YYYY-MM-DD
     leave fromDate and toDate empty to retrieve matches from last, this and next week
     
     
     @param string $application_key
     @param string $username
     @param string $password 
     @param string $role
     @param string $association
     @param string $fromDate
     @param string $toDate
     
     @return Matchinfo[]
     

getPlayedMatches

https://www.profixio.com/soap/services/getPlayedMatches.php?wsdl
     Returns the matches in a tournament/league which has result registered..
                             
     @param string $application_key
     @param int $competitionId
     
     @return Matchinfo[]
     

getRefereesForAssociation

https://www.profixio.com/soap/services/getRefereesForAssociation.php?wsdl
     Returns the referees that belong to an Association
     Needs special privileges.
    
     Used by Associatons only
    
     @param  string  $application_key
     @param  string  $sportID
    
    
     @return PersonFull[]
     

getSeasons

https://www.profixio.com/soap/services/getSeasons.php?wsdl
    Returns the league-seasons that belong to an association.
    
    Used by Associatons only
    
    @param string $application_key
    @param string $association
    @param string $sportID 
   
    
    @return Season[]
    

getTeamContactsForSeason

https://www.profixio.com/soap/services/getTeamContactsForSeason.php?wsdl
     Returns the contact persons for teams registered for this season.
    
     Used by Associations only
    
     @param string $application_key
     @param string $association
     @param int $seasonID
     @throws SoapFault
     @return GlobalTeamWithContacts[]
     

getTeamSports

https://www.profixio.com/soap/services/getTeamSports.php?wsdl
     Returns the sports in use for leagues belonging to an Association
     
     Used by Association only.
                             
     @param string $application_key
     @param string $organizationId
     
     @return TeamSports[]
     

getTournamentDetails

https://www.profixio.com/soap/services/getTournamentDetails.php?wsdl
    Returns detailed information about a tournament.
    
    @param ClubKey $ClubKey
    @param int $TournamentId 
    
    @return TournamentDetail
    
    

getTournamentReferees

https://www.profixio.com/soap/services/getTournamentReferees.php?wsdl
     Returns registered referees for a tournament.
     
     @param ClubKey $ClubKey
     @param int $TournamentId 
     
     @return Referee[]
     
     

getTournamentRegistrations

https://www.profixio.com/soap/services/getTournamentRegistrations.php?wsdl
    Returns registred clubs and teams and  for a tournament.
    
    @param ClubKey $ClubKey
    @param int $TournamentId 
    
    @return TournamentRegistration
    
    

getTournamentsForClub

https://www.profixio.com/soap/services/getTournamentsForClub.php?wsdl
    Return array of Tournaments that belong to a club.
    The club identifies itself with the ClubKey.
   
    @param ClubKey $ClubKey
    
    @return Tournament[]

getUpcomingMatches

https://www.profixio.com/soap/services/getUpcomingMatches.php?wsdl
     Returns the matches in a tournament/league which has no result registered.
                             
     @param string $application_key
     @param int $competitionId
     
     @return Matchinfo[]
     

getUserAuthentication

https://www.profixio.com/soap/services/getUserAuthentication.php?wsdl
     Checks userAuthentication, returns true or false
                         
     
     @param string $application_key
     @param string $username
     @param string $password 
     @param string $role
     @param string $association
     
     
     @return boolean
     

newAuth

https://www.profixio.com/soap/services/newAuth.php?wsdl
     Check association auth.
     
     Used by Associatons only
     
     @param string $application_key
     @param string $association
          
     
     @return string
     

setMatchResult

https://www.profixio.com/soap/services/setMatchResult.php?wsdl
     Save the result for a match in FX or in tournaments
    
     Required parameters if you have accesslevel 3:
     - application_key
     - matchID
     - team1Goals
     - team2Goals
    
    
     If accessed as a user (refere) in the Profixio FX system:
     - application_key
     - username
     - password
     - role: "referee"
     - matchID
     - team1Goals
     - team2Goals
    
     To erase a result, use
      - reason: "reset"
    
     Example accesslevel 3:
    
     $param = array(
         "application_key" => "secret", // contact us for your access key!
         "matchID" => 30614758,
         "team1Goals" => 2,
         "team2Goals" => 3,
         );
    
     Example reset a match:
    
     $param = array(
         "application_key" => "secret", // contact us for your access key!
         "matchID" => 30614758,
         "reason" => "reset"
         );
    
    
     @param string $application_key
     @param string $username A user in FX Federation (email address)
     @param string $password The password for the user.
     @param string $role referee, tournament_referee or admin.
     @param string $association
     @param int $matchID
     @param int $team1Goals
     @param int $team2Goals
     @param string $winner Match winner. This will be calculated from the goals if omitted. Accepted values: H, D or A. (Home, Draw, Away).
     @param string $reason Default empty. If  reason = "reset", the match results will be thrown away.
     @param string $comment If any public comments for the match. For instance info about walkover etc.
     @param string $setResults Comma separated list of set results. Example: "21-19,19-21".
    
     
     @return boolean
     returns true if result set OK, false if result not set OK
     

Authentication

Application Key

Your application needs an Application Key to get access.

To use the Profixio API from a 3rd party application there are several layers of access.

Every user of our SOAP API is required to get an Application Key from Profixio. This key allows give access to different data.

For example, you can be given access to data from:

  • one specific tournament (typically using a ClubKey)
  • all tournaments or series that belong to an organisation
  • every tournament

How to get the key

Contact Profixio to get the Application Key for your application. We will help you to set up the key, so that you get access to data from tournaments and/or associations.

Implemented Key Name

The name of the key is implemented as "application_key".

Level 1 - authentication for basic access

Basic access is granted to applications that require read-only access to tournaments for listing of matches and results.

Level 2 - authentication for extended access

Extended access is granted to applications that require read-write access to tournaments for listing of matches and results, listing of players and referees and result reporting.

Example of calling setMatchResult (PHP)


 
<?php 

$url = "https://www.profixio.com/soap/services/setMatchResult.php?wsdl";

# If accesslevel 3: 
$param = array(
    "application_key" => "secret", // contact us for your access key!
    "matchID" => 30614758,
    "team1Goals" => 2,
    "team2Goals" => 3,
);
# If accesslevel 2
$param = array(
    "application_key" => "secret", // contact us for your access key!
    "username " => "[email protected]",
    "password " => "myPazzw0rd",
    "matchID" => 30614758,
    "team1Goals" => 2,
    "team2Goals" => 3,
);

try {
    $soap = new SoapClient($url);
    $result = $soap->setMatchResult($param);
    echo "Result: <pre>";
    print_r($result);
    echo "</pre>";
    
} catch (SoapFault $exc) {
    echo $exc->getMessage();
    echo $exc->getCode();
}

?>
            

Example of calling getClubs (PHP)


 
<?php 
$url = "https://www.profixio.com/soap/tournament/ForTournament.php?wsdl";

// Parameters for the getClubs method
$param = array(
    "application_key" => "something secret", // contact us for your access key!
    "tournamentID" => "999",  // Your tournament id
    "limit" => "3",
);

try {
    $soap = new SoapClient($url);
    $result = $soap->getClubs($param);
    echo "Result: <pre>";
    print_r($result);
    echo "</pre>";

} catch (SoapFault $exc) {
    echo $exc->getMessage();
    echo $exc->getCode();
}
?>
            

Test Server

We have a testing environment where it's possible to try out the webservices on "fake" data.

Contact us for access to the testing environment!