Tournament API › Custom Fields
Endpoints
- GET /custom-fields
Retrieve all custom fields.
- POST /custom-fields
Create a new custom field in a tournament.
- GET /custom-fields/{id}
Retrieve a single custom field of a tournament.
- PATCH /custom-fields/{id}
Update a single custom field of a tournament.
- DELETE /custom-fields/{id}
Delete a custom field of a tournament.
- LegacyGET /tournaments/{tournament_id}/custom-fields
Retrieve the custom fields of a tournament.
- LegacyPOST /tournaments/{tournament_id}/custom-fields
Create a new custom field in a tournament.
- LegacyGET /tournaments/{tournament_id}/custom-fields/{id}
Retrieve a single custom field of a tournament.
- LegacyPATCH /tournaments/{tournament_id}/custom-fields/{id}
Update a single custom field of a tournament.
- LegacyDELETE /tournaments/{tournament_id}/custom-fields/{id}
Delete a custom field of a tournament.
GET /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/custom-fields
HTTP headers
- X-Api-Keystring
API key of your application (see Authentication)
- Authorizationstring
Access token with
organizer:admin
scope (see Authorization) - Rangestring
A range of requested items using the
custom-fields
unit. The size of the range can not exceed 50. (see Pagination)Example: custom-fields=0-49
Query Parameters
- target_typestring
The entity affected by the custom fields.
Possible values: player, team, team_player
Example: team
- tournament_idsarray
Only return reports for the given list of tournaments.
Example: 378426939508809728,534138941862841533
Request Body
This endpoint does not require a request body.
Response
[200] Success
Example
[ { "tournament_id": "534138941862841533", "id": "128114939547269789", "target_type": "player", "default_value": "#steam_id", "required": false, "public": false, "position": 5, "options": {}, "machine_name": "my_steam_id", "label": "My Steam ID", "type": "steam_player_id" } ]
Structure (collection)
- tournament_idstring
The id of tournament.
Example: "534138941862841533"
- idstring
The unique identifier of the custom field.
Example: "128114939547269789"
- target_typestring
The entity concerned by the custom field.
Possible values: player, team, team_player
- default_valuemixed|null
A default value (can be array, scalar or null).
Example: #steam_id
- requiredboolean
Whether the custom field is required.
Example: false
- publicboolean
Whether the value of the custom field is public.
Example: false
- positioninteger
The position of the field in forms.
Example: 5
- optionsobject
Options of the custom field.
Example: {}
- machine_namestring
A name used to identify a custom field for computing purposes.
Pattern: ^[a-z0-9_]+$
Max. length: 255 characters
Example: "my_steam_id"
- labelstring
The display name of a custom field in forms.
Max. length: 255 characters
Example: "My Steam ID"
- typestring
A data type used for both input and computing.
Example: "steam_player_id"
POST /custom-fields
Create a new custom field in a tournament. You can not have more than 128 custom fields in a tournament.
Resource URL
https://api.toornament.com/organizer/v2/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 does not have any query parameters.
Request Body
Data to provide for create the custom field.
Example
{ "target_type": "player", "tournament_id": "534138941862841533", "machine_name": "my_steam_id", "label": "My Steam ID", "type": "steam_player_id", "default_value": "#steam_id", "required": false, "public": false, "position": 5, "options": {} }
Structure (object)
- target_typestring
The entity concerned by the custom field.
Possible values: player, team, team_player
- tournament_idstring
The id of tournament.
Example: "534138941862841533"
- machine_namestring
A name used to identify a custom field for computing purposes.
Pattern: ^[a-z0-9_]+$
Max. length: 255 characters
Example: "my_steam_id"
- labelstring
The display name of a custom field in forms.
Max. length: 255 characters
Example: "My Steam ID"
- typestring
A data type used for both input and computing.
Example: "steam_player_id"
- default_valuemixed|null
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 value of the custom field is public.
Example: false
- positioninteger
Optional
The position of the field in forms.
Example: 5
- optionsobject
Optional
Options of the custom field.
Example: {}
Response
[201] Success.
Example
{ "tournament_id": "534138941862841533", "id": "128114939547269789", "target_type": "player", "default_value": "#steam_id", "required": false, "public": false, "position": 5, "options": {}, "machine_name": "my_steam_id", "label": "My Steam ID", "type": "steam_player_id" }
Structure (object)
- tournament_idstring
The id of tournament.
Example: "534138941862841533"
- idstring
The unique identifier of the custom field.
Example: "128114939547269789"
- target_typestring
The entity concerned by the custom field.
Possible values: player, team, team_player
- default_valuemixed|null
A default value (can be array, scalar or null).
Example: #steam_id
- requiredboolean
Whether the custom field is required.
Example: false
- publicboolean
Whether the value of the custom field is public.
Example: false
- positioninteger
The position of the field in forms.
Example: 5
- optionsobject
Options of the custom field.
Example: {}
- machine_namestring
A name used to identify a custom field for computing purposes.
Pattern: ^[a-z0-9_]+$
Max. length: 255 characters
Example: "my_steam_id"
- labelstring
The display name of a custom field in forms.
Max. length: 255 characters
Example: "My Steam ID"
- typestring
A data type used for both input and computing.
Example: "steam_player_id"
GET /custom-fields/{id}
Returns a single custom field of a tournament.
Resource URL
https://api.toornament.com/organizer/v2/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
- idstring
The id of the requested custom field.
Query Parameters
This endpoint does not have any query parameters.
Request Body
This endpoint does not require a request body.
Response
[200] Success
Example
{ "tournament_id": "534138941862841533", "id": "128114939547269789", "target_type": "player", "default_value": "#steam_id", "required": false, "public": false, "position": 5, "options": {}, "machine_name": "my_steam_id", "label": "My Steam ID", "type": "steam_player_id" }
Structure (object)
- tournament_idstring
The id of tournament.
Example: "534138941862841533"
- idstring
The unique identifier of the custom field.
Example: "128114939547269789"
- target_typestring
The entity concerned by the custom field.
Possible values: player, team, team_player
- default_valuemixed|null
A default value (can be array, scalar or null).
Example: #steam_id
- requiredboolean
Whether the custom field is required.
Example: false
- publicboolean
Whether the value of the custom field is public.
Example: false
- positioninteger
The position of the field in forms.
Example: 5
- optionsobject
Options of the custom field.
Example: {}
- machine_namestring
A name used to identify a custom field for computing purposes.
Pattern: ^[a-z0-9_]+$
Max. length: 255 characters
Example: "my_steam_id"
- labelstring
The display name of a custom field in forms.
Max. length: 255 characters
Example: "My Steam ID"
- typestring
A data type used for both input and computing.
Example: "steam_player_id"
PATCH /custom-fields/{id}
Update a single custom field of a tournament.
Resource URL
https://api.toornament.com/organizer/v2/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
- idstring
The id of the requested custom field.
Query Parameters
This endpoint does not 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, "options": {} }
Structure (object)
- labelstring
Optional
The display name of a custom field in forms.
Max. length: 255 characters
Example: "My Steam ID"
- default_valuemixed|null
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 value of the custom field is public.
Example: false
- positioninteger
Optional
The position of the field in forms.
Example: 5
- optionsobject
Optional
Options of the custom field.
Example: {}
Response
[200] Success.
Example
{ "tournament_id": "534138941862841533", "id": "128114939547269789", "target_type": "player", "default_value": "#steam_id", "required": false, "public": false, "position": 5, "options": {}, "machine_name": "my_steam_id", "label": "My Steam ID", "type": "steam_player_id" }
Structure (object)
- tournament_idstring
The id of tournament.
Example: "534138941862841533"
- idstring
The unique identifier of the custom field.
Example: "128114939547269789"
- target_typestring
The entity concerned by the custom field.
Possible values: player, team, team_player
- default_valuemixed|null
A default value (can be array, scalar or null).
Example: #steam_id
- requiredboolean
Whether the custom field is required.
Example: false
- publicboolean
Whether the value of the custom field is public.
Example: false
- positioninteger
The position of the field in forms.
Example: 5
- optionsobject
Options of the custom field.
Example: {}
- machine_namestring
A name used to identify a custom field for computing purposes.
Pattern: ^[a-z0-9_]+$
Max. length: 255 characters
Example: "my_steam_id"
- labelstring
The display name of a custom field in forms.
Max. length: 255 characters
Example: "My Steam ID"
- typestring
A data type used for both input and computing.
Example: "steam_player_id"
DELETE /custom-fields/{id}
Delete a custom field of a tournament.
Resource URL
https://api.toornament.com/organizer/v2/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
- idstring
The id of the requested custom field.
Query Parameters
This endpoint does not have any query parameters.
Request Body
This endpoint does not require a request body.
Response
[204] Success
LegacyGET /tournaments/{tournament_id}/custom-fields
This endpoint is in legacy mode. Access will soon be deprecated. It is therefore advised to use another endpoint when possible.
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
The id of the tournament you want to retrieve data about.
Query Parameters
- target_typestring
The entity affected by the custom fields.
Possible values: player, team, team_player
Example: team
Request Body
This endpoint does not require a request body.
Response
[200] Success
Example
[ { "id": "128114939547269789", "target_type": "player", "default_value": "#steam_id", "required": false, "public": false, "position": 5, "options": {}, "machine_name": "my_steam_id", "label": "My Steam ID", "type": "steam_player_id" } ]
Structure (collection)
- idstring
The unique identifier of the custom field.
Example: "128114939547269789"
- target_typestring
The entity concerned by the custom field.
Possible values: player, team, team_player
- default_valuemixed|null
A default value (can be array, scalar or null).
Example: #steam_id
- requiredboolean
Whether the custom field is required.
Example: false
- publicboolean
Whether the value of the custom field is public.
Example: false
- positioninteger
The position of the field in forms.
Example: 5
- optionsobject
Options of the custom field.
Example: {}
- machine_namestring
A name used to identify a custom field for computing purposes.
Pattern: ^[a-z0-9_]+$
Max. length: 255 characters
Example: "my_steam_id"
- labelstring
The display name of a custom field in forms.
Max. length: 255 characters
Example: "My Steam ID"
- typestring
A data type used for both input and computing.
Example: "steam_player_id"
LegacyPOST /tournaments/{tournament_id}/custom-fields
This endpoint is in legacy mode. Access will soon be deprecated. It is therefore advised to use another endpoint when possible.
Create a new custom field in a tournament. You can not have more than 128 custom fields in 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)
Path parameters
- tournament_idstring
The id of the tournament you want to retrieve data about.
Query Parameters
This endpoint does not 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", "default_value": "#steam_id", "required": false, "public": false, "position": 5, "options": {}, "target_type": "player" }
Structure (object)
- machine_namestring
A name used to identify a custom field for computing purposes.
Pattern: ^[a-z0-9_]+$
Max. length: 255 characters
Example: "my_steam_id"
- labelstring
The display name of a custom field in forms.
Max. length: 255 characters
Example: "My Steam ID"
- typestring
A data type used for both input and computing.
Example: "steam_player_id"
- default_valuemixed|null
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 value of the custom field is public.
Example: false
- positioninteger
Optional
The position of the field in forms.
Example: 5
- optionsobject
Optional
Options of the custom field.
Example: {}
- target_typestring
Optional
The entity concerned by the custom field.
Possible values: player, team, team_player
Response
[201] Success.
Example
{ "id": "128114939547269789", "target_type": "player", "default_value": "#steam_id", "required": false, "public": false, "position": 5, "options": {}, "machine_name": "my_steam_id", "label": "My Steam ID", "type": "steam_player_id" }
Structure (object)
- idstring
The unique identifier of the custom field.
Example: "128114939547269789"
- target_typestring
The entity concerned by the custom field.
Possible values: player, team, team_player
- default_valuemixed|null
A default value (can be array, scalar or null).
Example: #steam_id
- requiredboolean
Whether the custom field is required.
Example: false
- publicboolean
Whether the value of the custom field is public.
Example: false
- positioninteger
The position of the field in forms.
Example: 5
- optionsobject
Options of the custom field.
Example: {}
- machine_namestring
A name used to identify a custom field for computing purposes.
Pattern: ^[a-z0-9_]+$
Max. length: 255 characters
Example: "my_steam_id"
- labelstring
The display name of a custom field in forms.
Max. length: 255 characters
Example: "My Steam ID"
- typestring
A data type used for both input and computing.
Example: "steam_player_id"
LegacyGET /tournaments/{tournament_id}/custom-fields/{id}
This endpoint is in legacy mode. Access will soon be deprecated. It is therefore advised to use another endpoint when possible.
Returns 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
The id of the tournament you want to retrieve data about.
- idstring
The id of the requested custom field.
Query Parameters
This endpoint does not have any query parameters.
Request Body
This endpoint does not require a request body.
Response
[200] Success
Example
{ "id": "128114939547269789", "target_type": "player", "default_value": "#steam_id", "required": false, "public": false, "position": 5, "options": {}, "machine_name": "my_steam_id", "label": "My Steam ID", "type": "steam_player_id" }
Structure (object)
- idstring
The unique identifier of the custom field.
Example: "128114939547269789"
- target_typestring
The entity concerned by the custom field.
Possible values: player, team, team_player
- default_valuemixed|null
A default value (can be array, scalar or null).
Example: #steam_id
- requiredboolean
Whether the custom field is required.
Example: false
- publicboolean
Whether the value of the custom field is public.
Example: false
- positioninteger
The position of the field in forms.
Example: 5
- optionsobject
Options of the custom field.
Example: {}
- machine_namestring
A name used to identify a custom field for computing purposes.
Pattern: ^[a-z0-9_]+$
Max. length: 255 characters
Example: "my_steam_id"
- labelstring
The display name of a custom field in forms.
Max. length: 255 characters
Example: "My Steam ID"
- typestring
A data type used for both input and computing.
Example: "steam_player_id"
LegacyPATCH /tournaments/{tournament_id}/custom-fields/{id}
This endpoint is in legacy mode. Access will soon be deprecated. It is therefore advised to use another endpoint when possible.
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
The id of the tournament you want to retrieve data about.
- idstring
The id of the requested custom field.
Query Parameters
This endpoint does not 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, "options": {} }
Structure (object)
- labelstring
Optional
The display name of a custom field in forms.
Max. length: 255 characters
Example: "My Steam ID"
- default_valuemixed|null
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 value of the custom field is public.
Example: false
- positioninteger
Optional
The position of the field in forms.
Example: 5
- optionsobject
Optional
Options of the custom field.
Example: {}
Response
[200] Success.
Example
{ "id": "128114939547269789", "target_type": "player", "default_value": "#steam_id", "required": false, "public": false, "position": 5, "options": {}, "machine_name": "my_steam_id", "label": "My Steam ID", "type": "steam_player_id" }
Structure (object)
- idstring
The unique identifier of the custom field.
Example: "128114939547269789"
- target_typestring
The entity concerned by the custom field.
Possible values: player, team, team_player
- default_valuemixed|null
A default value (can be array, scalar or null).
Example: #steam_id
- requiredboolean
Whether the custom field is required.
Example: false
- publicboolean
Whether the value of the custom field is public.
Example: false
- positioninteger
The position of the field in forms.
Example: 5
- optionsobject
Options of the custom field.
Example: {}
- machine_namestring
A name used to identify a custom field for computing purposes.
Pattern: ^[a-z0-9_]+$
Max. length: 255 characters
Example: "my_steam_id"
- labelstring
The display name of a custom field in forms.
Max. length: 255 characters
Example: "My Steam ID"
- typestring
A data type used for both input and computing.
Example: "steam_player_id"
LegacyDELETE /tournaments/{tournament_id}/custom-fields/{id}
This endpoint is in legacy mode. Access will soon be deprecated. It is therefore advised to use another endpoint when possible.
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
The id of the tournament you want to retrieve data about.
- idstring
The id of the requested custom field.
Query Parameters
This endpoint does not have any query parameters.
Request Body
This endpoint does not require a request body.