공통 사항
도메인
| 환경 | 도메인 주소 |
|---|---|
개발서버 |
|
운영서버 |
- |
Http Status
| Code | 메시지 | 설명 |
|---|---|---|
200 |
OK |
Api 호출 성공 |
400 |
Bad request |
잘못된 요청 |
403 |
Forbidden |
권한 없음 |
500 |
Internal Server Error |
서버 오류 |
홈화면 상품 조회
Http
GET /product/v1/home/products HTTP/1.1
Host: localhost:8080
Response
| 필드명 | 타입 | 필수값 | 양식 | 설명 |
|---|---|---|---|---|
success |
Boolean |
true |
요청 성공 여부 |
|
data |
Object |
true |
응답 데이터 |
|
data.hotNew |
Array |
true |
화제의 신간 |
|
data.hotNew[].id |
Number |
true |
상품 고유번호 |
|
data.hotNew[].title |
String |
true |
상품 이름 |
|
data.hotNew[].author |
String |
true |
상품 저자 |
|
data.hotNew[].publisher |
String |
true |
상품 출판사 |
|
data.hotNew[].coverImage |
String |
true |
상품 이미지 |
|
data.hotNew[].categoryTitle |
String |
상품 카테고리 표시 이름 |
||
data.recommend |
Array |
true |
추천 도서 |
|
data.recommend[].id |
Number |
true |
상품 고유번호 |
|
data.recommend[].title |
String |
true |
상품 이름 |
|
data.recommend[].author |
String |
true |
상품 저자 |
|
data.recommend[].publisher |
String |
true |
상품 출판사 |
|
data.recommend[].coverImage |
String |
true |
상품 이미지 |
|
data.recommend[].categoryTitle |
String |
상품 카테고리 표시 이름 |
||
data.bestseller |
Array |
true |
베스트 셀러 |
|
data.bestseller[].id |
Number |
true |
상품 고유번호 |
|
data.bestseller[].title |
String |
true |
상품 이름 |
|
data.bestseller[].author |
String |
true |
상품 저자 |
|
data.bestseller[].publisher |
String |
true |
상품 출판사 |
|
data.bestseller[].coverImage |
String |
true |
상품 이미지 |
|
data.bestseller[].categoryTitle |
String |
상품 카테고리 표시 이름 |
||
error |
Array |
오류 정보 |
{
"success" : true,
"data" : {
"hotNew" : [ {
"id" : 1,
"title" : "책 1",
"author" : "저자",
"publisher" : "출판사",
"coverImage" : "http://image.com",
"categoryTitle" : "소설 > 국내 도서"
} ],
"recommend" : [ {
"id" : 1,
"title" : "책 1",
"author" : "저자",
"publisher" : "출판사",
"coverImage" : "http://image.com",
"categoryTitle" : "소설 > 국내 도서"
} ],
"bestseller" : [ {
"id" : 1,
"title" : "책 1",
"author" : "저자",
"publisher" : "출판사",
"coverImage" : "http://image.com",
"categoryTitle" : "소설 > 국내 도서"
} ]
},
"error" : null
}
상품 카테고리
Http
GET /product/v1/categories HTTP/1.1
Content-Type: application/json
Host: localhost:8080
Response
| 필드명 | 타입 | 필수값 | 양식 | 설명 |
|---|---|---|---|---|
success |
Boolean |
true |
요청 성공 여부 |
|
data |
Object |
true |
응답 데이터 |
|
data.childCategories |
Array |
자식 카테고리 |
||
data.childCategories[].id |
Number |
true |
자식 카테고리 id |
|
data.childCategories[].parentId |
Number |
true |
자식 카테고리의 부모 카테고리 id |
|
data.childCategories[].name |
String |
true |
자식 카테고리 이름 |
|
data.childCategories[].depth |
Number |
true |
자식 카테고리의 뎁스 |
|
data.childCategories[].childCategories |
Array |
더 하위의 자식 카테고리 리스트 (null일 수 있음) |
||
data.childCategories[].childCategories[].id |
Number |
하위 자식 카테고리 id |
||
data.childCategories[].childCategories[].parentId |
Number |
하위 자식 카테고리의 부모 카테고리 id |
||
data.childCategories[].childCategories[].name |
String |
하위 자식 카테고리 이름 |
||
data.childCategories[].childCategories[].depth |
Number |
하위 자식 카테고리의 뎁스 |
||
data.childCategories[].childCategories[].childCategories |
Array |
더 하위의 자식 카테고리 리스트 (null일 수 있음) |
||
error |
Array |
오류 정보 |
{
"success" : true,
"data" : {
"childCategories" : [ {
"id" : 1,
"parentId" : 0,
"name" : "한국도서",
"depth" : 1,
"childCategories" : [ {
"id" : 3,
"parentId" : 1,
"name" : "문학 소설",
"depth" : 2,
"childCategories" : null
} ]
}, {
"id" : 2,
"parentId" : 0,
"name" : "외국도서",
"depth" : 1,
"childCategories" : [ {
"id" : 4,
"parentId" : 2,
"name" : "문학 소설",
"depth" : 2,
"childCategories" : null
} ]
} ]
},
"error" : null
}
상품 목록 조회
Http
GET /product/v1/products?productCategoryId=2&searchWord=%EA%B5%AD%EB%82%B4%EB%8F%84%EC%84%9C&page=1&size=20&homeProductType=HOT_NEW HTTP/1.1
Host: localhost:8080
Request
| 필드명 | 필수값 | 양식 | 설명 |
|---|---|---|---|
productCategoryId |
카테고리 Id |
||
searchWord |
검색어 |
||
homeProductType |
상품 타입(추천 도서 : RECOMMEND / 베스트 셀러 : BESTSELLER / 화제의 신간 : HOT_NEW) |
||
page |
true |
페이지 |
|
size |
true |
사이즈 |
Response
| 필드명 | 타입 | 필수값 | 양식 | 설명 |
|---|---|---|---|---|
success |
Boolean |
true |
요청 성공 여부 |
|
data |
Object |
true |
응답 데이터 |
|
data.products |
Array |
true |
상품 데이터 |
|
data.pagination |
Object |
true |
상품 데이터 페이징 정보 |
|
data.pagination.currentPage |
Number |
true |
현재 페이지 |
|
data.pagination.totalPage |
Number |
true |
전체 페이지 |
|
data.pagination.pageSize |
Number |
true |
페이지 사이즈 |
|
data.pagination.totalCount |
Number |
true |
전체 갯수 |
|
data.pagination.hasNextPage |
Boolean |
true |
다음 페이지 존재 여부 |
|
data.pagination.hasPreviousPage |
Boolean |
true |
전 페이지 존재 여부 |
|
data.products[].id |
Number |
true |
상품 id |
|
data.products[].title |
String |
true |
도서 제목 |
|
data.products[].author |
String |
true |
작가 |
|
data.products[].price |
Number |
true |
가격 |
|
data.products[].discountedPrice |
Number |
true |
할인 가격 |
|
data.products[].publisher |
String |
true |
출판사 |
|
data.products[].publishDate |
String |
true |
출판일 |
|
data.products[].isbn |
String |
true |
isbn |
|
data.products[].description |
String |
true |
설명 |
|
data.products[].pages |
Number |
true |
페이지 수 |
|
data.products[].coverImage |
String |
true |
커버 이미지 |
|
data.products[].previewLink |
String |
true |
미리보기 링크 |
|
data.products[].stockQuantity |
Number |
true |
남은 수량 |
|
data.products[].rating |
Number |
true |
별점 |
|
data.products[].status |
String |
true |
상태 |
|
data.products[].category |
Object |
true |
카테고리 |
|
data.products[].category.id |
Number |
true |
카테고리 id |
|
data.products[].category.name |
String |
true |
카테고리 이름 |
|
data.products[].category.parentCategory |
Object |
true |
부모 카테고리 |
|
data.products[].category.parentCategory.id |
Number |
true |
부모 카테고리 id |
|
data.products[].category.parentCategory.name |
String |
true |
부모 카테고리 이름 |
|
error |
Array |
오류 정보 |
{
"success" : true,
"data" : {
"products" : [ {
"id" : 1,
"title" : "[개발팀]국내도서 테스트 상품 (테스트 상품입니다.)",
"author" : "Rudolph Swift",
"price" : 29475,
"discountedPrice" : 25317,
"publisher" : "YES24",
"publishDate" : "2024-10-21",
"isbn" : "1111111111",
"description" : "‘국가란 무엇인가’ 이후, ‘역사란 무엇인가’를 묻다\n\n유시민과 함께 역사의 갈피를 찾다!\n\n\n\n『거꾸로 읽는 세계사』로부터 30년, 작가 유시민 글쓰기의 새로운 시작. 헤로도토스의 『역사』, 투키디데스의 『펠로폰네소스 전쟁사』부터 유발 하라리의 『사피엔스』까지 고대로부터 최근까지 역사를 사로잡은 18권의 역사서들을 9장으로 나누어 훑으며 ‘역사’라는 화두를 전개해간다. 각 역사서의 주요 내용과 시대적인 맥락, 서사의 새로운 초점과 해석, 역사가의 생애 등을 유시민만의 언어로 요약했다.\n\n\n\n여기에 역사가의 속마음을 전달하고, 놓치지 말아야 할 부분을 체크해 주거나, 이해하지 못해도 좋다고 위로하고 격려하는 안내자 역할까지 맡았다. 역사에 대한 애정과 역사 공부의 중요성을 몸소 보여주며, 자신의 역사 공부법을 공개하는 셈이다.",
"pages" : 900,
"coverImage" : "https://shopping-phinf.pstatic.net/main_4964421/49644215637.20240806201630.jpg",
"previewLink" : "https://search.shopping.naver.com/book/catalog/49644215637",
"stockQuantity" : 90,
"rating" : 3.9,
"status" : "ON_SALE",
"category" : {
"id" : 2,
"name" : "외국도서",
"parentCategory" : {
"id" : 0,
"name" : "전체"
}
}
}, {
"id" : 2,
"title" : "국내도서The Challenge of Greatness (The Legacy of Great Teachers)",
"author" : "Gose, Michael",
"price" : 31672,
"discountedPrice" : 28778,
"publisher" : "국내총판도서",
"publishDate" : "2024-10-21",
"isbn" : "9781610480901",
"description" : "The Challenge of Greatness: The Legacy of Great Teachers reveals the characteristics and teaching strategies of Great Teachers. Simultaneously the book describes a Pantheon of thirty-two great teachers, and challenges the reader to continue their legacy by becoming one. Recognizing the uniqueness of a great teacher, the book raises the kind of issues they face, and a range of possibilities from which they find solutions.",
"pages" : 140,
"coverImage" : "https://shopping-phinf.pstatic.net/main_3247428/32474284194.20220520074619.jpg",
"previewLink" : "https://search.shopping.naver.com/book/catalog/32474284194",
"stockQuantity" : 31,
"rating" : 4.1,
"status" : "ON_SALE",
"category" : {
"id" : 2,
"name" : "외국도서",
"parentCategory" : {
"id" : 0,
"name" : "전체"
}
}
} ],
"pagination" : {
"currentPage" : 1,
"totalPage" : 1,
"pageSize" : 20,
"totalCount" : 2,
"hasNextPage" : true,
"hasPreviousPage" : false
}
},
"error" : null
}
상품 상세 조회
Http
GET /product/v1/products/1 HTTP/1.1
Host: localhost:8080
Request
| 필드명 | 필수값 | 양식 | 설명 |
|---|---|---|---|
productId |
true |
상품 ID |
Response
| 필드명 | 타입 | 필수값 | 양식 | 설명 |
|---|---|---|---|---|
success |
Boolean |
true |
요청 성공 여부 |
|
data |
Object |
true |
응답 데이터 |
|
data.id |
Number |
true |
상품 id |
|
data.title |
String |
true |
도서 제목 |
|
data.author |
String |
true |
작가 |
|
data.price |
Number |
true |
가격 |
|
data.discountedPrice |
Number |
true |
할인 가격 |
|
data.publisher |
String |
true |
출판사 |
|
data.publishDate |
String |
true |
출판일 |
|
data.isbn |
String |
true |
isbn |
|
data.description |
String |
true |
설명 |
|
data.pages |
Number |
true |
페이지 수 |
|
data.coverImage |
String |
true |
커버 이미지 |
|
data.previewLink |
String |
true |
미리보기 링크 |
|
data.stockQuantity |
Number |
true |
남은 수량 |
|
data.rating |
Number |
true |
별점 |
|
data.status |
String |
true |
상태 |
|
data.category |
Object |
true |
카테고리 |
|
data.category.id |
Number |
true |
카테고리 id |
|
data.category.name |
String |
true |
카테고리 이름 |
|
data.category.parentCategory |
Object |
true |
부모 카테고리 |
|
data.category.parentCategory.id |
Number |
true |
부모 카테고리 id |
|
data.category.parentCategory.name |
String |
true |
부모 카테고리 이름 |
|
error |
Array |
오류 정보 |
{
"success" : true,
"data" : {
"id" : 1,
"title" : "[개발팀]국내도서 테스트 상품 (테스트 상품입니다.)",
"author" : "Rudolph Swift",
"price" : 29475,
"discountedPrice" : 25317,
"publisher" : "YES24",
"publishDate" : "2024-10-21",
"isbn" : "1111111111",
"description" : "‘국가란 무엇인가’ 이후, ‘역사란 무엇인가’를 묻다\n\n유시민과 함께 역사의 갈피를 찾다!\n\n\n\n『거꾸로 읽는 세계사』로부터 30년, 작가 유시민 글쓰기의 새로운 시작. 헤로도토스의 『역사』, 투키디데스의 『펠로폰네소스 전쟁사』부터 유발 하라리의 『사피엔스』까지 고대로부터 최근까지 역사를 사로잡은 18권의 역사서들을 9장으로 나누어 훑으며 ‘역사’라는 화두를 전개해간다. 각 역사서의 주요 내용과 시대적인 맥락, 서사의 새로운 초점과 해석, 역사가의 생애 등을 유시민만의 언어로 요약했다.\n\n\n\n여기에 역사가의 속마음을 전달하고, 놓치지 말아야 할 부분을 체크해 주거나, 이해하지 못해도 좋다고 위로하고 격려하는 안내자 역할까지 맡았다. 역사에 대한 애정과 역사 공부의 중요성을 몸소 보여주며, 자신의 역사 공부법을 공개하는 셈이다.",
"pages" : 900,
"coverImage" : "https://shopping-phinf.pstatic.net/main_4964421/49644215637.20240806201630.jpg",
"previewLink" : "https://search.shopping.naver.com/book/catalog/49644215637",
"stockQuantity" : 90,
"rating" : 3.9,
"status" : "ON_SALE",
"category" : {
"id" : 2,
"name" : "외국도서",
"parentCategory" : {
"id" : 0,
"name" : "전체"
}
}
},
"error" : null
}
상품 리뷰 조회
Http
GET /product/v1/reviews?productId=1 HTTP/1.1
Host: localhost:8080
Request
| 필드명 | 필수값 | 양식 | 설명 |
|---|---|---|---|
productId |
true |
상품 ID |
Response
| 필드명 | 타입 | 필수값 | 양식 | 설명 |
|---|---|---|---|---|
success |
Boolean |
true |
요청 성공 여부 |
|
data |
Object |
true |
응답 데이터 |
|
data.reviews |
Array |
true |
리뷰 리스트 |
|
data.reviews[].reviewId |
Number |
true |
리뷰 아이디 |
|
data.reviews[].content |
String |
true |
리뷰 내용 |
|
data.reviews[].score |
Number |
true |
작성자 상품 리뷰 평점 |
|
data.reviews[].email |
String |
true |
리뷰 작성자 이메일 |
|
data.reviews[].productId |
Number |
true |
상품 ID |
|
data.reviews[].createdAt |
String |
true |
리뷰 작성일 |
|
data.reviews[].lastModifiedByUserAt |
String |
true |
리뷰 최종 수정일 |
|
data.reviews[].orderProductId |
Number |
주문 - 상품 ID |
||
error |
Array |
오류 정보 |
{
"success" : true,
"data" : {
"reviews" : [ {
"reviewId" : 1,
"content" : "이 책 너무 재밌어요",
"score" : 5,
"email" : "abc@naver.com",
"productId" : 1,
"createdAt" : "2024-10-21",
"lastModifiedByUserAt" : "2024-10-21",
"orderProductId" : null
}, {
"reviewId" : 2,
"content" : "이 책 재밌긴 한데 아쉬워요",
"score" : 3,
"email" : "bbb@naver.com",
"productId" : 1,
"createdAt" : "2024-10-21",
"lastModifiedByUserAt" : "2024-10-21",
"orderProductId" : null
}, {
"reviewId" : 3,
"content" : "어려워요 읽다 말았어요",
"score" : 1,
"email" : "ddd@naver.com",
"productId" : 1,
"createdAt" : "2024-10-21",
"lastModifiedByUserAt" : "2024-10-21",
"orderProductId" : null
} ]
},
"error" : null
}
상품 리뷰 등록
Http
POST /product/v1/reviews HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzM4NCJ9.eyJzdWIiOiIxIiwiaWF0IjoxNzI0NTIwNDc5LCJleHAiOjE3MjU3MzAwNzl9.i1WjcNXU2wBYjikGu5u0r41XmciafAfaMF3nNheb9cc7TUpai-tnMZCg3NUcTWP9
Content-Length: 70
Host: localhost:8080
{
"productId" : 1,
"content" : "재미있어요!",
"score" : 5
}
Request
| 필드명 | 타입 | 필수값 | 양식 | 설명 |
|---|---|---|---|---|
productId |
Number |
true |
상품 ID |
|
content |
String |
true |
리뷰 내용 |
|
score |
Number |
true |
리뷰 평점 |
Response
| 필드명 | 타입 | 필수값 | 양식 | 설명 |
|---|---|---|---|---|
success |
Boolean |
true |
요청 성공 여부 |
|
data |
Object |
true |
데이터 |
|
data.reviewId |
Number |
true |
생성된 리뷰 ID |
|
error |
Array |
오류 정보 |
{
"success" : true,
"data" : {
"reviewId" : 1
},
"error" : null
}
상품 리뷰 수정
Http
PATCH /product/v1/reviews/2 HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzM4NCJ9.eyJzdWIiOiIxIiwiaWF0IjoxNzI0NTIwNDc5LCJleHAiOjE3MjU3MzAwNzl9.i1WjcNXU2wBYjikGu5u0r41XmciafAfaMF3nNheb9cc7TUpai-tnMZCg3NUcTWP9
Content-Length: 51
Host: localhost:8080
{
"content" : "재미있어요!",
"score" : 5
}
Path Variable
| 필드명 | 필수값 | 양식 | 설명 |
|---|---|---|---|
reviewId |
true |
리뷰 ID |
Request
| 필드명 | 타입 | 필수값 | 양식 | 설명 |
|---|---|---|---|---|
content |
String |
true |
리뷰 내용 |
|
score |
Number |
true |
리뷰 평점 |
Response
| 필드명 | 타입 | 필수값 | 양식 | 설명 |
|---|---|---|---|---|
success |
Boolean |
true |
요청 성공 여부 |
|
data |
Object |
true |
데이터 |
|
data.reviewId |
Number |
true |
리뷰 ID |
|
error |
Array |
오류 정보 |
{
"success" : true,
"data" : {
"reviewId" : 2
},
"error" : null
}
상품 리뷰 삭제
Http
DELETE /product/v1/reviews/2 HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzM4NCJ9.eyJzdWIiOiIxIiwiaWF0IjoxNzI0NTIwNDc5LCJleHAiOjE3MjU3MzAwNzl9.i1WjcNXU2wBYjikGu5u0r41XmciafAfaMF3nNheb9cc7TUpai-tnMZCg3NUcTWP9
Host: localhost:8080
Path Variable
| 필드명 | 필수값 | 양식 | 설명 |
|---|---|---|---|
reviewId |
true |
리뷰 ID |
Response
| 필드명 | 타입 | 필수값 | 양식 | 설명 |
|---|---|---|---|---|
success |
Boolean |
true |
요청 성공 여부 |
|
data |
Object |
데이터 |
||
error |
Array |
오류 정보 |
{
"success" : true,
"data" : null,
"error" : null
}
본인이 작성한 상품 리뷰 조회
Http
GET /product/v1/reviews/me HTTP/1.1
Authorization: Bearer eyJhbGciOiJIUzM4NCJ9.eyJzdWIiOiIxIiwiaWF0IjoxNzI0NTIwNDc5LCJleHAiOjE3MjU3MzAwNzl9.i1WjcNXU2wBYjikGu5u0r41XmciafAfaMF3nNheb9cc7TUpai-tnMZCg3NUcTWP9
Host: localhost:8080
Response
| 필드명 | 타입 | 필수값 | 양식 | 설명 |
|---|---|---|---|---|
success |
Boolean |
true |
요청 성공 여부 |
|
data |
Object |
true |
응답 데이터 |
|
data.reviews |
Array |
true |
리뷰 리스트 |
|
data.reviews[].reviewId |
Number |
true |
리뷰 아이디 |
|
data.reviews[].content |
String |
true |
리뷰 내용 |
|
data.reviews[].score |
Number |
true |
작성자 상품 리뷰 평점 |
|
data.reviews[].productId |
Number |
true |
상품 ID |
|
data.reviews[].productTitle |
String |
true |
상품 이름 |
|
data.reviews[].productAuthor |
String |
true |
상품 저자 |
|
data.reviews[].productPublisher |
String |
true |
상품 출판사 |
|
data.reviews[].productCoverImage |
String |
true |
상품 이미지 |
|
data.reviews[].createdAt |
String |
true |
리뷰 작성일 |
|
data.reviews[].lastModifiedByUserAt |
String |
true |
리뷰 최종 수정일 |
|
error |
Array |
오류 정보 |
{
"success" : true,
"data" : {
"reviews" : [ {
"reviewId" : 1,
"content" : "이 책 너무 재밌어요",
"score" : 5,
"productId" : 1,
"productTitle" : "상품1",
"productAuthor" : "작성자1",
"productPublisher" : "출판사1",
"productCoverImage" : "https://image1.com",
"createdAt" : "2024-10-21",
"lastModifiedByUserAt" : "2024-10-21"
}, {
"reviewId" : 2,
"content" : "이 책 재밌긴 한데 아쉬워요",
"score" : 5,
"productId" : 2,
"productTitle" : "상품2",
"productAuthor" : "작성자2",
"productPublisher" : "출판사2",
"productCoverImage" : "https://image2.com",
"createdAt" : "2024-10-21",
"lastModifiedByUserAt" : "2024-10-21"
} ]
},
"error" : null
}
주문 전 상품 조회
Http
POST /product/v1/products/order/before HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzM4NCJ9.eyJzdWIiOiIxIiwiaWF0IjoxNzI0NTIwNDc5LCJleHAiOjE3MjU3MzAwNzl9.i1WjcNXU2wBYjikGu5u0r41XmciafAfaMF3nNheb9cc7TUpai-tnMZCg3NUcTWP9
Content-Length: 115
Host: localhost:8080
{
"products" : [ {
"productId" : 1,
"quantity" : 2
}, {
"productId" : 3,
"quantity" : 4
} ]
}
Response
| 필드명 | 타입 | 필수값 | 양식 | 설명 |
|---|---|---|---|---|
success |
Boolean |
true |
요청 성공 여부 |
|
data |
Object |
true |
응답 데이터 |
|
data.products |
Array |
true |
상품 목록 |
|
data.products[].productId |
Number |
true |
상품 고유번호 |
|
data.products[].title |
String |
true |
상품 이름 |
|
data.products[].coverImage |
String |
true |
상품 이미지 |
|
data.products[].quantity |
Number |
true |
수량 |
|
data.products[].price |
Number |
true |
상품 금액 |
|
data.products[].discountedPrice |
Number |
true |
상품 할인된 금액 |
|
error |
Array |
오류 정보 |
{
"success" : true,
"data" : {
"products" : [ {
"productId" : 1,
"title" : "[개발팀]국내도서 테스트 상품 (테스트 상품입니다.)",
"coverImage" : "https://shopping-phinf.pstatic.net/main_4964421/49644215637.20240806201630.jpg",
"quantity" : 12,
"price" : 353700,
"discountedPrice" : 303804
} ]
},
"error" : null
}