---
# System prepended metadata

title: "\U0001F3C5 Day 40 - 訂單 API"
tags: [JS 直播班 - 2023 秋季班]

---

---
tags: JS 直播班 - 2023 秋季班
---
# 🏅 Day 40 - 訂單 API

問題
---
延續 [Day 39 的每日任務](https://hackmd.io/7H8eIu1dStOUXEXmGcB4Tw)，串接「送出購買訂單」API（如圖），練習實作「送出訂單」的功能
> 使用此 [CodePen 模板](https://codepen.io/hexschool/pen/gOKLvKB) 

![](https://i.imgur.com/2jS2AOM.png)

送出的訂單可以到 [API 文件](https://hexschool.github.io/hexschoolliveswagger/) 點選【Try it out】 檢查是否有成功送出（需點擊右方的鑰匙 icon，輸入你的 UID 解鎖才能使用）。

![](https://i.imgur.com/D3Wg5Ty.png)


> 進階：可以試著使用 Validate.js 練習做表單驗證，驗證成功才送出訂單，如下圖：
> 
> ![](https://i.imgur.com/Z9iKB7P.png)




## 回報流程

將答案寫在 CodePen 並複製 CodePen 連結貼至底下回報就算完成了喔! 
解答位置請參考下圖（需打開程式碼的部分觀看）

![](https://i.imgur.com/vftL5i0.png)

<!-- 解答：  

請記得填入自己的 API 名稱
https://codepen.io/hexschool/pen/dyKOdQm?editors=1010
-->




回報區
---


|   Discord    |                    CodePen / 答案                      |
|:----------:|:-------------------------------------------------------:|
| lychee_kk |[CodePen](https://codepen.io/kakakala/pen/BaMqmwP)|
| Chia Pin |[CodePen](https://codepen.io/joker-cat/pen/jOdeYwW)|
| pinyi_9 |[CodePen](https://codepen.io/Wpypy/pen/RwveZBm?editors=1111)|
| kawa |[CodePen](https://codepen.io/z83xji6/pen/WNPaMMX?editors=0010)|
| Uli |[CodePen](https://codepen.io/uli1313/pen/MWLqRJp?editors=1011)|
| 楓仔 |[CodePen](https://codepen.io/maplestartend/pen/poGxrKR?editors=1010)|
|Moreene|[CodePen](https://codepen.io/Moreene/pen/YzBJrqK)|
|celinelinnn|[CodePen](https://codepen.io/celinephoebe/pen/zYemWQo)|
|Alyce|[CodePen](https://codepen.io/alycehwy/pen/RwveEMd?editors=0010)|
| bf_tsai |[CodePen](https://codepen.io/BF-Tsai/pen/abXRgaZ)|
| Celine 510 |[CodePen](https://codepen.io/Celine-510/pen/qBgQBdd)|
| kuanju27 |[CodePen](https://codepen.io/Eero-Chiao/pen/abXRezJ)|
| jamesli_92837 |[CodePen](https://codepen.io/kfovdlln-the-reactor/pen/poGQoWY?editors=0011)|
| ⭐️小正 |[CodePen](https://codepen.io/colorgolden/pen/jOdvdde?editors=1011)|
| Rogan |[CodePen](https://codepen.io/RoganHsu/pen/OJdaWqo?editors=1011)|
| skypassion5000 |[CodePen](https://codepen.io/skypassion5000/pen/WNPYpdb?editors=1111)|
| yu.t_liu |[CodePen](https://codepen.io/YuT200053/pen/VwgVYOg?editors=1010)|
| xin |[CodePen](https://codepen.io/Estherrrrrr999/pen/xxMJyRx)|
| dora |[CodePen](https://codepen.io/dorayu/pen/BaMqrQx?editors=1011)|
| ann6212 |[CodePen](https://codepen.io/yqmegupa-the-styleful/pen/zYemMEG?editors=1011)|
| Ataraxia |[CodePen](https://codepen.io/ataraxia8888/pen/NWoyBVy)|
| 奔跑吧(GTR150) |[CodePen](https://codepen.io/Wer-Qwe/pen/mdvaWXG?editors=1011)|
| ann6212 |[CodePen](https://codepen.io/yqmegupa-the-styleful/pen/zYemMEG)|
| Ching |[CodePen]([xxx](https://codepen.io/tzuchingg/pen/RwvvOWp))|
| runweiting |[CodePen](https://codepen.io/weiting14/pen/NWooyMx)|
| 小夏 |[CodePen](https://codepen.io/michaelhsia/pen/YzBBmPG)|
| Oria |[CodePen](https://codepen.io/kajing/pen/wvNOzLR?editors=0011)|
| Yijing |[CodePen](https://codepen.io/Yi-Jing-71080635/pen/VwgNZEB)|
| 歐陽龍龍#1061 |[CodePen](https://codepen.io/dizzydog-rgb/pen/VwRwLRe)|
| Daylily |[CodePen](https://codepen.io/daylily/pen/vYPmLKe)|
<!--
| xxx |[CodePen](xxx)|
-->

