Get started
API Endpoint
https://pttr.tischtennis.cloud/api/
The Tischtennis.Cloud Api Documentation for Import and Export Clubs, Classes, Player and Tournaments.
To use this API, you need an API key. The API Bearer Token you will get after first Login Call.
login
# Here is a PHP curl example
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://pttr.tischtennis.cloud/api/login',
CURLOPT_RETURNTRANSFER=> TRUE,
CURLOPT_SSL_VERIFYHOST=> 0,
CURLOPT_SSL_VERIFYPEER=> 0,
CURLOPT_AUTOREFERER=> true,
CURLINFO_HEADER_OUT=> true,
CURLOPT_FOLLOWLOCATION=> 1,
CURLOPT_VERBOSE=>true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('email' => 'YOUR@EMAIL.DE','password' => 'YOURSTRONGPASSWORD'),
));
$response = curl_exec($curl);
curl_close($curl);
$token = json_decode($response)->token;
echo $token;
To get Barear AUTH Token you need to make a POST call to the following url :
https://pttr.tischtennis.cloud/api/login
Result example :
{
"token": "*****************************************************************************************"
}
QUERY PARAMETERS
| Field | Type | Description |
|---|---|---|
| String | Your Email. | |
| password | String | Your Strong Password |
PPP USERS ALL
To get All PPP Users (Players) make a POST call to the following url :
https://pttr.tischtennis.cloud/api/ppp_users/all
[
{
"id": 29,
"internal_nr": "n1",
"lastname": "er1",
"firstname": "play",
"birthyear": 1998,
"sex": 1,
"club_name": null,
"class": null,
"created_at": "2021-10-05T18:04:00.000000Z",
"updated_at": "2021-10-07T06:18:48.000000Z",
"deleted_at": null,
"player_name": "play er1",
"constant_of_change": 24,
"ttr": 1180,
"qttr": 1180,
"played_games": null
},
{
"id": 30,
"internal_nr": "n2",
"lastname": "er2",
"firstname": "play",
"birthyear": 2000,
"sex": 1,
"club_name": null,
"class": null,
"created_at": "2021-10-05T18:04:00.000000Z",
"updated_at": "2021-10-07T06:18:48.000000Z",
"deleted_at": null,
"player_name": "play er2",
"constant_of_change": 52,
"ttr": 1455,
"qttr": 1455,
"played_games": null
},
]
QUERY PARAMETERS
| Field | Type | Description |
|---|---|---|
| Auth | String | Authtentification |
| Bearer Token | Token | Your Bearer Token |
Errors
The Westeros API uses the following error codes:
| Error Code | Meaning |
|---|---|
| X000 | Some parameters are missing. This error appears when you don't pass every mandatory parameters. |
| X001 |
Unknown or unvalid secret_key. This error appears if you use an unknow API key or if your API key expired.
|
| X002 |
Unvalid secret_key for this domain. This error appears if you use an API key non specified for your domain. Developper or Universal API keys doesn't have domain checker.
|
| X003 |
Unknown or unvalid user token. This error appears if you use an unknow user token or if the user token expired.
|