Chess - Swiss System REST API for Generating the Pairing or check from SS Pairs

  • based on bbpPairings (which bases on JaVaFo)
  • therefore follows FIDE Swiss Pairing Rules 2017
  • Client sends by GET or POST - the apikey and a TRF-Text (Tournament Result File, description), a current standing in a swiss system tournament
  • API replies in JSON-Format with original reply from bbpPairings and the pairing for the next round
  • free, non commercial, to receive an API Key use our contact form with short description who you are and what are your plans
  • But you really want to donate something to the club? We can also find a solution using the contact form
URL
http://k15932-1.server11.febas.net/swiss-system-api/pair.php
Input parameters - POST (recommended) or GET
apikey Your access key, inquire here
action "pair" = Determine pairings for the next round
"check" = Generate checkfile for the TRF
trf = Contents of the TRF file, text file with the tournament status in the Swiss system (description)
output fields (Content-Type: text/json)
errornumber Except for 0, something went wrong
errormessage Unless something went wrong with "ok", the text gives a clue
nextroundnumber Number of the next round drawn now
id internal ID of the query
rawoutput Complete response/output of bbpPairings.exe, if you want to use this API as a pure REST solution for bbpPairings, this field is enough for you. We're not angry then.
pairings Sub-branches (0 to n) each with "w" and "b" for White and Black with the respective player number. Player 0 has no game (with a no-contest point)
Demo-Aufruf
Demo (Pair) This demo uses this TRF (which would actually come as a parameter, but not in the demo)
restrictions
  • only DUTCH Modus, no BURSTEIN
Huh? quick start Guide
So you need to be able to create a TRF for the current tournament status. There's just text there, instructions You pass this text to the API. The TRF contains player numbers, which must start with 1. The TRF also shows who has already played against whom, no games, etc., what colors, how many rounds the tournament has, simply everything. This also shows whether the next round is the first or last, because certain rules apply to this. So you pass the Apikey, the TRF and hey presto, the next round's pairings come as JSON.
Who needs that? What problem does this solve?
You would like to write a program or a function on a website to manage the Swiss system tournament, but the FIDE algorithm is too complex for you, fuzzy logic leads to completely stupid pairings with more than 20 participants You don't have the option to run a Linux or Windows exe file (bbpPairings) or you find a REST call easier. So that's how I felt, let's see if anyone else feels the same way.
But you don't have to save your tournament situation in TRF. That wouldn't be easier than individual API parameters, because there's a lot of information in there. If you can use PHP code for this, contact form.
Don't feel like programming?
Would you rather organize your tournament directly online, free of charge using the Swiss system and the FIDE algorithm without any frills?
We have something ready there too, contact us