URL: /api/player/create
Method: POST
Body:
{
"name": ""s"",
"wallet_id": "string"
}
Responses:
{
"status": "success",
"data": {
"id": "string",
"name": "string",
"wallet_id": "string",
"createdAt": "string",
"updatedAt": "string"
},
"message": "Player created successfully"
}
{
"message": "Player with this wallet_id already exists"
}
{
"error": "Error message"
}
URL: /api/player/point/increment
Method: POST
Body:
{
"wallet_id": "string",
"point": "number"
}
Responses:
{
"status": "success",
"data": {
"id": "string",
"wallet_id": "string",
"total_points": "number",
"createdAt": "string",
"updatedAt": "string"
},
"message": "Point added successfully"
}
{
"message": "Player not found"
}
{
"status": "error",
"message": "Error message"
}
URL: /api/player/point/decrement
Method: POST
Body:
{
"wallet_id": "string",
"point": "number"
}
Responses:
{
"status": "success",
"data": {
"id": "string",
"wallet_id": "string",
"total_points": "number",
"createdAt": "string",
"updatedAt": "string"
},
"message": "Point decremented successfully"
}
{
"message": "Player not found"
}
{
"status": "error",
"message": "Error message"
}
URL: /api/player/kill/increment
Method: POST
Body:
{
"wallet_id": "string",
"kill": "number"
}
Responses:
{
"status": "success",
"data": {
"id": "string",
"wallet_id": "string",
"total_kills": "number",
"createdAt": "string",
"updatedAt": "string"
},
"message": "Kills incremented successfully"
}
{
"message": "Player not found"
}
{
"status": "error",
"message": "Error message"
}
URL: /api/player/dead/increment
Method: POST
Body:
{
"wallet_id": "string",
"death": "number"
}
Responses:
{
"status": "success",
"data": {
"id": "string",
"wallet_id": "string",
"total_deaths": "number",
"createdAt": "string",
"updatedAt": "string"
},
"message": "Death incremented successfully"
}
{
"message": "Player not found"
}
{
"status": "error",
"message": "Error message"
}
URL: /api/player/respawn/increment
Method: POST
Body:
{
"wallet_id": "string",
"respawn": "number"
}
Responses:
{
"status": "success",
"data": {
"id": "string",
"wallet_id": "string",
"total_respawns": "number",
"createdAt": "string",
"updatedAt": "string"
},
"message": "Respawn incremented successfully"
}
{
"message": "Player not found"
}
{
"status": "error",
"message": "Error message"
}
URL: /api/player/points/:wallet_id
Method: GET
Responses:
{
"status": "success",
"data": {
"total_points": "number"
},
"message": "Point fetched successfully"
}
{
"message": "Player not found"
}
{
"status": "error",
"message": "Error message"
}
URL: /api/player/points/top/:limit
Method: GET
Responses:
{
"status": "success",
"data": [
{
"wallet_id": "string",
"total_points": "number"
}
],
"message": "Top players fetched successfully"
}
{
"status": "error",
"message": "Error message"
}
URL: /api/player/kills/:wallet_id
Method: GET
Responses:
{
"status": "success",
"data": {
"total_kills": "number"
},
"message": "Kills fetched successfully"
}
{
"message": "Player not found"
}
{
"status": "error",
"message": "Error message"
}
URL: /api/player/deaths/:wallet_id
Method: GET
Responses:
{
"status": "success",
"data": {
"total_deaths": "number"
},
"message": "Deaths fetched successfully"
}
{
"message": "Player not found"
}
{
"status": "error",
"message": "Error message"
}
URL: /api/player/respawn/:wallet_id
Method: GET
Responses:
{
"status": "success",
"data": {
"total_respawns": "number"
},
"message": "Respawns fetched successfully"
}
{
"message": "Player not found"
}
{
"status": "error",
"message": "Error message"
}
URL: /api/player/referral-link/:wallet_id
Method: GET
Responses:
{
"status": "success",
"data": {
"referralLink": "string"
"referralCode": "string"
},
"message": "Referral link fetched successfully"
}
{
"message": "Player not found"
}
{
"status": "error",
"message": "Error message"
}
URL: /api/player/referral/validate
Method: POST
Body:
{
"new_user_wallet_id": "string",
"referral_code": "string"
}
Responses:
{
"status": "success",
"message": "Referral successful"
}
{
"message": "Player with this wallet_id does not exist"
}
{
"message": "Referral code is required"
}
{
"message": "Invalid referral code"
}
{
"message": "You cannot refer yourself"
}
{
"status": "error",
"message": "Error message"
}
URL: /api/player/check-username/:wallet_id/:username
Method: GET
Responses:
{
"status": "success",
"data": {
"available": true,
"isOwnUsername": false
},
"message": "This username is available"
}
{
"status": "error",
"message": "Error message"
}
URL: /api/player/username/:wallet_id
Method: GET
Responses:
{
"status": "success",
"data": {
"username": "string"
},
"message": "Username retrieved successfully"
}
{
"status": "error",
"message": "string"
}
URL: /api/player/exists/:wallet_id
Method: GET
Responses:
{
"status": "success",
"data": {
"exists": boolean
},
"message": "Player with this wallet exists"
}
{
"status": "error",
"message": "string"
}
URL: /api/player/battle/points/:wallet_id
Method: GET
Responses:
{
"status": "success",
"data": {
"playerBattlePoints": number
},
"message": "Battle Points fetched successfully"
}
{
"status": "error",
"message": "string"
}
URL: /api/player/points/all
Method: GET
Responses:
{
"status": "success",
"data": {
player: string,
wallet: string,
points: number,
clan: string
}[],
"message": "Points fetched successfully"
}
{
"status": "error",
"message": "string"
}
URL: /api/player/event/battle/points/all
Method: GET
Responses:
{
"status": "success",
"data": {
player: string,
wallet: string,
points: number,
clan: string
}[],
"message": "Battle Points fetched successfully"
}
{
"status": "error",
"message": "string"
}
URL: /api/player/christmas/:wallet_id
Method: GET
Responses:
{
"status": "success",
"data": {
"christmasGift": "number"
},
}
{
"message": "Player not found"
}
{
"status": "error",
"message": "Error message"
}
URL: /api/player/christmas/increment
Method: POST
Body:
{
"wallet_id": "string",
"count": "number"
}
Responses:
{
"status": "success",
"data": {
id: string;
name: string;
wallet_id: string;
christmasGift: number;
createdAt: Date;
updatedAt: Date;
},
"message": "gift added successfully"
}
{
"message": "Player not found"
}
{
"status": "error",
"message": "Error message"
}
URL: /api/player/username/update
Method: PUT
Body:
{
"wallet_id": "string",
"new_username": "string"
}
Responses:
{
"status": "success",
"data": {
"id": "string",
"name": "string",
"wallet_id": "string",
"createdAt": "string",
"updatedAt": "string"
},
"message": "Username updated successfully"
}
{
"message": "Username is already taken"
}
{
"message": "Player not found"
}
{
"status": "error",
"message": "Error message"
}
URL: /api/player/bio/update
Method: PUT
Body:
{
"wallet_id": "string",
"bio": "string (max 300 characters)"
}
Responses:
{
"status": "success",
"data": {
"id": "string",
"name": "string",
"wallet_id": "string",
"bio": "string",
"createdAt": "string",
"updatedAt": "string"
},
"message": "Bio updated successfully"
}
{
"message": "Bio must not exceed 300 characters"
}
{
"message": "Player not found"
}
{
"status": "error",
"message": "Error message"
}
URL: /api/player/image
Method: PUT
Body:
{
"wallet_id": "string",
"image": "string (base64)"
}
Responses:
{
"status": "success",
"data": {
"id": "string",
"name": "string",
"wallet_id": "string",
"image": "string",
"createdAt": "string",
"updatedAt": "string"
},
"message": "Image updated successfully"
}
{
"message": "Player not found"
}
{
"status": "error",
"message": "Error message"
}
URL: /api/player/image/:wallet_id
Method: GET
Responses:
{
"status": "success",
"data": {
"image": ["string (base64)"]
}
}
{
"error": "Error message"
}
URL: /api/player/coins/:wallet_id
Method: GET
Responses:
{
"status": "success",
"data": {
"coins": "number"
}
}
{
"error": "Error message"
}
URL: /api/player/coins/leaderboard
Method: GET
Responses:
{
"status": "success",
"data": [
{
"player": "string",
"coins": "number",
"wallet": "string"
}
]
}
{
"error": "Error message"
}
URL: /api/player/coins/add
Method: POST
Body:
{
"wallet_id": "string",
"coins": "number"
}
Responses:
{
"status": "success",
"data": {
"id": "string",
"name": "string",
"wallet_id": "string",
"coins": "number",
"createdAt": "string",
"updatedAt": "string"
},
"message": "Coins added successfully"
}
{
"message": "Player not found"
}
{
"status": "error",
"message": "Error message"
}
URL: /api/player/xp/add
Method: POST
Body:
{
"wallet_id": "string",
"xp": "number"
}
Responses:
{
"status": "success",
"data": {
"xp": "number",
"level": "number",
"xpForNextLevel": "number"
},
"message": "XP added successfully"
}
{
"message": "Player not found"
}
{
"status": "error",
"message": "Error message"
}
URL: /api/player/:wallet_id
Method: GET
Responses:
{
"status": "success",
"data": {
"id": "string",
"name": "string",
"wallet_id": "string",
"createdAt": "string",
"updatedAt": "string"
},
"message": "Player fetched successfully"
}
{
"message": "Player not found"
}
{
"status": "error",
"message": "Error message"
}