From 85f4a225dc84e46a4de6652860ff021c2be83428 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:21:36 +0900 Subject: [PATCH] Add files via upload MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit API 문서 추가 --- .../2022-3-25-Order Service API 문서.html | 2457 +++++++++++++ .../2022-3-25-Store Service API 문서.html | 3103 +++++++++++++++++ 2 files changed, 5560 insertions(+) create mode 100644 docs/_posts/2022-3-25-Order Service API 문서.html create mode 100644 docs/_posts/2022-3-25-Store Service API 문서.html diff --git a/docs/_posts/2022-3-25-Order Service API 문서.html b/docs/_posts/2022-3-25-Order Service API 문서.html new file mode 100644 index 0000000..df54622 --- /dev/null +++ b/docs/_posts/2022-3-25-Order Service API 문서.html @@ -0,0 +1,2457 @@ + + + + + + + +개요 + + + + + + +
+
+

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://http://just-pickup.com:8001/order/1' -i -X PATCH \
+    -H 'Content-Type: application/json;charset=UTF-8' \
+    -H 'Accept: application/json' \
+    -d '{
+  "orderStatus" : "PLACED"
+}'
+
+
+
+
+

HTTP request

+
+
+
PATCH //just-pickup.com:8001/order/1 HTTP/1.1
+Content-Type: application/json;charset=UTF-8
+Accept: application/json
+Content-Length: 30
+Host: http
+
+{
+  "orderStatus" : "PLACED"
+}
+
+
+
+
+

HTTP response

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

Path parameters

+ + ++++ + + + + + + + + + + + + +
Table 1. /order/{orderId}
ParameterDescription

orderId

주문 고유번호

+
+
+

Request fields

+ +++++ + + + + + + + + + + + + + + +
PathTypeDescription

orderStatus

String

주문 상태

+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

code

String

결과코드 SUCCESS/ERROR

message

String

메시지

data

Null

데이터

+
+
+
+

주문 상세보기 조회

+
+

Curl request

+
+
+
$ curl 'http://http://just-pickup.com:8001/api/order-detail/1589' -i -X GET
+
+
+
+
+

HTTP request

+
+
+
GET //just-pickup.com:8001/api/order-detail/1589 HTTP/1.1
+Host: http
+
+
+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Type: application/json
+Content-Length: 991
+
+{
+  "code" : "SUCCESS",
+  "message" : "",
+  "data" : {
+    "id" : 1589,
+    "orderStatus" : "PLACED",
+    "orderTime" : "2022-03-29 14:05",
+    "orderPrice" : 76600,
+    "storeName" : "매장이름",
+    "user" : {
+      "id" : 6,
+      "name" : "박상범",
+      "phoneNumber" : "010-1234-5678"
+    },
+    "orderItems" : [ {
+      "id" : 11374,
+      "itemId" : 43,
+      "totalPrice" : 0,
+      "count" : 2,
+      "name" : "카페라떼",
+      "options" : [ {
+        "id" : 11372,
+        "itemOptionId" : 41,
+        "name" : "HOT",
+        "optionType" : "REQUIRED"
+      }, {
+        "id" : 11373,
+        "itemOptionId" : 42,
+        "name" : "시럽 추가",
+        "optionType" : "OTHER"
+      } ]
+    }, {
+      "id" : 11375,
+      "itemId" : 44,
+      "totalPrice" : 0,
+      "count" : 2,
+      "name" : "아메리카노",
+      "options" : [ {
+        "id" : 11371,
+        "itemOptionId" : 40,
+        "name" : "ICE",
+        "optionType" : "REQUIRED"
+      } ]
+    } ]
+  }
+}
+
+
+
+
+

Path parameters

+ + ++++ + + + + + + + + + + + + +
Table 1. /api/order-detail/{orderId}
ParameterDescription

orderId

주문 고유번호

+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

code

String

결과코드 SUCCESS/ERROR

message

String

메세지

data.id

Number

주문 고유번호

data.storeName

String

주문 매장이름

data.orderStatus

String

주문 상태

data.orderTime

String

주문 시간 [yyy-MM-dd]

data.orderPrice

Number

주문 금액

data.user.id

Number

주문한 회원 고유번호

data.user.name

String

주문한 회원 이름

data.user.phoneNumber

String

주문한 회원 전화번호

data.orderItems[*].id

Number

주문아이템 고유번호

data.orderItems[*].itemId

Number

아이템 고유번호

data.orderItems[*].totalPrice

Number

주문아이템 총합계

data.orderItems[*].count

Number

주문아이템 수량

data.orderItems[*].name

String

아이템 이름

data.orderItems[*].options[*].id

Number

주문아이템옵션 고유번호

data.orderItems[*].options[*].itemOptionId

Number

아이템옵션 고유번호

data.orderItems[*].options[*].name

String

아이템옵션 이름

data.orderItems[*].options[*].optionType

String

아이템옵션 타입

+
+
+
+
+
+

주문 (사용자 서비스)

+
+
+

주문 내역 조회

+
+

Curl request

+
+
+
$ curl 'http://http://just-pickup.com:8001/api/customer/order/history?page=0' -i -X GET \
+    -H 'user-id: 2'
+
+
+
+
+

HTTP request

+
+
+
GET //just-pickup.com:8001/api/customer/order/history?page=0 HTTP/1.1
+user-id: 2
+Host: http
+
+
+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Type: application/json
+Content-Length: 1138
+
+{
+  "code" : "SUCCESS",
+  "message" : "",
+  "data" : {
+    "orders" : [ {
+      "orderId" : 1,
+      "orderTime" : "2022-03-07 19:00",
+      "orderStatus" : "PLACED",
+      "storeId" : 1001,
+      "storeName" : null,
+      "orderPrice" : 10000,
+      "orderItems" : [ {
+        "orderItemId" : 100,
+        "orderItemName" : null
+      }, {
+        "orderItemId" : 400,
+        "orderItemName" : null
+      } ]
+    }, {
+      "orderId" : 2,
+      "orderTime" : "2022-03-07 19:00",
+      "orderStatus" : "PLACED",
+      "storeId" : 1002,
+      "storeName" : null,
+      "orderPrice" : 20000,
+      "orderItems" : [ {
+        "orderItemId" : 200,
+        "orderItemName" : null
+      }, {
+        "orderItemId" : 600,
+        "orderItemName" : null
+      } ]
+    }, {
+      "orderId" : 3,
+      "orderTime" : "2022-03-07 19:00",
+      "orderStatus" : "PLACED",
+      "storeId" : 1003,
+      "storeName" : null,
+      "orderPrice" : 30000,
+      "orderItems" : [ {
+        "orderItemId" : 300,
+        "orderItemName" : null
+      }, {
+        "orderItemId" : 800,
+        "orderItemName" : null
+      } ]
+    } ],
+    "hasNext" : true
+  }
+}
+
+
+
+
+

Request headers

+ ++++ + + + + + + + + + + + + +
NameDescription

user-id

유저 고유번호

+
+
+

Request parameters

+ ++++ + + + + + + + + + + + + + + + + +
ParameterDescription

page

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

size

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

+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

code

String

결과 코드 SUCCESS/ERROR

message

String

메시지

data.orders[*].orderId

Number

주문 고유번호

data.orders[*].orderTime

String

주문 시간 [yyyy-MM-dd HH:mm]

data.orders[*].orderPrice

Number

합계

data.orders[*].orderStatus

String

주문 상태

data.orders[*].storeId

Number

매장 고유번호

data.orders[*].storeName

Null

매장 이름

data.orders[*].orderItems[*].orderItemId

Number

주문 아이템 고유번호

data.orders[*].orderItems[*].orderItemName

Null

주문 아이템 이름

data.hasNext

Boolean

더보기 버튼 유무

+
+
+
+

장바구니 상품 추가

+
+

Curl request

+
+
+
$ curl 'http://http://just-pickup.com:8001/api/customer/order/item' -i -X POST \
+    -H 'Content-Type: application/json;charset=UTF-8' \
+    -H 'user-id: 2' \
+    -H 'Accept: application/json' \
+    -d '{
+  "itemId" : 102,
+  "storeId" : 1,
+  "price" : 3000,
+  "count" : 4,
+  "itemOptionIds" : [ 1, 2, 3, 4, 5 ]
+}'
+
+
+
+
+

HTTP request

+
+
+
POST //just-pickup.com:8001/api/customer/order/item HTTP/1.1
+Content-Type: application/json;charset=UTF-8
+user-id: 2
+Accept: application/json
+Content-Length: 109
+Host: http
+
+{
+  "itemId" : 102,
+  "storeId" : 1,
+  "price" : 3000,
+  "count" : 4,
+  "itemOptionIds" : [ 1, 2, 3, 4, 5 ]
+}
+
+
+
+
+

HTTP response

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

Request headers

+ ++++ + + + + + + + + + + + + +
NameDescription

user-id

유저 고유번호

+
+
+

Request body

+
+
+
{
+  "itemId" : 102,
+  "storeId" : 1,
+  "price" : 3000,
+  "count" : 4,
+  "itemOptionIds" : [ 1, 2, 3, 4, 5 ]
+}
+
+
+
+
+

Request fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

itemId

Number

아이템 고유번호

storeId

Number

매장 고유번호

price

Number

아이템 가격

count

Number

아이템 갯수

itemOptionIds

Array

아이템 옵션들

+
+
+
+

장바구니 내역 조회

+
+

Curl request

+
+
+
$ curl 'http://http://just-pickup.com:8001/api/customer/order/orders' -i -X GET \
+    -H 'user-id: 2'
+
+
+
+
+

HTTP request

+
+
+
GET //just-pickup.com:8001/api/customer/order/orders HTTP/1.1
+user-id: 2
+Host: http
+
+
+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Type: application/json
+Content-Length: 518
+
+{
+  "code" : "SUCCESS",
+  "message" : "",
+  "data" : {
+    "id" : 2,
+    "userId" : 2,
+    "orderPrice" : 12000,
+    "storeName" : "저스트카페",
+    "orderItemDtoList" : [ {
+      "id" : 1,
+      "itemId" : 1,
+      "itemName" : "카페라테",
+      "orderItemOptionDtoList" : [ {
+        "id" : 2,
+        "optionType" : "REQUIRED",
+        "name" : "Hot"
+      }, {
+        "id" : 2,
+        "optionType" : "OTHER",
+        "name" : "샷추카"
+      } ],
+      "price" : 3000,
+      "count" : 32
+    } ]
+  }
+}
+
+
+
+
+

Request headers

+ ++++ + + + + + + + + + + + + +
NameDescription

user-id

유저 고유번호

+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

code

String

결과 코드 SUCCESS/ERROR

message

String

메시지

data.id

Number

주문 고유번호

data.userId

Number

주문한 유저 고유번호

data.storeName

String

매장 명

data.orderPrice

Number

총 합계

data.orderItemDtoList[*].id

Number

orderItem 고유번호

data.orderItemDtoList[*].itemId

Number

상품 고유번호

data.orderItemDtoList[*].itemName

String

상품 명

data.orderItemDtoList[*].orderItemOptionDtoList[*]

Array

아이템 옵션들

data.orderItemDtoList[*].orderItemOptionDtoList[*].id

Number

아이템 옵션 고유번호

data.orderItemDtoList[*].orderItemOptionDtoList[*].optionType

String

아이템 옵션 타입

data.orderItemDtoList[*].orderItemOptionDtoList[*].name

String

아이템 옵션명

data.orderItemDtoList[*].price

Number

상품 가격

data.orderItemDtoList[*].count

Number

상품 갯수

+
+
+
+

주문 생성

+
+

Curl request

+
+
+
$ curl 'http://http://just-pickup.com:8001/api/customer/order/orders' -i -X POST \
+    -H 'user-id: 2'
+
+
+
+
+

HTTP request

+
+
+
POST //just-pickup.com:8001/api/customer/order/orders HTTP/1.1
+user-id: 2
+Host: http
+
+
+
+
+

HTTP response

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

Request headers

+ ++++ + + + + + + + + + + + + +
NameDescription

user-id

유저 고유번호

+
+
+
+
+
+

주문 (점주 서비스)

+
+
+

주문 페이지 조회

+
+

Curl request

+
+
+
$ curl 'http://http://just-pickup.com:8001/api/owner/order/order-main?orderDate=2022-02-03&lastOrderId=7' -i -X GET \
+    -H 'user-id: 1'
+
+
+
+
+

HTTP request

+
+
+
GET //just-pickup.com:8001/api/owner/order/order-main?orderDate=2022-02-03&lastOrderId=7 HTTP/1.1
+user-id: 1
+Host: http
+
+
+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Type: application/json
+Content-Length: 2020
+
+{
+  "code" : "SUCCESS",
+  "message" : "",
+  "data" : {
+    "hasNext" : true,
+    "orders" : [ {
+      "id" : 1,
+      "orderTime" : "2022-03-29 14:05",
+      "orderStatus" : "ACCEPTED",
+      "userName" : null,
+      "storeName" : "가게명1",
+      "orderItems" : [ {
+        "itemName" : "아이템10"
+      }, {
+        "itemName" : "아이템11"
+      }, {
+        "itemName" : "아이템12"
+      } ]
+    }, {
+      "id" : 2,
+      "orderTime" : "2022-03-29 14:05",
+      "orderStatus" : "ACCEPTED",
+      "userName" : null,
+      "storeName" : "가게명2",
+      "orderItems" : [ {
+        "itemName" : "아이템20"
+      }, {
+        "itemName" : "아이템22"
+      }, {
+        "itemName" : "아이템24"
+      } ]
+    }, {
+      "id" : 3,
+      "orderTime" : "2022-03-29 14:05",
+      "orderStatus" : "ACCEPTED",
+      "userName" : null,
+      "storeName" : "가게명3",
+      "orderItems" : [ {
+        "itemName" : "아이템30"
+      }, {
+        "itemName" : "아이템33"
+      }, {
+        "itemName" : "아이템36"
+      } ]
+    }, {
+      "id" : 4,
+      "orderTime" : "2022-03-29 14:05",
+      "orderStatus" : "ACCEPTED",
+      "userName" : null,
+      "storeName" : "가게명4",
+      "orderItems" : [ {
+        "itemName" : "아이템40"
+      }, {
+        "itemName" : "아이템44"
+      }, {
+        "itemName" : "아이템48"
+      } ]
+    }, {
+      "id" : 5,
+      "orderTime" : "2022-03-29 14:05",
+      "orderStatus" : "ACCEPTED",
+      "userName" : null,
+      "storeName" : "가게명5",
+      "orderItems" : [ {
+        "itemName" : "아이템50"
+      }, {
+        "itemName" : "아이템55"
+      }, {
+        "itemName" : "아이템60"
+      } ]
+    }, {
+      "id" : 6,
+      "orderTime" : "2022-03-29 14:05",
+      "orderStatus" : "ACCEPTED",
+      "userName" : null,
+      "storeName" : "가게명6",
+      "orderItems" : [ {
+        "itemName" : "아이템60"
+      }, {
+        "itemName" : "아이템66"
+      }, {
+        "itemName" : "아이템72"
+      } ]
+    } ]
+  }
+}
+
+
+
+
+

Request headers

+ ++++ + + + + + + + + + + + + +
NameDescription

user-id

유저 고유번호

+
+
+

Request parameters

+ ++++ + + + + + + + + + + + + + + + + +
ParameterDescription

orderDate

주문 날짜 YYYY-MM-DD

lastOrderId

페이지의 마지막 주문 고유 번호

+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

code

String

결과 코드 SUCCESS/ERROR

message

String

메시지

data.hasNext

Boolean

다음 게시물 표시 여부

data.orders[*].id

Number

주문 고유번호

data.orders[*].orderTime

String

주문 시간 [yyyy-MM-dd HH:mm]

data.orders[*].orderStatus

String

주문 상태

data.orders[*].userName

Null

주문한 사용자 이름

data.orders[*].storeName

String

가게 이름

data.orders[*].orderItems[*].itemName

String

아이템 이름

+
+
+
+

주문 페이지 조회 (잘못된 파라미터 형식)

+
+

Curl request

+
+
+
$ curl 'http://http://just-pickup.com:8001/api/owner/order/prev-order?startDate=2023-02-03&endDate=2022-02-04&page=0' -i -X GET \
+    -H 'user-id: 1'
+
+
+
+
+

HTTP request

+
+
+
GET //just-pickup.com:8001/api/owner/order/prev-order?startDate=2023-02-03&endDate=2022-02-04&page=0 HTTP/1.1
+user-id: 1
+Host: http
+
+
+
+
+

HTTP response

+
+
+
HTTP/1.1 400 Bad Request
+Content-Type: application/json
+Content-Length: 155
+
+{
+  "code" : "ERROR",
+  "message" : "[startDate](은)는 시작일은 종료일보다 클 수 없습니다. 입력된 값: [2023-02-03]",
+  "data" : null
+}
+
+
+
+
+

Request headers

+ ++++ + + + + + + + + + + + + +
NameDescription

user-id

유저 고유번호

+
+
+

Request parameters

+ ++++ + + + + + + + + + + + + + + + + + + + + +
ParameterDescription

startDate

시작날짜 YYYY-MM-DD

endDate

종료날짜 YYYY-MM-DD

page

검색 페이지 (0부터 시작)

+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

code

String

결과 코드 SUCCESS/ERROR

message

String

메시지

data

Null

데이터

+
+
+
+

지난 주문 페이지 조회

+
+

Curl request

+
+
+
$ curl 'http://http://just-pickup.com:8001/api/owner/order/prev-order?startDate=2022-02-03&endDate=2022-02-04&page=0' -i -X GET \
+    -H 'user-id: 1'
+
+
+
+
+

HTTP request

+
+
+
GET //just-pickup.com:8001/api/owner/order/prev-order?startDate=2022-02-03&endDate=2022-02-04&page=0 HTTP/1.1
+user-id: 1
+Host: http
+
+
+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Type: application/json
+Content-Length: 831
+
+{
+  "code" : "SUCCESS",
+  "message" : "",
+  "data" : {
+    "orders" : [ {
+      "orderId" : 1,
+      "orderStatus" : "PLACED",
+      "orderTime" : "2022-02-03 14:00:00",
+      "orderPrice" : 0,
+      "userName" : "닉네임",
+      "orderItems" : [ {
+        "orderItemId" : 100,
+        "orderItemName" : "아이템1"
+      }, {
+        "orderItemId" : 101,
+        "orderItemName" : "아이템2"
+      } ]
+    }, {
+      "orderId" : 2,
+      "orderStatus" : "FAILED",
+      "orderTime" : "2022-02-03 15:00:00",
+      "orderPrice" : 0,
+      "userName" : "닉네임",
+      "orderItems" : [ {
+        "orderItemId" : 102,
+        "orderItemName" : "아이템3"
+      }, {
+        "orderItemId" : 103,
+        "orderItemName" : "아이템2"
+      } ]
+    } ],
+    "page" : {
+      "startPage" : 0,
+      "totalPage" : 1
+    }
+  }
+}
+
+
+
+
+

Request headers

+ ++++ + + + + + + + + + + + + +
NameDescription

user-id

유저 고유번호

+
+
+

Request parameters

+ ++++ + + + + + + + + + + + + + + + + + + + + +
ParameterDescription

startDate

시작날짜 YYYY-MM-DD

endDate

종료날짜 YYYY-MM-DD

page

검색 페이지 (0부터 시작)

+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

code

String

결과 코드 SUCCESS/ERROR

message

String

메시지

data.orders[*].orderId

Number

주문 고유번호

data.orders[*].orderStatus

String

주문상태

data.orders[*].orderTime

String

주문시간

data.orders[*].orderPrice

Number

결제금액

data.orders[*].userName

String

닉네임

data.orders[*].orderItems[*].orderItemId

Number

주문상품 고유번호

data.orders[*].orderItems[*].orderItemName

String

주문상품 이름

data.page.startPage

Number

현재 페이지 (0부터 시작)

data.page.totalPage

Number

총 페이지 개수

+
+
+
+

지난 주문 페이지 조회 (파라미터 오류)

+
+

Curl request

+
+
+
$ curl 'http://http://just-pickup.com:8001/api/owner/order/prev-order?startDate=2023-02-03&endDate=2022-02-04&page=0' -i -X GET \
+    -H 'user-id: 1'
+
+
+
+
+

HTTP request

+
+
+
GET //just-pickup.com:8001/api/owner/order/prev-order?startDate=2023-02-03&endDate=2022-02-04&page=0 HTTP/1.1
+user-id: 1
+Host: http
+
+
+
+
+

HTTP response

+
+
+
HTTP/1.1 400 Bad Request
+Content-Type: application/json
+Content-Length: 155
+
+{
+  "code" : "ERROR",
+  "message" : "[startDate](은)는 시작일은 종료일보다 클 수 없습니다. 입력된 값: [2023-02-03]",
+  "data" : null
+}
+
+
+
+
+

Request headers

+ ++++ + + + + + + + + + + + + +
NameDescription

user-id

유저 고유번호

+
+
+

Request parameters

+ ++++ + + + + + + + + + + + + + + + + + + + + +
ParameterDescription

startDate

시작날짜 YYYY-MM-DD

endDate

종료날짜 YYYY-MM-DD

page

검색 페이지 (0부터 시작)

+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

code

String

결과 코드 SUCCESS/ERROR

message

String

메시지

data

Null

데이터

+
+
+
+

대쉬보드 조회

+
+

Curl request

+
+
+
$ curl 'http://http://just-pickup.com:8001/api/owner/order/dashboard' -i -X GET \
+    -H 'user-id: 1'
+
+
+
+
+

HTTP request

+
+
+
GET //just-pickup.com:8001/api/owner/order/dashboard HTTP/1.1
+user-id: 1
+Host: http
+
+
+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Type: application/json
+Content-Length: 638
+
+{
+  "code" : "SUCCESS",
+  "message" : "",
+  "data" : {
+    "salesAmount" : 1237801239,
+    "bestSellItem" : {
+      "itemId" : 40,
+      "itemName" : "까메리카노",
+      "sumCounts" : 3217
+    },
+    "sellAmountAWeeks" : [ {
+      "sellDate" : "2022-03-22",
+      "sellAmount" : 1235
+    }, {
+      "sellDate" : "2022-03-23",
+      "sellAmount" : 235
+    }, {
+      "sellDate" : "2022-03-24",
+      "sellAmount" : 2235
+    }, {
+      "sellDate" : "2022-03-25",
+      "sellAmount" : 1635
+    }, {
+      "sellDate" : "2022-03-26",
+      "sellAmount" : 35
+    }, {
+      "sellDate" : "2022-03-27",
+      "sellAmount" : 635
+    } ]
+  }
+}
+
+
+
+
+

Request headers

+ ++++ + + + + + + + + + + + + +
NameDescription

user-id

유저 고유번호

+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

code

String

결과 코드 SUCCESS/ERROR

message

String

메시지

data

Object

데이터

data.salesAmount

Number

총 판매금약

data.bestSellItem

Object

7일간 베스트 판매 상품

data.bestSellItem.itemId

Number

7일간 베스트 판매 상품 고유번호

data.bestSellItem.itemName

String

7일간 베스트 판매 상품명

data.bestSellItem.sumCounts

Number

7일간 베스트 판매 상품판매량

data.sellAmountAWeeks

Array

7일간 판매 통계

data.sellAmountAWeeks[*].sellDate

String

7일간 판매 통계날짜

data.sellAmountAWeeks[*].sellAmount

Number

7일간 판매 통계날짜별 판매량

+
+
+
+
+
+

주문상품 (사용자 서비스)

+
+
+

장바구니 아이템 삭제

+
+

Curl request

+
+
+
$ curl 'http://http://just-pickup.com:8001/api/customer/orderItem/2' -i -X DELETE \
+    -H 'user-id: 2'
+
+
+
+
+

HTTP request

+
+
+
DELETE //just-pickup.com:8001/api/customer/orderItem/2 HTTP/1.1
+user-id: 2
+Host: http
+
+
+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Type: application/json
+Content-Length: 56
+
+{
+  "code" : "SUCCESS",
+  "message" : "",
+  "data" : 2
+}
+
+
+
+
+

Request headers

+ ++++ + + + + + + + + + + + + +
NameDescription

user-id

유저 고유번호

+
+
+

Path parameters

+ + ++++ + + + + + + + + + + + + +
Table 1. /api/customer/orderItem/{orderItemId}
ParameterDescription

orderItemId

orderItem 고유번호

+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

code

String

결과 코드 SUCCESS/ERROR

message

String

메시지

data

Number

orderItem 고유번호

+
+
+
+
+
+ + + + + + \ No newline at end of file diff --git a/docs/_posts/2022-3-25-Store Service API 문서.html b/docs/_posts/2022-3-25-Store Service API 문서.html new file mode 100644 index 0000000..09c0de0 --- /dev/null +++ b/docs/_posts/2022-3-25-Store Service API 문서.html @@ -0,0 +1,3103 @@ + + + + + + + +개요 + + + + + + +
+
+

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/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" : "와플"
+    } ]
+  } ]
+}
+
+
+
+
+

Request headers

+ ++++ + + + + + + + + + + + + +
NameDescription

user-id

로그인한 유저 id

+
+
+

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 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://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://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
+    }
+  }
+}
+
+
+
+
+

Request headers

+ ++++ + + + + + + + + + + + + +
NameDescription

user-id

로그인한 유저 id

+
+
+

Request parameters

+ ++++ + + + + + + + + + + + + +
ParameterDescription

word

아이템 명 or 카테고리 명

+
+
+

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 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' -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
+}
+
+
+
+
+

Request headers

+ ++++ + + + + + + + + + + + + +
NameDescription

user-id

로그인한 유저 id

+
+
+

Request fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

itemId

Null

아이템 고유번호

itemName

String

아이템 이름

itemPrice

Number

아이템 가격

categoryId

Number

카테고리 고유번호

requiredOption

Array

필수옵션

requiredOption[*].id

Null

옵션 고유번호

requiredOption[*].name

String

옵션 이름

requiredOption[*].optionType

String

옵션 타입

otherOption

Array

추가옵션

otherOption[*].id

Null

옵션 고유번호

otherOption[*].name

String

옵션 이름

otherOption[*].optionType

String

옵션 타입

+
+
+
+

상품 수정

+
+

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
+}
+
+
+
+
+

Request headers

+ ++++ + + + + + + + + + + + + +
NameDescription

user-id

로그인한 유저 id

+
+
+

Request fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

itemId

Number

아이템 고유번호

itemName

String

아이템 이름

itemPrice

Number

아이템 가격

categoryId

Number

카테고리 고유번호

requiredOption

Array

필수옵션

requiredOption[*].id

Null

옵션 고유번호

requiredOption[*].name

String

옵션 이름

requiredOption[*].optionType

String

옵션 타입

otherOption

Array

추가옵션

otherOption[*].id

Null

옵션 고유번호

otherOption[*].name

String

옵션 이름

otherOption[*].optionType

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://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

카테고리 고유번호

+
+
+
+
+
+

매장

+
+
+

매장 조회

+
+

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/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 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/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/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/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/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

매장 고유 번호

+
+
+
+
+
+ + + + + + \ No newline at end of file