Returns a list of persons that the user has access to.
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
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. |
Do not supply a request body with this method.
If successful this method returns a list of Person resources.
Get the detail about a specific person
GET /v1/{sport}/persons/{personId}
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. |
Do not supply a request body with this method.
If successful this method returns a Person resource.
Create a new person
POST /v1/{sport}/leagues/{leagueId}/persons
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. |
In the request body supply a Person resource. If the bulk
parameter is specified a list of resources is expected.
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.
primaryTeamId
primaryClubId
Update an existing person
PUT /v1/{sport}/persons/{personId}
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. |
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.
primaryTeamId
primaryClubId
If successful this method returns a Person resource.
Delete an existing person
DELETE /v1/{sport}/persons/{personId}
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: |
Do not supply a request body with this method.
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.