| 메소드 |
경로 |
설명 |
| POST |
/store/signup |
상점 정보 입력 |
Request Header
{
"Content-Type": "application/json"
}
{
"sub_category_name":"아구찜",
"name": "조스 떡볶이2",
"address": "서울시 노원구 공릉동 33-3",
"avg_delivery_time": "30분",
"cheeta_delivery": true,
"rating": 4,
"introduce": "세상에서 제일 맛있는 조스 떡볶이 입니다",
"picture": "http://google.com/~~~",
"delivery_fee": 2000
"distance": 200
}
- sub_category_name: 소분류 (찜,탕 등등)
- name: 상점 이름
- address: 상점 주소
- avg_delivery_time : 평균 배달 시간
- cheeta_delivery : 치타 배달 가능한지
- rating : 평점
- introduce : 소개
- picture : 사진
- delivery_fee : 배달비
- distance: 유저와의 거리(더미데이터)
{
"status": 200,
"success": true,
"message": "상점 등록 성공",
"data": {
"insertIdx": 9
}
}
{
"status": 400,
"success": false,
"message": "존재하는 상점 이름 입니다."
}
{
"status": 400,
"success": false,
"message": "상점을 개설하는데 필요한 값이 없습니다"
}
ㅤ
| 메소드 |
경로 |
설명 |
| GET |
/store |
모든 상점 정보 가져오기 |
{
{
"status": 200,
"success": true,
"message": "상점 정보 가져오기 성공",
"data": {
"result": [
{
"idx": 1,
"sub_category_idx": 3,
"name": "조떡",
"address": "공릉동",
"avg_delivery_time": 10,
"cheeta_delivery": 1,
"rating": 4,
"introduce": "세상에서 제일 맛있는 조스 떡볶이 입니다",
"picture": "https://lh3.googleusercontent.com/proxy/s9_k8LNW2gCNK_3FoV420C_oSOl7wes4VH8zTmdtVb0IJYtlxsGGO7f17ndeZoVMxoocS1EpxSzd6iBypWNDHBs31_uNl-Sqan0ehojS_OYw1xlW",
"delivery_fee": 1000,
"distance": 42
},
{
"idx": 2,
"sub_category_idx": 4,
"name": "아귀 내가 잡는다",
"address": "행당동",
"avg_delivery_time": 20,
"cheeta_delivery": 0,
"rating": 3,
"introduce": "고니의 아귀집 입니다",
"picture": "https://recipe1.ezmember.co.kr/cache/recipe/2017/12/11/8abb7bc5ceede607442029340e1b72011.jpg",
"delivery_fee": 2000,
"distance": 12
}
]
}
}
{
"status": 400,
"success": false,
"message": "상점 정보 값을 가져오는데 실패했습니다"
}
| 메소드 |
경로 |
설명 |
| GET |
/store/name |
상점명으로 상점 정보 가져오기 |
Request Header
{
"Content-Type": "application/json"
}
{
"status": 200,
"success": true,
"message": "상점 정보 가져오기 성공",
"data": {
"data": [
{
"idx": 1,
"sub_category_idx": 1,
"name": "조스 떡볶이2",
"address": "서울시 노원구 공릉동 33-3",
"avg_delivery_time": 30,
"cheeta_delivery": 1,
"rating": 1,
"introduce": "세상에서 제일 맛있는 조스 떡볶이 입니다",
"picture": "http://google.com/~~~",
"delivery_fee": 2000
"distance":200
}
]
}
}
{
"status": 400,
"success": false,
"message": "특정 상점 값을 가져오는데 실패했습니다"
}
| 메소드 |
경로 |
설명 |
| PUT |
/store/:idx |
상점 정보 업데이트 |
ex) store/1
Request Header
{
"Content-Type": "application/json"
}
{
"sub_category_idx":1,
"name": "조스 떡볶이",
"address": "서울시 노원구 공릉동 33-3",
"avg_delivery_time": "30분",
"cheeta_delivery": true,
"rating": 4,
"introduce": "세상에서 제일 맛있는 조스 떡볶이 입니다",
"picture": "http://google.com/~~~",
"delivery_fee": 2000
"distance":200
}
{
"status": 200,
"success": true,
"data": {
"changedData": [
{
"idx": 1,
"sub_category_idx": 1,
"name": "조스 떡볶이",
"address": "서울시 노원구 공릉동 33-3",
"avg_delivery_time": 30,
"cheeta_delivery": 0,
"rating": 4,
"introduce": "세상에서 제일 맛있는 조스 떡볶이 입니다",
"picture": "http://google.com/~~~",
"delivery_fee": 2000
"distance":200
}
]
}
}
{
"status": 400,
"success": false,
"message": "존재하는 상점 이름 입니다."
}
{
"status": 400,
"success": false,
"message": "필요한 값이 없습니다."
}
ㅤ
| 메소드 |
경로 |
설명 |
| DELETE |
/store/:idx |
상점 인덱스로 상점 정보 삭제하기 |
ex) /store/1
{
"status": 200,
"success": true,
"data": {
"deleteIdx": {
"fieldCount": 0,
"affectedRows": 1,
"insertId": 0,
"serverStatus": 2,
"warningCount": 0,
"message": "",
"protocol41": true,
"changedRows": 0
}
}
}
{
"status": 400,
"success": false,
"message": "상점 삭제 실패."
}