Skip to content

Review API

hmmini edited this page May 30, 2024 · 3 revisions
  • 작성자: hmmini
  • 작성일: 2024. 04. 03

11. Review

11-1. 등록

POST /reviews

Request Body

속성 타입 설명
customerId long 고객 id
productId long 상품 id
content string 내용
rating integer 등급

Response Body

HTTP 201

속성 타입 설명
reviewId long 리뷰 id
content string 내용
rating integer 등급
createdDate string 생성 시간
updatedDate string 수정 시간
customer object 고객 정보
product object 상품 정보

11-2. 목록 조회

GET /reviews

Query Parameters

속성 타입 설명
content string 내용
rating integer 등급
customerEmail string 고객 이메일
customerName string 고객 이름
customerPhoneNumber string 고객 휴대폰 번호
productName string 상품 이름
page long 페이지 번호
size long 조회 개수
sort string 정렬 속성
direction string 정렬 방향

Response Body

HTTP 200

속성 타입 설명
reviewId long 리뷰 id
content string 내용
rating integer 등급
createdDate string 생성 시간
updatedDate string 수정 시간
customer object 고객 정보
product object 상품 정보

customer: object

속성 타입 설명
customerId long 고객 id
email string 이메일
name string 이름
phoneNumber string 휴대폰 번호
createdDate string 생성 시간
updatedDate string 수정 시간

product: object

속성 타입 설명
productId long 상품 id
name string 상품 이름
description string 설명
price double 가격
stockQuantity Integer 재고
imageUrl string 이미지 url
createdDate string 생성 시간
updatedDate string 수정 시간

11-3. 조회

GET /reviews/{reviewId}

Path Parameters

속성 타입 설명
reviewId long 리뷰 id

Response Body

HTTP 200

속성 타입 설명
reviewId long 리뷰 id
content string 내용
rating integer 등급
createdDate string 생성 시간
updatedDate string 수정 시간
customer object 고객 정보
product object 상품 정보

11-4. 수정

PUT /reviews/{reviewId}

Path Parameters

속성 타입 설명
reviewId long 리뷰 id

Request Body

속성 타입 설명
content string 내용

Response Body

HTTP 200

속성 타입 설명
reviewId long 리뷰 id
content string 내용
rating integer 등급
createdDate string 생성 시간
updatedDate string 수정 시간
customer object 고객 정보
product object 상품 정보

11-5. 삭제

DELETE /reviews/{reviewId}

Path Parameters

속성 타입 설명
reviewId long 리뷰 id

Response

HTTP 204


Clone this wiki locally