6.1 addFreeRounds()

Gives $players $available free rounds for the $game. They are valid until $validTo.

public addFreeRounds( [ string $title = string(0) "" , string $players , string $games , string $available , string $validTo , string $validFrom = string(0) "" ] )

Parameters

  • string $title string(0) "" - Default = ""
  • string $playerids required - Value of the variable looks like 220650,124144 or 220650. Note that there number are EXAMPLES (playerids on our side → remote ID)
  • string $gameids required - Value of the variable looks like 787,789 or 787. Note that these numbers are EXAMPLES
  • string $available required - how many free rounds.
  • string $validTo string(0) "" - Default = + 1 week 
  • string $validFrom string(0) "" - Default = ""
  • string $betlevel string(0) "" - Default = "" - Possible values are: min, mid, max. It defines the cost of the bet during the freerounds (if empty it will set "min" by default)

Return Values

  • type - String

Example: The value of paramater $playerids can be: 220650,124144,2359283 or just 220650


The same is with the parameter $games

REST REQUEST
Array
    (
        [api_password] => xapitest
        [api_login] => xapitest
        [method] => addFreeRounds
        [tittle] => freeround 1
        [playerids] => "220650,124144"
        [gameids] => "787,789"
        [available] => 4
        [validTo] => 2016-05-11
		[validFrom] => ""
		[betlevel] => ""
		[currency] => EUR
    )


REST RESPONSE
ON ERROR
{
	"error": 1,
	"message": "addFreeRounds: [error text]"
}
ON SUCCESS
{
	"error": 0,
	"response": "{\"created\":1,\"freeround_id\":\"5b8fc08970d5544676009e24\"}",
	"currency": "EUR"
}


Source Code
public function addFreeRounds($title = '', $players, $games, $available, $validTo, $validFrom = '', $betLevel = ''){
	return $this->client->addFreeRounds($title, $players, $games, $available, $validTo, $validFrom, $betLevel);
}

Deep dive into freerounds

Once player enters the game in which he has freerounds all subsequent debit and credit requests will have param "freeround_id" with id that is returned in addFreeRounds() response.  There is no way to know actual value of the freeround - usually min is min possible bet in the game, mid 0.5€ - 2€ and max around 4€.

"validFrom" time will start at 00:00 and "validTo" will end at 23:59 server time (CET).

Freerounds will be added for all players from "playerids" that open any game from "gameids". Each player will get freerounds only in the first game that is opened and is in "gameids".