Competition Player Defaults

Request: GET

Returns a list of player defaults for the competition.

HTTP Request

GET /v1/{sport}/competitions/{competitionId}/playerdefaults

Parameters

Parameter Name Value Description
Required Parameters
sport string The sport for which you are making the request
competitionId integer Unique identifier for the competition
Optional Parameters
playerClubId integer Current Club player belongs to in competition
playerTeamId integer Current Team player belongs to in competition
isRookie integer Display only when player is a Rookie in the competition. 1=Yes (Rookie), 0=No.
shirtNumber string Player's current shirt Number in the competition.
playingPosition string Player's current Playing Position in the competition.
useExternalForLeague integer If this value is set to the leagueId for the competition, then the URL parameters playerClubId, playerTeamId and competitionId will instead refer to the externalId fields of the respective entities in that league.

Request Body

Do not supply a request body with this method.

Response

If successful this method returns a list of Competition Player Default resources.

Request: GET

Get the detail about a specific competition player default

HTTP Request

GET /v1/{sport}/competitions/{competitionId}/persons/{personId}/playerdefaults

Parameters

Parameter Name Value Description
Required Parameters
sport string The sport for which you are making the request
competitionId integer The unique identifier for this competition
personId integer The unique identifier for this person
Optional Parameters
useExternalForLeague integer If this value is set to the leagueId for the competition, then the URL parameters personId and competitionId will instead refer to the externalId fields of the respective entities in that league.

Request Body

Do not supply a request body with this method.

Response

If successful this method returns a list of Competition Player Default resources.

Request: POST, Request: PUT

Create a new competition player default. Both the PUT and POST verbs are accepted as the system will handle any creation/editing logic.

Note: Only the fields being sent for the resource will be returned. For a full list of fields, do a detail call as above.

HTTP Request

POST /v1/{sport}/leagues/{leagueId}/playerdefaults

Parameters

Parameter Name Value Description
Required Parameters
sport string The sport for which you are making the request
leagueId integer Unique identifier for the league the competition belongs to.
Optional Parameters
minimumResponse integer If this value is set to 1 then the response resource will only contain minimal fields.
bulk integer Create multiple records.
useExternalForLeague integer If this value is set to the leagueId for the team, then the content of the request body is interpreted differently. See the Request Body section for more information.

Request Body

In the request body supply a Competition Player Default resource. If the bulk parameter is specified a list of resources is expected.

If the useExternalForLeague parameter is specified, then the following fields in the resource will be interpreted as the externalId of the specific entity instead of the unique identifier.

Response

If successful this method returns a Competition Player Default resource. If the bulk parameter is specified it will return a list of resources. Any errors returned are against the specific resource.

Request: DELETE

Delete an existing competition Player Default

HTTP Request

DELETE /v1/{sport}/competitions/{competitionId}/persons/{personId}/playerdefaults

Parameters

Parameter Name Value Description
Required Parameters
sport string The sport for which you are making the request
competitionId integer The unique identifier for this competition
personId integer The unique identifier for this person
Optional Parameters
useExternalForLeague integer If this value is set to the leagueId for the competition, then the URL parameters personId and competitionId will instead refer to the externalId fields of the respective entities in that league.

Request Body

Do not supply a request body with this method.

Response

Successful this method returns SUCCESS.