forked from codesquad-members-2021/sidedish
-
Notifications
You must be signed in to change notification settings - Fork 1
API Document
August edited this page Apr 29, 2021
·
8 revisions
- 더미데이터 참고링크
- 카테고리id는 3개로 고정 Main/Soup/Side(17011000, 171011100, 171011200)
-
Description : 모든 카테고리목록 조회
-
Request
GET /main
- Response
[
{
"categoryId": 17011000,
"name": "풍성한 고기 반찬",
"items": [
{
"detailHash": "H9882",
"image": "https://cdn.bmf.kr/_data/product/H077F/f2a7b4df359c850b1a9eb57e17ddf6fc.jpg",
"alt": "[소중한식사] 경상도 한상차림",
"deliveryType": [
"새벽배송 전국택배"
],
"title": "[소중한식사] 경상도 한상차림",
"description": "경상도 명물 요리 세 가지를 한 상에!",
"normalPrice": 39000,
"salePrice": 31200,
"badge": [
"이벤트특가"
]
}
]
},
{
"categoryId": 17011100,
"name": "바다향가득 반찬",
"items": [
{
"detailHash": "H9883",
"image": "https://cdn.bmf.kr/_data/product/H9881/f2a7b4df359c850b1a9eb57e17ddf6fc.jpg",
"alt": "[소중한식사] 경상도 한상차림",
"deliveryType": [
"새벽배송 전국택배"
],
"title": "[소중한식사] 경상도 한상차림",
"description": "경상도 명물 요리 세 가지를 한 상에!",
"normalPrice": 39000,
"salePrice": 31200,
"badge": [
"론칭특가",
" 이벤트특가"
]
}
]
},
{
"categoryId": 17011200,
"name": "할인특가 세트 상상상",
"items": [
{
"detailHash": "H9881",
"image": "https://cdn.bmf.kr/_data/product/H9881/f2a7b4df359c850b1a9eb57e17ddf6fc.jpg",
"alt": "[소중한식사] 경상도 한상차림",
"deliveryType": [
"새벽배송 전국택배"
],
"title": "[소중한식사] 경상도 한상차림",
"description": "경상도 명물 요리 세 가지를 한 상에!",
"normalPrice": 39000,
"salePrice": 31200,
"badge": [
"이벤트특가"
]
}
]
}
]
-
Description : 특정 아이템을 가져옴. 이때 카테고리id와 아이템의 해시값이 맞아야 정상 출력된다.
-
Request
GET /detail/{categoryId}/{hash}
- Response
{
"detailHash": "H077F",
"title": "[마더앤찬] 코다리구이 320g",
"topImage": "http://public.codesquad.kr/jk/storeapp/data/0221110ead70dfd455e40703bbdd6252.jpg",
"thumbImages": [
"http://public.codesquad.kr/jk/storeapp/data/0221110ead70dfd455e40703bbdd6252.jpg",
"http://public.codesquad.kr/jk/storeapp/data/detail/HDF73/2d408898494ac950d7d2cfd6c36d59c2.jpg",
"http://public.codesquad.kr/jk/storeapp/data/detail/HDF73/62c8bb77facfc9c3be81f9bf45b27f2a.jpg",
"http://public.codesquad.kr/jk/storeapp/data/detail/HDF73/f6d73afc0ebc1efa71eaea32e9d846f2.jpg"
],
"productDescription": "큼지막하고 살집 많은 동태 한 마리로 만든 코다리구이입니다.",
"point": 75,
"deliveryInfo": "서울 경기 새벽배송 / 전국택배 (제주 및 도서산간 불가) [월 · 화 · 수 · 목 · 금 · 토] 수령 가능한 상품입니다.",
"deliveryFee": "2,500원 (40,000원 이상 구매 시 무료)",
"prices": [
"7500"
],
"badge": [
"론칭특가"
],
"detailSection": [
"http://public.codesquad.kr/jk/storeapp/data/detail/HDF73/9bd9158fb5ffbc46708b7928ee50708e.jpg",
"http://public.codesquad.kr/jk/storeapp/data/detail/HDF73/5f73c5c80b62ef63c8a8eecefe32fc29.jpg",
"http://public.codesquad.kr/jk/storeapp/data/detail/HDF73/9bd9158fb5ffbc46708b7928ee50708e.jpg",
"http://public.codesquad.kr/jk/storeapp/data/detail/HDF73/0253cdebc4972fefd6b94458024fe765.jpg",
"http://public.codesquad.kr/jk/storeapp/data/detail/HDF73/3299da0677b50c8c519adc0335271c49.jpg",
"http://public.codesquad.kr/jk/storeapp/data/detail/HDF73/0642265b65dcc2490ab164ff428cbfe2.jpg",
"http://public.codesquad.kr/jk/storeapp/data/detail/HDF73/695683493c1ae475a175475f50d3259f.jpg",
"http://public.codesquad.kr/jk/storeapp/data/detail/HDF73/c8f9bed4f5c07585b869e3d171904a93.jpg",
"http://public.codesquad.kr/jk/storeapp/data/detail/HDF73/d2e3274c95c832bc9bfbcebbd548f61b.jpg",
"http://public.codesquad.kr/jk/storeapp/data/detail/HDF73/d9e4fa00652483d74b46317d38159a2f.jpg",
"http://public.codesquad.kr/jk/storeapp/data/detail/HDF73/d7799b67683128642453f9e2b4c8ce84.jpg"
],
"stock": 10
}
-
Description : 특정 아이템을 주문
-
Request
POST /detail/{categoryId}/{hash}
- Request Body
{
"orderCount" : int
}
- Response
no response body
- History의 create는 서버에서 모든 api가 호출될 때 마다 호출되도록 구현
- History의 update/delete는 불가능하도록 구현