| Method | POST |
|---|---|
| URI | /orders |
| HTTP Status Code | 201 : 성공 |
| 500 : INSERT 에러 | |
| Request Header | “Authorization” : 로그인할 때 받은 JWT Token (문자열) |
| Request Body | { |
~~items : [{cartItemId : 장바구니 id, bookId : 책 id, quantity : 수량 } JSON 배열]~~,
items : [cartItemId, cartItemId …]
delivery : { address : “주소”, receiver : “이름”, contact : “010-0000-1234” }
totalPrice : 총 금액, totalQuantity : 총 수량, firstBookTitle : “대표 책제목”
} | | Response Body | |
| Method | GET |
|---|---|
| URI | /orders |
| HTTP Status Code | 200 : 성공 |
| 500 : SELECT 에러 | |
| Request Header | “Authorization” : 로그인할 때 받은 JWT Token (문자열) |
| Request Body | |
| Response Body | [ |
{
id : “주문 id”,
created_at : “주문일자”,
address : “주소”,
receiver : “이름”,
contact : “전화번호”
book_title : “대표 책 제목”,
total_price : “총 금액”,
total_count : “총 수량”
},
{
id : “주문 id”,
created_at : “주문일자”,
address : “주소”,
receiver : “이름”,
contact : “전화번호”
book_title : “대표 책 제목”,
total_price : “총 금액”,
total_count : “총 수량”
}
] |
| Method | GET |
|---|---|
| URI | /orders/{orderId} |
| HTTP Status Code | 200 : 성공 |
| 500 : SELECT 에러 | |
| Request Header | “Authorization” : 로그인할 때 받은 JWT Token (문자열) |
| Request Body | |
| Response Body | [ |
{
book_id : “도서 id”,
title : “도서 제목”,
author : “작가명”,
price : “가격”,
quantity : “수량”
},
{
book_id : “도서 id”,
title : “도서 제목”,
author : “작가명”,
price : “가격”,
quantity : “수량”
},
…
] |