Skip to main content

Mission API

The Mission API provides ways for the Staff to manage the users' coin, exp and token.

Endpoints

# Endpoints


Adjust user coin

This endpoint adjust user coin.

Request (AdjustUserCoinReqDTO)

POST /web/mission/coin/adjust
{
"userId": "084c69e3-988b-4aef-9604-c784ab61d6c2",
"coin": 20
}

Response

{
"success": true,
"message": "",
"data": null
}

Adjust user exp

This endpoint adjust user exp.

Request (AdjustUserExpReqDTO)

POST /web/mission/exp/adjust
{
"userId": "084c69e3-988b-4aef-9604-c784ab61d6c2",
"exp": 10
}

Response

{
"success": true,
"message": "",
"data": null
}

Filter mission

This endpoint filters the missions.

Request (MissionFilterReqDTO)

POST /web/mission/page
{
"pagination": {
"page": 1,
"size": 10
}
}

Response (MissionFilterResDTO)

{
"success": true,
"message": "",
"data": {
"pagination": {
"page": 1,
"size": 10,
"totalItems": 1,
"totalPages": 1
},
"sortings": [],
"items": [
{
"name": "每日登陸",
"type": "每日",
"coin": 5,
"exp": 0,
"level": 1,
"order": 1
}
]
}
}


Resources

AdjustUserCoinReqDTO

properties
  • userId
    string
    required
    The identifier of a user.
  • coin
    number
    required
    The adjusted amount.

AdjustUserExpReqDTO

properties
  • userId
    string
    required
    The identifier of a user.
  • exp
    number
    required
    The adjusted amount.

MissionFilterReqDTO

properties
  • pagination
    Pagination
    required
    index-1
    Indicates the page information of the resource.
  • sortings
    A list of sorting elements, the order of the list matters.

MissionFilterResDTO

properties
  • pagination
    Pagination
    required
    index-1
    Indicates the page information of the resource.
  • sortings
    A list of sorting elements, the order of the list matters.
  • A list of filtered elements.

MissionItemResDTO

properties
  • name
    string
    The name of the mission.
  • type
    string
    The type of the mission in text.
  • coin
    number
    The coin earned by the mission.
  • exp
    number
    The experience earned by the mission.
  • level
    number
    The level when the user is allowed to accomplish this mission.
  • order
    number
    The order of the mission. Please note that it is used by the backend only and may be removed in the future. Therefore, the frontend should not use this field.