From 4d83cf892163fd2970bbfc18dfa10be25752445c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=B1=EC=B0=BD=ED=9B=88?= <48042490+hoon7566@users.noreply.github.com> Date: Tue, 29 Mar 2022 19:22:49 +0900 Subject: [PATCH] =?UTF-8?q?Delete=202022-3-24-Store=20Service=20API=20?= =?UTF-8?q?=EB=AC=B8=EC=84=9C.html?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2022-3-24-Store Service API 문서.html | 2860 ----------------- 1 file changed, 2860 deletions(-) delete mode 100644 docs/_posts/2022-3-24-Store Service API 문서.html diff --git a/docs/_posts/2022-3-24-Store Service API 문서.html b/docs/_posts/2022-3-24-Store Service API 문서.html deleted file mode 100644 index 6b6fc78..0000000 --- a/docs/_posts/2022-3-24-Store Service API 문서.html +++ /dev/null @@ -1,2860 +0,0 @@ - - - - - - - -개요 - - - - - - -
-
-

HTTP 동사

-
-
-

본 REST API에서 사용하는 HTTP 동사(verbs)는 가능한한 표준 HTTP와 REST 규약을 따릅니다.

-
- ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
동사용례

GET

리소스를 가져올 때 사용

POST

새 리소스를 만들 때 사용

PUT

기존 리소스를 수정할 때 사용

PATCH

기존 리소스의 일부를 수정할 때 사용

DELETE

기존 리소스를 삭제할 떄 사용

-
-
-
-

HTTP 상태 코드

-
-
-

본 REST API에서 사용하는 HTTP 상태 코드는 가능한 표준 HTTP와 REST 규약을 따릅니다.

-
- ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
상태 코드용례

200 OK

요청을 성공적으로 처리함

201 Created

새 리소스를 성공적으로 생성함. 응답의 Location 헤더에 해당 리소스의 URI가 담겨있다.

204 No Content

기존 리소스를 성공적으로 수정함.

400 Bad Request

잘못된 요청을 보낸 경우. 응답 본문에 더 오류에 대한 정보가 담겨있다.

404 Not Found

요청한 리소스가 없음.

409 Conflict

클라이언트의 요청이 서버의 상태와 충돌이 발생한 경우.

-
-
-
-

상품

-
-
-

상품 조회

-
-

Curl request

-
-
-
$ curl 'http://127.0.0.1:8001/item/1' -i -X GET
-
-
-
-
-

HTTP request

-
-
-
GET /item/1 HTTP/1.1
-Host: 127.0.0.1:8001
-
-
-
-
-

HTTP response

-
-
-
HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 146
-
-{
-  "code" : "SUCCESS",
-  "message" : "",
-  "data" : {
-    "id" : 1,
-    "name" : "아메리카노",
-    "salesYn" : "Y",
-    "price" : 1500
-  }
-}
-
-
-
-
-

Path parameters

- - ---- - - - - - - - - - - - - -
Table 1. /item/{itemId}
ParameterDescription

itemId

상품 고유 번호

-
-
-

Response fields

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

code

String

결과 코드 SUCCESS/ERROR

message

String

메시지

data.id

Number

상품 고유 번호

data.name

String

상품 이름

data.salesYn

String

화면 표시 여부 Y/N

data.price

Number

상품 가격

-
-
-
-

상품 조회 (존재하지 않는 상품)

-
-

Curl request

-
-
-
$ curl 'http://127.0.0.1:8001/item/9999' -i -X GET
-
-
-
-
-

HTTP request

-
-
-
GET /item/9999 HTTP/1.1
-Host: 127.0.0.1:8001
-
-
-
-
-

HTTP response

-
-
-
HTTP/1.1 409 Conflict
-Content-Type: application/json
-Content-Length: 93
-
-{
-  "code" : "ERROR",
-  "message" : "존재하지 않는 상품입니다.",
-  "data" : null
-}
-
-
-
-
-

Path parameters

- - ---- - - - - - - - - - - - - -
Table 1. /item/{itemId}
ParameterDescription

itemId

상품 고유 번호

-
-
-

Response fields

- ----- - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

code

String

결과 코드 SUCCESS/ERROR

message

String

메시지

data

Null

데이터

-
-
-
-

상품 리스트 조회

-
-

Curl request

-
-
-
$ curl 'http://127.0.0.1:8001/items/1,2,3' -i -X GET
-
-
-
-
-

HTTP request

-
-
-
GET /items/1,2,3 HTTP/1.1
-Host: 127.0.0.1:8001
-
-
-
-
-

HTTP response

-
-
-
HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 219
-
-{
-  "code" : "SUCCESS",
-  "message" : "",
-  "data" : [ {
-    "id" : 1,
-    "name" : "아이템 이름1"
-  }, {
-    "id" : 2,
-    "name" : "아이템 이름2"
-  }, {
-    "id" : 3,
-    "name" : "아이템 이름3"
-  } ]
-}
-
-
-
-
-

Path parameters

- - ---- - - - - - - - - - - - - -
Table 1. /items/{itemIds}
ParameterDescription

itemIds

상품 고유 번호들

-
-
-

Response fields

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

code

String

결과 코드 SUCCESS/ERROR

message

String

메시지

data[*].id

Number

상품 고유 번호

data[*].name

String

상품 이름

-
-
-
-
-
-

상품 (판매자)

-
- -
-

상품 리스트 조회(구매자)

-
-

Curl request

-
-
-
$ curl 'http://just-pickup.com:8000/api/customer/items/1,2' -i -X GET
-
-
-
-
-

HTTP request

-
-
-
GET /api/customer/items/1,2 HTTP/1.1
-Host: just-pickup.com:8000
-
-
-
-
-

HTTP response

-
-
-
HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 608
-
-{
-  "code" : "SUCCESS",
-  "message" : "",
-  "data" : [ {
-    "id" : 1,
-    "name" : "아메리카노",
-    "salesYn" : "Y",
-    "price" : 1500,
-    "itemOptions" : [ {
-      "id" : 1,
-      "optionType" : "REQUIRED",
-      "name" : "Hot"
-    }, {
-      "id" : 2,
-      "optionType" : "OTHER",
-      "name" : "add shot"
-    } ]
-  }, {
-    "id" : 2,
-    "name" : "카페라테",
-    "salesYn" : "Y",
-    "price" : 2500,
-    "itemOptions" : [ {
-      "id" : 1,
-      "optionType" : "REQUIRED",
-      "name" : "Hot"
-    }, {
-      "id" : 2,
-      "optionType" : "OTHER",
-      "name" : "add shot"
-    } ]
-  } ]
-}
-
-
-
-
-

Path parameters

- - ---- - - - - - - - - - - - - -
Table 1. /api/customer/items/{itemIds}
ParameterDescription

itemIds

상품 고유 번호리스트

-
-
-

Response fields

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

code

String

결과 코드 SUCCESS/ERROR

message

String

메시지

data[*].id

Number

상품 고유 번호

data[*].name

String

상품 이름

data[*].salesYn

String

화면 표시 여부 Y/N

data[*].price

Number

상품 가격

data[*].itemOptions[*].id

Number

아이템 옵션 고유 번호

data[*].itemOptions[*].optionType

String

옵션 타입

data[*].itemOptions[*].name

String

옵션명

-
-
-
-

상품 조회(판매자)

-
-

Curl request

-
-
-
$ curl 'http://127.0.0.1:8001/api/owner/item/1' -i -X GET
-
-
-
-
-

HTTP request

-
-
-
GET /api/owner/item/1 HTTP/1.1
-Host: 127.0.0.1:8001
-
-
-
-
-

HTTP response

-
-
-
HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 196
-
-{
-  "code" : "SUCCESS",
-  "message" : "",
-  "data" : {
-    "id" : 1,
-    "name" : "아메리카노",
-    "salesYn" : "Y",
-    "price" : 1500,
-    "itemOptions" : [ ],
-    "categoryId" : null
-  }
-}
-
-
-
-
-

Path parameters

- - ---- - - - - - - - - - - - - -
Table 1. /api/owner/item/{itemId}
ParameterDescription

itemId

상품 고유 번호

-
-
-

Response fields

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

code

String

결과 코드 SUCCESS/ERROR

message

String

메시지

data.id

Number

상품 고유 번호

data.name

String

상품 이름

data.salesYn

String

화면 표시 여부 Y/N

data.price

Number

상품 가격

data.itemOptions

Array

아이템 옵션

data.categoryId

Null

카테고리 고유번호

-
-
-
-

상품 리스트 조회

-
-

Curl request

-
-
-
$ curl 'http://127.0.0.1:8001/api/owner/item/?word=' -i -X GET \
-    -H 'user-id: 1'
-
-
-
-
-

HTTP request

-
-
-
GET /api/owner/item/?word= HTTP/1.1
-user-id: 1
-Host: 127.0.0.1:8001
-
-
-
-
-

HTTP response

-
-
-
HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 408
-
-{
-  "code" : "SUCCESS",
-  "message" : "",
-  "data" : {
-    "itemList" : [ {
-      "id" : 1,
-      "name" : "아메리카노",
-      "salesYn" : "Y",
-      "price" : 1500,
-      "categoryName" : null
-    }, {
-      "id" : 2,
-      "name" : "카페라테",
-      "salesYn" : "Y",
-      "price" : 2000,
-      "categoryName" : null
-    } ],
-    "page" : {
-      "startPage" : 0,
-      "totalPage" : 1
-    }
-  }
-}
-
-
-
-
-

Response fields

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

code

String

결과 코드 SUCCESS/ERROR

message

String

메시지

data.itemList[*].id

Number

상품 고유 번호

data.itemList[*].name

String

상품 이름

data.itemList[*].salesYn

String

화면 표시 여부 Y/N

data.itemList[*].price

Number

상품 가격

data.itemList[*].categoryName

Null

카테고리 명

data.page.startPage

Number

현제 페이지

data.page.totalPage

Number

토탈 페이지

-
-
-
-

상품 수정

-
-

Curl request

-
-
-
$ curl 'http://127.0.0.1:8001/api/owner/item/1' -i -X PUT \
-    -H 'Content-Type: application/json;charset=UTF-8' \
-    -H 'user-id: 2' \
-    -H 'Accept: application/json' \
-    -d '{
-  "itemId" : 1,
-  "itemName" : "테스트아이템",
-  "itemPrice" : 3000,
-  "categoryId" : 1,
-  "requiredOption" : [ {
-    "id" : null,
-    "name" : "HOT",
-    "optionType" : "REQUIRED"
-  } ],
-  "otherOption" : [ {
-    "id" : null,
-    "name" : "샷 추가",
-    "optionType" : "OTHER"
-  } ]
-}'
-
-
-
-
-

HTTP request

-
-
-
PUT /api/owner/item/1 HTTP/1.1
-Content-Type: application/json;charset=UTF-8
-user-id: 2
-Accept: application/json
-Content-Length: 296
-Host: 127.0.0.1:8001
-
-{
-  "itemId" : 1,
-  "itemName" : "테스트아이템",
-  "itemPrice" : 3000,
-  "categoryId" : 1,
-  "requiredOption" : [ {
-    "id" : null,
-    "name" : "HOT",
-    "optionType" : "REQUIRED"
-  } ],
-  "otherOption" : [ {
-    "id" : null,
-    "name" : "샷 추가",
-    "optionType" : "OTHER"
-  } ]
-}
-
-
-
-
-

HTTP response

-
-
-
HTTP/1.1 204 No Content
-Content-Type: application/json
-Content-Length: 65
-
-{
-  "code" : "SUCCESS",
-  "message" : "성공",
-  "data" : null
-}
-
-
-
-
-
-

상품 등록

-
-

Curl request

-
-
-
$ curl 'http://127.0.0.1:8001/api/owner/item' -i -X POST \
-    -H 'Content-Type: application/json;charset=UTF-8' \
-    -H 'user-id: 2' \
-    -H 'Accept: application/json' \
-    -d '{
-  "itemId" : null,
-  "itemName" : "테스트아이템",
-  "itemPrice" : 3000,
-  "categoryId" : 1,
-  "requiredOption" : [ {
-    "id" : null,
-    "name" : "HOT",
-    "optionType" : "REQUIRED"
-  } ],
-  "otherOption" : [ {
-    "id" : null,
-    "name" : "샷 추가",
-    "optionType" : "OTHER"
-  } ]
-}'
-
-
-
-
-

HTTP request

-
-
-
POST /api/owner/item HTTP/1.1
-Content-Type: application/json;charset=UTF-8
-user-id: 2
-Accept: application/json
-Content-Length: 299
-Host: 127.0.0.1:8001
-
-{
-  "itemId" : null,
-  "itemName" : "테스트아이템",
-  "itemPrice" : 3000,
-  "categoryId" : 1,
-  "requiredOption" : [ {
-    "id" : null,
-    "name" : "HOT",
-    "optionType" : "REQUIRED"
-  } ],
-  "otherOption" : [ {
-    "id" : null,
-    "name" : "샷 추가",
-    "optionType" : "OTHER"
-  } ]
-}
-
-
-
-
-

HTTP response

-
-
-
HTTP/1.1 201 Created
-Content-Type: application/json
-Content-Length: 65
-
-{
-  "code" : "SUCCESS",
-  "message" : "성공",
-  "data" : null
-}
-
-
-
-
-
-
-
-

카테고리

-
- -
-
-
-

카테고리 조회

-
-
-

Curl request

-
-
-
$ curl 'http://127.0.0.1:8001/api/owner/category' -i -X GET \
-    -H 'user-id: 2'
-
-
-
-
-

HTTP request

-
-
-
GET /api/owner/category HTTP/1.1
-user-id: 2
-Host: 127.0.0.1:8001
-
-
-
-
-

HTTP response

-
-
-
HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 451
-
-{
-  "code" : "SUCCESS",
-  "message" : "",
-  "data" : [ {
-    "categoryId" : 10,
-    "name" : "카페인",
-    "order" : 1,
-    "items" : [ {
-      "id" : 1,
-      "name" : "아메리카노"
-    }, {
-      "id" : 2,
-      "name" : "카페라테"
-    } ]
-  }, {
-    "categoryId" : 11,
-    "name" : "디저트",
-    "order" : 2,
-    "items" : [ {
-      "id" : 3,
-      "name" : "비스킷"
-    }, {
-      "id" : 4,
-      "name" : "와플"
-    } ]
-  } ]
-}
-
-
-
- -
-

Response fields

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

code

String

결과 코드 SUCCESS/ERROR

message

String

메시지

data[*].categoryId

Number

카테고리 고유 번호

data[*].name

String

카테고리 명

data[*].order

Number

순서

data[*].items[*].id

Number

아이템 고유번호

data[*].items[*].name

String

아이템 명

-
-
-
-
-

카테고리 수정

-
-
-

Curl request

-
-
-
$ curl 'http://127.0.0.1:8001/api/owner/category' -i -X PUT \
-    -H 'Content-Type: application/json;charset=UTF-8' \
-    -H 'Accept: application/json' \
-    -d '{
-  "storeId" : 1,
-  "categoryList" : [ {
-    "categoryId" : 10,
-    "name" : "카테고리1",
-    "order" : 2
-  }, {
-    "categoryId" : 11,
-    "name" : "카테고리2",
-    "order" : 1
-  } ],
-  "deletedList" : [ {
-    "categoryId" : 11,
-    "name" : "Non Coffee",
-    "order" : 3
-  } ]
-}'
-
-
-
-
-

HTTP request

-
-
-
PUT /api/owner/category HTTP/1.1
-Content-Type: application/json;charset=UTF-8
-Accept: application/json
-Content-Length: 289
-Host: 127.0.0.1:8001
-
-{
-  "storeId" : 1,
-  "categoryList" : [ {
-    "categoryId" : 10,
-    "name" : "카테고리1",
-    "order" : 2
-  }, {
-    "categoryId" : 11,
-    "name" : "카테고리2",
-    "order" : 1
-  } ],
-  "deletedList" : [ {
-    "categoryId" : 11,
-    "name" : "Non Coffee",
-    "order" : 3
-  } ]
-}
-
-
-
-
-

HTTP response

-
-
-
HTTP/1.1 204 No Content
-Content-Type: application/json
-Content-Length: 59
-
-{
-  "code" : "SUCCESS",
-  "message" : "",
-  "data" : null
-}
-
-
-
-
-

Request body

-
-
-
{
-  "storeId" : 1,
-  "categoryList" : [ {
-    "categoryId" : 10,
-    "name" : "카테고리1",
-    "order" : 2
-  }, {
-    "categoryId" : 11,
-    "name" : "카테고리2",
-    "order" : 1
-  } ],
-  "deletedList" : [ {
-    "categoryId" : 11,
-    "name" : "Non Coffee",
-    "order" : 3
-  } ]
-}
-
-
-
-
-

Request fields

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

storeId

Number

매장 고유 번호

categoryList

Array

수정된 카테고리 리스트

categoryList[*].categoryId

Number

카테고리 고유 번호

categoryList[*].name

String

카테고리명

categoryList[*].order

Number

순서

deletedList

Array

삭제된 카테고리 리스트

deletedList[*].categoryId

Number

카테고리 고유 번호

deletedList[*].name

String

카테고리명

deletedList[*].order

Number

순서

-
-
-
-
-

매장

-
-
-

매장 검색 조회

-
-

Curl request

-
-
-
$ curl 'http://just-pickup.com:8000/api/customer/store/search?latitude=37.5403912&longitude=126.9438922&page=0&size=2' -i -X GET
-
-
-
-
-

HTTP request

-
-
-
GET /api/customer/store/search?latitude=37.5403912&longitude=126.9438922&page=0&size=2 HTTP/1.1
-Host: just-pickup.com:8000
-
-
-
-
-

HTTP response

-
-
-
HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 359
-
-{
-  "code" : "SUCCESS",
-  "message" : "",
-  "data" : {
-    "stores" : [ {
-      "id" : 1,
-      "name" : "이디야커피 마포오벨리스크점",
-      "distance" : "145m",
-      "favoriteCounts" : 10
-    }, {
-      "id" : 2,
-      "name" : "만랩커피 마포점",
-      "distance" : "151m",
-      "favoriteCounts" : 5
-    } ],
-    "hasNext" : true
-  }
-}
-
-
-
-
-

Request parameters

- ---- - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterDescription

latitude

고객의 위도 [필수]

longitude

고객의 경도 [필수]

page

검색할 페이지 [Optional, default: 0]

size

검색할 페이지 사이즈 [Optional, default: 2]

-
-
-

Response fields

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

code

String

결과 코드 SUCCESS/ERROR

message

String

메시지

data.stores[*].id

Number

매장 고유번호

data.stores[*].name

String

매장 이름

data.stores[*].distance

String

고객과의 거리차이 m/km

data.stores[*].favoriteCounts

Number

매장 즐겨찾기 수

data.hasNext

Boolean

더보기 버튼 유무

-
-
-
-

자주찾는 매장

-
-

Curl request

-
-
-
$ curl 'http://just-pickup.com:8000/api/customer/store/favorite?latitude=37.5403912&longitude=126.9438922' -i -X GET \
-    -H 'user-id: 2'
-
-
-
-
-

HTTP request

-
-
-
GET /api/customer/store/favorite?latitude=37.5403912&longitude=126.9438922 HTTP/1.1
-user-id: 2
-Host: just-pickup.com:8000
-
-
-
-
-

HTTP response

-
-
-
HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 408
-
-{
-  "code" : "SUCCESS",
-  "message" : "",
-  "data" : [ {
-    "id" : 1,
-    "name" : "이디야커피 마포오벨리스크점",
-    "distance" : "145m",
-    "favoriteCounts" : 5
-  }, {
-    "id" : 2,
-    "name" : "만랩커피 마포점",
-    "distance" : "151m",
-    "favoriteCounts" : 5
-  }, {
-    "id" : 3,
-    "name" : "커피온리 마포역점",
-    "distance" : "341m",
-    "favoriteCounts" : 5
-  } ]
-}
-
-
-
-
-

Request headers

- ---- - - - - - - - - - - - - -
NameDescription

user-id

로그인한 유저 id

-
-
-

Request parameters

- ---- - - - - - - - - - - - - - - - - -
ParameterDescription

latitude

고객의 위도 [필수]

longitude

고객의 경도 [필수]

-
-
-

Response fields

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

code

String

결과 코드 SUCCESS/ERROR

message

String

메시지

data[*].id

Number

매장 고유번호

data[*].name

String

매장 이름

data[*].distance

String

고객과의 거리차이 m/km

data[*].favoriteCounts

Number

즐겨찾기 회수

-
-
-
-

매장 조회

-
-

Curl request

-
-
-
$ curl 'http://just-pickup.com:8000/store/1' -i -X GET
-
-
-
-
-

HTTP request

-
-
-
GET /store/1 HTTP/1.1
-Host: just-pickup.com:8000
-
-
-
-
-

HTTP response

-
-
-
HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 155
-
-{
-  "code" : "SUCCESS",
-  "message" : "",
-  "data" : {
-    "id" : 1,
-    "name" : "이디야커피 대림역점",
-    "phoneNumber" : "010-1234-5678"
-  }
-}
-
-
-
-
-

Path parameters

- - ---- - - - - - - - - - - - - -
Table 1. /store/{storeId}
ParameterDescription

storeId

매장 고유번호

-
-
-

Response fields

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

code

String

결과 코드 SUCCESS/ERROR

message

String

메시지

data.id

Number

매장 고유번호

data.name

String

매장 이름

data.phoneNumber

String

매장 번호

-
-
-
-

매장 조회 (회원 고유번호)

-
-

Curl request

-
-
-
$ curl 'http://just-pickup.com:8000/api/owner/store' -i -X GET \
-    -H 'user-id: 1'
-
-
-
-
-

HTTP request

-
-
-
GET /api/owner/store HTTP/1.1
-user-id: 1
-Host: just-pickup.com:8000
-
-
-
-
-

HTTP response

-
-
-
HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 103
-
-{
-  "code" : "SUCCESS",
-  "message" : "",
-  "data" : {
-    "id" : 10,
-    "name" : "한강커피"
-  }
-}
-
-
-
-
-

Request headers

- ---- - - - - - - - - - - - - -
NameDescription

user-id

로그인한 유저 id

-
-
-

Response fields

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

code

String

결과 코드 SUCCESS/ERROR

message

String

메시지

data.id

Number

매장 고유번호

data.name

String

매장 이름

-
-
-
-

매장 리스트 조회

-
-

Curl request

-
-
-
$ curl 'http://just-pickup.com:8000/stores/1,2,3' -i -X GET
-
-
-
-
-

HTTP request

-
-
-
GET /stores/1,2,3 HTTP/1.1
-Host: just-pickup.com:8000
-
-
-
-
-

HTTP response

-
-
-
HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 321
-
-{
-  "code" : "SUCCESS",
-  "message" : "",
-  "data" : [ {
-    "id" : 1,
-    "name" : "매장 이름1",
-    "phoneNumber" : "010-1234-5678"
-  }, {
-    "id" : 2,
-    "name" : "매장 이름2",
-    "phoneNumber" : "010-1234-5678"
-  }, {
-    "id" : 3,
-    "name" : "매장 이름3",
-    "phoneNumber" : "010-1234-5678"
-  } ]
-}
-
-
-
-
-

Path parameters

- - ---- - - - - - - - - - - - - -
Table 1. /stores/{storeIds}
ParameterDescription

storeIds

매장 고유 번호들

-
-
-

Response fields

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

code

String

결과 코드 SUCCESS/ERROR

message

String

메시지

data[*].id

Number

매장 고유 번호

data[*].name

String

매장 이름

data[*].phoneNumber

String

매장 휴대폰 번호

-
-
-
-

매장 생성 (점주 서비스)

-
-

Curl request

-
-
-
$ curl 'http://just-pickup.com:8000/api/owner/store' -i -X POST \
-    -H 'Content-Type: application/json;charset=UTF-8' \
-    -H 'Accept: application/json' \
-    -H 'user-id: 1' \
-    -d '{
-  "name" : "점주 이름",
-  "phoneNumber" : "010-1234-5678",
-  "address" : "서울특별시 마포구 용강동 123-1길",
-  "zipcode" : "129845",
-  "latitude" : 30.90199982,
-  "longitude" : 112.1298347
-}'
-
-
-
-
-

HTTP request

-
-
-
POST /api/owner/store HTTP/1.1
-Content-Type: application/json;charset=UTF-8
-Accept: application/json
-user-id: 1
-Content-Length: 208
-Host: just-pickup.com:8000
-
-{
-  "name" : "점주 이름",
-  "phoneNumber" : "010-1234-5678",
-  "address" : "서울특별시 마포구 용강동 123-1길",
-  "zipcode" : "129845",
-  "latitude" : 30.90199982,
-  "longitude" : 112.1298347
-}
-
-
-
-
-

HTTP response

-
-
-
HTTP/1.1 201 Created
-
-
-
-
-

Request headers

- ---- - - - - - - - - - - - - -
NameDescription

user-id

JWT 유저 고유 번호

-
-
-

Request fields

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

name

String

매징 이름

phoneNumber

String

매장 번호

address

String

매장 주소

zipcode

String

매장 우편번호

latitude

Number

위도

longitude

Number

경도

-
-
-
-
-
-

즐겨찾는 매장

-
-
-

즐겨찾는 매장 조회

-
-

Curl request

-
-
-
$ curl 'http://just-pickup.com:8000/api/customer/favoriteStore/1' -i -X GET \
-    -H 'user-id: 1'
-
-
-
-
-

HTTP request

-
-
-
GET /api/customer/favoriteStore/1 HTTP/1.1
-user-id: 1
-Host: just-pickup.com:8000
-
-
-
-
-

HTTP response

-
-
-
HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 116
-
-{
-  "code" : "SUCCESS",
-  "message" : "",
-  "data" : {
-    "userId" : 1,
-    "storeId" : 1,
-    "exist" : true
-  }
-}
-
-
-
-
-

Request headers

- ---- - - - - - - - - - - - - -
NameDescription

user-id

로그인한 유저 id

-
-
-

Path parameters

- - ---- - - - - - - - - - - - - -
Table 1. /api/customer/favoriteStore/{storeId}
ParameterDescription

storeId

매장 고유 번호

-
-
-

Response fields

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

code

String

결과 코드 SUCCESS/ERROR

message

String

메시지

data.userId

Number

유저 고유번호

data.storeId

Number

매장 고유 번호

data.exist

Boolean

즐겨찾기 매장 존재여부

-
-
-
-

즐겨찾는 매장 추가/삭제

-
-

Curl request

-
-
-
$ curl 'http://just-pickup.com:8000/api/customer/favoriteStore/1' -i -X PATCH \
-    -H 'user-id: 1'
-
-
-
-
-

HTTP request

-
-
-
PATCH /api/customer/favoriteStore/1 HTTP/1.1
-user-id: 1
-Host: just-pickup.com:8000
-
-
-
-
-

HTTP response

-
-
-
HTTP/1.1 204 No Content
-Content-Type: application/json
-Content-Length: 65
-
-{
-  "code" : "SUCCESS",
-  "message" : "성공",
-  "data" : null
-}
-
-
-
-
-

Request headers

- ---- - - - - - - - - - - - - -
NameDescription

user-id

로그인한 유저 id

-
-
-

Path parameters

- - ---- - - - - - - - - - - - - -
Table 1. /api/customer/favoriteStore/{storeId}
ParameterDescription

storeId

매장 고유 번호

-
-
-

Curl request

-
-
-
$ curl 'http://just-pickup.com:8000/api/customer/item/1' -i -X GET
-
-
-
-
-

HTTP request

-
-
-
GET /api/customer/item/1 HTTP/1.1
-Host: just-pickup.com:8000
-
-
-
-
-

HTTP response

-
-
-
HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 371
-
-{
-  "code" : "SUCCESS",
-  "message" : "",
-  "data" : {
-    "id" : 1,
-    "name" : "아메리카노",
-    "salesYn" : "Y",
-    "price" : 1500,
-    "itemOptions" : [ {
-      "id" : 1,
-      "optionType" : "REQUIRED",
-      "name" : "Hot"
-    }, {
-      "id" : 2,
-      "optionType" : "OTHER",
-      "name" : "add shot"
-    } ],
-    "storeId" : 1,
-    "categoryId" : 1
-  }
-}
-
-
-
-
-

Path parameters

- - ---- - - - - - - - - - - - - -
Table 1. /api/customer/item/{itemId}
ParameterDescription

itemId

상품 고유 번호

-
-
-

Response fields

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

code

String

결과 코드 SUCCESS/ERROR

message

String

메시지

data.id

Number

상품 고유 번호

data.name

String

상품 이름

data.salesYn

String

화면 표시 여부 Y/N

data.price

Number

상품 가격

data.itemOptions[*].id

Number

아이템 옵션 고유 번호

data.itemOptions[*].optionType

String

옵션 타입

data.itemOptions[*].name

String

옵션명

data.storeId

Number

매장 고유번호

data.categoryId

Number

카테고리 고유번호

-
-
-
-
-
- - - - - - \ No newline at end of file