HTTP 메서드
해당 API에서 사용하는 HTTP 메서드는 다음과 같습니다.
메서드 | 용례 |
---|---|
|
리소스를 가져올 때 사용 |
|
새 리소스를 만들 때 사용 |
|
기존 리소스를 수정할 때 사용 |
|
기존 리소스의 일부를 수정할 때 사용 |
|
기존 리소스를 삭제할 떄 사용 |
HTTP 상태 코드
해당 API에서 사용하는 HTTP 상태 코드는 다음과 같습니다.
상태 코드 | 용례 |
---|---|
|
요청을 성공적으로 처리함 |
|
새 리소스를 성공적으로 생성함. 응답의 |
|
잘못된 요청을 보낸 경우. 응답 본문에 더 오류에 대한 정보가 담겨있다. |
|
요청한 리소스가 없음. |
메뉴
메뉴 생성
메뉴를 생성할 수 있습니다.
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 |
---|---|
|
application/json |
|
application/json |
요청 필드
Path | Type | Description |
---|---|---|
|
|
메뉴 그룹 ID |
|
|
메뉴명(최대 100자) |
|
|
메뉴 설명(선택, 최대 1000자) |
|
|
메뉴 가격 |
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 |
---|---|
|
생성된 메뉴의 위치 |
메뉴 단건 조회
메뉴를 단건 조회할 수 있습니다.
HTTP 요청 예시
GET /api/v1/menus/1 HTTP/1.1
Accept: application/json
Host: localhost:8080
요청 헤더
Name | Description |
---|---|
|
application/json |
PATH 파라미터
Parameter | Description |
---|---|
|
조회할 메뉴 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 |
---|---|
|
application/json |
응답 필드
Path | Type | Description |
---|---|---|
|
|
메뉴 ID |
|
|
메뉴명 |
|
|
메뉴 설명 |
|
|
메뉴 가격 |
메뉴 정보 업데이트
메뉴 이름 및 설명을 업데이트 할 수 있습니다.
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 |
---|---|
|
application/json |
요청 필드
Path | Type | Description |
---|---|---|
|
|
메뉴명(필수, 최대 100자) |
|
|
메뉴 설명(선택, 최대 1000자) |
|
|
메뉴 가격(필수) |
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 파라미터
Parameter | Description |
---|---|
|
삭제할 메뉴 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 |
---|---|
|
application/json |
요청 필드
Path | Type | Description |
---|---|---|
|
|
변경할 메뉴 상태(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 파라미터
Parameter | Description |
---|---|
|
설정을 변경할 메뉴 ID |
요청 필드
Path | Type | Description |
---|---|---|
|
|
대표 메뉴 설정 여부 |
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 |
---|---|
|
application/json |
PATH 파라미터
Parameter | Description |
---|---|
|
메뉴그룹을 추가할 가게의 ID |
요청 필드
Path | Type | Description |
---|---|---|
|
|
메뉴그룹명(필수, 최대 100자 |
|
|
메뉴그룹 설명(선택, 최대 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 |
---|---|
|
생성된 메뉴 그룹의 위치 |
메뉴그룹 단건 조회
메뉴그룹을 단건 조회할 수 있습니다.
HTTP 요청 예시
GET /api/v1/menu-groups/1 HTTP/1.1
Accept: application/json
Host: localhost:8080
요청 헤더
Name | Description |
---|---|
|
application/json |
PATH 파라미터
Parameter | Description |
---|---|
|
조회할 메뉴그룹 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 |
---|---|
|
application/json |
응답 필드
Path | Type | Description |
---|---|---|
|
|
메뉴그룹 ID |
|
|
메뉴그룹명 |
|
|
메뉴그룹 설명 |
가게 메뉴그룹 조회
가게의 메뉴그룹을 조회할 수 있다.
HTTP 요청 예시
GET /api/v1/restaurant/1/menu-groups HTTP/1.1
Accept: application/json
Host: localhost:8080
PATH 파라미터
Parameter | Description |
---|---|
|
메뉴그룹을 조회할 가게 ID |
요청 헤더
Name | Description |
---|---|
|
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 |
---|---|
|
application/json |
응답 필드
Path | Type | Description |
---|---|---|
|
|
메뉴그룹 목록 |
|
|
메뉴그룹 ID |
|
|
메뉴그룹명 |
|
|
메뉴그룹 설명 |
메뉴그룹 업데이트
메뉴그룹 정보를 수정할 수 있다.
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 파라미터
Parameter | Description |
---|---|
|
업데이트할 메뉴그룹 ID |
요청 헤더
Name | Description |
---|---|
|
application/json |
요청 필드
Path | Type | Description |
---|---|---|
|
|
메뉴그룹명(필수, 최대 100자) |
|
|
메뉴그룹 설명(선택, 최대 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 파라미터
Parameter | Description |
---|---|
|
삭제할 메뉴그룹 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 |
---|---|
|
application/json |
요청 필드
Path | Type | Description |
---|---|---|
|
|
주문한 회원의 아이디 |
|
|
주문한 레스토랑의 ID |
|
|
사용한 쿠폰의 ID(쿠폰 미사용 주문일 경우 해당 필드는 null로 전달) |
|
|
주문에 사용한 회원의 포인트 |
|
|
결제 수단 |
|
|
배달 주소 |
|
|
장바구니 메뉴 정보 |
|
|
메뉴의 ID |
|
|
메뉴 수량 |
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 |
---|---|
|
생성된 주문의 경로 |
주문 취소
주문을 취소할 수 있습니다.
HTTP 요청 예시
PATCH /api/v1/orders/1/cancel HTTP/1.1
X-CSRF-TOKEN: 3458049d-6a34-40a7-b388-d4aeb7a9309a
Host: localhost:8080
PATH 파라미터
Parameter | Description |
---|---|
|
취소할 주문 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 |
---|---|
|
application/json |
PATH 파라미터
Parameter | Description |
---|---|
|
수락할 주문 ID |
요청 필드
Path | Type | Description |
---|---|---|
|
|
조리 예상 시간(분) |
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 |
---|---|
|
application/json |
|
application/json |
요청 필드
Path | Type | Description |
---|---|---|
|
|
가게 ID |
|
|
페이지 번호(0부터 시작) |
|
|
1페이지당 목록 개수 |
|
|
조회 시작일(형식: yyyy-MM-dd) |
|
|
조회 종료일(형식: 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 |
---|---|
|
application/json |
응답 필드
Path | Type | Description |
---|---|---|
|
|
다음 페이지가 있으면 TRUE |
|
|
주문 목록 개수 |
|
|
주묵 목록 |
|
|
주문 생성 시간 |
|
|
할인전 주문 가격(배달비 제외) |
|
|
배달비 |
|
|
할인후 가격(배달비 포함 |
|
|
할인액(쿠폰 + 포인트 사용) |
|
|
주문 상태(PAYMENT_COMPLETED, ACCEPTED, CANCEL) |
|
|
주문한 메뉴 정보 |
|
|
메뉴명 |
|
|
수량 |
|
|
가격 |
주문 상세 조회 for 가게
가게의 특정 주문을 상세 조회할 수 있습니다.
HTTP 요청 예시
GET /api/v1/restaurants/orders/1 HTTP/1.1
Accept: application/json
Host: localhost:8080
요청 헤더
Name | Description |
---|---|
|
application/json |
PATH 파라미터
Parameter | Description |
---|---|
|
조회할 주문 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 |
---|---|
|
application/json |
응답 필드
Path | Type | Description |
---|---|---|
|
|
주문 생성 시간(형식: yyyy-MM-dd HH:mm:ss) |
|
|
할인전 주문 금액(배달비 제외) |
|
|
배달비 |
|
|
할인후 최종 결제 가격(배달비 포함) |
|
|
총 할인 금액(쿠폰 + 포인트) |
|
|
주문 상태(PAYMENT_COMPLETED, ACCEPTED, CANCEL) |
|
|
주문한 메뉴 정보 |
|
|
메뉴명 |
|
|
수량 |
|
|
가격 |
주문 목록 조회 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 |
---|---|
|
application/json |
요청 필드
Path | Type | Description |
---|---|---|
|
|
회원 로그인 ID |
|
|
페이지 번호 |
|
|
페이지당 목록 개수 |
|
|
조회 시작일(형식: yyyy-MM-dd) |
|
|
조회 종료일(형식: 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 |
---|---|
|
application/json |
응답 필드
Path | Type | Description |
---|---|---|
|
|
다음 페이지가 있으면 TRUE |
|
|
주문 목록 개수 |
|
|
주문 목록 |
|
|
주문 ID |
|
|
주문 시간(형식: yyyy-MM-dd HH:mm:ss) |
|
|
주문 상태 |
|
|
가게명 |
|
|
최종 결제 가격(할인 적용, 배달비 포함) |
|
|
주문한 메뉴 정보 |
|
|
메뉴명 |
|
|
수량 |
주문 상세 조회 for 회원
회원의 특정 주문을 상세 조회할 수 있습니다.
HTTP 요청 예시
GET /api/v1/customers/orders/1 HTTP/1.1
Accept: application/json
Host: localhost:8080
요청 헤더
Name | Description |
---|---|
|
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 |
---|---|
|
application/json |
응답 필드
Path | Type | Description |
---|---|---|
|
|
주문 생성 시간(형식: yyyy-MM-dd HH:mm:ss) |
|
|
할인전 주문 금액(배달비 제외) |
|
|
배달비 |
|
|
쿠폰 할인 금액 |
|
|
주문에 사용한 포인트 |
|
|
주문 상태(PAYMENT_COMPLETED, ACCEPTED, CANCEL) |
|
|
배달 주소 |
|
|
주문한 메뉴 정보 |
|
|
메뉴명 |
|
|
수량 |
|
|
가격 |
주문 통계 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 |
---|---|
|
application/json |
|
application/json |
요청 필드
Path | Type | Description |
---|---|---|
|
|
조회할 가게 ID |
|
|
조회 시작일(형식: yyyy-MM-dd) |
|
|
조회 마감일(형식: 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 |
---|---|
|
application/json |
응답 필드
Path | Type | Description |
---|---|---|
|
|
주문 횟수 |
|
|
주문 가격(할인 금액 제외) |
|
|
할인 금액 |
관리자
관리자 생성
관리자를 생성할 수 있습니다.
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 |
---|---|---|
|
|
아이디 |
|
|
비밀번호 |
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 |
---|---|---|
|
|
생성된 아이디 |
관리자 조회
관리자를 단건 조회할 수 있습니다.
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 파라미터
Parameter | Description |
---|---|
|
조회할 관리자 로그인 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 |
---|---|---|
|
|
생성된 아이디 |
관리자 정보 업데이트
관리자의 정보를 업데이트 할 수 있습니다.
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 |
---|---|---|
|
|
수정하려는 비밀 번호 |
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 |
---|---|---|
|
|
정보가 수정된 계정의 아이디 |
관리자 삭제
관리자를 삭제할 수 있습니다.
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 파라미터
Parameter | Description |
---|---|
|
삭제할 관리자 로그인 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 |
---|---|---|
|
|
아이디 |
|
|
생년월일 |
|
|
적립 포인트 |
|
|
정기쿠폰 발행 여부 |
|
|
한 달 간 구매횟수 |
|
|
고객 등급 아이디 |
|
|
최소 주문 횟수 |
|
|
고객 등급명 |
|
|
할인 가격 |
|
|
쿠폰 갯수 |
고객 조회
고객을 단건 조회할 수 있습니다.
HTTP 요청 예시
GET /api/v1/customers/dev12 HTTP/1.1
Host: localhost:8080
PATH 파라미터
Parameter | Description |
---|---|
|
조회할 고객 로그인 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 |
---|---|---|
|
|
아이디 |
|
|
생년월일 |
|
|
적립 포인트 |
|
|
한 달 간 구매횟수 |
|
|
정기쿠폰 발행 여부 |
|
|
고객 등급 아이디 |
|
|
최소 주문 횟수 |
|
|
고객 등급명 |
|
|
할인 가격 |
|
|
쿠폰 갯수 |
고객 정보 업데이트
고객의 정보를 업데이트 할 수 있습니다.
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 파라미터
Parameter | Description |
---|---|
|
수정할 고객 로그인 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 |
---|---|---|
|
|
아이디 |
|
|
생년월일 |
|
|
적립 포인트 |
|
|
한 달 간 구매횟수 |
|
|
정기쿠폰 발행 여부 |
|
|
고객 등급 아이디 |
|
|
최소 주문 횟수 |
|
|
고객 등급명 |
|
|
할인 가격 |
|
|
쿠폰 갯수 |
고객 매달 정보 업데이트
매달 1일 고객의 주문 횟수와 정기 쿠폰 발행 여부를 업데이트 할 수 있습니다.
HTTP 요청 예시
PUT /api/v1/customers/firstday/dev12 HTTP/1.1
X-CSRF-TOKEN: 7eee9340-7ea0-4fbe-bbf7-710f24d80601
Host: localhost:8080
PATH 파라미터
Parameter | Description |
---|---|
|
수정할 고객 로그인 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 |
---|---|---|
|
|
아이디 |
|
|
생년월일 |
|
|
적립 포인트 |
|
|
한 달 간 구매횟수 |
|
|
정기쿠폰 발행 여부 |
|
|
고객 등급 아이디 |
|
|
최소 주문 횟수 |
|
|
고객 등급명 |
|
|
할인 가격 |
|
|
쿠폰 갯수 |
고객 삭제
고객을 삭제할 수 있습니다.
HTTP 요청 예시
DELETE /api/v1/customers/dev12 HTTP/1.1
X-CSRF-TOKEN: 6fce2981-db3d-4717-8f19-efff1d65cde4
Host: localhost:8080
PATH 파라미터
Parameter | Description |
---|---|
|
삭제할 고객 로그인 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 파라미터
Parameter | Description |
---|---|
|
조회할 고객 로그인 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 |
---|---|---|
|
|
주소 아이디 |
|
|
주소 |
|
|
명칭 |
고객 주소 조회
고객 주소를 단건 조회할 수 있습니다.
HTTP 요청 예시
GET /api/v1/customers/addresses/dev12 HTTP/1.1
Host: localhost:8080
PATH 파라미터
Parameter | Description |
---|---|
|
조회할 고객 로그인 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 |
---|---|---|
|
|
주소 아이디 |
|
|
주소 |
|
|
명칭 |
고객 주소 정보 업데이트
고객 주소의 정보를 업데이트 할 수 있습니다.
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 파라미터
Parameter | Description |
---|---|
|
수정할 주소 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 |
---|---|---|
|
|
주소 아이디 |
|
|
주소 |
|
|
명칭 |
고객 주소 삭제
고객 주소를 삭제할 수 있습니다.
HTTP 요청 예시
DELETE /api/v1/customers/addresses/1 HTTP/1.1
X-CSRF-TOKEN: 5940ddd3-5e4b-4b49-8905-a530bce6cdfc
Host: localhost:8080
PATH 파라미터
Parameter | Description |
---|---|
|
삭제할 고객 로그인 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 |
---|---|---|
|
|
생성된 고객 등급 아이디 |
|
|
최소 주문 횟수 |
|
|
등급 이름 |
|
|
할인 가격 |
|
|
쿠폰 갯수 |
고객 등급 조회
고객 등급을 단건 조회할 수 있습니다.
HTTP 요청 예시
GET /api/v1/customers/grades/1 HTTP/1.1
Host: localhost:8080
PATH 파라미터
Parameter | Description |
---|---|
|
조회할 고객 등급 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 |
---|---|---|
|
|
생성된 고객 등급 아이디 |
|
|
최소 주문 횟수 |
|
|
등급 이름 |
|
|
할인 가격 |
|
|
쿠폰 갯수 |
고객 등급 정보 업데이트
고객 등급의 정보를 업데이트 할 수 있습니다.
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 파라미터
Parameter | Description |
---|---|
|
수정할 고객 등급 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 |
---|---|---|
|
|
생성된 고객 등급 아이디 |
|
|
최소 주문 횟수 |
|
|
등급 이름 |
|
|
할인 가격 |
|
|
쿠폰 갯수 |
고객 등급 삭제
고객 등급을 삭제할 수 있습니다.
HTTP 요청 예시
DELETE /api/v1/customers/grades/1 HTTP/1.1
X-CSRF-TOKEN: 04ca425e-c4b8-4881-a018-9b611f574e28
Host: localhost:8080
PATH 파라미터
Parameter | Description |
---|---|
|
삭제할 고객 등급 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 |
---|---|---|
|
|
할인 타입 |
|
|
이벤트 타입 |
|
|
할인 수치 |
|
|
만료 시간 |
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 파라미터
Parameter | Description |
---|---|
|
조회할 쿠폰 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 |
---|---|---|
|
|
쿠폰 아이디 |
|
|
할인 타입 |
|
|
이벤트 타입 |
|
|
할인 수치 |
|
|
만료 시간 |
|
|
등록 코드 |
정기 쿠폰 등록
고객 등급에 따라 정기 쿠폰을 등록할 수 있습니다.
HTTP 요청 예시
GET /api/v1/vouchers/month/dev12 HTTP/1.1
Host: localhost:8080
PATH 파라미터
Parameter | Description |
---|---|
|
정기 쿠폰을 발급할 고객 로그인 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 |
---|---|---|
|
|
쿠폰 아이디 |
|
|
할인 타입 |
|
|
이벤트 타입 |
|
|
할인 수치 |
|
|
만료 시간 |
|
|
등록 코드 |
쿠폰 등록
고객이 쿠폰을 등록할 수 있습니다.
HTTP 요청 예시
GET /api/v1/vouchers/dev12/97cf9d1b-3c3e-466b-bebd-fa579f944b2d HTTP/1.1
Host: localhost:8080
PATH 파라미터
Parameter | Description |
---|---|
|
쿠폰을 등록할 고객 로그인 ID |
|
쿠폰 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 |
---|---|---|
|
|
쿠폰 아이디 |
|
|
할인 타입 |
|
|
이벤트 타입 |
|
|
할인 수치 |
|
|
만료 시간 |
|
|
등록 코드 |
쿠폰 삭제
쿠폰을 삭제할 수 있습니다.
HTTP 요청 예시
DELETE /api/v1/vouchers/dev12/1 HTTP/1.1
X-CSRF-TOKEN: 1cbe29d5-8e7d-441b-b142-e0ae2d5e2833
Host: localhost:8080
PATH 파라미터
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 /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 파라미터
Parameter | Description |
---|---|
|
사장님 아이디 |
요청 필드
Path | Type | Description |
---|---|---|
|
|
이름 |
|
|
사업자등록번호 |
|
|
문여는 시간 |
|
|
문닫는 시간 |
|
|
영업여부 |
|
|
전화번호 |
|
|
소개 |
|
|
주소 |
|
|
속하는 카테고리명 |
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 |
---|---|---|
|
|
가게 아이디 |
|
|
사장님 아이디 |
|
|
이름 |
|
|
사업자등록번호 |
|
|
문여는 시간 |
|
|
문닫는 시간 |
|
|
영업여부 |
|
|
전화번호 |
|
|
소개 |
|
|
주소 |
|
|
속하는 카테고리명 |
|
|
생성일 |
가게 삭제
가게 엔티티를 삭제할 수 있습니다.
HTTP 요청 예시
DELETE /baemin/v1/owners/1/restaurants/1 HTTP/1.1
X-CSRF-TOKEN: df4d48b3-c44b-478c-b293-7a6f53031927
Host: localhost:8080
PATH 파라미터
Parameter | Description |
---|---|
|
사장님 아이디 |
|
가게 아이디 |
가게 전체 조회
저장된 모든 가게 정보를 조회할 수 있습니다.
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 |
---|---|---|
|
|
가게 아이디 |
|
|
사장님 아이디 |
|
|
이름 |
|
|
사업자등록번호 |
|
|
문여는 시간 |
|
|
문닫는 시간 |
|
|
영업여부 |
|
|
전화번호 |
|
|
소개 |
|
|
평균 리뷰수 |
|
|
리뷰수 |
|
|
주소 |
|
|
속하는 카테고리명 |
|
|
생성일 |
|
|
변경일 |
사장님 아이디로 가게 전체 조회
사장님 아이디로 저장된 모든 가게 정보를 조회할 수 있습니다.
HTTP 요청 예시
GET /baemin/v1/owners/1/restaurants HTTP/1.1
Accept: application/json
Host: localhost:8080
PATH 파라미터
Parameter | Description |
---|---|
|
사장님 아이디 |
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 |
---|---|---|
|
|
가게 아이디 |
|
|
사장님 아이디 |
|
|
이름 |
|
|
사업자등록번호 |
|
|
문여는 시간 |
|
|
문닫는 시간 |
|
|
영업여부 |
|
|
전화번호 |
|
|
소개 |
|
|
평균 리뷰수 |
|
|
리뷰수 |
|
|
주소 |
|
|
속하는 카테고리명 |
|
|
생성일 |
|
|
변경일 |
광고 아이디로 가게 전체 조회
광고 아이디로 저장된 모든 가게 정보를 조회할 수 있습니다.
HTTP 요청 예시
GET /baemin/v1/advertisements/1/restaurants HTTP/1.1
Accept: application/json
Host: localhost:8080
PATH 파라미터
Parameter | Description |
---|---|
|
광고 아이디 |
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 |
---|---|---|
|
|
가게 아이디 |
|
|
사장님 아이디 |
|
|
이름 |
|
|
사업자등록번호 |
|
|
문여는 시간 |
|
|
문닫는 시간 |
|
|
영업여부 |
|
|
전화번호 |
|
|
소개 |
|
|
평균 리뷰수 |
|
|
리뷰수 |
|
|
주소 |
|
|
속하는 카테고리명 |
|
|
생성일 |
|
|
변경일 |
카테고리 아이디로 가게 전체 조회
카테고리 아이디로 저장된 모든 가게 정보를 조회할 수 있습니다.
HTTP 요청 예시
GET /baemin/v1/categories/1/restaurants HTTP/1.1
Accept: application/json
Host: localhost:8080
PATH 파라미터
Parameter | Description |
---|---|
|
카테고리 아이디 |
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 |
---|---|---|
|
|
가게 아이디 |
|
|
사장님 아이디 |
|
|
이름 |
|
|
사업자등록번호 |
|
|
문여는 시간 |
|
|
문닫는 시간 |
|
|
영업여부 |
|
|
전화번호 |
|
|
소개 |
|
|
평균 리뷰수 |
|
|
리뷰수 |
|
|
주소 |
|
|
속하는 카테고리명 |
|
|
생성일 |
|
|
변경일 |
가게 단건 조회
저장된 하나의 가게 정보를 조회할 수 있습니다.
HTTP 요청 예시
GET /baemin/v1/restaurants/1 HTTP/1.1
Accept: application/json
Host: localhost:8080
PATH 파라미터
Parameter | Description |
---|---|
|
가게 아이디 |
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 |
---|---|---|
|
|
가게 아이디 |
|
|
사장님 아이디 |
|
|
이름 |
|
|
사업자등록번호 |
|
|
문여는 시간 |
|
|
문닫는 시간 |
|
|
영업여부 |
|
|
전화번호 |
|
|
소개 |
|
|
평균 리뷰수 |
|
|
리뷰수 |
|
|
주소 |
|
|
속하는 카테고리명 |
|
|
생성일 |
|
|
변경일 |
가게 변경
저장된 하나의 가게 정보를 변경할 수 있습니다.
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 파라미터
Parameter | Description |
---|---|
|
사장님 아이디 |
|
가게 아이디 |
요청 바디
{
"openingTime" : "21:43:55.377549",
"closingTime" : "21:43:55.37756",
"phoneNumber" : "010-1234-6789",
"address" : "서울시 동작구",
"description" : "테스트용 가게입니다."
}
요청 필드
Path | Type | Description |
---|---|---|
|
|
문여는 시간 |
|
|
문닫는 시간 |
|
|
전화번호 |
|
|
주소 |
|
|
소개 |
가게 문 열기/닫기
가게 문을 열고 닫을 수 있습니다(영업 상태 변경).
HTTP 요청 예시
PATCH /baemin/v1/owners/1/restaurants/1 HTTP/1.1
X-CSRF-TOKEN: 483162e6-7f95-4773-8107-1030404351d7
Host: localhost:8080
PATH 파라미터
Parameter | Description |
---|---|
|
사장님 아이디 |
|
가게 아이디 |
요청 파라미터
Parameter | Description |
---|---|
|
영업여부 |
가게에 카테고리 추가
가게에 카테고리를 추가할 수 있습니다.
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 파라미터
Parameter | Description |
---|---|
|
사장님 아이디 |
|
가게 아이디 |
요청 파라미터
Parameter | Description |
---|---|
|
카테고리 아이디 |
가게에 카테고리 삭제
가게에 카테고리를 삭제할 수 있습니다.
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 파라미터
Parameter | Description |
---|---|
|
사장님 아이디 |
|
가게 아이디 |
요청 파라미터
Parameter | Description |
---|---|
|
카테고리 아이디 |
가게에 배달지역 추가
가게에 배달지역을 추가할 수 있습니다.
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 파라미터
Parameter | Description |
---|---|
|
사장님 아이디 |
|
가게 아이디 |
요청 파라미터
Parameter | Description |
---|---|
|
지역코드 |
|
배달비 |
사장님
사장님 생성
새로운 사장님을 생성할 수 있습니다.
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 |
---|---|---|
|
|
로그인 아이디 |
|
|
비밀번호 |
|
|
이름 |
|
|
전화번호 |
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 |
---|---|---|
|
|
아이디 |
|
|
로그인 아이디 |
|
|
비밀번호 |
|
|
이름 |
|
|
전화번호 |
|
|
생성일 |
사장님 삭제
사장님 엔티티를 삭제할 수 있습니다.
HTTP 요청 예시
DELETE /baemin/v1/owners/1 HTTP/1.1
X-CSRF-TOKEN: 0b08aa0d-b41d-491a-88b3-e9fcb1e26be3
Host: localhost:8080
PATH 파라미터
Parameter | Description |
---|---|
|
아이디 |
사장님 전체 조회
저장된 모든 사장님 정보를 조회할 수 있습니다.
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 |
---|---|---|
|
|
아이디 |
|
|
로그인 아이디 |
|
|
비밀번호 |
|
|
이름 |
|
|
전화번호 |
|
|
생성일 |
|
|
변경일 |
사장님 단건 조회
저장된 하나의 사장님 정보를 조회할 수 있습니다.
HTTP 요청 예시
GET /baemin/v1/owners/1 HTTP/1.1
Accept: application/json
Host: localhost:8080
PATH 파라미터
Parameter | Description |
---|---|
|
아이디 |
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 |
---|---|---|
|
|
아이디 |
|
|
로그인 아이디 |
|
|
비밀번호 |
|
|
이름 |
|
|
전화번호 |
|
|
생성일 |
|
|
변경일 |
사장님 변경
저장된 하나의 사장님 정보를 변경할 수 있습니다.
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 파라미터
Parameter | Description |
---|---|
|
아이디 |
요청 바디
{
"password" : "tT@!123456789",
"name" : "테스트",
"phoneNumber" : "010-1111-2222"
}
요청 필드
Path | Type | Description |
---|---|---|
|
|
비밀번호 |
|
|
이름 |
|
|
전화번호 |
광고
광고 생성
새로운 광고를 생성할 수 있습니다.
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 |
---|---|---|
|
|
광고명 |
|
|
적용단위 |
|
|
청구유형 |
|
|
광고료 |
|
|
설명 |
|
|
최대 가게 수 |
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 |
---|---|---|
|
|
아이디 |
|
|
광고명 |
|
|
적용단위 |
|
|
청구유형 |
|
|
광고료 |
|
|
설명 |
|
|
최대 가게 수 |
|
|
현재 가게 수 |
|
|
생성일 |
광고 삭제
광고 엔티티를 삭제할 수 있습니다.
HTTP 요청 예시
DELETE /baemin/v1/advertisements/1 HTTP/1.1
X-CSRF-TOKEN: 1969d1e6-a392-4d69-bcf4-7fd2035328da
Host: localhost:8080
PATH 파라미터
Parameter | Description |
---|---|
|
아이디 |
광고 전체 조회
저장된 모든 광고 정보를 조회할 수 있습니다.
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 |
---|---|---|
|
|
아이디 |
|
|
광고명 |
|
|
적용단위 |
|
|
청구유형 |
|
|
광고료 |
|
|
설명 |
|
|
최대 가게 수 |
|
|
현재 가게 수 |
|
|
생성일 |
|
|
변경일 |
광고 단건 조회
저장된 하나의 광고 정보를 조회할 수 있습니다.
HTTP 요청 예시
GET /baemin/v1/advertisements/1 HTTP/1.1
Accept: application/json
Host: localhost:8080
PATH 파라미터
Parameter | Description |
---|---|
|
아이디 |
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 |
---|---|---|
|
|
아이디 |
|
|
광고명 |
|
|
적용단위 |
|
|
청구유형 |
|
|
광고료 |
|
|
설명 |
|
|
최대 가게 수 |
|
|
현재 가게 수 |
|
|
생성일 |
|
|
변경일 |
광고 변경
저장된 하나의 광고 정보를 변경할 수 있습니다.
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 파라미터
Parameter | Description |
---|---|
|
아이디 |
요청 바디
{
"title" : "울트라콜",
"unitType" : "주문별",
"rateType" : "정액제",
"rate" : 10,
"description" : "테스트용 울트라콜"
}
요청 필드
Path | Type | Description |
---|---|---|
|
|
광고명 |
|
|
적용단위 |
|
|
청구유형 |
|
|
광고료 |
|
|
설명 |
광고 가게 추가
광고에 특정 가게를 포함할 수 있습니다.
HTTP 요청 예시
POST /baemin/v1/advertisements/10/restaurants/20 HTTP/1.1
X-CSRF-TOKEN: 68422a29-c5c0-466e-91f4-0f0a70603854
Host: localhost:8080
PATH 파라미터
Parameter | Description |
---|---|
|
광고 아이디 |
|
가게 아이디 |
광고 가게 제외
광고에 특정 가게를 제외할 수 있습니다.
HTTP 요청 예시
DELETE /baemin/v1/advertisements/10/restaurants/20 HTTP/1.1
X-CSRF-TOKEN: 450b1b93-dd55-47df-a31b-c148c9820405
Host: localhost:8080
PATH 파라미터
Parameter | Description |
---|---|
|
광고 아이디 |
|
가게 아이디 |
카테고리
카테고리 생성
새로운 카테고리를 생성할 수 있습니다.
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 |
---|---|---|
|
|
이름 |
카테고리 삭제
카테고리 엔티티를 삭제할 수 있습니다.
HTTP 요청 예시
DELETE /baemin/v1/categories/1 HTTP/1.1
X-CSRF-TOKEN: 20f1e221-284b-43b0-89d1-a9a973da0482
Host: localhost:8080
PATH 파라미터
Parameter | Description |
---|---|
|
저장된 카테고리 아이디 |
카테고리 전체 조회
저장된 모든 카테고리 정보를 조회할 수 있습니다.
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 |
---|---|---|
|
|
아이디 |
|
|
이름 |
|
|
생성일 |
|
|
변경일 |
카테고리 단건 조회
저장된 하나의 카테고리 정보를 조회할 수 있습니다.
HTTP 요청 예시
GET /baemin/v1/categories/1 HTTP/1.1
Accept: application/json
Host: localhost:8080
PATH 파라미터
Parameter | Description |
---|---|
|
저장된 카테고리 아이디 |
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 |
---|---|---|
|
|
아이디 |
|
|
이름 |
|
|
생성일 |
|
|
변경일 |
카테고리 변경
저장된 하나의 카테고리 정보를 변경할 수 있습니다.
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 파라미터
Parameter | Description |
---|---|
|
저장된 카테고리 아이디 |
요청 바디
{
"name" : "분식"
}
요청 필드
Path | Type | Description |
---|---|---|
|
|
변경할 이름 |