---
# System prepended metadata

title: E-Sport Tournament API Specifications

---

# E-Sport Tournament API Specifications

## Endpoints

### Get Tournaments

Returns list of all tournaments.

#### Get Tournaments Request

```plain
POST https://*.zulaoyun.com/zula/Tournament/GetTournaments
```

#### Get Tournaments Response

List of [Tournament](#Tournament)
___

### Get Active Tournaments

Returns list of all active tournaments.

#### Get Active Tournaments Request

```plain
POST https://*.zulaoyun.com/zula/Tournament/GetActiveTournaments
```

#### Get Active Tournaments Response

List of [Tournament](#Tournament)
___

### Get Joinable Teams

Returns list of all joinable teams of selected tournament. Teams which played any teams will not be listed here.

#### Get Joinable Teams Request

```plain
POST https://*.zulaoyun.com/zula/Tournament/GetJoinableTeams
```

##### Get Joinable Teams Request Data

|Name|Type|
|---|---|
|TournamentId|int|

#### Get Joinable Teams Response

List of [TournamentTeamInfoView](#TournamentTeamInfoView)
___

### Get Tournament Statistics

Used for listing all team statistics of the tournament. (ex: Current ranking, top 10 etc.)

#### Get Tournament Statistics Request

```plain
POST https://*.zulaoyun.com/zula/Tournament/GetTournamentStatistics
```

##### Get Tournament Statistics Request Data

|Name|Type|
|---|---|
|TournamentId|int|

### Get Tournament Statistics Response

List of [TournamentTeamMatchStatistic](#TournamentTeamMatchStatistic)
___

### Get Tournament Statistics By TeamId

Used for listing statistics of the team. Can be used for current team status or lookup for join.

#### Get Tournament Statistics By TeamId Request

```plain
POST https://*.zulaoyun.com/zula/Tournament/GetTournamentStatisticsByTeamId
```

##### Get Tournament Statistics By TeamId Request Data

|Name|Type|
|---|---|
|TournamentId|int|
|TeamId|int|

#### Get Tournament Statistics By TeamId Response

[TournamentTeamMatchStatistic](#TournamentTeamMatchStatistic)
___

### Get Tournament Player Statistics

Used for listing all player statistics of the tournament. (ex: Current ranking, top 10 etc.)

#### Get Tournament Player Statistics Request

```plain
POST https://*.zulaoyun.com/zula/Tournament/GetTournamentPlayerStatistics
```

##### Get Tournament Player Statistics Request Data

|Name|Type|
|---|---|
|TournamentId|int|

### Get Tournament Player Statistics Response

[TournamentTeamPlayerStatisticsView](#TournamentTeamPlayerStatisticsView)
___

### Get Tournament Player Statistics By TeamId

Used for listing player statistics of the team. Can be used for current team dashboard.

#### Get Tournament Player Statistics By TeamId Request

```plain
POST https://*.zulaoyun.com/zula/Tournament/GetTournamentPlayerStatisticsByTeamId
```

##### Get Tournament Player Statistics By TeamId Request Data

|Name|Type|
|---|---|
|TournamentId|int|
|TeamId|int|

#### Get Tournament Player Statistics By TeamId Response

[TournamentTeamPlayerStatisticsView](#TournamentTeamPlayerStatisticsView)
___

### Create Team

Called for creting team for the tournament. Requires ticket of the tournament.

#### Create Team Request

```plain
POST https://*.zulaoyun.com/zula/Tournament/Create
```

##### Create Team Request Data

|Name|Type|
|---|---|
|TournamentId|int|
|TeamName|string|
|RequestPermissionType|[ETournamentTeamRequestPermissionType](#ETournamentTeamRequestPermissionType) : int

#### Create Team Response

##### Create Team BadRequest Status Codes

|Value|Name|Description|
|---|---|---|
|23|AccessDenied|Player is not allowed to play (ex: league players are forbidden)|
|16|NotFound|Tournament does not exists|
|17|MaxEndTime|Tournaments has finished|
|59|SmsOptIn|Phone number of the player is not verified|
|26|InsufficientLevel|Level of the player does not match with tournament requirements|
|84|InsufficientElo|Elo level of the player does not match with tournament requirements|
| 8|NoSpaceLeft|Tournament has reached maximum team count|
|24|UserExists|Player is already in the another team at that tournament|
| 3|ModelStateError|Team name forbidden due to censored word|
|67|PaymentRequirementItem|Player does not have any ticket for the tournament|

##### Create Team Ok Response

See [TournamentTeam](#TournamentTeam)
___

### Disband Team

Disbands the team of the player. Gives back ticket to the player. Can not be called after any match is played.

#### Disband Team Request

```plain
POST https://*.zulaoyun.com/zula/Tournament/Disband
```

#### Disband Team Request Data

|Name|Type|
|---|---|
|TeamId|int|

#### Disband Team Response

##### Disband Team BadRequest Status Codes

|Value|Name|Description|
|---|---|---|
| 3|ModelStateError|Player does not exist in the team|
|23|AccessDenied|Player is not captain of the team|
|16|NotFound|Team does not found|
|69|AllReadyCompetitiveMatchPlayed|Team has already played a game. Can not be disbanded|

##### Disband Team Ok Response

Empty response
___

### Invite To Team

Only team captain can call thin endpoints. Used for sending invites to players.

#### Invite To Team Request

```plain
POST https://*.zulaoyun.com/zula/Tournament/Invite
```

##### Invite To Team Request Data

|Name|Type|
|---|---|
|TeamId|int|
|RecipientMemberId|int|

#### Invite To Team Response

##### Invite To Team BadRequest Status Codes

|Value|Name|Description|
|---|---|---|
| 3|ModelStateError|Player does not exist in the team|
|23|AccessDenied|Player is not captain of the team|

##### Invite To Team Ok Response

Empty response
___

### Join Team

Used for requesting to join tournament team. Player joins the team if possible or creates join request for team captain.

#### Join Team Request

```plain
POST https://*.zulaoyun.com/zula/Tournament/Join
```

##### Join Team Request Data

|Name|Type|
|---|---|
|TeamId|int|

#### Join Team Response

##### Join Team BadRequest Status Codes

|Value|Name|Description|
|---|---|---|
| 3|ModelStateError|Team does not exist|
|24|UserExists|Player exists in another team for tournament|
| 8|NoSpaceLeft|Team is full|
|16|NotFound|(Tournament does not exist) OR (Requested team has private RequestPermissionType and player is not invited)|
|59|SmsOptIn|Phone number of the player is not verified|
|26|InsufficientLevel|Level of the player does not match with tournament requirements|
|84|InsufficientElo|Elo level of the player does not match with tournament requirements|

##### Join Team Ok Response Data

- Empty Response: On join request sent to team captain.
- [TournamentTeamPlayer](#TournamentTeamPlayer): On joining to the team.

___

### Reject Invite

Can be called when player receive intive request from team captain.

#### Reject Invite Request

```plain
POST https://*.zulaoyun.com/zula/Tournament/RejectInvite
```

##### Reject Invite Request Data

|Name|Type|
|---|---|
|TeamId|int|

#### Reject Invite Response

##### Reject Invite BadRequest Status Codes

|Value|Name|Description|
|---|---|---|
|16|NotFound|Invite does not exists|

##### Reject Invite Ok Response Data

Empty response
___

### Kick Player

#### Kick Player Request

```plain
POST https://*.zulaoyun.com/zula/Tournament/KickPlayer
```

##### Kick Player Request Data

|Name|Type|Description|
|---|---|---|
|MemberId|int|Member id of the player which will be kicked|
|TeamId|int|

#### Kick Player Response

##### Kick Player BadRequest Status Codes

|Value|Name|Description|
|---|---|---|
| 3|ModelStateError|Requested member id is same as current player|
|16|NotFound|Team or player to be kicked not found|
|23|AccessDenied|Requester is not the team captain|

##### Kick Player Ok Response Data

Empty response
___

### Leave Team

#### Leave Team Request

```plain
POST https://*.zulaoyun.com/zula/Tournament/LeaveTeam
```

##### Leave Team Request Data

|Name|Type|
|---|---|
|TeamId|int|

#### Leave Team Response

##### Leave Team BadRequest Status Codes

|Value|Name|Description|
|---|---|---|
|16|NotFound|Team or player to which will be left not found|

##### Leave Team Ok Response Data

Empty response

___

## Models

### Enums

#### ETournamentTeamRequestPermissionType

|Value|Name|Desciption|
|---|---|---|
|1|Private|Only team leader can invite players|
|2|ViaApplication|Other player can request to join|
|3|Public|Other players can directly join to the team|

#### GameMode

|Value|Name|
|---|---|
|-1|None|
|0|Tdm|
|1|Wanted|
|2|Sabotage|
|3|Coop|
|4|Vampir|
|5|DeadMatch|
|6|CaptureTheFlag|
|7|SnowBall|
|8|Escort|
|9|Elimination|
|10|VIP|
|11|BattleRoyale|
|12|Slap|

### Request Models

#### CreateTournamentTeamRequest

|Name|Type|
|---|---|---|
|TournamentId|int|
|TeamName|string|
|RequestPermissionType|[ETournamentTeamRequestPermissionType](#ETournamentTeamRequestPermissionType) : int|

___

### Response/Entity Models

#### Tournament

|Name|Type|Desciption|
|---|---|---|
|Id|int|
|Name|string|
|Description|string|Description of the tournament|
|CreateDate|DateTime|
|StartDate|DateTime|Tournament playable time start|
|EndDate|DateTime|Tournament playable time end|
|MatchCount|int|Total match count which will be player per team|
|MinimumTeamCount|int|
|MaximumTeamCount|int|
|MinimumEloLevel|int|
|MaximumEloLevel|int|
|MinimumLevel|int|
|MaximumLevel|int|
|IsActive|int|
|PhoneConfirmationNeeded|bool|
|StartDateSeconds|int|Tournament playable time start (Negative if not started)|
|EndDateSeconds|int|Tournament playable time end (Negative if ended)|

#### TournamentTeam

|Name|Type|
|---|---|
|Id|int|
|Name|string|
|TournamentId|int|
|PlayedMatchCount|int|
|CreateDate|DateTime|
|CreateDateSeconds|int|
|IsActive|bool|
|RequestPermissionType|[ETournamentTeamRequestPermissionType](#ETournamentTeamRequestPermissionType) : int|

#### TournamentTeamPlayer

|Name|Type|
|---|---|
|Id|int|
|TournamentId|int|
|TournamentTeamId|int|
|MemberId|int|
|CreateDate|DateTime|
|IsCaptain|bool|

#### TournamentTeamMatchStatistic

|Name|Type|
|---|---|
|Id|int|
|TournamentId|int|
|MatchId|int|
|WinRoundCount|int(nullable)|
|LoseRoundCount|int(nullable)|
|TotalKillCount|int|
|TotalDeathCount|int|
|CreateDate|DateTime|
|GameMode|[GameMode](#GameMode) : int|
|Standing|int(nullable)|

#### TournamentTeamPlayerMatchStatistic

|Name|Type|
|---|---|
|Id|int|
|TournamentId|int|
|MatchId|int|
|TeamId|int|
|WinRoundCount|int|
|LoseRoundCount|int|
|TotalKillCount|int|
|TotalDeathCount|int|
|TotalAssistCount|int|
|CreateDate|Datetime|
|Standing|int(nullable)|

#### TournamentTeamPlayerInfoView

|Name|Type|
|---|---|
|MemberId|int|
|Nickname|string|
|IsCaptain|bool|

#### TournamentTeamInfoView

|Name|Type|Description|
|---|---|---|
|Id|int|Id of the team|
|Name|string|
|CaptainRank|int|
|CurrentPlayerCount|int|
|PlayerCapacity|int|
|RequestPermissionType|[ETournamentTeamRequestPermissionType](#ETournamentTeamRequestPermissionType) : int|
|Players|List of [TournamentTeamPlayerInfoView](#TournamentTeamPlayerInfoView)|

#### TournamentTeamPlayerStatisticDTO

|Name|Type|Description|
|---|---|---|
|PlayerId|int|
|TeamId|int|
|Nickname|int|
|TeamName|string|
|Kill|int|
|Death|int|
|Assist|int|
|KDA|double|(Kill + Assist) / Death|

#### TournamentTeamPlayerStatisticView

|Name|Type|Description|
|---|---|---|
|TournamentId|int|
|LastUpdate|int|Seconds passed after last update|
|Statistic|[TournamentTeamPlayerStatisticDTO](#TournamentTeamPlayerStatisticDTO)|

#### TournamentTeamPlayerStatisticsView

|Name|Type|Description|
|---|---|---|
|TournamentId|int|
|LastUpdate|int|Seconds passed after last update|
|Statistics|List of [TournamentTeamPlayerStatisticDTO](#TournamentTeamPlayerStatisticDTO)|
