Blog

API 설계

Search
구분
기능
사용자유형
진행상황
method
url
Request Header
request
response
HttpStatus
요구사항
담당자
보조담당자
Frontend
All User
Done
GET
/
“index”
citeFred
citeFred
Frontend
All User
Done
GET
/api/auth/signup
“signup-form”
해찬 이
해찬 이
citeFred
citeFred
Backend
All User
Done
POST
/api/auth/signup
{ ”username”:”String”, ”email”:””String, ”password”:”String”, ”registNum”:”String” }
{ msg:”회원가입 완료”, statusCode:200 }
회원가입 시 이메일 인증 기능 “고객님”으로 가입 시 100만 포인트를 지급 BIZ유저인 경우, 아래 입력해야함 ◦ 사업자등록번호(registNum)
해찬 이
해찬 이
citeFred
citeFred
Frontend
All User
Done
GET
/api/auth/login
“login-form”
해찬 이
해찬 이
citeFred
citeFred
Backend
All User
Done
GET
/api/auth/logout
{ msg:”로그아웃됬습니다.”, statusCode:200 }
citeFred
citeFred
해찬 이
해찬 이
Backend
All User
Done
POST
/api/auth/login
{ ”email”:””String, ”password”:”String” }
{ msg:”로그인 성공”, statusCode:200 }
해찬 이
해찬 이
citeFred
citeFred
Frontend
BIZ
Done
GET
/api/sotres/add-stores
Authorization : Bearer bizuser~
“add-stores”
구리 예
구리 예
Backend
BIZ
Done
POST
/api/stores
Authorization : Bearer bizuser~
{ ”storeName”:”String”, ”storeAdress”:”String”, ”information”:”String”, }
{ msg:”카페를 등록하였습니다.”, statusCode:200 }
“사장님”은 업장 정보를 오직 1개만 갖고 있을 수 있어야 합니다. ◦ 가게이름 ◦ 가게주소 ◦ 가게소개
구리 예
구리 예
Backend
All User
Done
GET
/api/stores
[{ ”storeName”:”String”, ”storeAdress”:”String”, ”information”:”String”, }]
구리 예
구리 예
Backend
All User
Done
GET
/api/stores/{id}
쿼리문 “사장님” 및 “고객님”은 키워드 기반으로 음식점을 검색하여 볼 수 있어야 합니다.
{ ”storeName”:”String”, ”storeAdress”:”String”, ”information”:”String”, }
구리 예
구리 예
Backend
BIZ
Done
Put
/api/stores/{id}
Authorization : Bearer bizuser~
{ ”storeName”:”String”, ”storeAdress”:”String”, ”information”:”String”, }
{ ”storeName”:”String”, ”storeAdress”:”String”, ”information”:”String”, }
구리 예
구리 예
Backend
BIZ
Done
Delete
/api/stores/{id}
Authorization : Bearer bizuser~
{ ”password”:”String” }
구리 예
구리 예
Frontend
BIZ
Done
GET
/api/menus/add-menus
“add-menus”
citeFred
citeFred
해찬 이
해찬 이
Backend
BIZ
Done
POST
/api/menus
Authorization : Bearer bizuser~
{ ”menuName”:”String”, ”image”:”String”, ”price”:”int” }
{ msg:”메뉴를 동록했습니다.”, statusCode:200 }
• 메뉴 정보는 다음과 같습니다. ◦ 메뉴 이름 ◦ 이미지 ◦ 가격 업장 내에서 동일한 메뉴 이름으로는 재등록이 되지 않습니다.
해찬 이
해찬 이
Backend
All User
Done
GET
/api/menus
{ ”menuName”:”String”, ”image”:”String”, ”price”:”int” }
해찬 이
해찬 이
Backend
All User
Done
GET
/api/menus/{id}
쿼리문 “사장님” 및 “고객님”은 키워드 기반으로 메뉴를 검색하여 볼 수 있어야 합니다.
해찬 이
해찬 이
Backend
BIZ
Done
Put
/api/menus/{id}
Authorization : Bearer bizuser~
{ ”menuName”:”String”, ”image”:”String”, ”price”:”int” }
{ ”menuName”:”String”, ”image”:”String”, ”price”:”int” }
해찬 이
해찬 이
Backend
BIZ
Done
Delete
/api/menus/{id}
Authorization : Bearer bizuser~
{ ”password”:”String” }
{ msg:”메뉴가 삭제됬습니다.”, statusCode:200 }
해찬 이
해찬 이
Frontend
USER
In progress
GET
/api/orders/add-orders
“add-orders”
구리 예
구리 예
Backend
USER
In progress
POST
/api/orders
{ ”menuId”:”Long”, ”storeId”:”Long” }
{ ”menuName”:”String”, ”orderDate”:”LocalDtaeTime, }
구리 예
구리 예
Backend
All User
In progress
GET
/api/orders
Authorization : Bearer user~
{ ”menuName”:”String”, ”orderDate”:”LocalDateTime”, ”price”:”int” }
구리 예
구리 예
Backend
BIZ
In progress
GET
/api/orders/stores
Authorization : Bearer bizuser~
[{         "id": Long,         "contents": null,         "orderStatus": "DELIVERY_COMPLETED"     }]
구리 예
구리 예
Backend
BIZ
In progress
Put
/api/orders/{id}
Authorization : Bearer bizuser~
{ ”contents”:”String”, ”orderstatus”:”enum” }
{ ”menuName”:”String”, ”price”:”int” }
사장님 → 조리중, 배달완료
구리 예
구리 예
Backend
All User
In progress
Delete
/api/orders/{id}
Authorization : Bearer user~orbizuser~
{ ”contents”:”String” }
{ msg:”주문을 취소하였습니다.”, statusCode:200 }
구리 예
구리 예
BE Not started
Frontend
USER
Done
GET
/api/stores/{store_id}/reviews
“add-reviews”
citeFred
citeFred
Frontend
USER
Done
GET
/api/reviews/{store_id}/modify-reviews
“modify-reviews”
citeFred
citeFred
Backend
USER
Done
POST
/api/reviews/{store_id}
Authorization : Bearer abcd~
{ ”review”:”String”, ”star”:”int” }
{ msg:”리뷰가 등록되었습니다.”, statusCode:200 }
citeFred
citeFred
Backend
USER
Done
Put
/api/reviews/{id}
Authorization : Bearer abcd~
{ ”review”:”String”, ”star”:”int” }
{ ”review”:”String”, ”star”:”int” }
citeFred
citeFred
Backend
All User
Done
GET
/api/reviews/{store_id}
{[ ”review”:”String”, ”star”:”int” ]}
citeFred
citeFred
Backend
USER
Done
Delete
/api/reviews/{id}
Authorization : Bearer abcd~
{ msg:”리뷰가 삭제되었습니다.”, statusCode:200 }
citeFred
citeFred
Backend
All User
Done
GET
/search/stores-and-menus?keword={keword}
citeFred
citeFred
Frontend
All User
Done
GET
citeFred
citeFred