API
| 메서드 | URL |
|---|---|
| GET | [http://127.0.0.1:8000/](http://127.0.0.1:8000/user/buyer/signin/)carts/list/ |
Request
| 필드명 | 설명 |
|---|---|
| Content-type | Content-type: application/json |
| Authorization | Token ${로그인 시 발행한 토큰 키 값} |
Response
| 필드명 | 데이터 타입 | 설명 | 상태코드 |
|---|---|---|---|
| 필드명 | 데이터 타입 | 설명 | 상태코드 |
|---|---|---|---|
| error | String |
에러 메세지 | 400 |
API
| 메서드 | URL |
|---|---|
| POST | [http://127.0.0.1:8000/c](http://127.0.0.1:8000/user/buyer/signin/)arts/add/ |
Request
| 필드명 | 설명 |
|---|---|
| Content-type | Content-type: application/json |
| Authorization | Token ${로그인 시 발행한 토큰 키 값} |
| 필드명 | 데이터 타입 | 설명 | 필수 |
|---|---|---|---|
| product_id | String |
외래키, 상품id | O |
| amount | Int | 기본값 1 | O |
Response
| 필드명 | 데이터 타입 | 설명 | 상태코드 |
|---|---|---|---|
| message | String |
장바구니에 상품을 추가하였습니다. | 201 |
| 필드명 | 데이터 타입 | 설명 | 상태코드 |
|---|---|---|---|
| error | String |
에러 메세지 | 400 |
| error | String |
(상품id가 없을 경우) | |
| 존재하지 않는 상품입니다. | 404 |
API
| 메서드 | URL |
|---|---|
| PATCH | [http://127.0.0.1:8000/c](http://127.0.0.1:8000/user/buyer/signin/)arts/update/ |
Request
| 필드명 | 설명 |
|---|---|
| Content-type | Content-type: application/json |
| Authorization | Token ${로그인 시 발행한 토큰 키 값} |
| 필드명 | 데이터 타입 | 설명 | 필수 |
|---|---|---|---|
| cart_id | String |
장바구니 id | O |
| amount | Int | 수량 | X |
Response
| 필드명 | 데이터 타입 | 설명 | 상태코드 |
|---|---|---|---|
| - | - | - | 200 |
| 필드명 | 데이터 타입 | 설명 | 상태코드 |
|---|---|---|---|
| error | String |
에러 메세지 | 400 |
API
| 메서드 | URL |
|---|---|
| DELETE | [http://127.0.0.1:8000/](http://127.0.0.1:8000/user/buyer/signin/)carts/delete/ |
Request
| 필드명 | 설명 |
|---|---|
| Content-type | Content-type: application/json |
| Authorization | Token ${로그인 시 발행한 토큰 키 값} |
| 필드명 | 데이터 타입 | 설명 | 필수 |
|---|---|---|---|
| cart_id | String |
장바구니 id | O |
Response