Endpoints
- GET /tournaments/{tournament_id}/custom-fields
Retrieve custom fields of a tournament.
Authorized Access - POST /tournaments/{tournament_id}/custom-fields
Create a custom-field for a tournament.
Authorized Access - GET /tournaments/{tournament_id}/custom-fields/{id}
Retrieve a single custom field of a tournament.
Authorized Access - PATCH /tournaments/{tournament_id}/custom-fields/{id}
Update a single custom field of a tournament.
Authorized Access - DELETE /tournaments/{tournament_id}/custom-fields/{id}
Delete a custom-field of a tournament.
Authorized Access
GET /tournaments/{tournament_id}/custom-fields
Returns the complete definition of all custom fields for a given tournament. This includes both public and private custom fields. A custom field may be associated to a player, a team or a team's player.
For more information, please read the Custom Fields documentation.
Resource URL
https://api.toornament.com/organizer/v2/tournaments/{tournament_id}/custom-fields
HTTP headers
- X-Api-Keystring
API key of your application (see Authentication)
- Authorizationstring
Access token with
organizer:admin
scope (see Authorization)
Path parameters
- tournament_idstring
A unique identifier of the tournament.
Query Parameters
- target_typestring
Possible values: player, team, team_player
Request Body
This endpoint doesn't require a request body.
Response
[200] Success
Example
[ { "id": "128114939547269789", "machine_name": "my_steam_id", "label": "My Steam ID", "type": "steam_player_id", "target_type": "player", "default_value": "#steam_id", "required": false, "public": false, "position": 5 } ]
Structure (collection)
- idstring
A unique identifier for the custom-field
Example: "128114939547269789"
- machine_namestring
A name used to identify a custom field for computing purposes (maximum 255 characters, accepts only "a-z0-9_" characters)
Example: "my_steam_id"
- labelstring
A name used in forms to display a custom field (maximum 255 characters)
Example: "My Steam ID"
- typestring
A data type used for both input and computing
Example: "steam_player_id"
- target_typestring
The entity concerned by the custom field
Possible values: player, team, team_player
- default_valuemixed
A default value (can be array, scalar or null)
Example: #steam_id
- requiredboolean
Whether the custom field is required
Example: false
- publicboolean
Whether the values of the custom field are public
Example: false
- positioninteger
An ordering position used in forms
Example: 5
POST /tournaments/{tournament_id}/custom-fields
Create a custom-field for a tournament. You can not exceed 128 custom-fields in total for a tournament.
Resource URL
https://api.toornament.com/organizer/v2/tournaments/{tournament_id}/custom-fields
HTTP headers
- X-Api-Keystring
API key of your application (see Authentication)
- Authorizationstring
Access token with
organizer:admin
scope (see Authorization)
Query Parameters
This endpoint doesn't have any query parameters.
Request Body
Data to provide for create the custom-field.
Example
{ "machine_name": "my_steam_id", "label": "My Steam ID", "type": "steam_player_id", "target_type": "player", "default_value": "#steam_id", "required": false, "public": false, "position": 5 }
Structure (object)
- machine_namestring
A name used to identify a custom field for computing purposes (maximum 255 characters, accepts only "a-z0-9_" characters)
Example: "my_steam_id"
- labelstring
A name used in forms to display a custom field (maximum 255 characters)
Example: "My Steam ID"
- typestring
A data type used for both input and computing
Example: "steam_player_id"
- target_typestring
Optional
The entity concerned by the custom field, by default is team or player.
Possible values: player, team, team_player
- default_valuemixed
Optional
A default value (can be array, scalar or null)
Example: #steam_id
- requiredboolean
Optional
Whether the custom field is required
Example: false
- publicboolean
Optional
Whether the values of the custom field are public
Example: false
- positioninteger
Optional
An ordering position used in forms
Example: 5
Response
[201] Success
Example
{ "id": "128114939547269789", "machine_name": "my_steam_id", "label": "My Steam ID", "type": "steam_player_id", "target_type": "player", "default_value": "#steam_id", "required": false, "public": false, "position": 5 }
Structure (object)
- idstring
A unique identifier for the custom-field
Example: "128114939547269789"
- machine_namestring
A name used to identify a custom field for computing purposes (maximum 255 characters, accepts only "a-z0-9_" characters)
Example: "my_steam_id"
- labelstring
A name used in forms to display a custom field (maximum 255 characters)
Example: "My Steam ID"
- typestring
A data type used for both input and computing
Example: "steam_player_id"
- target_typestring
The entity concerned by the custom field
Possible values: player, team, team_player
- default_valuemixed
A default value (can be array, scalar or null)
Example: #steam_id
- requiredboolean
Whether the custom field is required
Example: false
- publicboolean
Whether the values of the custom field are public
Example: false
- positioninteger
An ordering position used in forms
Example: 5
GET /tournaments/{tournament_id}/custom-fields/{id}
Returns a custom field by the given id.
Resource URL
https://api.toornament.com/organizer/v2/tournaments/{tournament_id}/custom-fields/{id}
HTTP headers
- X-Api-Keystring
API key of your application (see Authentication)
- Authorizationstring
Access token with
organizer:admin
scope (see Authorization)
Path parameters
- tournament_idstring
A unique identifier of the tournament.
- idstring
The id of the requested custom-field.
Query Parameters
This endpoint doesn't have any query parameters.
Request Body
This endpoint doesn't require a request body.
Response
[200] Success
Example
{ "id": "128114939547269789", "machine_name": "my_steam_id", "label": "My Steam ID", "type": "steam_player_id", "target_type": "player", "default_value": "#steam_id", "required": false, "public": false, "position": 5 }
Structure (object)
- idstring
A unique identifier for the custom-field
Example: "128114939547269789"
- machine_namestring
A name used to identify a custom field for computing purposes (maximum 255 characters, accepts only "a-z0-9_" characters)
Example: "my_steam_id"
- labelstring
A name used in forms to display a custom field (maximum 255 characters)
Example: "My Steam ID"
- typestring
A data type used for both input and computing
Example: "steam_player_id"
- target_typestring
The entity concerned by the custom field
Possible values: player, team, team_player
- default_valuemixed
A default value (can be array, scalar or null)
Example: #steam_id
- requiredboolean
Whether the custom field is required
Example: false
- publicboolean
Whether the values of the custom field are public
Example: false
- positioninteger
An ordering position used in forms
Example: 5
PATCH /tournaments/{tournament_id}/custom-fields/{id}
Update a single custom field of a tournament.
Resource URL
https://api.toornament.com/organizer/v2/tournaments/{tournament_id}/custom-fields/{id}
HTTP headers
- X-Api-Keystring
API key of your application (see Authentication)
- Authorizationstring
Access token with
organizer:admin
scope (see Authorization)
Path parameters
- tournament_idstring
A unique identifier of the tournament.
- idstring
The id of the requested custom-field.
Query Parameters
This endpoint doesn't have any query parameters.
Request Body
Data to provide for update the custom-field.
Example
{ "label": "My Steam ID", "default_value": "#steam_id", "required": false, "public": false, "position": 5 }
Structure (object)
- labelstring
Optional
A name used in forms to display a custom field (maximum 255 characters)
Example: "My Steam ID"
- default_valuemixed
Optional
A default value (can be array, scalar or null)
Example: #steam_id
- requiredboolean
Optional
Whether the custom field is required
Example: false
- publicboolean
Optional
Whether the values of the custom field are public
Example: false
- positioninteger
Optional
An ordering position used in forms
Example: 5
Response
[200] Success
Example
{ "id": "128114939547269789", "machine_name": "my_steam_id", "label": "My Steam ID", "type": "steam_player_id", "target_type": "player", "default_value": "#steam_id", "required": false, "public": false, "position": 5 }
Structure (object)
- idstring
A unique identifier for the custom-field
Example: "128114939547269789"
- machine_namestring
A name used to identify a custom field for computing purposes (maximum 255 characters, accepts only "a-z0-9_" characters)
Example: "my_steam_id"
- labelstring
A name used in forms to display a custom field (maximum 255 characters)
Example: "My Steam ID"
- typestring
A data type used for both input and computing
Example: "steam_player_id"
- target_typestring
The entity concerned by the custom field
Possible values: player, team, team_player
- default_valuemixed
A default value (can be array, scalar or null)
Example: #steam_id
- requiredboolean
Whether the custom field is required
Example: false
- publicboolean
Whether the values of the custom field are public
Example: false
- positioninteger
An ordering position used in forms
Example: 5
DELETE /tournaments/{tournament_id}/custom-fields/{id}
Delete a custom-field of a tournament.
Resource URL
https://api.toornament.com/organizer/v2/tournaments/{tournament_id}/custom-fields/{id}
HTTP headers
- X-Api-Keystring
API key of your application (see Authentication)
- Authorizationstring
Access token with
organizer:admin
scope (see Authorization)
Path parameters
- tournament_idstring
A unique identifier of the tournament.
- idstring
The id of the requested custom-field.
Query Parameters
This endpoint doesn't have any query parameters.
Request Body
This endpoint doesn't require a request body.