API
| 메서드 | URL |
|---|---|
| GET | [http://127.0.0.1:8000/r](http://127.0.0.1:8000/user/buyer/signin/)eviews/list/ |
Request
| 필드명 | 설명 |
|---|---|
| Content-type | Content-type: application/json |
| 필드명 | 데이터 타입 | 설명 | 필수 여부 |
|---|---|---|---|
| product_id | String |
상품 id | O |
Response
| 필드명 | 데이터 타입 | 설명 | 상태코드 |
|---|---|---|---|
| 200 |
| 필드명 | 데이터 타입 | 설명 | 상태코드 |
|---|---|---|---|
| error | String |
에러 메세지 | 400 |
| error | String |
(상품id가 없는 경우) | |
| 상품이 존재하지 않습니다. | 404 |
API
| 메서드 | URL |
|---|---|
| POST | [http://127.0.0.1:8000/r](http://127.0.0.1:8000/user/buyer/signin/)eviews/write/ |
Request
| 필드명 | 설명 |
|---|---|
| Content-type | Content-type: application/json |
| Authorization | Token ${로그인 시 발행한 토큰 키 값} |
| 필드명 | 데이터 타입 | 설명 | 필수 여부 |
|---|---|---|---|
| product_id | String |
상품 id | O |
| desc | String | 내용, 최대 200자 | O |
| score | Float | 평점 | O |
Response
| 필드명 | 데이터 타입 | 설명 | 상태코드 |
|---|---|---|---|
| message | String |
리뷰가 등록되었습니다. | 201 |
| 필드명 | 데이터 타입 | 설명 | 상태코드 |
|---|---|---|---|
| error | String |
에러 메세지 | 400 |
| error | String |
(상품 구매자가 아닐 경우) | |
| 상품 구매자만 답변할 수 있습니다. | 403 | ||
| error | String |
(토큰이 없는 경우) | |
| 로그인한 유저만 작성 가능합니다. | 403 |
API
| 메서드 | URL |
|---|---|
| PATCH | http://127.0.0.1:8000/products/register/ |
Request
| 필드명 | 설명 |
|---|---|
| Content-type | Content-type: application/json |
| Authorization | Token ${로그인 시 발행한 토큰 키 값} |
| 필드명 | 데이터 타입 | 설명 | 필수 여부 |
|---|---|---|---|
| product_id | String |
상품 id | X |
| desc | String | 내용, 최대 200자 | X |
| score | Float | 평점 | X |
Response
| 필드명 | 데이터 타입 | 설명 | 상태코드 |
|---|---|---|---|
| message | String |
리뷰가 수정되었습니다. | 200 |
| 필드명 | 데이터 타입 | 설명 | 상태코드 |
|---|---|---|---|
| error | String |
에러 메세지 | 400 |
| error | String |
(리뷰 작성자가 아닐 경우) | |
| 리뷰 수정 권한이 없습니다. | 403 | ||
| error | String |
(리뷰 id가 없을 경우) | |
| 존재하지 않는 리뷰입니다. | 404 |
API
| 메서드 | URL |
|---|---|
| DELETE | http://127.0.0.1:8000/products/register/ |
Request
Response