Persons

Request: GET

Returns a list of persons that the user has access to.

HTTP Request

GET /v1/{sport}/leagues/{leagueId}/persons
GET /v1/{sport}/clubs/{clubId}/persons
GET /v1/{sport}/teams/{teamId}/persons
GET /v1/{sport}/competitions/{competitionId}/teams/{teamId}/persons
GET /v1/{sport}/competitions/{competitionId}/matches/{matchId}/teams/{teamId}/persons

Parameters

Parameter Name Value Description
Required Parameters
sport string The sport for which you are making the request
Optional Parameters
primaryClubId integer Unique identifier for the primary Club the person belongs to.
primaryTeamId integer Unique identifier for the primary Team the person belongs to.
leagueId integer Unique identifier for the league the person belongs to.
keywords string Display only where the person has the given keyword.
clubId integer Unique ID of a club of which this person is a member.
competitionId integer Unique ID of a competition in which this person is involved.
teamId integer Unique ID of a team of which this person is a member.
isPlayer integer Display only where person was a player in a match. 1=Yes, 0=No.
isTeamOfficial integer Display only where person was a team official in a match. 1=Yes, 0=No.
isCurrent integer Only valid if teamId or clubId is also passed in. By default the person call will return all the people that have been part of the team in the competition (past and current). If this parameter is set to 1 then only the current persons are returned. If matchId, isPlayer or isTeamOfficial is set then this parameter is ignored.

matchId integer Unique ID of a match to get its persons.
In order to be included in the match, a person must have a Person Match Statistics record with periodNumber of 0 and periodType of REGULAR. They can have participated of 0, but this base record must exist.
useExternalForLeague integer If this value is set to the leagueId for the person, then the URL parameters clubId, teamId, competitionId, matchId, primaryClubId, primaryTeamId will instead refer to the externalId of the respective entity in that league.

Request Body

Do not supply a request body with this method.

Response

If successful this method returns a list of Person resources.

Request: GET

Get the detail about a specific person

HTTP Request

GET /v1/{sport}/persons/{personId}

Parameters

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

Request Body

Do not supply a request body with this method.

Response

If successful this method returns a Person resource.

Request: POST

Create a new person

HTTP Request

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

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 person belongs to.
Optional Parameters
minimumResponse integer If this value is set to 1 then the response resource will only contain personId and externalId.
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 Person resource. If the bulk parameter is specified a list of resources is expected.

Response

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

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.

Request: PUT

Update an existing person

HTTP Request

PUT /v1/{sport}/persons/{personId}

Parameters

Parameter Name Value Description
Required Parameters
sport string The sport for which you are making the request
personId integer The unique identifier for this person
Optional Parameters
useExternalForLeague integer If this value is set to the leagueId for the person, then the URL parameter personId will instead refer to the externalId of the person in that league. The content of the request body is also interpreted differently. See the Request Body section for more information.

Request Body

In the request body supply a Person resource.

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 Person resource.

Request: DELETE

Delete an existing person

HTTP Request

DELETE /v1/{sport}/persons/{personId}

Parameters

Parameter Name Value Description
Required Parameters
sport string The sport for which you are making the request
personId integer The unique identifier for this person
Optional Parameters
useExternalForLeague integer If this value is set to the leagueId for the person, then the URL parameter personId will instead refer to the externalId of the person in that league.
confirm integer 0 = Default. FAILURE returned if cascade records found.
1 = override cascades

Affected resources:

Request Body

Do not supply a request body with this method.

Response

If the personId is involved in a COMPLETE match, then the delete will fail.

If no override is flag passed in and the personId is involved in any of the affected resources then the DELETE will fail (returns FAILURE). Successful this method returns SUCCESS.