HTTP 메서드

해당 API에서 사용하는 HTTP 메서드는 다음과 같습니다.

메서드 용례

GET

리소스를 가져올 때 사용

POST

새 리소스를 만들 때 사용

PUT

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

PATCH

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

DELETE

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

HTTP 상태 코드

해당 API에서 사용하는 HTTP 상태 코드는 다음과 같습니다.

상태 코드 용례

200 OK

요청을 성공적으로 처리함

201 Created

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

400 Bad Request

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

404 Not Found

요청한 리소스가 없음.

메뉴

메뉴 생성

메뉴를 생성할 수 있습니다.

HTTP 요청 예시

POST /api/v1/menus HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 115
X-CSRF-TOKEN: 7e0800b9-aa2c-4483-ba3a-04265a930608
Host: localhost:8080

{
  "menuGroupId" : 1,
  "title" : "참치 김밥",
  "description" : "맛있는 참치 김밥",
  "price" : 4500
}

요청 헤더

Name Description

Content-Type

application/json

Accept

application/json

요청 필드

Path Type Description

menuGroupId

Number

메뉴 그룹 ID

title

String

메뉴명(최대 100자)

description

String

메뉴 설명(선택, 최대 1000자)

price

Number

메뉴 가격

HTTP 응답 예시

HTTP/1.1 201 Created
Location: /api/v1/menus/1
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

응답 헤더

Name Description

Location

생성된 메뉴의 위치

메뉴 단건 조회

메뉴를 단건 조회할 수 있습니다.

HTTP 요청 예시

GET /api/v1/menus/1 HTTP/1.1
Accept: application/json
Host: localhost:8080

요청 헤더

Name Description

Accept

application/json

PATH 파라미터

Table 1. /api/v1/menus/{menuId}
Parameter Description

menuId

조회할 메뉴 ID

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 106

{
  "id" : 1,
  "title" : "참치 김밥",
  "description" : "맛있는 참치 김밥",
  "price" : 4500
}

응답 헤더

Name Description

Content-Type

application/json

응답 필드

Path Type Description

id

Number

메뉴 ID

title

String

메뉴명

description

String

메뉴 설명

price

Number

메뉴 가격

메뉴 정보 업데이트

메뉴 이름 및 설명을 업데이트 할 수 있습니다.

HTTP 요청 예시

PATCH /api/v1/menus/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 99
X-CSRF-TOKEN: 2d0e8e21-64d8-49ac-a750-7f74ca49a9d9
Host: localhost:8080

{
  "title" : "참치 김밥2",
  "description" : "더 맛있는 참치 김밥",
  "price" : 5000
}

요청 헤더

Name Description

Content-Type

application/json

요청 필드

Path Type Description

title

String

메뉴명(필수, 최대 100자)

description

String

메뉴 설명(선택, 최대 1000자)

price

Number

메뉴 가격(필수)

HTTP 응답 예시

HTTP/1.1 200 OK
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

메뉴 삭제

메뉴를 삭제할 수 있습니다.

HTTP 요청 예시

DELETE /api/v1/menus/1 HTTP/1.1
X-CSRF-TOKEN: 210f2804-3c24-4c8a-81cf-4bd061278685
Host: localhost:8080

PATH 파라미터

Table 1. /api/v1/menus/{menuId}
Parameter Description

menuId

삭제할 메뉴 ID

HTTP 응답 예시

HTTP/1.1 200 OK
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

메뉴 상태 변경

메뉴의 판매 상태(판매중, 품절, 숨김)를 변경할 수 있습니다.

HTTP 요청 예시

PATCH /api/v1/menus/1/menu-status HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 27
X-CSRF-TOKEN: a4caa2af-4e00-43ec-97fa-fbade1bcfbd7
Host: localhost:8080

{
  "menuStatus" : "sale"
}

요청 헤더

Name Description

Content-Type

application/json

요청 필드

Path Type Description

menuStatus

String

변경할 메뉴 상태(sale, sold_out, hidden 중 하나)

HTTP 응답 예시

HTTP/1.1 200 OK
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

대표 메뉴 설정/해제

메뉴를 대표 메뉴로 설정/해제 할 수 있습니다.

HTTP 요청 예시

PATCH /api/v1/menus/1/main-menu HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 25
X-CSRF-TOKEN: b7bda736-e394-421f-8e3c-206ac24096b0
Host: localhost:8080

{
  "isMainMenu" : true
}

PATH 파라미터

Table 1. /api/v1/menus/{menuId}/main-menu
Parameter Description

menuId

설정을 변경할 메뉴 ID

요청 필드

Path Type Description

isMainMenu

Boolean

대표 메뉴 설정 여부

HTTP 응답 예시

HTTP/1.1 200 OK
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

가== 메뉴그룹

메뉴그룹 생성

메뉴그룹을 생성할 수 있습니다.

HTTP 요청 예시

POST /api/v1/restaurant/1/menu-groups HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 71
X-CSRF-TOKEN: 0aa6e24e-aa07-452b-a63c-f8bce5f2d034
Host: localhost:8080

{
  "title" : "볶음밥류",
  "description" : "맛있는 볶음밥"
}

요청 헤더

Name Description

Content-Type

application/json

PATH 파라미터

Table 1. /api/v1/restaurant/{restaurantId}/menu-groups
Parameter Description

restaurantId

메뉴그룹을 추가할 가게의 ID

요청 필드

Path Type Description

title

String

메뉴그룹명(필수, 최대 100자

description

String

메뉴그룹 설명(선택, 최대 500자)

HTTP 응답 예시

HTTP/1.1 201 Created
Location: /api/v1/menu-groups/2
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

응답 헤더

Name Description

Location

생성된 메뉴 그룹의 위치

메뉴그룹 단건 조회

메뉴그룹을 단건 조회할 수 있습니다.

HTTP 요청 예시

GET /api/v1/menu-groups/1 HTTP/1.1
Accept: application/json
Host: localhost:8080

요청 헤더

Name Description

Accept

application/json

PATH 파라미터

Table 1. /api/v1/menu-groups/{menuGroupId}
Parameter Description

menuGroupId

조회할 메뉴그룹 ID

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 80

{
  "id" : 1,
  "title" : "김밥류",
  "description" : "맛있는 김밥류"
}

응답 헤더

Name Description

Content-Type

application/json

응답 필드

Path Type Description

id

Number

메뉴그룹 ID

title

String

메뉴그룹명

description

String

메뉴그룹 설명

가게 메뉴그룹 조회

가게의 메뉴그룹을 조회할 수 있다.

HTTP 요청 예시

GET /api/v1/restaurant/1/menu-groups HTTP/1.1
Accept: application/json
Host: localhost:8080

PATH 파라미터

Table 1. /api/v1/restaurant/{restaurantId}/menu-groups
Parameter Description

restaurantId

메뉴그룹을 조회할 가게 ID

요청 헤더

Name Description

Accept

application/json

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 278

{
  "menuGroups" : [ {
    "id" : 1,
    "title" : "김밥류",
    "description" : "맛있는 김밥"
  }, {
    "id" : 2,
    "title" : "찌개류",
    "description" : "맛있는 찌개"
  }, {
    "id" : 2,
    "title" : "면류",
    "description" : "맛있는 면"
  } ]
}

응답 헤더

Name Description

Content-Type

application/json

응답 필드

Path Type Description

menuGroups[]

Array

메뉴그룹 목록

menuGroups[].id

Number

메뉴그룹 ID

menuGroups[].title

String

메뉴그룹명

menuGroups[].description

String

메뉴그룹 설명

메뉴그룹 업데이트

메뉴그룹 정보를 수정할 수 있다.

HTTP 요청 예시

PATCH /api/v1/menu-groups/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 78
X-CSRF-TOKEN: 3b6289ab-9b6b-4f6f-a808-015390d6043f
Host: localhost:8080

{
  "title" : "사이드류",
  "description" : "맛있는 사이드 메뉴"
}

PATH 파라미터

Table 1. /api/v1/menu-groups/{menuGroupId}
Parameter Description

menuGroupId

업데이트할 메뉴그룹 ID

요청 헤더

Name Description

Content-Type

application/json

요청 필드

Path Type Description

title

String

메뉴그룹명(필수, 최대 100자)

description

String

메뉴그룹 설명(선택, 최대 500자)

HTTP 응답 예시

HTTP/1.1 200 OK
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

메뉴그룹 삭제

메뉴그룹을 삭제할 수 있습니다.

HTTP 요청 예시

DELETE /api/v1/menu-groups/1 HTTP/1.1
X-CSRF-TOKEN: d9ec6a62-3736-4d6e-8468-6a8360652cbb
Host: localhost:8080

PATH 파라미터

Table 1. /api/v1/menu-groups/{menuGroupId}
Parameter Description

menuGroupId

삭제할 메뉴그룹 ID

HTTP 응답 예시

HTTP/1.1 200 OK
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

주문

주문 생성

주문을 생성할 수 있습니다.

HTTP 요청 예시

POST /api/v1/orders HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 231
X-CSRF-TOKEN: e1978716-1351-464f-917c-12b22ef8b2b6
Host: localhost:8080

{
  "loginId" : "dev12",
  "restaurantId" : 1,
  "voucherId" : null,
  "usePoint" : 0,
  "paymentType" : "CREDIT_CARD",
  "deliveryAddress" : "서울특별시 종로구",
  "carts" : [ {
    "menuId" : 1,
    "quantity" : 2
  } ]
}

요청 헤더

Name Description

Content-Type

application/json

요청 필드

Path Type Description

loginId

String

주문한 회원의 아이디

restaurantId

Number

주문한 레스토랑의 ID

voucherId

Null

사용한 쿠폰의 ID(쿠폰 미사용 주문일 경우 해당 필드는 null로 전달)

usePoint

Number

주문에 사용한 회원의 포인트

paymentType

String

결제 수단

deliveryAddress

String

배달 주소

carts[]

Array

장바구니 메뉴 정보

carts[].menuId

Number

메뉴의 ID

carts[].quantity

Number

메뉴 수량

HTTP 응답 예시

HTTP/1.1 201 Created
Location: /api/v1/orders1
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

응답 헤더

Name Description

Location

생성된 주문의 경로

주문 취소

주문을 취소할 수 있습니다.

HTTP 요청 예시

PATCH /api/v1/orders/1/cancel HTTP/1.1
X-CSRF-TOKEN: 3458049d-6a34-40a7-b388-d4aeb7a9309a
Host: localhost:8080

PATH 파라미터

Table 1. /api/v1/orders/{orderId}/cancel
Parameter Description

orderId

취소할 주문 ID

HTTP 응답 예시

HTTP/1.1 200 OK
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

주문 수락

주문을 수락할 수 있습니다.

HTTP 요청 예시

PATCH /api/v1/orders/1/accept HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 24
X-CSRF-TOKEN: 936d0eb5-de9f-4726-9963-2dfc815c6882
Host: localhost:8080

{
  "cookingTime" : 30
}

요청 헤더

Name Description

Content-Type

application/json

PATH 파라미터

Table 1. /api/v1/orders/{orderId}/accept
Parameter Description

orderId

수락할 주문 ID

요청 필드

Path Type Description

cookingTime

Number

조리 예상 시간(분)

HTTP 응답 예시

HTTP/1.1 200 OK
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

주문 목록 조회 for 가게

가게에서 주문 목록을 조회할 수 있습니다.

HTTP 요청 예시

GET /api/v1/restaurants/orders HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 104
Host: localhost:8080

{
  "restaurantId" : 1,
  "pageNum" : 0,
  "size" : 3,
  "from" : "2022-06-10",
  "end" : "2022-07-10"
}

요청 헤더

Name Description

Content-Type

application/json

Accept

application/json

요청 필드

Path Type Description

restaurantId

Number

가게 ID

pageNum

Number

페이지 번호(0부터 시작)

size

Number

1페이지당 목록 개수

from

String

조회 시작일(형식: yyyy-MM-dd)

end

String

조회 종료일(형식: yyyy-MM-dd)

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 684

{
  "hasNextPage" : false,
  "size" : 2,
  "orders" : [ {
    "createdAt" : "2022-07-10 22:14:12",
    "menus" : [ {
      "menuName" : "참치 김밥",
      "quantity" : 1,
      "totalPrice" : 4500
    } ],
    "orderPrice" : 4500,
    "deliveryFee" : 3000,
    "afterDiscountTotalPrice" : 7500,
    "totalDiscountPrice" : 0,
    "orderStatus" : "PAYMENT_COMPLETED"
  }, {
    "createdAt" : "2022-07-10 22:14:12",
    "menus" : [ {
      "menuName" : "돈가스",
      "quantity" : 1,
      "totalPrice" : 7000
    } ],
    "orderPrice" : 7000,
    "deliveryFee" : 3000,
    "afterDiscountTotalPrice" : 7500,
    "totalDiscountPrice" : 2500,
    "orderStatus" : "ACCEPTED"
  } ]
}

응답 헤더

Name Description

Content-Type

application/json

응답 필드

Path Type Description

hasNextPage

Boolean

다음 페이지가 있으면 TRUE

size

Number

주문 목록 개수

orders[]

Array

주묵 목록

orders[].createdAt

String

주문 생성 시간

orders[].orderPrice

Number

할인전 주문 가격(배달비 제외)

orders[].deliveryFee

Number

배달비

orders[].afterDiscountTotalPrice

Number

할인후 가격(배달비 포함

orders[].totalDiscountPrice

Number

할인액(쿠폰 + 포인트 사용)

orders[].orderStatus

String

주문 상태(PAYMENT_COMPLETED, ACCEPTED, CANCEL)

orders[].menus[]

Array

주문한 메뉴 정보

orders[].menus[].menuName

String

메뉴명

orders[].menus[].quantity

Number

수량

orders[].menus[].totalPrice

Number

가격

주문 상세 조회 for 가게

가게의 특정 주문을 상세 조회할 수 있습니다.

HTTP 요청 예시

GET /api/v1/restaurants/orders/1 HTTP/1.1
Accept: application/json
Host: localhost:8080

요청 헤더

Name Description

Accept

application/json

PATH 파라미터

Table 1. /api/v1/restaurants/orders/{orderId}
Parameter Description

orderId

조회할 주문 ID

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 463

{
  "createdAt" : "2022-07-10 22:14:13",
  "menus" : [ {
    "menuName" : "참치 김밥",
    "quantity" : 1,
    "totalPrice" : 4500
  }, {
    "menuName" : "치즈 라면",
    "quantity" : 1,
    "totalPrice" : 5000
  }, {
    "menuName" : "돈가스",
    "quantity" : 1,
    "totalPrice" : 7000
  } ],
  "orderPrice" : 16500,
  "deliveryFee" : 3000,
  "afterDiscountTotalPrice" : 13000,
  "totalDiscountPrice" : 6500,
  "orderStatus" : "PAYMENT_COMPLETED"
}

응답 헤더

Name Description

Content-Type

application/json

응답 필드

Path Type Description

createdAt

String

주문 생성 시간(형식: yyyy-MM-dd HH:mm:ss)

orderPrice

Number

할인전 주문 금액(배달비 제외)

deliveryFee

Number

배달비

afterDiscountTotalPrice

Number

할인후 최종 결제 가격(배달비 포함)

totalDiscountPrice

Number

총 할인 금액(쿠폰 + 포인트)

orderStatus

String

주문 상태(PAYMENT_COMPLETED, ACCEPTED, CANCEL)

menus[]

Array

주문한 메뉴 정보

menus[].menuName

String

메뉴명

menus[].quantity

Number

수량

menus[].totalPrice

Number

가격

주문 목록 조회 for 회원

회원의 주문 목록을 조회할 수 있습니다.

HTTP 요청 예시

GET /api/v1/customers/orders HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 106
Host: localhost:8080

{
  "loginId" : "dev12",
  "pageNum" : 0,
  "size" : 10,
  "from" : "2022-06-10",
  "end" : "2022-07-10"
}

요청 헤더

Name Description

Content-Type

application/json

요청 필드

Path Type Description

loginId

String

회원 로그인 ID

pageNum

Number

페이지 번호

size

Number

페이지당 목록 개수

from

String

조회 시작일(형식: yyyy-MM-dd)

end

String

조회 종료일(형식: yyyy-MM-dd)

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 637

{
  "hasNextPage" : false,
  "size" : 2,
  "orders" : [ {
    "id" : 1,
    "createdAt" : "2022-07-10 22:14:13",
    "orderStatus" : "ACCEPTED",
    "restaurantName" : "김밥나라",
    "afterDiscountTotalPrice" : 15000,
    "carts" : [ {
      "menuTitle" : "돈가스",
      "quantity" : 2
    } ]
  }, {
    "id" : 1,
    "createdAt" : "2022-07-10 22:14:13",
    "orderStatus" : "ACCEPTED",
    "restaurantName" : "맥도날드",
    "afterDiscountTotalPrice" : 13000,
    "carts" : [ {
      "menuTitle" : "1955버거 세트",
      "quantity" : 1
    }, {
      "menuTitle" : "빅맥 세트",
      "quantity" : 1
    } ]
  } ]
}

응답 헤더

Name Description

Content-Type

application/json

응답 필드

Path Type Description

hasNextPage

Boolean

다음 페이지가 있으면 TRUE

size

Number

주문 목록 개수

orders[]

Array

주문 목록

orders[].id

Number

주문 ID

orders[].createdAt

String

주문 시간(형식: yyyy-MM-dd HH:mm:ss)

orders[].orderStatus

String

주문 상태

orders[].restaurantName

String

가게명

orders[].afterDiscountTotalPrice

Number

최종 결제 가격(할인 적용, 배달비 포함)

orders[].carts[]

Array

주문한 메뉴 정보

orders[].carts[].menuTitle

String

메뉴명

orders[].carts[].quantity

Number

수량

주문 상세 조회 for 회원

회원의 특정 주문을 상세 조회할 수 있습니다.

HTTP 요청 예시

GET /api/v1/customers/orders/1 HTTP/1.1
Accept: application/json
Host: localhost:8080

요청 헤더

Name Description

Accept

application/json

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 489

{
  "createdAt" : "2022-07-10 22:14:12",
  "menus" : [ {
    "menuName" : "참치 김밥",
    "quantity" : 1,
    "totalPrice" : 4500
  }, {
    "menuName" : "치즈 라면",
    "quantity" : 1,
    "totalPrice" : 5000
  }, {
    "menuName" : "돈가스",
    "quantity" : 1,
    "totalPrice" : 7000
  } ],
  "orderPrice" : 16500,
  "deliveryFee" : 3000,
  "voucherDiscountPrice" : 3000,
  "usedPoint" : 0,
  "orderStatus" : "ACCEPTED",
  "deliveryAddress" : "서울특별시 강남구"
}

응답 헤더

Name Description

Content-Type

application/json

응답 필드

Path Type Description

createdAt

String

주문 생성 시간(형식: yyyy-MM-dd HH:mm:ss)

orderPrice

Number

할인전 주문 금액(배달비 제외)

deliveryFee

Number

배달비

voucherDiscountPrice

Number

쿠폰 할인 금액

usedPoint

Number

주문에 사용한 포인트

orderStatus

String

주문 상태(PAYMENT_COMPLETED, ACCEPTED, CANCEL)

deliveryAddress

String

배달 주소

menus[]

Array

주문한 메뉴 정보

menus[].menuName

String

메뉴명

menus[].quantity

Number

수량

menus[].totalPrice

Number

가격

주문 통계 for 가게

가게의 기간별 주문 통계를 조회할 수 있습니다.

HTTP 요청 예시

GET /api/v1/restaurants/orders/statistics HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 73
Host: localhost:8080

{
  "restaurantId" : 1,
  "from" : "2022-06-10",
  "end" : "2022-07-10"
}

요청 헤더

Name Description

Content-Type

application/json

Accept

application/json

요청 필드

Path Type Description

restaurantId

Number

조회할 가게 ID

from

String

조회 시작일(형식: yyyy-MM-dd)

end

String

조회 마감일(형식: yyyy-MM-dd)

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 75

{
  "orderCount" : 10,
  "orderPrice" : 150000,
  "discountPrice" : 35000
}

응답 헤더

Name Description

Content-Type

application/json

응답 필드

Path Type Description

orderCount

Number

주문 횟수

orderPrice

Number

주문 가격(할인 금액 제외)

discountPrice

Number

할인 금액

관리자

관리자 생성

관리자를 생성할 수 있습니다.

HTTP 요청 예시

POST /api/v1/admins HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 63
X-CSRF-TOKEN: 4a198dd7-6da4-46f2-a0df-eab59388cb84
Host: localhost:8080

{
  "loginId" : "dev12",
  "loginPassword" : "Programmers12!"
}

요청 필드

Path Type Description

loginId

String

아이디

loginPassword

String

비밀번호

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 25

{
  "loginId" : "dev12"
}

응답 필드

Path Type Description

loginId

String

생성된 아이디

관리자 조회

관리자를 단건 조회할 수 있습니다.

HTTP 요청 예시

GET /api/v1/admins/dev12 HTTP/1.1
Content-Type: application/json;charset=UTF-8
X-CSRF-TOKEN: f112c10c-3a9f-4957-afff-fd8cefd4a1ee
Host: localhost:8080

PATH 파라미터

Table 1. /api/v1/admins/{loginId}
Parameter Description

loginId

조회할 관리자 로그인 ID

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 25

{
  "loginId" : "dev12"
}

응답 필드

Path Type Description

loginId

String

생성된 아이디

관리자 정보 업데이트

관리자의 정보를 업데이트 할 수 있습니다.

HTTP 요청 예시

PUT /api/v1/admins/dev12 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 41
X-CSRF-TOKEN: 98c41178-e2fb-4502-9c1f-2bd11ad91043
Host: localhost:8080

{
  "loginPassword" : "Programmers123!"
}

요청 필드

Path Type Description

loginPassword

String

수정하려는 비밀 번호

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 25

{
  "loginId" : "dev12"
}

응답 필드

Path Type Description

loginId

String

정보가 수정된 계정의 아이디

관리자 삭제

관리자를 삭제할 수 있습니다.

HTTP 요청 예시

DELETE /api/v1/admins/dev12 HTTP/1.1
Content-Type: application/json;charset=UTF-8
X-CSRF-TOKEN: 32f0442b-44ec-4f56-a33e-e92860a670ea
Host: localhost:8080

PATH 파라미터

Table 1. /api/v1/admins/{loginId}
Parameter Description

loginId

삭제할 관리자 로그인 ID

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: text/plain;charset=UTF-8
Content-Length: 17
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

delete id - dev12

고객

고객 생성

고객을 생성할 수 있습니다.

HTTP 요청 예시

POST /api/v1/customers HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 238
X-CSRF-TOKEN: 2a5ec57a-1d14-4733-860c-9bbabc79f37c
Host: localhost:8080

{
  "loginId" : "dev12",
  "loginPassword" : "Programmers12!",
  "birthdate" : "2000-01-01",
  "address" : {
    "defaultAddress" : "서울특별시 서초구 서초동",
    "detailAddress" : "1000-1 101호",
    "nickname" : "집"
  }
}

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 253

{
  "loginId" : "dev12",
  "birthdate" : "2000-01-01",
  "orderPerMonth" : 0,
  "point" : 0,
  "isIssued" : false,
  "customerGrade" : {
    "id" : 1,
    "orderCount" : 5,
    "title" : "일반",
    "discountPrice" : 1000,
    "voucherCount" : 2
  }
}

응답 필드

Path Type Description

loginId

String

아이디

birthdate

String

생년월일

point

Number

적립 포인트

isIssued

Boolean

정기쿠폰 발행 여부

orderPerMonth

Number

한 달 간 구매횟수

customerGrade.id

Number

고객 등급 아이디

customerGrade.orderCount

Number

최소 주문 횟수

customerGrade.title

String

고객 등급명

customerGrade.discountPrice

Number

할인 가격

customerGrade.voucherCount

Number

쿠폰 갯수

고객 조회

고객을 단건 조회할 수 있습니다.

HTTP 요청 예시

GET /api/v1/customers/dev12 HTTP/1.1
Host: localhost:8080

PATH 파라미터

Table 1. /api/v1/customers/{loginId}
Parameter Description

loginId

조회할 고객 로그인 ID

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 253

{
  "loginId" : "dev12",
  "birthdate" : "2000-01-01",
  "orderPerMonth" : 0,
  "point" : 0,
  "isIssued" : false,
  "customerGrade" : {
    "id" : 1,
    "orderCount" : 5,
    "title" : "일반",
    "discountPrice" : 1000,
    "voucherCount" : 2
  }
}

응답 필드

Path Type Description

loginId

String

아이디

birthdate

String

생년월일

point

Number

적립 포인트

orderPerMonth

Number

한 달 간 구매횟수

isIssued

Boolean

정기쿠폰 발행 여부

customerGrade.id

Number

고객 등급 아이디

customerGrade.orderCount

Number

최소 주문 횟수

customerGrade.title

String

고객 등급명

customerGrade.discountPrice

Number

할인 가격

customerGrade.voucherCount

Number

쿠폰 갯수

고객 정보 업데이트

고객의 정보를 업데이트 할 수 있습니다.

HTTP 요청 예시

PUT /api/v1/customers/dev12 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 43
X-CSRF-TOKEN: 078efe51-9430-4826-8e1c-59f904e29fda
Host: localhost:8080

{
  "loginPassword" : "Programmers12345!"
}

PATH 파라미터

Table 1. /api/v1/customers/{loginId}
Parameter Description

loginId

수정할 고객 로그인 ID

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 253

{
  "loginId" : "dev12",
  "birthdate" : "2000-01-01",
  "orderPerMonth" : 0,
  "point" : 0,
  "isIssued" : false,
  "customerGrade" : {
    "id" : 1,
    "orderCount" : 5,
    "title" : "일반",
    "discountPrice" : 1000,
    "voucherCount" : 2
  }
}

응답 필드

Path Type Description

loginId

String

아이디

birthdate

String

생년월일

point

Number

적립 포인트

orderPerMonth

Number

한 달 간 구매횟수

isIssued

Boolean

정기쿠폰 발행 여부

customerGrade.id

Number

고객 등급 아이디

customerGrade.orderCount

Number

최소 주문 횟수

customerGrade.title

String

고객 등급명

customerGrade.discountPrice

Number

할인 가격

customerGrade.voucherCount

Number

쿠폰 갯수

고객 매달 정보 업데이트

매달 1일 고객의 주문 횟수와 정기 쿠폰 발행 여부를 업데이트 할 수 있습니다.

HTTP 요청 예시

PUT /api/v1/customers/firstday/dev12 HTTP/1.1
X-CSRF-TOKEN: 7eee9340-7ea0-4fbe-bbf7-710f24d80601
Host: localhost:8080

PATH 파라미터

Table 1. /api/v1/customers/firstday/{loginId}
Parameter Description

loginId

수정할 고객 로그인 ID

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 253

{
  "loginId" : "dev12",
  "birthdate" : "2000-01-01",
  "orderPerMonth" : 0,
  "point" : 0,
  "isIssued" : false,
  "customerGrade" : {
    "id" : 1,
    "orderCount" : 5,
    "title" : "일반",
    "discountPrice" : 1000,
    "voucherCount" : 2
  }
}

응답 필드

Path Type Description

loginId

String

아이디

birthdate

String

생년월일

point

Number

적립 포인트

orderPerMonth

Number

한 달 간 구매횟수

isIssued

Boolean

정기쿠폰 발행 여부

customerGrade.id

Number

고객 등급 아이디

customerGrade.orderCount

Number

최소 주문 횟수

customerGrade.title

String

고객 등급명

customerGrade.discountPrice

Number

할인 가격

customerGrade.voucherCount

Number

쿠폰 갯수

고객 삭제

고객을 삭제할 수 있습니다.

HTTP 요청 예시

DELETE /api/v1/customers/dev12 HTTP/1.1
X-CSRF-TOKEN: 6fce2981-db3d-4717-8f19-efff1d65cde4
Host: localhost:8080

PATH 파라미터

Table 1. /api/v1/customers/{loginId}
Parameter Description

loginId

삭제할 고객 로그인 ID

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: text/plain;charset=UTF-8
Content-Length: 17
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

delete id - dev12

고객 주소

고객 주소 생성

고객 주소를 생성할 수 있습니다.

HTTP 요청 예시

POST /api/v1/customers/addresses/dev12 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 121
X-CSRF-TOKEN: 44fcf03c-8da2-46dd-8a69-6bd3af2d4fd9
Host: localhost:8080

{
  "defaultAddress" : "서울특별시 서초구 서초동",
  "detailAddress" : "1000-1 101호",
  "nickname" : "집"
}

PATH 파라미터

Table 1. /api/v1/customers/addresses/{loginId}
Parameter Description

loginId

조회할 고객 로그인 ID

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 103

{
  "id" : 1,
  "address" : "서울특별시 서초구 서초동 1000-1 101호",
  "nickname" : "집"
}

응답 필드

Path Type Description

id

Number

주소 아이디

address

String

주소

nickname

String

명칭

고객 주소 조회

고객 주소를 단건 조회할 수 있습니다.

HTTP 요청 예시

GET /api/v1/customers/addresses/dev12 HTTP/1.1
Host: localhost:8080

PATH 파라미터

Table 1. /api/v1/customers/addresses/{loginId}
Parameter Description

loginId

조회할 고객 로그인 ID

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 107

[ {
  "id" : 1,
  "address" : "서울특별시 서초구 서초동 1000-1 101호",
  "nickname" : "집"
} ]

응답 필드

Path Type Description

[].id

Number

주소 아이디

[].address

String

주소

[].nickname

String

명칭

고객 주소 정보 업데이트

고객 주소의 정보를 업데이트 할 수 있습니다.

HTTP 요청 예시

PUT /api/v1/customers/addresses/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 124
X-CSRF-TOKEN: a800650c-3ece-4ed9-b73f-f323e60a360b
Host: localhost:8080

{
  "defaultAddress" : "서울특별시 서초구 서초동",
  "detailAddress" : "아파트 101호",
  "nickname" : "집"
}

PATH 파라미터

Table 1. /api/v1/customers/addresses/{id}
Parameter Description

id

수정할 주소 ID

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 103

{
  "id" : 1,
  "address" : "서울특별시 서초구 서초동 1000-1 101호",
  "nickname" : "집"
}

응답 필드

Path Type Description

id

Number

주소 아이디

address

String

주소

nickname

String

명칭

고객 주소 삭제

고객 주소를 삭제할 수 있습니다.

HTTP 요청 예시

DELETE /api/v1/customers/addresses/1 HTTP/1.1
X-CSRF-TOKEN: 5940ddd3-5e4b-4b49-8905-a530bce6cdfc
Host: localhost:8080

PATH 파라미터

Table 1. /api/v1/customers/addresses/{id}
Parameter Description

id

삭제할 고객 로그인 ID

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: text/plain;charset=UTF-8
Content-Length: 13
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

delete id - 1

고객 등급

고객 등급 생성

고객 등급을 생성할 수 있습니다.

HTTP 요청 예시

POST /api/v1/customers/grades HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 92
X-CSRF-TOKEN: ddfe31ec-b4e8-4bb1-b1d7-34c3a43a58f7
Host: localhost:8080

{
  "orderCount" : 5,
  "title" : "일반",
  "discountPrice" : 1000,
  "voucherCount" : 2
}

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 104

{
  "id" : 1,
  "orderCount" : 5,
  "title" : "일반",
  "discountPrice" : 1000,
  "voucherCount" : 2
}

응답 필드

Path Type Description

id

Number

생성된 고객 등급 아이디

orderCount

Number

최소 주문 횟수

title

String

등급 이름

discountPrice

Number

할인 가격

voucherCount

Number

쿠폰 갯수

고객 등급 조회

고객 등급을 단건 조회할 수 있습니다.

HTTP 요청 예시

GET /api/v1/customers/grades/1 HTTP/1.1
Host: localhost:8080

PATH 파라미터

Table 1. /api/v1/customers/grades/{id}
Parameter Description

id

조회할 고객 등급 ID

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 104

{
  "id" : 1,
  "orderCount" : 5,
  "title" : "일반",
  "discountPrice" : 1000,
  "voucherCount" : 2
}

응답 필드

Path Type Description

id

Number

생성된 고객 등급 아이디

orderCount

Number

최소 주문 횟수

title

String

등급 이름

discountPrice

Number

할인 가격

voucherCount

Number

쿠폰 갯수

고객 등급 정보 업데이트

고객 등급의 정보를 업데이트 할 수 있습니다.

HTTP 요청 예시

PUT /api/v1/customers/grades/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 93
X-CSRF-TOKEN: f409e69d-ec91-48cb-afa9-781defa31afd
Host: localhost:8080

{
  "orderCount" : 10,
  "title" : "실버",
  "discountPrice" : 2000,
  "voucherCount" : 2
}

PATH 파라미터

Table 1. /api/v1/customers/grades/{id}
Parameter Description

id

수정할 고객 등급 ID

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 105

{
  "id" : 1,
  "orderCount" : 10,
  "title" : "실버",
  "discountPrice" : 2000,
  "voucherCount" : 2
}

응답 필드

Path Type Description

id

Number

생성된 고객 등급 아이디

orderCount

Number

최소 주문 횟수

title

String

등급 이름

discountPrice

Number

할인 가격

voucherCount

Number

쿠폰 갯수

고객 등급 삭제

고객 등급을 삭제할 수 있습니다.

HTTP 요청 예시

DELETE /api/v1/customers/grades/1 HTTP/1.1
X-CSRF-TOKEN: 04ca425e-c4b8-4881-a018-9b611f574e28
Host: localhost:8080

PATH 파라미터

Table 1. /api/v1/customers/grades/{id}
Parameter Description

id

삭제할 고객 등급 ID

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: text/plain;charset=UTF-8
Content-Length: 13
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

delete id - 1

쿠폰

쿠폰 생성

쿠폰을 생성할 수 있습니다.

HTTP 요청 예시

POST /api/v1/vouchers HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 123
X-CSRF-TOKEN: 848332f3-deca-4fdb-b62b-1457e2c75df5
Host: localhost:8080

{
  "voucherType" : "fixed",
  "eventType" : "special",
  "discountValue" : 1000,
  "expirationDate" : "2022-01-01 12:00"
}

요청 필드

Path Type Description

voucherType

String

할인 타입

eventType

String

이벤트 타입

discountValue

Number

할인 수치

expirationDate

String

만료 시간

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 196

{
  "id" : 1,
  "voucherType" : "fixed",
  "eventType" : "special",
  "discountValue" : 1000,
  "expirationDate" : "2022-07-10T21:44:02.515375",
  "code" : "3607c887-eb89-4af5-8361-99bdca58031a"
}

쿠폰 조회

쿠폰을 단건 조회할 수 있습니다.

HTTP 요청 예시

GET /api/v1/vouchers/1 HTTP/1.1
Host: localhost:8080

PATH 파라미터

Table 1. /api/v1/vouchers/{id}
Parameter Description

id

조회할 쿠폰 ID

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 194

{
  "id" : 1,
  "voucherType" : "fixed",
  "eventType" : "special",
  "discountValue" : 1000,
  "expirationDate" : "2022-07-10T21:44:02.5869",
  "code" : "a9b0a76d-70a8-4701-99e2-5c4f96d23396"
}

응답 필드

Path Type Description

id

Number

쿠폰 아이디

voucherType

String

할인 타입

eventType

String

이벤트 타입

discountValue

Number

할인 수치

expirationDate

String

만료 시간

code

String

등록 코드

정기 쿠폰 등록

고객 등급에 따라 정기 쿠폰을 등록할 수 있습니다.

HTTP 요청 예시

GET /api/v1/vouchers/month/dev12 HTTP/1.1
Host: localhost:8080

PATH 파라미터

Table 1. /api/v1/vouchers/month/{loginId}
Parameter Description

loginId

정기 쿠폰을 발급할 고객 로그인 ID

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 393

[ {
  "id" : 1,
  "voucherType" : "fixed",
  "eventType" : "month",
  "discountValue" : 1000,
  "expirationDate" : "2022-07-10T21:44:02.53944",
  "code" : "f7b23375-e38e-475a-944a-c9b477a96a8f"
}, {
  "id" : 1,
  "voucherType" : "fixed",
  "eventType" : "month",
  "discountValue" : 1000,
  "expirationDate" : "2022-07-10T21:44:02.539552",
  "code" : "45fecca6-6770-4a48-bfa1-f3f7177abe67"
} ]

응답 필드

Path Type Description

[].id

Number

쿠폰 아이디

[].voucherType

String

할인 타입

[].eventType

String

이벤트 타입

[].discountValue

Number

할인 수치

[].expirationDate

String

만료 시간

[].code

String

등록 코드

쿠폰 등록

고객이 쿠폰을 등록할 수 있습니다.

HTTP 요청 예시

GET /api/v1/vouchers/dev12/97cf9d1b-3c3e-466b-bebd-fa579f944b2d HTTP/1.1
Host: localhost:8080

PATH 파라미터

Table 1. /api/v1/vouchers/{loginId}/{code}
Parameter Description

loginId

쿠폰을 등록할 고객 로그인 ID

code

쿠폰 code

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 196

{
  "id" : 1,
  "voucherType" : "fixed",
  "eventType" : "special",
  "discountValue" : 1000,
  "expirationDate" : "2022-07-10T21:44:02.573678",
  "code" : "05826050-8594-431a-a20d-245d8a27008b"
}

응답 필드

Path Type Description

id

Number

쿠폰 아이디

voucherType

String

할인 타입

eventType

String

이벤트 타입

discountValue

Number

할인 수치

expirationDate

String

만료 시간

code

String

등록 코드

쿠폰 삭제

쿠폰을 삭제할 수 있습니다.

HTTP 요청 예시

DELETE /api/v1/vouchers/dev12/1 HTTP/1.1
X-CSRF-TOKEN: 1cbe29d5-8e7d-441b-b142-e0ae2d5e2833
Host: localhost:8080

PATH 파라미터

Table 1. /api/v1/vouchers/{loginId}/{id}
Parameter Description

loginId

삭제한 쿠폰을 보유한 고객 로그인 ID

id

삭제할 쿠폰 ID

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: text/plain;charset=UTF-8
Content-Length: 13
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

delete id - 1

가게

가게 생성

새로운 가게를 생성할 수 있습니다.

HTTP 요청 예시

POST /baemin/v1/owners/1/restaurants HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 314
X-CSRF-TOKEN: 1ca2dd1c-9211-4a76-ae5f-cd97aef4817c
Host: localhost:8080

{
  "name" : "테스트가게",
  "businessNumber" : "760-15-00993",
  "openingTime" : "21:43:55.136031",
  "closingTime" : "21:43:55.136047",
  "isOpen" : false,
  "phoneNumber" : "010-1234-6789",
  "description" : "테스트용 가게입니다.",
  "address" : "서울시 동작구",
  "categoryIds" : [ 1, 2 ]
}

PATH 파라미터

Table 1. /baemin/v1/owners/{ownerId}/restaurants
Parameter Description

ownerId

사장님 아이디

요청 필드

Path Type Description

name

String

이름

businessNumber

String

사업자등록번호

openingTime

String

문여는 시간

closingTime

String

문닫는 시간

isOpen

Boolean

영업여부

phoneNumber

String

전화번호

description

String

소개

address

String

주소

categoryIds

Array

속하는 카테고리명

HTTP 응답 예시

HTTP/1.1 201 Created
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 400

{
  "id" : 1,
  "ownerId" : 1,
  "name" : "테스트가게",
  "businessNumber" : "760-15-00993",
  "openingTime" : "21:43:55.13611",
  "closingTime" : "21:43:55.13612",
  "isOpen" : false,
  "phoneNumber" : "010-1234-6789",
  "description" : "테스트용 가게입니다.",
  "address" : "서울시 동작구",
  "categories" : [ "한식", "중식" ],
  "createdAt" : "2022-07-10T21:43:55.136135"
}

응답 필드

Path Type Description

id

Number

가게 아이디

ownerId

Number

사장님 아이디

name

String

이름

businessNumber

String

사업자등록번호

openingTime

String

문여는 시간

closingTime

String

문닫는 시간

isOpen

Boolean

영업여부

phoneNumber

String

전화번호

description

String

소개

address

String

주소

categories.[]

Array

속하는 카테고리명

createdAt

String

생성일

가게 삭제

가게 엔티티를 삭제할 수 있습니다.

HTTP 요청 예시

DELETE /baemin/v1/owners/1/restaurants/1 HTTP/1.1
X-CSRF-TOKEN: df4d48b3-c44b-478c-b293-7a6f53031927
Host: localhost:8080

PATH 파라미터

Table 1. /baemin/v1/owners/{ownerId}/restaurants/{restaurantId}
Parameter Description

ownerId

사장님 아이디

restaurantId

가게 아이디

가게 전체 조회

저장된 모든 가게 정보를 조회할 수 있습니다.

HTTP 요청 예시

GET /baemin/v1/restaurants?areaCodeId=1 HTTP/1.1
Accept: application/json
Host: localhost:8080

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1507

[ {
  "id" : 1,
  "ownerId" : 1,
  "name" : "테스트가게1",
  "businessNumber" : "760-15-00991",
  "openingTime" : "21:43:55.282283",
  "closingTime" : "21:43:55.282315",
  "isOpen" : false,
  "phoneNumber" : "010-1234-6789",
  "description" : "테스트용 가게입니다.",
  "averageReviewScore" : 0.0,
  "reviewCount" : 0,
  "address" : "서울시 동작구",
  "categories" : [ "한식", "중식" ],
  "createdAt" : "2022-07-10T21:43:55.282325",
  "updatedAt" : "2022-07-10T21:43:55.282401"
}, {
  "id" : 2,
  "ownerId" : 1,
  "name" : "테스트가게2",
  "businessNumber" : "760-15-00992",
  "openingTime" : "21:43:55.282425",
  "closingTime" : "21:43:55.282431",
  "isOpen" : false,
  "phoneNumber" : "010-1234-6789",
  "description" : "테스트용 가게입니다.",
  "averageReviewScore" : 0.0,
  "reviewCount" : 0,
  "address" : "서울시 동작구",
  "categories" : [ "한식", "중식" ],
  "createdAt" : "2022-07-10T21:43:55.282437",
  "updatedAt" : "2022-07-10T21:43:55.282444"
}, {
  "id" : 3,
  "ownerId" : 1,
  "name" : "테스트가게3",
  "businessNumber" : "760-15-00993",
  "openingTime" : "21:43:55.282453",
  "closingTime" : "21:43:55.28246",
  "isOpen" : false,
  "phoneNumber" : "010-1234-6789",
  "description" : "테스트용 가게입니다.",
  "averageReviewScore" : 0.0,
  "reviewCount" : 0,
  "address" : "서울시 동작구",
  "categories" : [ "한식", "중식" ],
  "createdAt" : "2022-07-10T21:43:55.282465",
  "updatedAt" : "2022-07-10T21:43:55.282471"
} ]

응답 필드

Path Type Description

[].id

Number

가게 아이디

[].ownerId

Number

사장님 아이디

[].name

String

이름

[].businessNumber

String

사업자등록번호

[].openingTime

String

문여는 시간

[].closingTime

String

문닫는 시간

[].isOpen

Boolean

영업여부

[].phoneNumber

String

전화번호

[].description

String

소개

[].averageReviewScore

Number

평균 리뷰수

[].reviewCount

Number

리뷰수

[].address

String

주소

[].categories.[]

Array

속하는 카테고리명

[].createdAt

String

생성일

[].updatedAt

String

변경일

사장님 아이디로 가게 전체 조회

사장님 아이디로 저장된 모든 가게 정보를 조회할 수 있습니다.

HTTP 요청 예시

GET /baemin/v1/owners/1/restaurants HTTP/1.1
Accept: application/json
Host: localhost:8080

PATH 파라미터

Table 1. /baemin/v1/owners/{ownerId}/restaurants
Parameter Description

ownerId

사장님 아이디

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1505

[ {
  "id" : 1,
  "ownerId" : 1,
  "name" : "테스트가게1",
  "businessNumber" : "760-15-00991",
  "openingTime" : "21:43:55.412443",
  "closingTime" : "21:43:55.412459",
  "isOpen" : false,
  "phoneNumber" : "010-1234-6789",
  "description" : "테스트용 가게입니다.",
  "averageReviewScore" : 0.0,
  "reviewCount" : 0,
  "address" : "서울시 동작구",
  "categories" : [ "한식", "중식" ],
  "createdAt" : "2022-07-10T21:43:55.412468",
  "updatedAt" : "2022-07-10T21:43:55.412479"
}, {
  "id" : 2,
  "ownerId" : 1,
  "name" : "테스트가게2",
  "businessNumber" : "760-15-00992",
  "openingTime" : "21:43:55.412487",
  "closingTime" : "21:43:55.412492",
  "isOpen" : false,
  "phoneNumber" : "010-1234-6789",
  "description" : "테스트용 가게입니다.",
  "averageReviewScore" : 0.0,
  "reviewCount" : 0,
  "address" : "서울시 동작구",
  "categories" : [ "한식", "중식" ],
  "createdAt" : "2022-07-10T21:43:55.4125",
  "updatedAt" : "2022-07-10T21:43:55.412547"
}, {
  "id" : 3,
  "ownerId" : 1,
  "name" : "테스트가게3",
  "businessNumber" : "760-15-00993",
  "openingTime" : "21:43:55.412562",
  "closingTime" : "21:43:55.412567",
  "isOpen" : false,
  "phoneNumber" : "010-1234-6789",
  "description" : "테스트용 가게입니다.",
  "averageReviewScore" : 0.0,
  "reviewCount" : 0,
  "address" : "서울시 동작구",
  "categories" : [ "한식", "중식" ],
  "createdAt" : "2022-07-10T21:43:55.412573",
  "updatedAt" : "2022-07-10T21:43:55.41258"
} ]

응답 필드

Path Type Description

[].id

Number

가게 아이디

[].ownerId

Number

사장님 아이디

[].name

String

이름

[].businessNumber

String

사업자등록번호

[].openingTime

String

문여는 시간

[].closingTime

String

문닫는 시간

[].isOpen

Boolean

영업여부

[].phoneNumber

String

전화번호

[].description

String

소개

[].averageReviewScore

Number

평균 리뷰수

[].reviewCount

Number

리뷰수

[].address

String

주소

[].categories.[]

Array

속하는 카테고리명

[].createdAt

String

생성일

[].updatedAt

String

변경일

광고 아이디로 가게 전체 조회

광고 아이디로 저장된 모든 가게 정보를 조회할 수 있습니다.

HTTP 요청 예시

GET /baemin/v1/advertisements/1/restaurants HTTP/1.1
Accept: application/json
Host: localhost:8080

PATH 파라미터

Table 1. /baemin/v1/advertisements/{advertisementId}/restaurants
Parameter Description

advertisementId

광고 아이디

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1507

[ {
  "id" : 1,
  "ownerId" : 1,
  "name" : "테스트가게1",
  "businessNumber" : "760-15-00991",
  "openingTime" : "21:43:55.444051",
  "closingTime" : "21:43:55.444064",
  "isOpen" : false,
  "phoneNumber" : "010-1234-6789",
  "description" : "테스트용 가게입니다.",
  "averageReviewScore" : 0.0,
  "reviewCount" : 0,
  "address" : "서울시 동작구",
  "categories" : [ "한식", "중식" ],
  "createdAt" : "2022-07-10T21:43:55.44407",
  "updatedAt" : "2022-07-10T21:43:55.444078"
}, {
  "id" : 2,
  "ownerId" : 1,
  "name" : "테스트가게2",
  "businessNumber" : "760-15-00992",
  "openingTime" : "21:43:55.444084",
  "closingTime" : "21:43:55.444099",
  "isOpen" : false,
  "phoneNumber" : "010-1234-6789",
  "description" : "테스트용 가게입니다.",
  "averageReviewScore" : 0.0,
  "reviewCount" : 0,
  "address" : "서울시 동작구",
  "categories" : [ "한식", "중식" ],
  "createdAt" : "2022-07-10T21:43:55.444103",
  "updatedAt" : "2022-07-10T21:43:55.444108"
}, {
  "id" : 3,
  "ownerId" : 1,
  "name" : "테스트가게3",
  "businessNumber" : "760-15-00993",
  "openingTime" : "21:43:55.444112",
  "closingTime" : "21:43:55.444115",
  "isOpen" : false,
  "phoneNumber" : "010-1234-6789",
  "description" : "테스트용 가게입니다.",
  "averageReviewScore" : 0.0,
  "reviewCount" : 0,
  "address" : "서울시 동작구",
  "categories" : [ "한식", "중식" ],
  "createdAt" : "2022-07-10T21:43:55.444118",
  "updatedAt" : "2022-07-10T21:43:55.444122"
} ]

응답 필드

Path Type Description

[].id

Number

가게 아이디

[].ownerId

Number

사장님 아이디

[].name

String

이름

[].businessNumber

String

사업자등록번호

[].openingTime

String

문여는 시간

[].closingTime

String

문닫는 시간

[].isOpen

Boolean

영업여부

[].phoneNumber

String

전화번호

[].description

String

소개

[].averageReviewScore

Number

평균 리뷰수

[].reviewCount

Number

리뷰수

[].address

String

주소

[].categories.[]

Array

속하는 카테고리명

[].createdAt

String

생성일

[].updatedAt

String

변경일

카테고리 아이디로 가게 전체 조회

카테고리 아이디로 저장된 모든 가게 정보를 조회할 수 있습니다.

HTTP 요청 예시

GET /baemin/v1/categories/1/restaurants HTTP/1.1
Accept: application/json
Host: localhost:8080

PATH 파라미터

Table 1. /baemin/v1/categories/{categoryId}/restaurants
Parameter Description

categoryId

카테고리 아이디

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1507

[ {
  "id" : 1,
  "ownerId" : 1,
  "name" : "테스트가게1",
  "businessNumber" : "760-15-00991",
  "openingTime" : "21:43:55.485262",
  "closingTime" : "21:43:55.485275",
  "isOpen" : false,
  "phoneNumber" : "010-1234-6789",
  "description" : "테스트용 가게입니다.",
  "averageReviewScore" : 0.0,
  "reviewCount" : 0,
  "address" : "서울시 동작구",
  "categories" : [ "한식", "중식" ],
  "createdAt" : "2022-07-10T21:43:55.485282",
  "updatedAt" : "2022-07-10T21:43:55.485291"
}, {
  "id" : 2,
  "ownerId" : 1,
  "name" : "테스트가게2",
  "businessNumber" : "760-15-00992",
  "openingTime" : "21:43:55.485296",
  "closingTime" : "21:43:55.485299",
  "isOpen" : false,
  "phoneNumber" : "010-1234-6789",
  "description" : "테스트용 가게입니다.",
  "averageReviewScore" : 0.0,
  "reviewCount" : 0,
  "address" : "서울시 동작구",
  "categories" : [ "한식", "중식" ],
  "createdAt" : "2022-07-10T21:43:55.485302",
  "updatedAt" : "2022-07-10T21:43:55.485306"
}, {
  "id" : 3,
  "ownerId" : 1,
  "name" : "테스트가게3",
  "businessNumber" : "760-15-00993",
  "openingTime" : "21:43:55.48531",
  "closingTime" : "21:43:55.485312",
  "isOpen" : false,
  "phoneNumber" : "010-1234-6789",
  "description" : "테스트용 가게입니다.",
  "averageReviewScore" : 0.0,
  "reviewCount" : 0,
  "address" : "서울시 동작구",
  "categories" : [ "한식", "중식" ],
  "createdAt" : "2022-07-10T21:43:55.485315",
  "updatedAt" : "2022-07-10T21:43:55.485319"
} ]

응답 필드

Path Type Description

[].id

Number

가게 아이디

[].ownerId

Number

사장님 아이디

[].name

String

이름

[].businessNumber

String

사업자등록번호

[].openingTime

String

문여는 시간

[].closingTime

String

문닫는 시간

[].isOpen

Boolean

영업여부

[].phoneNumber

String

전화번호

[].description

String

소개

[].averageReviewScore

Number

평균 리뷰수

[].reviewCount

Number

리뷰수

[].address

String

주소

[].categories.[]

Array

속하는 카테고리명

[].createdAt

String

생성일

[].updatedAt

String

변경일

가게 단건 조회

저장된 하나의 가게 정보를 조회할 수 있습니다.

HTTP 요청 예시

GET /baemin/v1/restaurants/1 HTTP/1.1
Accept: application/json
Host: localhost:8080

PATH 파라미터

Table 1. /baemin/v1/restaurants/{restaurantId}
Parameter Description

restaurantId

가게 아이디

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 499

{
  "id" : 1,
  "ownerId" : 1,
  "name" : "테스트가게1",
  "businessNumber" : "760-15-00991",
  "openingTime" : "21:43:55.225017",
  "closingTime" : "21:43:55.225033",
  "isOpen" : false,
  "phoneNumber" : "010-1234-6789",
  "description" : "테스트용 가게입니다.",
  "averageReviewScore" : 0.0,
  "reviewCount" : 0,
  "address" : "서울시 동작구",
  "categories" : [ "한식", "중식" ],
  "createdAt" : "2022-07-10T21:43:55.22506",
  "updatedAt" : "2022-07-10T21:43:55.225073"
}

응답 필드

Path Type Description

id

Number

가게 아이디

ownerId

Number

사장님 아이디

name

String

이름

businessNumber

String

사업자등록번호

openingTime

String

문여는 시간

closingTime

String

문닫는 시간

isOpen

Boolean

영업여부

phoneNumber

String

전화번호

description

String

소개

averageReviewScore

Number

평균 리뷰수

reviewCount

Number

리뷰수

address

String

주소

categories.[]

Array

속하는 카테고리명

createdAt

String

생성일

updatedAt

String

변경일

가게 변경

저장된 하나의 가게 정보를 변경할 수 있습니다.

HTTP 요청 예시

PUT /baemin/v1/owners/1/restaurants/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 198
X-CSRF-TOKEN: 52221336-1712-4487-a740-a3e00586fdbd
Host: localhost:8080

{
  "openingTime" : "21:43:55.377549",
  "closingTime" : "21:43:55.37756",
  "phoneNumber" : "010-1234-6789",
  "address" : "서울시 동작구",
  "description" : "테스트용 가게입니다."
}

PATH 파라미터

Table 1. /baemin/v1/owners/{ownerId}/restaurants/{restaurantId}
Parameter Description

ownerId

사장님 아이디

restaurantId

가게 아이디

요청 바디

{
  "openingTime" : "21:43:55.377549",
  "closingTime" : "21:43:55.37756",
  "phoneNumber" : "010-1234-6789",
  "address" : "서울시 동작구",
  "description" : "테스트용 가게입니다."
}

요청 필드

Path Type Description

openingTime

String

문여는 시간

closingTime

String

문닫는 시간

phoneNumber

String

전화번호

address

String

주소

description

String

소개

가게 문 열기/닫기

가게 문을 열고 닫을 수 있습니다(영업 상태 변경).

HTTP 요청 예시

PATCH /baemin/v1/owners/1/restaurants/1 HTTP/1.1
X-CSRF-TOKEN: 483162e6-7f95-4773-8107-1030404351d7
Host: localhost:8080

PATH 파라미터

Table 1. /baemin/v1/owners/{ownerId}/restaurants/{restaurantId}
Parameter Description

ownerId

사장님 아이디

restaurantId

가게 아이디

요청 파라미터

Parameter Description

isOpen

영업여부

가게에 카테고리 추가

가게에 카테고리를 추가할 수 있습니다.

HTTP 요청 예시

PATCH /baemin/v1/owners/1/restaurants/1/categories/add HTTP/1.1
X-CSRF-TOKEN: 2b85affd-24e8-44d3-a2b6-e82230c03746
Host: localhost:8080

PATH 파라미터

Table 1. /baemin/v1/owners/{ownerId}/restaurants/{restaurantId}/categories/add
Parameter Description

ownerId

사장님 아이디

restaurantId

가게 아이디

요청 파라미터

Parameter Description

categoryId

카테고리 아이디

가게에 카테고리 삭제

가게에 카테고리를 삭제할 수 있습니다.

HTTP 요청 예시

PATCH /baemin/v1/owners/1/restaurants/1/categories/remove HTTP/1.1
X-CSRF-TOKEN: 3a6fcdce-c421-432c-818a-268b3829eb98
Host: localhost:8080

PATH 파라미터

Table 1. /baemin/v1/owners/{ownerId}/restaurants/{restaurantId}/categories/remove
Parameter Description

ownerId

사장님 아이디

restaurantId

가게 아이디

요청 파라미터

Parameter Description

categoryId

카테고리 아이디

가게에 배달지역 추가

가게에 배달지역을 추가할 수 있습니다.

HTTP 요청 예시

PATCH /baemin/v1/owners/1/restaurants/1/delivery/add HTTP/1.1
X-CSRF-TOKEN: af9876e0-c59e-4e4b-b154-e7c671dbf489
Host: localhost:8080

PATH 파라미터

Table 1. /baemin/v1/owners/{ownerId}/restaurants/{restaurantId}/delivery/add
Parameter Description

ownerId

사장님 아이디

restaurantId

가게 아이디

요청 파라미터

Parameter Description

areaCodeId

지역코드

deliveryFee

배달비

사장님

사장님 생성

새로운 사장님을 생성할 수 있습니다.

HTTP 요청 예시

POST /baemin/v1/owners HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 122
X-CSRF-TOKEN: 0699fd59-76e5-4c79-ac81-9b609258b65c
Host: localhost:8080

{
  "loginId" : "Aabcd123456",
  "password" : "tT@!123456789",
  "name" : "테스트",
  "phoneNumber" : "010-1234-5678"
}

요청 필드

Path Type Description

loginId

String

로그인 아이디

password

String

비밀번호

name

String

이름

phoneNumber

String

전화번호

HTTP 응답 예시

HTTP/1.1 201 Created
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 180

{
  "id" : 1,
  "loginId" : "Aabcd123456",
  "password" : "tT@!123456789",
  "name" : "테스트",
  "phoneNumber" : "010-1234-5678",
  "createdAt" : "2022-07-10T21:43:59.639737"
}

응답 필드

Path Type Description

id

Number

아이디

loginId

String

로그인 아이디

password

String

비밀번호

name

String

이름

phoneNumber

String

전화번호

createdAt

String

생성일

사장님 삭제

사장님 엔티티를 삭제할 수 있습니다.

HTTP 요청 예시

DELETE /baemin/v1/owners/1 HTTP/1.1
X-CSRF-TOKEN: 0b08aa0d-b41d-491a-88b3-e9fcb1e26be3
Host: localhost:8080

PATH 파라미터

Table 1. /baemin/v1/owners/{ownerId}
Parameter Description

ownerId

아이디

사장님 전체 조회

저장된 모든 사장님 정보를 조회할 수 있습니다.

HTTP 요청 예시

GET /baemin/v1/owners HTTP/1.1
Accept: application/json
Host: localhost:8080

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 686

[ {
  "id" : 1,
  "loginId" : "Aabcd123456",
  "password" : "tT@!123456789",
  "name" : "테테테",
  "phoneNumber" : "010-1111-2222",
  "createdAt" : "2022-07-10T21:43:59.664851",
  "updatedAt" : "2022-07-10T21:43:59.664866"
}, {
  "id" : 2,
  "loginId" : "Aabcd123457",
  "password" : "tT@!123456789",
  "name" : "스스스",
  "phoneNumber" : "010-3333-4444",
  "createdAt" : "2022-07-10T21:43:59.664889",
  "updatedAt" : "2022-07-10T21:43:59.664894"
}, {
  "id" : 3,
  "loginId" : "Aabcd123458",
  "password" : "tT@!123456789",
  "name" : "트트트",
  "phoneNumber" : "010-5555-6666",
  "createdAt" : "2022-07-10T21:43:59.664901",
  "updatedAt" : "2022-07-10T21:43:59.664905"
} ]

응답 필드

Path Type Description

[].id

Number

아이디

[].loginId

String

로그인 아이디

[].password

String

비밀번호

[].name

String

이름

[].phoneNumber

String

전화번호

[].createdAt

String

생성일

[].updatedAt

String

변경일

사장님 단건 조회

저장된 하나의 사장님 정보를 조회할 수 있습니다.

HTTP 요청 예시

GET /baemin/v1/owners/1 HTTP/1.1
Accept: application/json
Host: localhost:8080

PATH 파라미터

Table 1. /baemin/v1/owners/{ownerId}
Parameter Description

ownerId

아이디

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 227

{
  "id" : 1,
  "loginId" : "Aabcd123456",
  "password" : "tT@!123456789",
  "name" : "테스트1",
  "phoneNumber" : "010-1111-2222",
  "createdAt" : "2022-07-10T21:43:59.681706",
  "updatedAt" : "2022-07-10T21:43:59.681721"
}

응답 필드

Path Type Description

id

Number

아이디

loginId

String

로그인 아이디

password

String

비밀번호

name

String

이름

phoneNumber

String

전화번호

createdAt

String

생성일

updatedAt

String

변경일

사장님 변경

저장된 하나의 사장님 정보를 변경할 수 있습니다.

HTTP 요청 예시

PUT /baemin/v1/owners/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 93
X-CSRF-TOKEN: 26296e93-8e2b-4a66-ae69-63f3160525be
Host: localhost:8080

{
  "password" : "tT@!123456789",
  "name" : "테스트",
  "phoneNumber" : "010-1111-2222"
}

PATH 파라미터

Table 1. /baemin/v1/owners/{ownerId}
Parameter Description

ownerId

아이디

요청 바디

{
  "password" : "tT@!123456789",
  "name" : "테스트",
  "phoneNumber" : "010-1111-2222"
}

요청 필드

Path Type Description

password

String

비밀번호

name

String

이름

phoneNumber

String

전화번호

광고

광고 생성

새로운 광고를 생성할 수 있습니다.

HTTP 요청 예시

POST /baemin/v1/advertisements HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 168
X-CSRF-TOKEN: c903b808-3d04-4ddb-b3d3-0aaa534821ec
Host: localhost:8080

{
  "title" : "울트라콜",
  "unitType" : "주문별",
  "rateType" : "정액제",
  "rate" : 10,
  "description" : "테스트용 울트라콜",
  "limitSize" : 10
}

요청 필드

Path Type Description

title

String

광고명

unitType

String

적용단위

rateType

String

청구유형

rate

Number

광고료

description

String

설명

limitSize

Number

최대 가게 수

HTTP 응답 예시

HTTP/1.1 201 Created
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 244

{
  "id" : 1,
  "title" : "울트라콜",
  "unitType" : "주문별",
  "rateType" : "정액제",
  "rate" : 10,
  "description" : "테스트용 울트라콜",
  "limitSize" : 10,
  "currentSize" : 0,
  "createdAt" : "2022-07-10T21:44:04.039"
}

응답 필드

Path Type Description

id

Number

아이디

title

String

광고명

unitType

String

적용단위

rateType

String

청구유형

rate

Number

광고료

description

String

설명

limitSize

Number

최대 가게 수

currentSize

Number

현재 가게 수

createdAt

String

생성일

광고 삭제

광고 엔티티를 삭제할 수 있습니다.

HTTP 요청 예시

DELETE /baemin/v1/advertisements/1 HTTP/1.1
X-CSRF-TOKEN: 1969d1e6-a392-4d69-bcf4-7fd2035328da
Host: localhost:8080

PATH 파라미터

Table 1. /baemin/v1/advertisements/{advertisementId}
Parameter Description

advertisementId

아이디

광고 전체 조회

저장된 모든 광고 정보를 조회할 수 있습니다.

HTTP 요청 예시

GET /baemin/v1/advertisements HTTP/1.1
Accept: application/json
Host: localhost:8080

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 781

[ {
  "id" : 1,
  "title" : "A",
  "unitType" : "주문별",
  "rateType" : "비율제",
  "rate" : 10,
  "description" : "a",
  "limitSize" : 10,
  "currentSize" : 1,
  "createdAt" : "2022-07-10T21:44:03.96841",
  "updatedAt" : "2022-07-10T21:44:03.968422"
}, {
  "id" : 2,
  "title" : "B",
  "unitType" : "주문별",
  "rateType" : "비율제",
  "rate" : 10,
  "description" : "b",
  "limitSize" : 10,
  "currentSize" : 2,
  "createdAt" : "2022-07-10T21:44:03.968435",
  "updatedAt" : "2022-07-10T21:44:03.968437"
}, {
  "id" : 3,
  "title" : "C",
  "unitType" : "주문별",
  "rateType" : "비율제",
  "rate" : 10,
  "description" : "c",
  "limitSize" : 10,
  "currentSize" : 3,
  "createdAt" : "2022-07-10T21:44:03.968441",
  "updatedAt" : "2022-07-10T21:44:03.968443"
} ]

응답 필드

Path Type Description

[].id

Number

아이디

[].title

String

광고명

[].unitType

String

적용단위

[].rateType

String

청구유형

[].rate

Number

광고료

[].description

String

설명

[].limitSize

Number

최대 가게 수

[].currentSize

Number

현재 가게 수

[].createdAt

String

생성일

[].updatedAt

String

변경일

광고 단건 조회

저장된 하나의 광고 정보를 조회할 수 있습니다.

HTTP 요청 예시

GET /baemin/v1/advertisements/1 HTTP/1.1
Accept: application/json
Host: localhost:8080

PATH 파라미터

Table 1. /baemin/v1/advertisements/{advertisementId}
Parameter Description

advertisementId

아이디

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 293

{
  "id" : 1,
  "title" : "울트라콜",
  "unitType" : "주문별",
  "rateType" : "정액제",
  "rate" : 10,
  "description" : "테스트용 울트라콜",
  "limitSize" : 10,
  "currentSize" : 0,
  "createdAt" : "2022-07-10T21:44:03.986017",
  "updatedAt" : "2022-07-10T21:44:03.986036"
}

응답 필드

Path Type Description

id

Number

아이디

title

String

광고명

unitType

String

적용단위

rateType

String

청구유형

rate

Number

광고료

description

String

설명

limitSize

Number

최대 가게 수

currentSize

Number

현재 가게 수

createdAt

String

생성일

updatedAt

String

변경일

광고 변경

저장된 하나의 광고 정보를 변경할 수 있습니다.

HTTP 요청 예시

PUT /baemin/v1/advertisements/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 148
X-CSRF-TOKEN: 9fa2f307-df5f-420c-b75b-57fe9c49aee3
Host: localhost:8080

{
  "title" : "울트라콜",
  "unitType" : "주문별",
  "rateType" : "정액제",
  "rate" : 10,
  "description" : "테스트용 울트라콜"
}

PATH 파라미터

Table 1. /baemin/v1/advertisements/{advertisementId}
Parameter Description

advertisementId

아이디

요청 바디

{
  "title" : "울트라콜",
  "unitType" : "주문별",
  "rateType" : "정액제",
  "rate" : 10,
  "description" : "테스트용 울트라콜"
}

요청 필드

Path Type Description

title

String

광고명

unitType

String

적용단위

rateType

String

청구유형

rate

Number

광고료

description

String

설명

광고 가게 추가

광고에 특정 가게를 포함할 수 있습니다.

HTTP 요청 예시

POST /baemin/v1/advertisements/10/restaurants/20 HTTP/1.1
X-CSRF-TOKEN: 68422a29-c5c0-466e-91f4-0f0a70603854
Host: localhost:8080

PATH 파라미터

Table 1. /baemin/v1/advertisements/{advertisementId}/restaurants/{restaurantId}
Parameter Description

advertisementId

광고 아이디

restaurantId

가게 아이디

광고 가게 제외

광고에 특정 가게를 제외할 수 있습니다.

HTTP 요청 예시

DELETE /baemin/v1/advertisements/10/restaurants/20 HTTP/1.1
X-CSRF-TOKEN: 450b1b93-dd55-47df-a31b-c148c9820405
Host: localhost:8080

PATH 파라미터

Table 1. /baemin/v1/advertisements/{advertisementId}/restaurants/{restaurantId}
Parameter Description

advertisementId

광고 아이디

restaurantId

가게 아이디

카테고리

카테고리 생성

새로운 카테고리를 생성할 수 있습니다.

HTTP 요청 예시

POST /baemin/v1/categories HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json
Content-Length: 23
X-CSRF-TOKEN: c588c1c8-e861-41f3-93e5-3d1943643be4
Host: localhost:8080

{
  "name" : "한식"
}

요청 필드

Path Type Description

name

String

이름

카테고리 삭제

카테고리 엔티티를 삭제할 수 있습니다.

HTTP 요청 예시

DELETE /baemin/v1/categories/1 HTTP/1.1
X-CSRF-TOKEN: 20f1e221-284b-43b0-89d1-a9a973da0482
Host: localhost:8080

PATH 파라미터

Table 1. /baemin/v1/categories/{categoryId}
Parameter Description

categoryId

저장된 카테고리 아이디

카테고리 전체 조회

저장된 모든 카테고리 정보를 조회할 수 있습니다.

HTTP 요청 예시

GET /baemin/v1/categories HTTP/1.1
Accept: application/json
Host: localhost:8080

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 518

[ {
  "id" : 1,
  "name" : "한식",
  "createdAt" : "2022-07-10T21:44:05.479483",
  "updatedAt" : "2022-07-10T21:44:05.479518"
}, {
  "id" : 2,
  "name" : "중식",
  "createdAt" : "2022-07-10T21:44:05.479564",
  "updatedAt" : "2022-07-10T21:44:05.479567"
}, {
  "id" : 3,
  "name" : "일식",
  "createdAt" : "2022-07-10T21:44:05.479575",
  "updatedAt" : "2022-07-10T21:44:05.479577"
}, {
  "id" : 4,
  "name" : "분식",
  "createdAt" : "2022-07-10T21:44:05.479579",
  "updatedAt" : "2022-07-10T21:44:05.479581"
} ]

응답 필드

Path Type Description

[].id

Number

아이디

[].name

String

이름

[].createdAt

String

생성일

[].updatedAt

String

변경일

카테고리 단건 조회

저장된 하나의 카테고리 정보를 조회할 수 있습니다.

HTTP 요청 예시

GET /baemin/v1/categories/1 HTTP/1.1
Accept: application/json
Host: localhost:8080

PATH 파라미터

Table 1. /baemin/v1/categories/{categoryId}
Parameter Description

categoryId

저장된 카테고리 아이디

HTTP 응답 예시

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 127

{
  "id" : 1,
  "name" : "한식",
  "createdAt" : "2022-07-10T21:44:05.460575",
  "updatedAt" : "2022-07-10T21:44:05.460592"
}

응답 필드

Path Type Description

id

Number

아이디

name

String

이름

createdAt

String

생성일

updatedAt

String

변경일

카테고리 변경

저장된 하나의 카테고리 정보를 변경할 수 있습니다.

HTTP 요청 예시

PUT /baemin/v1/categories/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 23
X-CSRF-TOKEN: d9542f1f-61d1-4b66-a0ba-59786a8daa44
Host: localhost:8080

{
  "name" : "분식"
}

PATH 파라미터

Table 1. /baemin/v1/categories/{categoryId}
Parameter Description

categoryId

저장된 카테고리 아이디

요청 바디

{
  "name" : "분식"
}

요청 필드

Path Type Description

name

String

변경할 이름