#9c44c
Back
2026/01/27
7 min read

查詢任務詳情 API

查詢任務詳情 API.md
422 additions, 0 deletions
... ... @@ -1 +1,423 @@
1 +## 版本紀錄
2 +| 版本 | 說明 | 日期 | 異動者 |
3 +| ---| ---| ---| --- |
4 +| 1.0 | 初版 | 2026/01/27 | Hanna |
5 +
6 +* * *
7 +## 說明
8 +* 服務名稱:查詢任務詳情 API。
9 +* Reference Table:
10 +* Reference Redis:
11 +* Request / Response 是否加密:
12 +* 邏輯說明:
13 +
14 +### Endpoint by environment
15 +* sit: [https://smr.cathaybkdev.com.tw:8082/zuul/](https://smr.cathaybkdev.com.tw:8082/zuul/) mobile-device-service
16 +* uat: [https://tmr.cathaybkdev.com.tw:8082/zuul/](https://tmr.cathaybkdev.com.tw:8082/zuul/) mobile-device-service
17 +* prod: [https://myrewards-app.com.tw:8082/zuul/](https://myrewards-app.com.tw:8082/zuul/) mobile-device-service
18 +## HTTP REQUEST
19 +
20 +```powershell
21 +curl GET {EndPoint}/mds/mbps/mission/detail?id=FOOBAR123
22 +```
23 +
24 +| Header | Description |
25 +| ---| --- |
26 +| Content-Type | application/json |
27 +
28 +### REQUEST HEADER
29 +
30 +| Level | Key | Data type | Required | Field name | Description / Example |
31 +| ---| ---| ---| ---| ---| --- |
32 +| 1 | X-Auth-Token | String | true | session token | ex. Gy6u-SIDe7N3zCrPqaG0YcJ+.a5b00e2c-3334-3acd-9c37 |
33 +
34 +## URL PARAMETER
35 +
36 +| Level | Key | Data type | Required | Field name | Description / Example |
37 +| ---| ---| ---| ---| ---| --- |
38 +| 1 | id | String | true | 任務 ID | FOOBAR123 |
39 +
40 +### RESPONSE BODY
41 +
42 +| Level | Parameters | Data type | Required field | Field name | Description / example |
43 +| ---| ---| ---| ---| ---| --- |
44 +| 1 | success | Boolean | true | 是否成功 | |
45 +| 1 | errorCode | String | true | 錯誤代碼 | |
46 +| 1 | message | String | true | 錯誤訊息 | |
47 +| 1 | values | JsonObject | true | 成功 response 內容 | |
48 +| 2 | id | String | true | 任務 ID | FOOBAR123 |
49 +| 2 | name | String | true | 任務名稱 | 1212限定I甜蜜共享 |
50 +| 2 | detail | String | true | 任務指南 | 至花點專區,兌換並核銷指定星巴克票券2張,即可獲得小樹點(生活)30點。 |
51 +| 2 | category | String | true | 任務類型 | `ASSIGNED` : 指定型`MILESTONE` : 多門檻型`SEQUENTIAL` : 關聯型 |
52 +| 2 | status | String | true | 任務狀態 | `UNSTARTED` : 尚未開始<br>`STARTED` : 未達標<br>`UNREDEEMED` : 已達標未領獎<br>`REDEEMED` : 已領獎<br>`FULL` : 已額滿<br>`OVERDUE` : 已逾期 |
53 +| 2 | progress | String | true | 任務完成進度 | "0.65" |
54 +| 2 | remainingTime | Integer | true | 任務剩餘時間(秒) | 259200 |
55 +| 2 | remainingQuota | Integer | true | 任務剩餘名額 | 1000 |
56 +| 2 | quota | Integer | true | 任務限制名額 | 1000 |
57 +| 2 | startDate | String | true | 任務開始時間 | ISO8601 格式2026-01-01T00:00:00+08:00 |
58 +| 2 | endDate | String | true | 任務截止時間 | ISO8601 格式<br>2026-12-31T23:59:59+08:00 |
59 +| 2 | awardType | String | true | 獎項類型 | `POINT` : 小樹點<br>`VOUCHER` : 票券 |
60 +| 2 | awardContent | String | true | 獎項內容 | 星巴克拿鐵票券乙張<br>30 |
61 +| 2 | terms | String | true | 任務活動條款 | <ol><li>各項任務採限額限量制,每人限得獎乙次,不可重複獲獎</li><li>得獎者將於收到系統通知後入點,查看入點狀況請至「首頁小樹點牌卡」</li></ol> |
62 +| 2 | shareable | Boolean | true | 該任務是否可分享 | true |
63 +| 2 | subtasks | Array<Subtask> | true | 子任務列表 | 請參考下方 **Subtask** 區塊 |
64 +
65 +## Subtask
66 +
67 +| Level | Parameters | Data type | Required field | Field name | Description / example |
68 +| ---| ---| ---| ---| ---| --- |
69 +| 3 | id | String | true | 子任務 ID | S001 |
70 +| 3 | name | String | true | 子任務名稱 | 兌換星巴克美式票券2張 |
71 +| 3 | targetCount | Integer | true | 總目標數 | 5 |
72 +| 3 | completedCount | Integer | true | 已完成目標數 | 1 |
73 +| 3 | isCTAVisible | Boolean | true | 是否顯示 CTA | true |
74 +| 3 | ctaContent | String | true | CTA 文案(按鈕文案) | 立即前往 |
75 +| 3 | ctaLink | String | true | CTA 連結 | mmo://CouponList?tab=exchange&voucherType=C&storeName=肯德基 |
76 +| 3 | awardType | String | false | 子任務獎項類型 | 除指定型任務以外會回傳<br>`POINT` : 小樹點<br>`VOUCHER` : 票券 |
77 +| 3 | awardContent | String | false | 子任務獎項內容 | 除指定型任務以外會回傳<br>星巴克拿鐵票券乙張<br>30 |
78 +| 3 | awardRedeemed | Boolean | true | 子任務是否已領獎 | false |
79 +
80 +## RESPONSE BODY - json format
81 +
82 +* 任務明細(尚未開始)
83 +
84 + ```json
85 + {
86 + "success": true,
87 + "errorCode": null,
88 + "message": null,
89 + "values": {
90 + "id": "FOOBAR123",
91 + "name": "1212限定I成雙成對甜蜜共享",
92 + "detail": "兌換專區內指定任兩張票券,即可獲得小樹點(生活) 30 點",
93 + "category": "ASSIGNED",
94 + "status": "UNSTARTED",
95 + "progress": "0.00",
96 + "remainingTime": 2592000,
97 + "remainingQuota": 1000,
98 + "quota": 1000,
99 + "startDate": "2026-08-01T00:00:00+0800",
100 + "endDate": "2026-12-31T23:59:59+0800",
101 + "awardType": "POINT",
102 + "awardContent": "30",
103 + "terms": "<ol><li>各項任務採限額限量制,每人限得獎乙次,不可重複獲獎</li><li>得獎者將於收到系統通知後入點,查看入點狀況請至「首頁小樹點牌卡」</li></ol>",
104 + "shareable": true,
105 + "subtasks": [
106 + {
107 + "id": "SUB001",
108 + "name": "兌換星巴克票券1張",
109 + "targetCount": 1,
110 + "completedCount": 0,
111 + "isCTAVisible": true,
112 + "ctaContent": "前往兌換",
113 + "ctaLink": "mmo://BrandProducts?productType=eCoupon&brandCode=Starbucks",
114 + "awardType": null,
115 + "awardContent": null,
116 + "awardRedeemed": false
117 + },
118 + {
119 + "id": "SUB002",
120 + "name": "兌換 KFC 票券1張",
121 + "targetCount": 1,
122 + "completedCount": 0,
123 + "isCTAVisible": true,
124 + "ctaContent": "前往兌換",
125 + "ctaLink": "mmo://BrandProducts?productType=eCoupon&brandCode=KFC",
126 + "awardType": null,
127 + "awardContent": null,
128 + "awardRedeemed": false
129 + }
130 + ]
131 + }
132 + }
133 + ```
134 +
135 +
136 +* 任務明細(已開始,尚未達標)
137 +
138 + ```json
139 + {
140 + "success": true,
141 + "errorCode": null,
142 + "message": null,
143 + "values": {
144 + "id": "FOOBAR123",
145 + "name": "1212限定I成雙成對甜蜜共享",
146 + "detail": "兌換專區內指定任兩張票券,即可獲得星巴克拿鐵票券乙張",
147 + "category": "ASSIGNED",
148 + "status": "STARTED",
149 + "progress": "0.50",
150 + "remainingTime": 2592000,
151 + "remainingQuota": 88,
152 + "quota": 1000,
153 + "startDate": "2026-01-01T00:00:00+0800",
154 + "endDate": "2026-10-31T23:59:59+0800",
155 + "awardType": "VOUCHER",
156 + "awardContent": "星巴克拿鐵票券乙張",
157 + "terms": "<ol><li>各項任務採限額限量制,每人限得獎乙次,不可重複獲獎</li><li>得獎者將於收到系統通知後入券,查看入券狀況請至「我的票券」</li></ol>",
158 + "shareable": true,
159 + "subtasks": [
160 + {
161 + "id": "SUB001",
162 + "name": "兌換星巴克票券1張",
163 + "targetCount": 1,
164 + "completedCount": 0,
165 + "isCTAVisible": true,
166 + "ctaContent": "前往兌換",
167 + "ctaLink": "mmo://BrandProducts?productType=eCoupon&brandCode=Starbucks",
168 + "awardType": null,
169 + "awardContent": null,
170 + "awardRedeemed": false
171 + },
172 + {
173 + "id": "SUB002",
174 + "name": "兌換 KFC 票券1張",
175 + "targetCount": 1,
176 + "completedCount": 1,
177 + "isCTAVisible": true,
178 + "ctaContent": "前往兌換",
179 + "ctaLink": "mmo://BrandProducts?productType=eCoupon&brandCode=KFC",
180 + "awardType": null,
181 + "awardContent": null,
182 + "awardRedeemed": false
183 + }
184 + ]
185 + }
186 + }
187 + ```
188 +
189 +
190 +* 任務明細(已達標,尚未領獎)
191 +
192 + ```json
193 + {
194 + "success": true,
195 + "errorCode": null,
196 + "message": null,
197 + "values": {
198 + "id": "FOOBAR123",
199 + "name": "1212限定I成雙成對甜蜜共享",
200 + "detail": "兌換專區內指定任兩張票券,即可獲得星巴克拿鐵票券乙張",
201 + "category": "ASSIGNED",
202 + "status": "UNREDEEMED",
203 + "progress": "1.00",
204 + "remainingTime": 2592000,
205 + "remainingQuota": 88,
206 + "quota": 1000,
207 + "startDate": "2026-01-01T00:00:00+0800",
208 + "endDate": "2026-10-31T23:59:59+0800",
209 + "awardType": "VOUCHER",
210 + "awardContent": "星巴克拿鐵票券乙張",
211 + "terms": "<ol><li>各項任務採限額限量制,每人限得獎乙次,不可重複獲獎</li><li>得獎者將於收到系統通知後入券,查看入券狀況請至「我的票券」</li></ol>",
212 + "shareable": true,
213 + "subtasks": [
214 + {
215 + "id": "SUB001",
216 + "name": "兌換星巴克票券1張",
217 + "targetCount": 1,
218 + "completedCount": 1,
219 + "isCTAVisible": true,
220 + "ctaContent": "前往兌換",
221 + "ctaLink": "mmo://BrandProducts?productType=eCoupon&brandCode=Starbucks",
222 + "awardType": null,
223 + "awardContent": null,
224 + "awardRedeemed": false
225 + },
226 + {
227 + "id": "SUB002",
228 + "name": "兌換 KFC 票券1張",
229 + "targetCount": 1,
230 + "completedCount": 1,
231 + "isCTAVisible": true,
232 + "ctaContent": "前往兌換",
233 + "ctaLink": "mmo://BrandProducts?productType=eCoupon&brandCode=KFC",
234 + "awardType": null,
235 + "awardContent": null,
236 + "awardRedeemed": false
237 + }
238 + ]
239 + }
240 + }
241 + ```
242 +
243 +
244 +* 任務明細(已領獎)
245 +
246 + ```json
247 + {
248 + "success": true,
249 + "errorCode": null,
250 + "message": null,
251 + "values": {
252 + "id": "FOOBAR123",
253 + "name": "1212限定I成雙成對甜蜜共享",
254 + "detail": "兌換專區內指定任兩張票券,即可獲得星巴克拿鐵票券乙張",
255 + "category": "ASSIGNED",
256 + "status": "REDEEMED",
257 + "progress": "1.00",
258 + "remainingTime": 2592000,
259 + "remainingQuota": 88,
260 + "quota": 1000,
261 + "startDate": "2026-01-01T00:00:00+0800",
262 + "endDate": "2026-10-31T23:59:59+0800",
263 + "awardType": "VOUCHER",
264 + "awardContent": "星巴克拿鐵票券乙張",
265 + "terms": "<ol><li>各項任務採限額限量制,每人限得獎乙次,不可重複獲獎</li><li>得獎者將於收到系統通知後入券,查看入券狀況請至「我的票券」</li></ol>",
266 + "shareable": true,
267 + "subtasks": [
268 + {
269 + "id": "SUB001",
270 + "name": "兌換星巴克票券1張",
271 + "targetCount": 1,
272 + "completedCount": 1,
273 + "isCTAVisible": true,
274 + "ctaContent": "前往兌換",
275 + "ctaLink": "mmo://BrandProducts?productType=eCoupon&brandCode=Starbucks",
276 + "awardType": null,
277 + "awardContent": null,
278 + "awardRedeemed": false
279 + },
280 + {
281 + "id": "SUB002",
282 + "name": "兌換 KFC 票券1張",
283 + "targetCount": 1,
284 + "completedCount": 1,
285 + "isCTAVisible": true,
286 + "ctaContent": "前往兌換",
287 + "ctaLink": "mmo://BrandProducts?productType=eCoupon&brandCode=KFC",
288 + "awardType": null,
289 + "awardContent": null,
290 + "awardRedeemed": false
291 + }
292 + ]
293 + }
294 + }
295 + ```
296 +
297 +
298 +* 任務明細(已額滿)
299 +
300 + ```json
301 + {
302 + "success": true,
303 + "errorCode": null,
304 + "message": null,
305 + "values": {
306 + "id": "FOOBAR123",
307 + "name": "1212限定I成雙成對甜蜜共享",
308 + "detail": "兌換專區內指定任兩張票券,即可獲得星巴克拿鐵票券乙張",
309 + "category": "ASSIGNED",
310 + "status": "FULL",
311 + "progress": "1.00",
312 + "remainingTime": 2592000,
313 + "remainingQuota": 0,
314 + "quota": 1000,
315 + "startDate": "2026-01-01T00:00:00+0800",
316 + "endDate": "2026-10-31T23:59:59+0800",
317 + "awardType": "VOUCHER",
318 + "awardContent": "星巴克拿鐵票券乙張",
319 + "terms": "<ol><li>各項任務採限額限量制,每人限得獎乙次,不可重複獲獎</li><li>得獎者將於收到系統通知後入券,查看入券狀況請至「我的票券」</li></ol>",
320 + "shareable": true,
321 + "subtasks": [
322 + {
323 + "id": "SUB001",
324 + "name": "兌換星巴克票券1張",
325 + "targetCount": 1,
326 + "completedCount": 1,
327 + "isCTAVisible": true,
328 + "ctaContent": "前往兌換",
329 + "ctaLink": "mmo://BrandProducts?productType=eCoupon&brandCode=Starbucks",
330 + "awardType": null,
331 + "awardContent": null,
332 + "awardRedeemed": false
333 + },
334 + {
335 + "id": "SUB002",
336 + "name": "兌換 KFC 票券1張",
337 + "targetCount": 1,
338 + "completedCount": 1,
339 + "isCTAVisible": true,
340 + "ctaContent": "前往兌換",
341 + "ctaLink": "mmo://BrandProducts?productType=eCoupon&brandCode=KFC",
342 + "awardType": null,
343 + "awardContent": null,
344 + "awardRedeemed": false
345 + }
346 + ]
347 + }
348 + }
349 + ```
350 +
351 +
352 +* 任務明細(已逾期)
353 +
354 + ```json
355 + {
356 + "success": true,
357 + "errorCode": null,
358 + "message": null,
359 + "values": {
360 + "id": "FOOBAR123",
361 + "name": "1212限定I成雙成對甜蜜共享",
362 + "detail": "兌換專區內指定任兩張票券,即可獲得星巴克拿鐵票券乙張",
363 + "category": "ASSIGNED",
364 + "status": "OVERDUE",
365 + "progress": "0.50",
366 + "remainingTime": 0,
367 + "remainingQuota": 100,
368 + "quota": 1000,
369 + "startDate": "2026-01-01T00:00:00+0800",
370 + "endDate": "2026-01-31T23:59:59+0800",
371 + "awardType": "VOUCHER",
372 + "awardContent": "星巴克拿鐵票券乙張",
373 + "terms": "<ol><li>各項任務採限額限量制,每人限得獎乙次,不可重複獲獎</li><li>得獎者將於收到系統通知後入券,查看入券狀況請至「我的票券」</li></ol>",
374 + "shareable": true,
375 + "subtasks": [
376 + {
377 + "id": "SUB001",
378 + "name": "兌換星巴克票券1張",
379 + "targetCount": 1,
380 + "completedCount": 0,
381 + "isCTAVisible": true,
382 + "ctaContent": "前往兌換",
383 + "ctaLink": "mmo://BrandProducts?productType=eCoupon&brandCode=Starbucks",
384 + "awardType": null,
385 + "awardContent": null,
386 + "awardRedeemed": false
387 + },
388 + {
389 + "id": "SUB002",
390 + "name": "兌換 KFC 票券1張",
391 + "targetCount": 1,
392 + "completedCount": 1,
393 + "isCTAVisible": true,
394 + "ctaContent": "前往兌換",
395 + "ctaLink": "mmo://BrandProducts?productType=eCoupon&brandCode=KFC",
396 + "awardType": null,
397 + "awardContent": null,
398 + "awardRedeemed": false
399 + }
400 + ]
401 + }
402 + }
403 + ```
404 +
405 +
406 +* API 錯誤
407 +
408 + ```cs
409 + {
410 + "success": false,
411 + "errorCode": {error_code},
412 + "message": {error_message},
413 + "values": null
414 + }
415 + ```
416 +
417 +
418 +| B2E內部錯誤訊息 | B2E錯誤代碼 | App錯誤訊息 | App錯誤代碼 |
419 +| ---| ---| ---| --- |
420 +| 已下架/超過下架時間/未到上架時間/沒有該任務ID | | 目前無法查看此任務 | |
421 +| 身分不符(非封測人員) | | | |
422 +| | | | |