Overview

HTTP status codes

상태 코드 설명

200 OK

성공

400 Bad Request

잘못된 요청

401 Unauthorized

비인증 상태

403 Forbidden

권한 거부

404 Not Found

존재하지 않는 요청 리소스

500 Internal Server Error

서버 에러

HTTP Error Response

HTTP response

HTTP/1.1 400 Bad Request
Content-Type: application/json;charset=UTF-8
Content-Length: 88

{
  "code" : 400,
  "message" : "must be a well-formed email address",
  "data" : null
}

Response fields

필드명

타입

필수여부

설명

message

String

true

에러 메시지

code

Number

true

Error Code

data

Null

true

data

Auth API

1. 로그인

Curl request

$ curl 'http://localhost:8080/api/v1/auth/login' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -d '{
  "provider" : "kakao",
  "code" : "code",
  "redirect_uri" : "redirect_uri"
}'

HTTP request

POST /api/v1/auth/login HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 80
Host: localhost:8080

{
  "provider" : "kakao",
  "code" : "code",
  "redirect_uri" : "redirect_uri"
}

Request fields

필드명

타입

필수여부

제약조건

설명

provider

String

true

소셜 로그인 제공자 (kakao, apple)

code

String

true

소셜 로그인 코드

redirect_uri

String

false

리다이렉트 URI (kakao는 필수)

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 155

{
  "code" : 200,
  "message" : "성공",
  "data" : {
    "accessToken" : "access_token",
    "refreshToken" : "refresh_token",
    "isFirst" : true
  }
}

2. 약관동의 후 회원가입

Curl request

$ curl 'http://localhost:8080/api/v1/auth/signup' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Bearer accessToken'

HTTP request

POST /api/v1/auth/signup HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer accessToken
Host: localhost:8080

Request headers

Name Description

Authorization

accessToken

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 59

{
  "code" : 200,
  "message" : "성공",
  "data" : null
}

3. 토큰 재발급

  • refresh token으로 access token을 재발급합니다.

Curl request

$ curl 'http://localhost:8080/api/v1/auth/token/reissue' -i -X POST \
    -H 'Authorization-refresh: refresh_token'

HTTP request

POST /api/v1/auth/token/reissue HTTP/1.1
Authorization-refresh: refresh_token
Host: localhost:8080
Content-Type: application/x-www-form-urlencoded

Request headers

Name Description

Authorization-refresh

refreshToken

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 155

{
  "code" : 200,
  "message" : "성공",
  "data" : {
    "accessToken" : "access_token",
    "refreshToken" : "refresh_token",
    "isFirst" : null
  }
}

4. 로그아웃

Curl request

$ curl 'http://localhost:8080/api/v1/auth/logout' -i -X POST

HTTP request

POST /api/v1/auth/logout HTTP/1.1
Host: localhost:8080
Content-Type: application/x-www-form-urlencoded

HTTP response

HTTP/1.1 200 OK

Store API

1. 핀 클릭시 음식점 바텀시트 조회

Curl request

$ curl 'http://localhost:8080/api/v1/stores/1?_csrf=2qE66Lr6mGgM5ixdRGwu0iQoMilhIVtq2Wlp1Vacb7hGLokf6JBb2onJqgshgk9kdEEa5BAcHxEEFmxHvVoN4GSuWYx2He99' -i -X GET \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Bearer accessToken'

HTTP request

GET /api/v1/stores/1?_csrf=2qE66Lr6mGgM5ixdRGwu0iQoMilhIVtq2Wlp1Vacb7hGLokf6JBb2onJqgshgk9kdEEa5BAcHxEEFmxHvVoN4GSuWYx2He99 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer accessToken
Host: localhost:8080

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 443

{
  "code" : 200,
  "message" : "성공",
  "data" : {
    "storeId" : 1,
    "categoryName" : "중식",
    "storeName" : "칠기마라탕",
    "address" : "서울시 강남구 역삼동 123-123",
    "totalRating" : 4.1,
    "totalReviewCount" : 10,
    "reviewImageUrls" : [ "https://image.com/1.jpg", "https://image.com/2.jpg" ],
    "userId" : 1,
    "myRevisitedCount" : 5,
    "totalRevisitedCount" : 2,
    "isBookmarked" : true
  }
}

HTTPie request

$ http GET 'http://localhost:8080/api/v1/stores/1?_csrf=2qE66Lr6mGgM5ixdRGwu0iQoMilhIVtq2Wlp1Vacb7hGLokf6JBb2onJqgshgk9kdEEa5BAcHxEEFmxHvVoN4GSuWYx2He99' \
    'Content-Type:application/json;charset=UTF-8' \
    'Authorization:Bearer accessToken'

Path parameters

Table 1. /api/v1/stores/{storeId}
Parameter Description

storeId

음식점 ID

Request headers

Name Description

Authorization

accessToken

Response body

{
  "code" : 200,
  "message" : "성공",
  "data" : {
    "storeId" : 1,
    "categoryName" : "중식",
    "storeName" : "칠기마라탕",
    "address" : "서울시 강남구 역삼동 123-123",
    "totalRating" : 4.1,
    "totalReviewCount" : 10,
    "reviewImageUrls" : [ "https://image.com/1.jpg", "https://image.com/2.jpg" ],
    "userId" : 1,
    "myRevisitedCount" : 5,
    "totalRevisitedCount" : 2,
    "isBookmarked" : true
  }
}

Response fields

필드명

타입

필수여부

설명

code

Number

true

결과코드

message

String

true

결과메시지

data.storeId

Number

true

음식점 ID

data.categoryName

String

true

카테고리 명

data.storeName

String

true

음식점 명

data.address

String

true

음식점 주소

data.totalRating

Number

true

음식점 별점

data.totalReviewCount

Number

true

리뷰 개수

data.reviewImageUrls

Array

true

리뷰 이미지 URL

data.userId

Number

true

사용자 ID

data.myRevisitedCount

Number

true

자신이 재방문한 횟수(N번 방문)

data.totalRevisitedCount

Number

true

전체 재방문 인원 수(00명이 재방문했어요)

data.isBookmarked

Boolean

true

북마크 여부

2. 또잇 리포트 및 음식점 상세 페이지 상단 이미지

Curl request

$ curl 'http://localhost:8080/api/v1/stores/1/reports?_csrf=LwPz7-3rzA11QcvJwEF-hovnXXdnOngNH0LAibw3AIKzCSe2GTuV1ouPrj1YIqio8mxKsr_RcE5TXB0gfXPwut0BZOPQOUGO' -i -X GET \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Bearer accessToken'

HTTP request

GET /api/v1/stores/1/reports?_csrf=LwPz7-3rzA11QcvJwEF-hovnXXdnOngNH0LAibw3AIKzCSe2GTuV1ouPrj1YIqio8mxKsr_RcE5TXB0gfXPwut0BZOPQOUGO HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer accessToken
Host: localhost:8080

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 188

{
  "code" : 200,
  "message" : "성공",
  "data" : {
    "storeId" : 1,
    "thumbnailUrl" : "https://image.com/1.jpg",
    "mostVisitedCount" : 15,
    "totalRevisitedCount" : 100
  }
}

HTTPie request

$ http GET 'http://localhost:8080/api/v1/stores/1/reports?_csrf=LwPz7-3rzA11QcvJwEF-hovnXXdnOngNH0LAibw3AIKzCSe2GTuV1ouPrj1YIqio8mxKsr_RcE5TXB0gfXPwut0BZOPQOUGO' \
    'Content-Type:application/json;charset=UTF-8' \
    'Authorization:Bearer accessToken'

Path parameters

Table 1. /api/v1/stores/{storeId}/reports
Parameter Description

storeId

음식점 ID

Request headers

Name Description

Authorization

accessToken

Response body

{
  "code" : 200,
  "message" : "성공",
  "data" : {
    "storeId" : 1,
    "thumbnailUrl" : "https://image.com/1.jpg",
    "mostVisitedCount" : 15,
    "totalRevisitedCount" : 100
  }
}

Response fields

필드명

타입

필수여부

설명

code

Number

true

결과코드

message

String

true

결과메시지

data.storeId

Number

true

음식점 ID

data.thumbnailUrl

String

true

음식점 대표 이미지 URL

data.mostVisitedCount

Number

true

가장 많이 유저의 방문한 횟수

data.totalRevisitedCount

Number

true

전체 재방문 인원 수

3. 리뷰 조회

Curl request

$ curl 'http://localhost:8080/api/v1/stores/1/reviews?type=REVISITED&page=0' -i -X GET \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Bearer accessToken'

HTTP request

GET /api/v1/stores/1/reviews?type=REVISITED&page=0 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer accessToken
Host: localhost:8080

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 1141

{
  "code" : 200,
  "message" : "성공",
  "data" : {
    "content" : [ {
      "userId" : 1,
      "reviewId" : 1,
      "nickName" : "김철수",
      "rating" : 4,
      "imageUrl" : "https://image.com/1.jpg",
      "visitTimes" : 3,
      "visitedAt" : "2024.03.07",
      "description" : "맛있어요",
      "isMine" : true
    }, {
      "userId" : 2,
      "reviewId" : 2,
      "nickName" : "김길동",
      "rating" : 2,
      "imageUrl" : "https://image.com/2.jpg",
      "visitTimes" : 1,
      "visitedAt" : "2024.03.07",
      "description" : "맛있어요",
      "isMine" : false
    }, {
      "userId" : 3,
      "reviewId" : 3,
      "nickName" : "맛있는 음식을보면 짖는 개",
      "rating" : 3,
      "imageUrl" : null,
      "visitTimes" : 1,
      "visitedAt" : "2024.03.07",
      "description" : "왈왈왈왈왈왈왈",
      "isMine" : false
    } ],
    "pageable" : "INSTANCE",
    "size" : 3,
    "number" : 0,
    "sort" : {
      "empty" : true,
      "unsorted" : true,
      "sorted" : false
    },
    "last" : false,
    "first" : true,
    "numberOfElements" : 3,
    "empty" : false
  }
}

HTTPie request

$ http GET 'http://localhost:8080/api/v1/stores/1/reviews?type=REVISITED&page=0' \
    'Content-Type:application/json;charset=UTF-8' \
    'Authorization:Bearer accessToken'

Path parameters

Table 1. /api/v1/stores/{storeId}/reviews
Parameter Description

storeId

음식점 ID

Query parameters

Parameter Description

page

페이지 번호 (0번 부터)

type

리뷰 타입 - REVISITED, PHOTO

Request headers

Name Description

Authorization

accessToken

Response body

{
  "code" : 200,
  "message" : "성공",
  "data" : {
    "content" : [ {
      "userId" : 1,
      "reviewId" : 1,
      "nickName" : "김철수",
      "rating" : 4,
      "imageUrl" : "https://image.com/1.jpg",
      "visitTimes" : 3,
      "visitedAt" : "2024.03.07",
      "description" : "맛있어요",
      "isMine" : true
    }, {
      "userId" : 2,
      "reviewId" : 2,
      "nickName" : "김길동",
      "rating" : 2,
      "imageUrl" : "https://image.com/2.jpg",
      "visitTimes" : 1,
      "visitedAt" : "2024.03.07",
      "description" : "맛있어요",
      "isMine" : false
    }, {
      "userId" : 3,
      "reviewId" : 3,
      "nickName" : "맛있는 음식을보면 짖는 개",
      "rating" : 3,
      "imageUrl" : null,
      "visitTimes" : 1,
      "visitedAt" : "2024.03.07",
      "description" : "왈왈왈왈왈왈왈",
      "isMine" : false
    } ],
    "pageable" : "INSTANCE",
    "size" : 3,
    "number" : 0,
    "sort" : {
      "empty" : true,
      "unsorted" : true,
      "sorted" : false
    },
    "last" : false,
    "first" : true,
    "numberOfElements" : 3,
    "empty" : false
  }
}

Response fields

필드명

타입

필수여부

설명

code

Number

true

결과코드

message

String

true

결과메시지

data.content[]

Array

true

리뷰 목록

data.content[].userId

Number

true

사용자 ID

data.content[].nickName

String

true

닉네임

data.content[].rating

Number

true

평점

data.content[].imageUrl

String

false

이미지 URL

data.content[].visitTimes

Number

true

방문 횟수

data.content[].visitedAt

String

true

방문 일시

data.content[].description

String

true

리뷰 내용

data.content[].isMine

Boolean

true

자신의 리뷰인지 여부

data.pageable

String

true

페이지 정보

data.first

Boolean

true

첫 번째 페이지 여부

data.last

Boolean

true

마지막 페이지 여부

data.size

Number

true

페이지 크기

data.number

Number

true

현재 페이지 번호

data.sort

Object

true

정렬 정보

data.numberOfElements

Number

true

현재 페이지의 요소 수

data.empty

Boolean

true

현재 페이지가 비어 있는지 여부

4-1. 리뷰 작성 (기존에 존재하는 가게)

Curl request

$ curl 'http://localhost:8080/api/v1/stores/reviews?_csrf=Ybqumg_n8tRVHj4l8v1s3P7m0pJm93V_WepEeCnkyHRJxd7iUoyZo2mFxO14LAgXy9BYvp3e__AFwRRSadIhS0-GrRF58e7S' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Bearer accessToken' \
    -d '{
  "storeId" : 1,
  "newStore" : null,
  "rating" : 5,
  "visitedAt" : "2024.01.10",
  "imageUrl" : "https://exampleimageurl.com",
  "description" : "진짜진짜진짜진짜맛있어요"
}'

HTTP request

POST /api/v1/stores/reviews?_csrf=Ybqumg_n8tRVHj4l8v1s3P7m0pJm93V_WepEeCnkyHRJxd7iUoyZo2mFxO14LAgXy9BYvp3e__AFwRRSadIhS0-GrRF58e7S HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer accessToken
Content-Length: 190
Host: localhost:8080

{
  "storeId" : 1,
  "newStore" : null,
  "rating" : 5,
  "visitedAt" : "2024.01.10",
  "imageUrl" : "https://exampleimageurl.com",
  "description" : "진짜진짜진짜진짜맛있어요"
}

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 98

{
  "code" : 201,
  "message" : "생성",
  "data" : {
    "reviewId" : 7,
    "storeId" : 1
  }
}

HTTPie request

$ echo '{
  "storeId" : 1,
  "newStore" : null,
  "rating" : 5,
  "visitedAt" : "2024.01.10",
  "imageUrl" : "https://exampleimageurl.com",
  "description" : "진짜진짜진짜진짜맛있어요"
}' | http POST 'http://localhost:8080/api/v1/stores/reviews?_csrf=Ybqumg_n8tRVHj4l8v1s3P7m0pJm93V_WepEeCnkyHRJxd7iUoyZo2mFxO14LAgXy9BYvp3e__AFwRRSadIhS0-GrRF58e7S' \
    'Content-Type:application/json;charset=UTF-8' \
    'Authorization:Bearer accessToken'

Request body

{
  "storeId" : 1,
  "newStore" : null,
  "rating" : 5,
  "visitedAt" : "2024.01.10",
  "imageUrl" : "https://exampleimageurl.com",
  "description" : "진짜진짜진짜진짜맛있어요"
}

Request fields

필드명

타입

필수여부

제약조건

설명

storeId

Number

false

가게 ID

newStore

Object

false

새로운 가게 정보

newStore.storeName

String

true

가게 이름

newStore.latitude

Number

true

위도

newStore.longitude

Number

true

경도

newStore.categoryType

String

true

또잇 카테고리 타입 (KOREAN, JAPANESE, CHINESE, CAFE, WESTERN, BARS, ETC..)

newStore.kakaoStoreId

Number

true

카카오 가게 고유 ID

newStore.kakaoCategoryName

String

true

카카오 카테고리 분류 기준 (빵집, 뷔페 등 카카오에서 내려오는 값 저장하기 위함)

newStore.address

String

true

가게 주소

rating

Number

true

별점

visitedAt

String

true

방문 날짜

imageUrl

String

false

첨부된 이미지 url

description

String

true

리뷰 내용

Request headers

Name Description

Authorization

accessToken

Response body

{
  "code" : 201,
  "message" : "생성",
  "data" : {
    "reviewId" : 7,
    "storeId" : 1
  }
}

Response fields

필드명

타입

필수여부

설명

code

Number

true

결과코드

message

String

true

결과메시지

data.reviewId

Number

true

생성된 리뷰 ID

data.storeId

Number

true

생성된/기존 가게 ID

4-2. 리뷰 작성 (새로운 가게)

Curl request

$ curl 'http://localhost:8080/api/v1/stores/reviews?_csrf=jblk5jaRj4wTnVfjkTFy4s899DpMQSuHdGh0n9u8am863nrnuN9Qgg6mtr0--2fT9xxG1v4J2Vh4chqqEA1B_rjdCwoL7xmD' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Bearer accessToken' \
    -d '{
  "storeId" : null,
  "newStore" : {
    "storeName" : "칠기마라탕",
    "latitude" : 127.239487,
    "longitude" : 37.29472,
    "categoryType" : "KOREAN",
    "kakaoStoreId" : 1234,
    "kakaoCategoryName" : "간식",
    "address" : "서울시 강남구 역삼동 123-123"
  },
  "rating" : 5,
  "visitedAt" : "2024.01.10",
  "imageUrl" : "https://exampleimageurl.com",
  "description" : "진짜진짜진짜진짜맛있어요"
}'

HTTP request

POST /api/v1/stores/reviews?_csrf=jblk5jaRj4wTnVfjkTFy4s899DpMQSuHdGh0n9u8am863nrnuN9Qgg6mtr0--2fT9xxG1v4J2Vh4chqqEA1B_rjdCwoL7xmD HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer accessToken
Content-Length: 438
Host: localhost:8080

{
  "storeId" : null,
  "newStore" : {
    "storeName" : "칠기마라탕",
    "latitude" : 127.239487,
    "longitude" : 37.29472,
    "categoryType" : "KOREAN",
    "kakaoStoreId" : 1234,
    "kakaoCategoryName" : "간식",
    "address" : "서울시 강남구 역삼동 123-123"
  },
  "rating" : 5,
  "visitedAt" : "2024.01.10",
  "imageUrl" : "https://exampleimageurl.com",
  "description" : "진짜진짜진짜진짜맛있어요"
}

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 98

{
  "code" : 201,
  "message" : "생성",
  "data" : {
    "reviewId" : 7,
    "storeId" : 3
  }
}

HTTPie request

$ echo '{
  "storeId" : null,
  "newStore" : {
    "storeName" : "칠기마라탕",
    "latitude" : 127.239487,
    "longitude" : 37.29472,
    "categoryType" : "KOREAN",
    "kakaoStoreId" : 1234,
    "kakaoCategoryName" : "간식",
    "address" : "서울시 강남구 역삼동 123-123"
  },
  "rating" : 5,
  "visitedAt" : "2024.01.10",
  "imageUrl" : "https://exampleimageurl.com",
  "description" : "진짜진짜진짜진짜맛있어요"
}' | http POST 'http://localhost:8080/api/v1/stores/reviews?_csrf=jblk5jaRj4wTnVfjkTFy4s899DpMQSuHdGh0n9u8am863nrnuN9Qgg6mtr0--2fT9xxG1v4J2Vh4chqqEA1B_rjdCwoL7xmD' \
    'Content-Type:application/json;charset=UTF-8' \
    'Authorization:Bearer accessToken'

Request body

{
  "storeId" : null,
  "newStore" : {
    "storeName" : "칠기마라탕",
    "latitude" : 127.239487,
    "longitude" : 37.29472,
    "categoryType" : "KOREAN",
    "kakaoStoreId" : 1234,
    "kakaoCategoryName" : "간식",
    "address" : "서울시 강남구 역삼동 123-123"
  },
  "rating" : 5,
  "visitedAt" : "2024.01.10",
  "imageUrl" : "https://exampleimageurl.com",
  "description" : "진짜진짜진짜진짜맛있어요"
}

Request fields

필드명

타입

필수여부

제약조건

설명

storeId

Number

false

가게 ID

newStore

Object

true

새로운 가게 정보

newStore.storeName

String

true

가게 이름

newStore.latitude

Number

true

위도

newStore.longitude

Number

true

경도

newStore.categoryType

String

true

또잇 카테고리 타입 (KOREAN, JAPANESE, CHINESE, CAFE, WESTERN, BARS, ETC..)

newStore.kakaoStoreId

Number

true

카카오 가게 고유 ID

newStore.kakaoCategoryName

String

true

카카오 카테고리 분류 기준 (빵집, 뷔페 등 카카오에서 내려오는 값 저장하기 위함)

newStore.address

String

true

가게 주소

rating

Number

true

별점

visitedAt

String

true

방문 날짜

imageUrl

String

false

첨부된 이미지 url

description

String

true

리뷰 내용

Request headers

Name Description

Authorization

accessToken

Response body

{
  "code" : 201,
  "message" : "생성",
  "data" : {
    "reviewId" : 7,
    "storeId" : 3
  }
}

Response fields

필드명

타입

필수여부

설명

code

Number

true

결과코드

message

String

true

결과메시지

data.reviewId

Number

true

생성된 리뷰 ID

data.storeId

Number

false

생성된 가게 ID

5. 리뷰 삭제(본인이 작성한 리뷰만)

Curl request

$ curl 'http://localhost:8080/api/v1/reviews/1' -i -X DELETE \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Bearer accessToken'

HTTP request

DELETE /api/v1/reviews/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer accessToken
Host: localhost:8080

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 59

{
  "code" : 200,
  "message" : "성공",
  "data" : null
}

HTTPie request

$ http DELETE 'http://localhost:8080/api/v1/reviews/1' \
    'Content-Type:application/json;charset=UTF-8' \
    'Authorization:Bearer accessToken'

Path parameters

Table 1. /api/v1/reviews/{reviewId}
Parameter Description

reviewId

리뷰 ID

Request headers

Name Description

Authorization

accessToken

Response body

{
  "code" : 200,
  "message" : "성공",
  "data" : null
}

Response fields

필드명

타입

필수여부

설명

code

Number

true

결과코드

message

String

true

결과메시지

data

Null

true

null

6. 북마크 등록 및 삭제

Curl request

$ curl 'http://localhost:8080/api/v1/bookmarks/1' -i -X PATCH \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Bearer accessToken'

HTTP request

PATCH /api/v1/bookmarks/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer accessToken
Host: localhost:8080

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 99

{
  "code" : 200,
  "message" : "성공",
  "data" : {
    "bookmarkId" : 1,
    "userId" : 1
  }
}

HTTPie request

$ http PATCH 'http://localhost:8080/api/v1/bookmarks/1' \
    'Content-Type:application/json;charset=UTF-8' \
    'Authorization:Bearer accessToken'

Path parameters

Table 1. /api/v1/bookmarks/{storeId}
Parameter Description

storeId

음식점 ID

Request headers

Name Description

Authorization

accessToken

Response body

{
  "code" : 200,
  "message" : "성공",
  "data" : {
    "bookmarkId" : 1,
    "userId" : 1
  }
}

Response fields

필드명

타입

필수여부

설명

code

Number

true

결과코드

message

String

true

결과메시지

data.bookmarkId

Number

true

북마크 ID

data.userId

Number

true

유저 ID

7. 지도에서 위,경도 내에 존재하는 식당정보 조회

Curl request

$ curl 'http://localhost:8080/api/v1/stores/location-range?leftTopLatitude=60.11111&leftTopLongitude=120.0&rightBottomLatitude=30.11111&rightBottomLongitude=140.0&level=4&type=CAFE' -i -X GET \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Bearer accessToken'

HTTP request

GET /api/v1/stores/location-range?leftTopLatitude=60.11111&leftTopLongitude=120.0&rightBottomLatitude=30.11111&rightBottomLongitude=140.0&level=4&type=CAFE HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer accessToken
Host: localhost:8080

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 1603

{
  "code" : 200,
  "message" : "성공",
  "data" : {
    "locationStoreList" : [ {
      "storeId" : 1,
      "kakaoStoreId" : 2,
      "storeName" : "칠기마라탕1",
      "categoryId" : 1,
      "categoryName" : "한식",
      "categoryType" : "KOREAN",
      "address" : "서울특별시 1",
      "longitude" : 127.239487,
      "latitude" : 37.29472,
      "totalRevisitedCount" : 1,
      "totalReviewCount" : 1,
      "isBookmarked" : true
    }, {
      "storeId" : 2,
      "kakaoStoreId" : 2,
      "storeName" : "칠기마라탕2",
      "categoryId" : 1,
      "categoryName" : "중식",
      "categoryType" : "CHINESE",
      "address" : "서울특별시 2",
      "longitude" : 127.239487,
      "latitude" : 37.29472,
      "totalRevisitedCount" : 1,
      "totalReviewCount" : 1,
      "isBookmarked" : true
    }, {
      "storeId" : 3,
      "kakaoStoreId" : 3,
      "storeName" : "칠기마라탕3",
      "categoryId" : 1,
      "categoryName" : "일식",
      "categoryType" : "JAPANESE",
      "address" : "서울특별시 3",
      "longitude" : 127.239487,
      "latitude" : 37.29472,
      "totalRevisitedCount" : 1,
      "totalReviewCount" : 1,
      "isBookmarked" : false
    }, {
      "storeId" : 4,
      "kakaoStoreId" : 4,
      "storeName" : "칠기마라탕4",
      "categoryId" : 1,
      "categoryName" : "양식",
      "categoryType" : "WESTERN",
      "address" : "서울특별시 4",
      "longitude" : 127.239487,
      "latitude" : 37.29472,
      "totalRevisitedCount" : 1,
      "totalReviewCount" : 1,
      "isBookmarked" : false
    } ]
  }
}

HTTPie request

$ http GET 'http://localhost:8080/api/v1/stores/location-range?leftTopLatitude=60.11111&leftTopLongitude=120.0&rightBottomLatitude=30.11111&rightBottomLongitude=140.0&level=4&type=CAFE' \
    'Content-Type:application/json;charset=UTF-8' \
    'Authorization:Bearer accessToken'

Query parameters

Parameter Description

leftTopLatitude

첫번째 위도(좌측최상단)

leftTopLongitude

두번째 경도(좌측최상단)

rightBottomLatitude

두번째 위도(우측최하단)

rightBottomLongitude

두번째 경도(우측최하단)

level

확대/축소 레벨

type

식당 카테고리(optional) - KOREAN(한식) CHINESE(중식) JAPANESE(일식) WESTERN(양식) CAFE(카페,디저트) BARS(술집) SCHOOLFOOD(분식)

Request headers

Name Description

Authorization

accessToken

Response body

{
  "code" : 200,
  "message" : "성공",
  "data" : {
    "locationStoreList" : [ {
      "storeId" : 1,
      "kakaoStoreId" : 2,
      "storeName" : "칠기마라탕1",
      "categoryId" : 1,
      "categoryName" : "한식",
      "categoryType" : "KOREAN",
      "address" : "서울특별시 1",
      "longitude" : 127.239487,
      "latitude" : 37.29472,
      "totalRevisitedCount" : 1,
      "totalReviewCount" : 1,
      "isBookmarked" : true
    }, {
      "storeId" : 2,
      "kakaoStoreId" : 2,
      "storeName" : "칠기마라탕2",
      "categoryId" : 1,
      "categoryName" : "중식",
      "categoryType" : "CHINESE",
      "address" : "서울특별시 2",
      "longitude" : 127.239487,
      "latitude" : 37.29472,
      "totalRevisitedCount" : 1,
      "totalReviewCount" : 1,
      "isBookmarked" : true
    }, {
      "storeId" : 3,
      "kakaoStoreId" : 3,
      "storeName" : "칠기마라탕3",
      "categoryId" : 1,
      "categoryName" : "일식",
      "categoryType" : "JAPANESE",
      "address" : "서울특별시 3",
      "longitude" : 127.239487,
      "latitude" : 37.29472,
      "totalRevisitedCount" : 1,
      "totalReviewCount" : 1,
      "isBookmarked" : false
    }, {
      "storeId" : 4,
      "kakaoStoreId" : 4,
      "storeName" : "칠기마라탕4",
      "categoryId" : 1,
      "categoryName" : "양식",
      "categoryType" : "WESTERN",
      "address" : "서울특별시 4",
      "longitude" : 127.239487,
      "latitude" : 37.29472,
      "totalRevisitedCount" : 1,
      "totalReviewCount" : 1,
      "isBookmarked" : false
    } ]
  }
}

Response fields

필드명

타입

필수여부

설명

code

Number

true

결과코드

message

String

true

결과메시지

data.locationStoreList[]

Array

true

요청한 위경도 내 식당 목록

data.locationStoreList[].storeId

Number

true

우리 DB상 음식점 ID

data.locationStoreList[].kakaoStoreId

Number

true

카카오 DB상 음식점 ID

data.locationStoreList[].storeName

String

true

음식점 명

data.locationStoreList[].categoryId

Number

true

음식점 카테고리 ID

data.locationStoreList[].categoryName

String

true

음식점 카테고리 명

data.locationStoreList[].categoryType

String

true

음식점 카테고리 타입 KOREAN(한식) CHINESE(중식) JAPANESE(일식) WESTERN(양식) CAFE(카페,디저트) BARS(술집) SCHOOLFOOD(분식) ETC(기타)

data.locationStoreList[].address

String

true

음식점 주소

data.locationStoreList[].longitude

Number

true

음식점 위도

data.locationStoreList[].latitude

Number

true

음식점 경도

data.locationStoreList[].totalRevisitedCount

Number

true

재방문한 인원수 (N명 재방문)

data.locationStoreList[].totalReviewCount

Number

true

총 리뷰 갯수

data.locationStoreList[].isBookmarked

Boolean

true

북마크 여부

8. 사용자 리뷰 작성 가능 여부 체크

Curl request

$ curl 'http://localhost:8080/api/v1/stores/1/reviews/check-limit?_csrf=FdlXdqnY0hkk_EadWE9i5EEzNdIppU_JYEewegrtyt9WrmHjdOk1FJDpsHgJnSOubWJWgSBVGLMYknrkWSbSQjuMqb4zzQTU' -i -X GET \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Bearer accessToken'

HTTP request

GET /api/v1/stores/1/reviews/check-limit?_csrf=FdlXdqnY0hkk_EadWE9i5EEzNdIppU_JYEewegrtyt9WrmHjdOk1FJDpsHgJnSOubWJWgSBVGLMYknrkWSbSQjuMqb4zzQTU HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer accessToken
Host: localhost:8080

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 86

{
  "code" : 200,
  "message" : "성공",
  "data" : {
    "isAvailable" : false
  }
}

HTTPie request

$ http GET 'http://localhost:8080/api/v1/stores/1/reviews/check-limit?_csrf=FdlXdqnY0hkk_EadWE9i5EEzNdIppU_JYEewegrtyt9WrmHjdOk1FJDpsHgJnSOubWJWgSBVGLMYknrkWSbSQjuMqb4zzQTU' \
    'Content-Type:application/json;charset=UTF-8' \
    'Authorization:Bearer accessToken'

Path parameters

Table 1. /api/v1/stores/{storeId}/reviews/check-limit
Parameter Description

storeId

음식점 ID

Request headers

Name Description

Authorization

accessToken

Response body

{
  "code" : 200,
  "message" : "성공",
  "data" : {
    "isAvailable" : false
  }
}

Response fields

필드명

타입

필수여부

설명

code

Number

true

결과코드

message

String

true

결과메시지

data

Object

true

리뷰 작성 가능 여부 반환

data.isAvailable

Boolean

true

리뷰 작성 가능 여부 반환 (작성가능 : true, 작성불가 : false)

9. 나의 재방문한 식당들 정보 공유

Curl request

$ curl 'http://localhost:8080/api/v1/stores/sharing-spot?userId=3' -i -X GET \
    -H 'Content-Type: application/json;charset=UTF-8'

HTTP request

GET /api/v1/stores/sharing-spot?userId=3 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Host: localhost:8080

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 1525

{
  "code" : 200,
  "message" : "성공",
  "data" : {
    "userNickName" : "또밥입니다",
    "locationStoreList" : [ {
      "storeId" : 1,
      "kakaoStoreId" : 2,
      "storeName" : "칠기마라탕1",
      "categoryId" : 1,
      "categoryName" : "한식",
      "categoryType" : "KOREAN",
      "address" : "서울특별시 1",
      "longitude" : 127.239487,
      "latitude" : 37.29472,
      "totalRevisitedCount" : 1,
      "totalReviewCount" : 1
    }, {
      "storeId" : 2,
      "kakaoStoreId" : 2,
      "storeName" : "칠기마라탕2",
      "categoryId" : 1,
      "categoryName" : "중식",
      "categoryType" : "CHINESE",
      "address" : "서울특별시 2",
      "longitude" : 127.239487,
      "latitude" : 37.29472,
      "totalRevisitedCount" : 1,
      "totalReviewCount" : 1
    }, {
      "storeId" : 3,
      "kakaoStoreId" : 3,
      "storeName" : "칠기마라탕3",
      "categoryId" : 1,
      "categoryName" : "일식",
      "categoryType" : "JAPANESE",
      "address" : "서울특별시 3",
      "longitude" : 127.239487,
      "latitude" : 37.29472,
      "totalRevisitedCount" : 1,
      "totalReviewCount" : 1
    }, {
      "storeId" : 4,
      "kakaoStoreId" : 4,
      "storeName" : "칠기마라탕4",
      "categoryId" : 1,
      "categoryName" : "양식",
      "categoryType" : "WESTERN",
      "address" : "서울특별시 4",
      "longitude" : 127.239487,
      "latitude" : 37.29472,
      "totalRevisitedCount" : 1,
      "totalReviewCount" : 1
    } ]
  }
}

HTTPie request

$ http GET 'http://localhost:8080/api/v1/stores/sharing-spot?userId=3' \
    'Content-Type:application/json;charset=UTF-8'

Query parameters

Parameter Description

userId

유저 고유id

Response body

{
  "code" : 200,
  "message" : "성공",
  "data" : {
    "userNickName" : "또밥입니다",
    "locationStoreList" : [ {
      "storeId" : 1,
      "kakaoStoreId" : 2,
      "storeName" : "칠기마라탕1",
      "categoryId" : 1,
      "categoryName" : "한식",
      "categoryType" : "KOREAN",
      "address" : "서울특별시 1",
      "longitude" : 127.239487,
      "latitude" : 37.29472,
      "totalRevisitedCount" : 1,
      "totalReviewCount" : 1
    }, {
      "storeId" : 2,
      "kakaoStoreId" : 2,
      "storeName" : "칠기마라탕2",
      "categoryId" : 1,
      "categoryName" : "중식",
      "categoryType" : "CHINESE",
      "address" : "서울특별시 2",
      "longitude" : 127.239487,
      "latitude" : 37.29472,
      "totalRevisitedCount" : 1,
      "totalReviewCount" : 1
    }, {
      "storeId" : 3,
      "kakaoStoreId" : 3,
      "storeName" : "칠기마라탕3",
      "categoryId" : 1,
      "categoryName" : "일식",
      "categoryType" : "JAPANESE",
      "address" : "서울특별시 3",
      "longitude" : 127.239487,
      "latitude" : 37.29472,
      "totalRevisitedCount" : 1,
      "totalReviewCount" : 1
    }, {
      "storeId" : 4,
      "kakaoStoreId" : 4,
      "storeName" : "칠기마라탕4",
      "categoryId" : 1,
      "categoryName" : "양식",
      "categoryType" : "WESTERN",
      "address" : "서울특별시 4",
      "longitude" : 127.239487,
      "latitude" : 37.29472,
      "totalRevisitedCount" : 1,
      "totalReviewCount" : 1
    } ]
  }
}

Response fields

필드명

타입

필수여부

설명

code

Number

true

결과코드

message

String

true

결과메시지

data.userNickName

String

true

유저닉네임

data.locationStoreList[]

Array

true

요청한 위경도 내 식당 목록

data.locationStoreList[].storeId

Number

true

우리 DB상 음식점 ID

data.locationStoreList[].kakaoStoreId

Number

true

카카오 DB상 음식점 ID

data.locationStoreList[].storeName

String

true

음식점 명

data.locationStoreList[].categoryId

Number

true

음식점 카테고리 ID

data.locationStoreList[].categoryName

String

true

음식점 카테고리 명

data.locationStoreList[].categoryType

String

true

음식점 카테고리 타입 KOREAN(한식) CHINESE(중식) JAPANESE(일식) WESTERN(양식) CAFE(카페,디저트) BARS(술집) SCHOOLFOOD(분식) ETC(기타)

data.locationStoreList[].address

String

true

음식점 주소

data.locationStoreList[].longitude

Number

true

음식점 위도

data.locationStoreList[].latitude

Number

true

음식점 경도

data.locationStoreList[].totalRevisitedCount

Number

true

재방문한 인원수 (N명 재방문)

data.locationStoreList[].totalReviewCount

Number

true

총 리뷰 갯수

User API

1. 유저 닉네임 변경

Curl request

$ curl 'http://localhost:8080/api/v1/users/nickname?_csrf=1tR5PQgCwSeO7_JF1aQVt05ExxDLS5bAOM_YyxQdEoIob0j2t-YbDzkzpRaj2Zck7Ikh03gl6iiqe6XtXv_r_y0qKrYaWXyQ' -i -X PUT \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Bearer accessToken' \
    -d '{
  "nickname" : "뉴닉네임"
}'

HTTP request

PUT /api/v1/users/nickname?_csrf=1tR5PQgCwSeO7_JF1aQVt05ExxDLS5bAOM_YyxQdEoIob0j2t-YbDzkzpRaj2Zck7Ikh03gl6iiqe6XtXv_r_y0qKrYaWXyQ HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer accessToken
Content-Length: 33
Host: localhost:8080

{
  "nickname" : "뉴닉네임"
}

HTTP response

HTTP/1.1 200 OK

HTTPie request

$ echo '{
  "nickname" : "뉴닉네임"
}' | http PUT 'http://localhost:8080/api/v1/users/nickname?_csrf=1tR5PQgCwSeO7_JF1aQVt05ExxDLS5bAOM_YyxQdEoIob0j2t-YbDzkzpRaj2Zck7Ikh03gl6iiqe6XtXv_r_y0qKrYaWXyQ' \
    'Content-Type:application/json;charset=UTF-8' \
    'Authorization:Bearer accessToken'

Request body

{
  "nickname" : "뉴닉네임"
}

Request fields

필드명

타입

필수여부

제약조건

설명

nickname

String

true

새로운 닉네임

Request headers

Name Description

Authorization

accessToken

2. 유저 프로필 조회

Curl request

$ curl 'http://localhost:8080/api/v1/users/profile' -i -X GET \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Bearer accessToken'

HTTP request

GET /api/v1/users/profile HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer accessToken
Host: localhost:8080

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 134

{
  "code" : 200,
  "message" : "성공",
  "data" : {
    "userId" : 1,
    "nickname" : "닉네임",
    "level" : "배고픈"
  }
}

HTTPie request

$ http GET 'http://localhost:8080/api/v1/users/profile' \
    'Content-Type:application/json;charset=UTF-8' \
    'Authorization:Bearer accessToken'

Request headers

Name Description

Authorization

accessToken

Response body

{
  "code" : 200,
  "message" : "성공",
  "data" : {
    "userId" : 1,
    "nickname" : "닉네임",
    "level" : "배고픈"
  }
}

Response fields

필드명

타입

필수여부

설명

code

Number

true

결과코드

message

String

true

결과메시지

data

Object

true

프로필

data.userId

Number

true

유저 ID

data.nickname

String

true

유저 닉네임

data.level

String

true

유저 레벨 이름 (배고픈, 맨밥이, 또밥이, 또또밥이)

3. 유저 북마크 조회

Curl request

$ curl 'http://localhost:8080/api/v1/users/bookmarks?page=0&size=20' -i -X GET \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Bearer accessToken'

HTTP request

GET /api/v1/users/bookmarks?page=0&size=20 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer accessToken
Host: localhost:8080

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 1078

{
  "code" : 200,
  "message" : "성공",
  "data" : {
    "content" : [ {
      "bookmarkId" : 1,
      "storeId" : 1,
      "storeName" : "칠기마라탕",
      "address" : "서울특별시 동대문구 제기로5길 38",
      "totalRevisitedCount" : 3,
      "categoryName" : "중식",
      "isVisited" : true
    }, {
      "bookmarkId" : 2,
      "storeId" : 2,
      "storeName" : "알베르",
      "address" : "서울특별시 강남구 강남대로102길 34",
      "totalRevisitedCount" : 0,
      "categoryName" : "카페",
      "isVisited" : true
    }, {
      "bookmarkId" : 3,
      "storeId" : 3,
      "storeName" : "떡도리탕",
      "address" : "서울특별시 강남구 테헤란로1길 28-9 1층",
      "totalRevisitedCount" : 50,
      "categoryName" : "한식",
      "isVisited" : false
    } ],
    "pageable" : "INSTANCE",
    "size" : 3,
    "number" : 0,
    "sort" : {
      "empty" : true,
      "unsorted" : true,
      "sorted" : false
    },
    "last" : false,
    "first" : true,
    "numberOfElements" : 3,
    "empty" : false
  }
}

HTTPie request

$ http GET 'http://localhost:8080/api/v1/users/bookmarks?page=0&size=20' \
    'Content-Type:application/json;charset=UTF-8' \
    'Authorization:Bearer accessToken'

Query parameters

Parameter Description

page

페이지 번호 (1번 부터)

size

페이지 사이즈

Request headers

Name Description

Authorization

accessToken

Response body

{
  "code" : 200,
  "message" : "성공",
  "data" : {
    "content" : [ {
      "bookmarkId" : 1,
      "storeId" : 1,
      "storeName" : "칠기마라탕",
      "address" : "서울특별시 동대문구 제기로5길 38",
      "totalRevisitedCount" : 3,
      "categoryName" : "중식",
      "isVisited" : true
    }, {
      "bookmarkId" : 2,
      "storeId" : 2,
      "storeName" : "알베르",
      "address" : "서울특별시 강남구 강남대로102길 34",
      "totalRevisitedCount" : 0,
      "categoryName" : "카페",
      "isVisited" : true
    }, {
      "bookmarkId" : 3,
      "storeId" : 3,
      "storeName" : "떡도리탕",
      "address" : "서울특별시 강남구 테헤란로1길 28-9 1층",
      "totalRevisitedCount" : 50,
      "categoryName" : "한식",
      "isVisited" : false
    } ],
    "pageable" : "INSTANCE",
    "size" : 3,
    "number" : 0,
    "sort" : {
      "empty" : true,
      "unsorted" : true,
      "sorted" : false
    },
    "last" : false,
    "first" : true,
    "numberOfElements" : 3,
    "empty" : false
  }
}

Response fields

필드명

타입

필수여부

설명

code

Number

true

결과코드

message

String

true

결과메시지

data.content[]

Array

true

북마크 목록

data.content[].bookmarkId

Number

true

북마크 ID

data.content[].storeId

Number

true

가게 ID

data.content[].storeName

String

true

가게 이름

data.content[].address

String

true

가게 주소

data.content[].categoryName

String

true

카테고리 이름

data.content[].totalRevisitedCount

Number

true

총 재방문한 사람 수

data.content[].isVisited

Boolean

true

유저의 가게 방문 여부

data.pageable

String

true

페이지 요청 정보

data.first

Boolean

true

첫 번째 페이지 여부

data.last

Boolean

true

마지막 페이지 여부

data.size

Number

true

페이지 크기

data.number

Number

true

현재 페이지 번호

data.sort

Object

true

정렬 정보

data.numberOfElements

Number

true

현재 페이지의 요소 수

data.empty

Boolean

true

현재 페이지가 비어 있는지 여부

4. 유저 리뷰 조회

Curl request

$ curl 'http://localhost:8080/api/v1/users/reviews?page=0&size=20' -i -X GET \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Bearer accessToken'

HTTP request

GET /api/v1/users/reviews?page=0&size=20 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer accessToken
Host: localhost:8080

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 1151

{
  "code" : 200,
  "message" : "성공",
  "data" : {
    "content" : [ {
      "reviewId" : 1,
      "storeId" : 1,
      "storeName" : "칠기마라탕",
      "visitTimes" : 1,
      "visitedAt" : "2024.01.11",
      "categoryName" : "중식",
      "rating" : 5,
      "imageUrl" : "https://image.com/1.jpg",
      "description" : "맛있어요"
    }, {
      "reviewId" : 2,
      "storeId" : 1,
      "storeName" : "칠기마라탕",
      "visitTimes" : 2,
      "visitedAt" : "2024.01.13",
      "categoryName" : "중식",
      "rating" : 4,
      "imageUrl" : "https://image.com/2.jpg",
      "description" : "맛있어요"
    }, {
      "reviewId" : 3,
      "storeId" : 2,
      "storeName" : "알베르",
      "visitTimes" : 1,
      "visitedAt" : "2024.01.03",
      "categoryName" : "카페",
      "rating" : 5,
      "imageUrl" : null,
      "description" : "맛있어요"
    } ],
    "pageable" : "INSTANCE",
    "size" : 3,
    "number" : 0,
    "sort" : {
      "empty" : true,
      "unsorted" : true,
      "sorted" : false
    },
    "last" : false,
    "first" : true,
    "numberOfElements" : 3,
    "empty" : false
  }
}

HTTPie request

$ http GET 'http://localhost:8080/api/v1/users/reviews?page=0&size=20' \
    'Content-Type:application/json;charset=UTF-8' \
    'Authorization:Bearer accessToken'

Query parameters

Parameter Description

page

페이지 번호 (1번 부터)

size

페이지 사이즈

Request headers

Name Description

Authorization

accessToken

Response body

{
  "code" : 200,
  "message" : "성공",
  "data" : {
    "content" : [ {
      "reviewId" : 1,
      "storeId" : 1,
      "storeName" : "칠기마라탕",
      "visitTimes" : 1,
      "visitedAt" : "2024.01.11",
      "categoryName" : "중식",
      "rating" : 5,
      "imageUrl" : "https://image.com/1.jpg",
      "description" : "맛있어요"
    }, {
      "reviewId" : 2,
      "storeId" : 1,
      "storeName" : "칠기마라탕",
      "visitTimes" : 2,
      "visitedAt" : "2024.01.13",
      "categoryName" : "중식",
      "rating" : 4,
      "imageUrl" : "https://image.com/2.jpg",
      "description" : "맛있어요"
    }, {
      "reviewId" : 3,
      "storeId" : 2,
      "storeName" : "알베르",
      "visitTimes" : 1,
      "visitedAt" : "2024.01.03",
      "categoryName" : "카페",
      "rating" : 5,
      "imageUrl" : null,
      "description" : "맛있어요"
    } ],
    "pageable" : "INSTANCE",
    "size" : 3,
    "number" : 0,
    "sort" : {
      "empty" : true,
      "unsorted" : true,
      "sorted" : false
    },
    "last" : false,
    "first" : true,
    "numberOfElements" : 3,
    "empty" : false
  }
}

Response fields

필드명

타입

필수여부

설명

code

Number

true

결과코드

message

String

true

결과메시지

data.content[]

Array

true

리뷰 목록

data.content[].reviewId

Number

true

리뷰 ID

data.content[].storeId

Number

true

가게 ID

data.content[].storeName

String

true

가게 이름

data.content[].rating

Number

true

평점

data.content[].categoryName

String

true

카테고리 이름

data.content[].imageUrl

String

false

이미지 URL

data.content[].visitTimes

Number

true

방문 횟수

data.content[].visitedAt

String

true

방문 일시

data.content[].description

String

true

리뷰 내용

data.pageable

String

true

페이지 요청 정보

data.first

Boolean

true

첫 번째 페이지 여부

data.last

Boolean

true

마지막 페이지 여부

data.size

Number

true

페이지 크기

data.number

Number

true

현재 페이지 번호

data.sort

Object

true

정렬 정보

data.numberOfElements

Number

true

현재 페이지의 요소 수

data.empty

Boolean

true

현재 페이지가 비어 있는지 여부

5. 회원 탈퇴

Curl request

$ curl 'http://localhost:8080/api/v1/users/withdraw' -i -X DELETE

HTTP request

DELETE /api/v1/users/withdraw HTTP/1.1
Host: localhost:8080

HTTP response

HTTP/1.1 200 OK

Store Search API

Curl request

$ curl 'http://localhost:8080/api/v1/stores/search?query=%EC%8A%A4%ED%83%80&x=127.0628310&y=37.51432257&storePage=1&cafePage=1' -i -X GET \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Bearer accessToken'

HTTP request

GET /api/v1/stores/search?query=%EC%8A%A4%ED%83%80&x=127.0628310&y=37.51432257&storePage=1&cafePage=1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer accessToken
Host: localhost:8080

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 863

{
  "code" : 200,
  "message" : "성공",
  "data" : {
    "storeSearchResult" : [ {
      "storeId" : 1,
      "kakaoStoreId" : 1234567,
      "storeName" : "티컵 스타필드 코엑스몰점",
      "kakaoCategoryName" : "카페",
      "categoryType" : "CAFE",
      "address" : "서울 강남구 삼성동 159",
      "distance" : 389,
      "totalRevisitedCount" : 3,
      "longitude" : 37.5126847515106,
      "latitude" : 127.058938708812
    }, {
      "storeId" : 2,
      "kakaoStoreId" : 1112233,
      "storeName" : "스타가든",
      "kakaoCategoryName" : "간식",
      "categoryType" : "ETC",
      "address" : "서울 강남구 역삼동 737",
      "distance" : 2810,
      "totalRevisitedCount" : 0,
      "longitude" : 37.5000544957843,
      "latitude" : 127.036568685902
    } ],
    "storeIsEnd" : false,
    "cafeIsEnd" : false
  }
}

HTTPie request

$ http GET 'http://localhost:8080/api/v1/stores/search?query=%EC%8A%A4%ED%83%80&x=127.0628310&y=37.51432257&storePage=1&cafePage=1' \
    'Content-Type:application/json;charset=UTF-8' \
    'Authorization:Bearer accessToken'

Query parameters

Parameter Description

query

검색 키워드

x

경도

y

위도

storePage

음식점 페이지 - optional

cafePage

카페 페이지 - optional

Request headers

Name Description

Authorization

accessToken

Response body

{
  "code" : 200,
  "message" : "성공",
  "data" : {
    "storeSearchResult" : [ {
      "storeId" : 1,
      "kakaoStoreId" : 1234567,
      "storeName" : "티컵 스타필드 코엑스몰점",
      "kakaoCategoryName" : "카페",
      "categoryType" : "CAFE",
      "address" : "서울 강남구 삼성동 159",
      "distance" : 389,
      "totalRevisitedCount" : 3,
      "longitude" : 37.5126847515106,
      "latitude" : 127.058938708812
    }, {
      "storeId" : 2,
      "kakaoStoreId" : 1112233,
      "storeName" : "스타가든",
      "kakaoCategoryName" : "간식",
      "categoryType" : "ETC",
      "address" : "서울 강남구 역삼동 737",
      "distance" : 2810,
      "totalRevisitedCount" : 0,
      "longitude" : 37.5000544957843,
      "latitude" : 127.036568685902
    } ],
    "storeIsEnd" : false,
    "cafeIsEnd" : false
  }
}

Response fields

필드명

타입

필수여부

설명

code

Number

true

결과코드

message

String

true

결과메시지

data.storeSearchResult[]

Array

true

리뷰 목록

data.storeSearchResult[].storeId

Number

true

우리 DB상 음식점 ID

data.storeSearchResult[].storeName

String

true

음식점 명

data.storeSearchResult[].kakaoCategoryName

String

true

카카오 카테고리

data.storeSearchResult[].categoryType

String

true

카테고리 타입 - 또잇또잇 db 기준

data.storeSearchResult[].address

String

true

음식점 주소

data.storeSearchResult[].distance

Number

true

현재 위치와 음식점과의 거리

data.storeSearchResult[].totalRevisitedCount

Number

true

재방문한 인원수 (N명 재방문)

data.storeSearchResult[].longitude

Number

true

음식점 경도

data.storeSearchResult[].latitude

Number

true

음식점 위도

data.storeSearchResult[].kakaoStoreId

Number

true

카카오 DB상 음식점 ID

data.storeIsEnd

Boolean

true

음식점 검색 결과 마지막 페이지 여부

data.cafeIsEnd

Boolean

true

카페 검색 결과 마지막 페이지 여부

Image API

presigned url 발급

Curl request

$ curl 'http://localhost:8080/api/v1/images/presigned-url?fileName=exampleimage' -i -X GET \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Bearer accessToken'

HTTP request

GET /api/v1/images/presigned-url?fileName=exampleimage HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer accessToken
Host: localhost:8080

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 137

{
  "code" : 200,
  "message" : "성공",
  "data" : {
    "presignedUrl" : "https://ddoeatimg.kr.object.ncloudstorage.com/example"
  }
}

Query parameters

Parameter Description

fileName

업로드할 이미지 파일 이름

Request headers

Name Description

Authorization

accessToken

Response fields

필드명

타입

필수여부

설명

code

Number

true

결과코드

message

String

true

결과메시지

data

Object

true

data.presignedUrl

String

true

presigned url 주소

Test API

1. 테스트용 토큰 발급

Curl request

$ curl 'http://localhost:8080/api/v1/auth/access-token/1' -i -X GET \
    -H 'Content-Type: application/json;charset=UTF-8'

HTTP request

GET /api/v1/auth/access-token/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Host: localhost:8080

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 155

{
  "code" : 200,
  "message" : "성공",
  "data" : {
    "accessToken" : "access_token",
    "refreshToken" : "refresh_token",
    "isFirst" : null
  }
}

HTTPie request

$ http GET 'http://localhost:8080/api/v1/auth/access-token/1' \
    'Content-Type:application/json;charset=UTF-8'

Path parameters

Table 1. /api/v1/auth/access-token/{userId}
Parameter Description

userId

USER ID

Response body

{
  "code" : 200,
  "message" : "성공",
  "data" : {
    "accessToken" : "access_token",
    "refreshToken" : "refresh_token",
    "isFirst" : null
  }
}

Response fields

필드명

타입

필수여부

설명

code

Number

true

결과코드

message

String

true

결과메시지

data.accessToken

String

true

테스트용 accessToken

data.refreshToken

String

true

테스트용 refreshToken

data.isFirst

Null

true

NULL