Skip to main content

Mission API

The Mission API allows App User to manage the mission centre.

Endpoints

# Endpoints


Get my level bar

This endpoint gets my level bar.

Request

GET /app/mission/level-bar

Response (LevelBarResDTO)

{
"success": true,
"message": "",
"data": {
"userType": 2,
"coin": 400,
"token": 3,
"level": 10,
"nickname": "my pet pet",
"showLevelData": false,
"expPortion": 5400,
"expAll": 9000,
"levels": [
{
"level": 9,
"present": false
}
]
}
}

Get my lesson bar

This endpoint gets my lessom bar.

Request

GET /app/mission/lesson/bar

Response (LessonBarResDTO)

{
"success": true,
"message": "",
"data": {
"message": "再完成1個課程就可以獲得獎勵!",
"bars": [
{
"count": 2,
"exp": 500,
"current": true
}
]
}
}

Filter mission

This endpoint filters the missions.

Request (MissionFilterReqDTO)

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

Response (MissionFilterResDTO)

{
"success": true,
"message": "",
"data": {
"pagination": {
"page": 1,
"size": 10,
"totalItems": 1,
"totalPages": 1
},
"sortings": [],
"items": [
{
"id": "ffb4a540-54a9-11ef-986b-7085c2d96f0d",
"type": 3,
"name": "為1個地點打卡",
"thumbnail": "https://jcci-test-media.aritaone.com/share/mission/8",
"link": 0,
"item": 0,
"all": 1,
"coin": 4,
"exp": 250,
"token": 0,
"buttonStatus": 0,
"order": 0
}
]
}
}

Claim reward

This endpoint claims reward.

Request (RewardMode)

GET /app/mission/{mission_id}/claim?mode={reward_mode}

Response (RewardResDTO)

{
"success": true,
"message": "",
"data": {
"coin": 5,
"exp": 15,
"token": 0,
"level": 6,
"isLevelUp": false
}
}

Get mission reward

This endpoint gets the mission reward.

Request

GET /app/mission/rewards

The data in the response body is not guaranteed. If there are no rewards, data will be null.

Response (MissionRewardResDTO)

{
"success": true,
"message": "",
"data": {
"missionId": "ffb4a540-54a9-11ef-986b-7085c2d96f0d",
"name": "為1個地點打卡",
"coin": 4,
"exp": 250,
"token": 0
}
}

Get mission badges

This endpoint gets the mission badges.

Request

GET /app/mission/badges

Response (MissionBadgeResDTO)

{
"success": true,
"message": "",
"data": {
"dailyBadge": true,
"limitedBadge": true,
"mascotBadge": true,
"mapBadge": false
}
}


Resources

LevelBarResDTO

properties
  • coin
    number
    User's coin.
  • level
    number
    User's level.
  • nickname
    string
    The nickname of the user.
  • showLevelData
    boolean
    It indicates if the level data will be shown or not.
  • expPortion
    number
    The user's experience portion in the current level.
  • expAll
    number
    The total experience needed to reach the next level.
  • levels
    LevelDataResDTO[]
    The level progress bar.

LevelDataResDTO

properties
  • level
    number
    The level.
  • present
    boolean
    It indicates if there is a present in the level. The present is only available for the PIR user.

LessonBarResDTO

properties
  • message
    string
    Message above the bar.
  • bars
    LessonDataResDTO[]
    The progress bar.

LessonDataResDTO

properties
  • count
    number
    The count of the completed lessons.
  • exp
    number
    The gained experience.
  • current
    boolean
    It indicates the user's current progress.

RewardResDTO

properties
  • coin
    number
    The coin earned by the mission.
  • exp
    number
    The experience earned by the mission.
  • token
    number
    The token earned by the mission.
  • level
    number
    The level.
  • isLevelUp
    boolean
    It indicates if the user is leveled up or not.

MissionFilterReqDTO

properties
  • type
    MissionType
    The type of the mission.

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
  • id
    string
    The identifier of the mission.
  • type
    MissionType
    The type of the mission.
  • name
    string
    The name of the mission.
  • thumbnail
    string
    The url of the mission thumbnail.
  • The in-app redirect link of the mission.
  • item
    number
    The proportion of the mission that the user has achieved.
  • all
    number
    The whole portion of the mission progress.
  • coin
    number
    The coin earned by the mission.
  • exp
    number
    The experience earned by the mission.
  • token
    number
    The token earned by the mission.
  • It controls the button of the 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.

MissionRewardResDTO

properties
  • missionId
    string
    The identifier of the mission.
  • name
    string
    The name of the mission.
  • coin
    number
    The coin earned by the mission.
  • exp
    number
    The experience earned by the mission.
  • token
    number
    The token earned by the mission.

MissionBadgeResDTO

properties
  • dailyBadge
    Boolean
    True: 有待領取的每日任務; False: 沒有待領取的每日任務
  • limitedBadge
    Boolean
    True: 有待領取的限定任務; False: 沒有待領取的限定任務
  • mascotBadge
    Boolean
    True: 有待領取的伙伴任務; False: 沒有待領取的伙伴任務
  • mapBadge
    Boolean
    True: 有待領取的打卡任務; False: 沒有待領取的打卡任務


MissionType

NameValue
每日任務0
限定任務1
伙伴任務2
打卡任務3
學習任務4
練習任務5
親友任務6
NameValueWordings
-0-
步行1步行現況
文章2立即閱讀
打卡3查看地圖
伙伴4立即前往
商店5前往商店
寶庫-家具6立即前往
寶庫-服裝7立即前往
問卷8立即前往
通知中心9立即前往
個人資料10立即前往
帳戶資料11立即前往
課程12立即學習
章節13立即前往
功課14我的練習
親友15立即添加
我的進程16立即前往

MissionButtonStatus

NameValue
未達成任務要求0
未達成任務要求(附上連結)1
待領取獎勵2
已領取獎勵3

RewardMode

NameValue
文章0
步行1
打卡2
學習課程3