본 REST API 문서에서 사용하는 HTTP 상태 코드는 가능한한 표준 HTTP와 REST 규약을 따릅니다.
|
|
|
상태를 성공적으로 처리함. |
|
|
|
새 리소스를 성공적으로 생성함. |
|
|
|
기존 리소스를 성공적으로 제거하여 반환할 자원이 존재하지 않음. |
|
|
|
잘못된 요청이므로 서버에서 처리할 수 없음. |
|
|
|
인증에 실패함. |
|
|
|
권한이 부족하여 요청을 수행할 수 없음. |
|
|
|
요청한 자원이 존재하지 않음. |
|
|
|
서버의 규칙에 의해 해당 요청을 수행할 수 없음. |
YangEunChan
2022.12.26
1. 모임
1.1. 등록
POST /meetings HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer AccessToken
Content-Length: 535
Host: docs.api.com
{
"category" : "소셜",
"title" : "제목1",
"content" : "내용1",
"tags" : [ "온라인", "오프라인" ],
"address" : {
"addressIds" : [ 1, 2 ],
"addressInfo" : "추가 주소1"
},
"dateTime" : {
"datePolicy" : "FREE",
"startDate" : "2023-02-07",
"endDate" : "2023-02-17",
"startTime" : "01:00:00",
"endTime" : "05:00:00",
"maxTime" : 3,
"dayWeeks" : [ 1, 2, 7 ],
"dates" : [ "2023-02-07", "2023-02-09", "2023-02-12", "2023-02-17" ]
},
"personnel" : 1,
"price" : 20000
}
| Name | Description |
|---|---|
|
|
Bearer AccessToken |
| Path | Type | Description |
|---|---|---|
|
|
|
카테고리 |
|
|
|
제목 |
|
|
|
내용 |
|
|
|
태그 |
|
|
|
주소 |
|
|
|
주소 식별자 |
|
|
|
주소 정보 |
|
|
|
날짜/시간 정보 |
|
|
|
날짜 정책 (ONE_DAY/PERIOD/FREE) |
|
|
|
시작 날짜 |
|
|
|
끝나는 날짜 |
|
|
|
시작 시간 |
|
|
|
끝나는 시간 |
|
|
|
요일 (월: 1 ~ 일: 7, datePolicy가 PEROID일 때만) |
|
|
|
날짜 (datePolicy가 FREE일 때만) |
|
|
|
최대 예약 가능 시간 |
|
|
|
최대 예약 가능 인원 |
|
|
|
가격 |
HTTP/1.1 201 Created
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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: 1
1
1.2. 수정
PATCH /meetings/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer AccessToken
Content-Length: 272
Host: docs.api.com
{
"category" : "소셜",
"title" : "제목2",
"content" : "내용2",
"tags" : [ "멘토링", "스터디", "5인 이상", "오프라인" ],
"address" : {
"addressIds" : [ 3, 4 ],
"addressInfo" : "추가 주소2"
},
"personnel" : 1,
"price" : 20000
}
| Name | Description |
|---|---|
|
|
Bearer AccessToken |
| Path | Type | Description |
|---|---|---|
|
|
|
카테고리 |
|
|
|
제목 |
|
|
|
내용 |
|
|
|
태그 |
|
|
|
주소 |
|
|
|
주소 식별자 |
|
|
|
주소 정보 |
|
|
|
최대 예약 가능 인원 |
|
|
|
가격 |
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
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
1.3. 상세 조회
GET /meetings/1 HTTP/1.1
Host: docs.api.com
| Parameter | Description |
|---|---|
|
|
모임 식별자 |
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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: 1454
{
"meetingId" : 1,
"category" : "소셜",
"host" : {
"userId" : 1,
"nickname" : "nickname",
"imageUrl" : "https://7357.tistory.com/",
"email" : "user@test.com"
},
"title" : "제목1",
"content" : "내용1",
"address" : {
"addresses" : [ "서울시 강남구", "서울시 강북구" ],
"addressInfo" : "추가 주소1"
},
"meetingState" : "모집중",
"isOpen" : true,
"dateTime" : {
"datePolicy" : "FREE",
"startDate" : "2023-02-07",
"endDate" : "2023-02-13",
"startTime" : "01:00:00",
"endTime" : "05:00:00",
"maxTime" : 3,
"dayWeeks" : [ ],
"dates" : [ "2023-02-07", "2023-02-08" ]
},
"price" : 1000,
"personnel" : 5,
"addressIds" : [ 1, 2 ],
"tags" : [ "온라인", "오프라인" ],
"questions" : [ {
"questionId" : 1,
"content" : "내용1",
"questioner" : {
"userId" : 2,
"email" : "user@test.com",
"nickname" : "nickname",
"imageUrl" : "https://7357.tistory.com/"
},
"createdAt" : "2023-02-07T19:33:30.197591",
"modifiedAt" : "2023-02-07T19:33:30.197603",
"answers" : [ {
"answerId" : 1,
"content" : "내용1",
"answerer" : {
"userId" : 3,
"email" : "user@test.com",
"nickname" : "nickname",
"imageUrl" : "https://7357.tistory.com/"
},
"createdAt" : "2023-02-07T19:33:30.197608",
"modifiedAt" : "2023-02-07T19:33:30.19761"
} ]
} ]
}
| Path | Type | Description |
|---|---|---|
|
|
|
모임 식별자 |
|
|
|
카테고리 |
|
|
|
주최자 |
|
|
|
주최자 식별자 |
|
|
|
주최자 닉네임 |
|
|
|
주최자 이미지 |
|
|
|
주최자 이메일 |
|
|
|
제목 |
|
|
|
내용 |
|
|
|
주소 정보 |
|
|
|
주소 |
|
|
|
추가 주소 |
|
|
|
모임 상태 |
|
|
|
모임 오픈 여부 |
|
|
|
날짜 정보 |
|
|
|
날짜 정책 |
|
|
|
시작 날짜 |
|
|
|
끝나는 날짜 |
|
|
|
시작 시간 |
|
|
|
끝나는 시간 |
|
|
|
최대 예약 가능 시간 |
|
|
|
요일 (월: 1 ~ 일: 7, datePolicy가 PEROID일 때만) |
|
|
|
날짜 (datePolicy가 FREE일 때만) |
|
|
|
가격 |
|
|
|
최대 예약 가능 인원 |
|
|
|
주소 식별자 |
|
|
|
태그 |
|
|
|
질문/답변 |
|
|
|
질문 식별자 |
|
|
|
질문 내용 |
|
|
|
질문자 |
|
|
|
질문자 식별자 |
|
|
|
질문자 이메일 |
|
|
|
질문자 닉네임 |
|
|
|
질문자 이미지 |
|
|
|
질문 작성일시 |
|
|
|
질문자 수정일시 |
|
|
|
답변 |
|
|
|
답변 식별자 |
|
|
|
답변 내용 |
|
|
|
답변자 |
|
|
|
답변자 식별자 |
|
|
|
답변자 이메일 |
|
|
|
답변자 닉네임 |
|
|
|
답변자 이미지 |
|
|
|
답변 작성일시 |
|
|
|
답변자 수정일시 |
1.4. 목록 조회
GET /meetings?keyword=%EC%A0%9C%EB%AA%A91&category=SOCIAL&tag=%EC%98%A8%EB%9D%BC%EC%9D%B8&page=1&size=20 HTTP/1.1
Host: docs.api.com
| Parameter | Description |
|---|---|
|
|
검색어 |
|
|
카테고리 |
|
|
태그 |
|
|
페이지 |
|
|
사이즈 |
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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: 872
{
"content" : [ {
"meetingId" : 1,
"category" : "소셜",
"host" : {
"userId" : 1,
"nickname" : "nickname",
"imageUrl" : "user@test.com",
"email" : "https://7357.tistory.com/"
},
"title" : "제목1",
"content" : "내용1",
"address" : {
"addresses" : [ "서울시 강남구", "서울시 강북구" ],
"addressInfo" : "추가 주소1"
},
"meetingState" : "모집중",
"isOpen" : true,
"dateTime" : {
"datePolicy" : "FREE",
"startDate" : "2023-02-07",
"endDate" : "2023-02-13",
"startTime" : "01:00:00",
"endTime" : "05:00:00",
"maxTime" : 3,
"dayWeeks" : [ 1, 3, 7 ],
"dates" : [ "2023-02-07", "2023-02-08" ]
},
"price" : 1000
} ],
"pageInfo" : {
"page" : 1,
"size" : 20,
"totalElements" : 1,
"totalPages" : 1
}
}
| Path | Type | Description |
|---|---|---|
|
|
|
데이터 |
|
|
|
모임 식별자 |
|
|
|
카테고리 |
|
|
|
주최자 정보 |
|
|
|
주최자 식별자 |
|
|
|
주최자 닉네임 |
|
|
|
주최자 이미지 |
|
|
|
주최자 이메일 |
|
|
|
제목 |
|
|
|
내용 |
|
|
|
주소 정보 |
|
|
|
주소 |
|
|
|
추가 주소 |
|
|
|
모임 상태 |
|
|
|
모임 오픈 여부 |
|
|
|
날짜 정보 |
|
|
|
날짜 정책 |
|
|
|
시작 날짜 |
|
|
|
끝나는 날짜 |
|
|
|
시작 시간 |
|
|
|
끝나는 시간 |
|
|
|
최대 예약 가능 시간 |
|
|
|
요일 (월: 1 ~ 일: 7, datePolicy가 PEROID일 때만) |
|
|
|
날짜 (datePolicy가 FREE일 때만) |
|
|
|
가격 |
|
|
|
페이지 정보 |
|
|
|
페이지 |
|
|
|
사이즈 |
|
|
|
총 개수 |
|
|
|
총 페이지 개수 |
1.5. 만든 모임 목록 조회
GET /mypage/meetings/hosts?page=1&size=20 HTTP/1.1
Authorization: Bearer AccessToken
Host: docs.api.com
| Name | Description |
|---|---|
|
|
Bearer AccessToken |
| Parameter | Description |
|---|---|
|
|
페이지 |
|
|
사이즈 |
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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: 1673
{
"content" : [ {
"meetingId" : 1,
"category" : "소셜",
"host" : {
"userId" : 1,
"nickname" : "nickname",
"imageUrl" : "https://7357.tistory.com/",
"email" : "user2@test.com"
},
"title" : "제목1",
"content" : "내용1",
"address" : {
"addresses" : [ "서울시 강남구", "서울시 강북구" ],
"addressInfo" : "추가 주소1"
},
"meetingState" : "모집중",
"isOpen" : true,
"dateTime" : {
"datePolicy" : "FREE",
"startDate" : "2023-02-07",
"endDate" : "2023-02-13",
"startTime" : "01:00:00",
"endTime" : "05:00:00",
"maxTime" : 3,
"dayWeeks" : [ 1, 3, 7 ],
"dates" : [ "2023-02-07", "2023-02-08" ]
},
"price" : 1000,
"applications" : {
"requests" : [ {
"userId" : 2,
"nickname" : "test1",
"imageUrl" : "https://7357.tistory.com/",
"reservationId" : 1,
"reservationState" : "PAYMENT_SUCCESS",
"message" : "잘 부탁드려요~",
"dateTimeInfo" : {
"date" : "2023-02-07",
"time" : "01:00 - 05:00 (4시간)"
}
} ],
"confirmed" : [ {
"userId" : 3,
"nickname" : "test2",
"imageUrl" : "https://7357.tistory.com/",
"email" : "user@test.com",
"reservationId" : 2,
"reservationState" : "ACCEPT",
"message" : "잘 부탁드려요~",
"dateTimeInfo" : {
"date" : "2023-02-07",
"time" : "01:00 - 05:00 (4시간)"
}
} ]
}
} ],
"pageInfo" : {
"page" : 1,
"size" : 20,
"totalElements" : 1,
"totalPages" : 1
}
}
| Path | Type | Description |
|---|---|---|
|
|
|
데이터 |
|
|
|
모임 식별자 |
|
|
|
카테고리 |
|
|
|
주최자 정보 |
|
|
|
주최자 식별자 |
|
|
|
주최자 닉네임 |
|
|
|
주최자 이미지 |
|
|
|
주최자 이메일 |
|
|
|
제목 |
|
|
|
내용 |
|
|
|
주소 정보 |
|
|
|
주소 |
|
|
|
추가 주소 |
|
|
|
모임 상태 |
|
|
|
모임 오픈 여부 |
|
|
|
날짜 정보 |
|
|
|
날짜 정책 |
|
|
|
시작 날짜 |
|
|
|
끝나는 날짜 |
|
|
|
시작 시간 |
|
|
|
끝나는 시간 |
|
|
|
최대 예약 가능 시간 |
|
|
|
요일 (월: 1 ~ 일: 7, datePolicy가 PEROID일 때만) |
|
|
|
날짜 (datePolicy가 FREE일 때만) |
|
|
|
가격 |
|
|
|
지원자 |
|
|
|
신청 목록 |
|
|
|
예약 식별자 |
|
|
|
지원자 식별자 |
|
|
|
지원자 닉네임 |
|
|
|
지원자 이미지 |
|
|
|
예약 상태 |
|
|
|
전달 사항 |
|
|
|
날짜 정보 |
|
|
|
예약 날짜 |
|
|
|
예약 시간 |
|
|
|
확정된 지원자 목록 |
|
|
|
예약 식별자 |
|
|
|
지원자 식별자 |
|
|
|
지원자 닉네임 |
|
|
|
지원자 이미지 |
|
|
|
예약 상태 |
|
|
|
지원자 이메일 |
|
|
|
전달 사항 |
|
|
|
날짜 정보 |
|
|
|
예약 날짜 |
|
|
|
예약 시간 |
|
|
|
페이지 정보 |
|
|
|
페이지 |
|
|
|
사이즈 |
|
|
|
총 개수 |
|
|
|
총 페이지 개수 |
1.6. 참여 모임 목록 조회
GET /mypage/meetings/participants?page=1&size=20 HTTP/1.1
Authorization: Bearer AccessToken
Host: docs.api.com
| Name | Description |
|---|---|
|
|
Bearer AccessToken |
| Parameter | Description |
|---|---|
|
|
페이지 |
|
|
사이즈 |
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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: 1283
{
"content" : [ {
"meetingId" : 1,
"category" : "소셜",
"host" : {
"userId" : 1,
"nickname" : "nickname",
"imageUrl" : "https://7357.tistory.com/",
"email" : "user@test.com"
},
"title" : "제목1",
"content" : "내용1",
"address" : {
"addresses" : [ "서울시 강남구", "서울시 강북구" ],
"addressInfo" : "추가 주소1"
},
"meetingState" : "모집중",
"isOpen" : true,
"dateTime" : {
"datePolicy" : "FREE",
"startDate" : "2023-02-07",
"endDate" : "2023-02-13",
"startTime" : "01:00:00",
"endTime" : "05:00:00",
"maxTime" : 3,
"dayWeeks" : [ 1, 3, 7 ],
"dates" : [ "2023-02-07", "2023-02-08" ]
},
"price" : 1000,
"application" : {
"userId" : 2,
"nickname" : "test1",
"imageUrl" : "https://7357.tistory.com/",
"email" : "user@test.com",
"reservationState" : "PAYMENT_SUCCESS",
"message" : "잘 부탁드려요~",
"paymentKey" : "ABC123",
"dateTimeInfo" : {
"date" : "2023-02-07",
"time" : "01:00 - 05:00 (4시간)"
},
"reservationId" : 3
}
} ],
"pageInfo" : {
"page" : 1,
"size" : 20,
"totalElements" : 1,
"totalPages" : 1
}
}
| Path | Type | Description |
|---|---|---|
|
|
|
데이터 |
|
|
|
모임 식별자 |
|
|
|
카테고리 |
|
|
|
주최자 정보 |
|
|
|
주최자 식별자 |
|
|
|
주최자 닉네임 |
|
|
|
주최자 이미지 |
|
|
|
주최자 이메일 |
|
|
|
제목 |
|
|
|
내용 |
|
|
|
주소 정보 |
|
|
|
주소 |
|
|
|
추가 주소 |
|
|
|
모임 상태 |
|
|
|
모임 오픈 여부 |
|
|
|
날짜 정보 |
|
|
|
날짜 정책 |
|
|
|
시작 날짜 |
|
|
|
끝나는 날짜 |
|
|
|
시작 시간 |
|
|
|
끝나는 시간 |
|
|
|
최대 예약 가능 시간 |
|
|
|
요일 (월: 1 ~ 일: 7, datePolicy가 PEROID일 때만) |
|
|
|
날짜 (datePolicy가 FREE일 때만) |
|
|
|
가격 |
|
|
|
지원 정보 |
|
|
|
지원자 식별자 |
|
|
|
지원자 닉네임 |
|
|
|
지원자 이미지 |
|
|
|
예약 상태 |
|
|
|
이메일 |
|
|
|
전달 사항 |
|
|
|
결제 키 |
|
|
|
날짜 정보 |
|
|
|
예약 날짜 |
|
|
|
예약 시간 |
|
|
|
예약 아이디 |
|
|
|
페이지 정보 |
|
|
|
페이지 |
|
|
|
사이즈 |
|
|
|
총 개수 |
|
|
|
총 페이지 개수 |
1.7. 모임 랭킹 조회
GET /ranks HTTP/1.1
Host: docs.api.com
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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: 347
[ {
"meetingId" : 1,
"title" : "제목1",
"content" : "내용1",
"imageUrl" : "https://7357.tistory.com/"
}, {
"meetingId" : 1,
"title" : "제목1",
"content" : "내용1",
"imageUrl" : "https://7357.tistory.com/"
}, {
"meetingId" : 1,
"title" : "제목1",
"content" : "내용1",
"imageUrl" : "https://7357.tistory.com/"
} ]
| Path | Type | Description |
|---|---|---|
|
|
|
모임 배열 |
|
|
|
모임 아이디 |
|
|
|
모임 설명 |
|
|
|
모임 주최자 프로필 |
|
|
|
모임 제목 |
2. 질문/답변 조회
2.1. 성공 200
GET /meetings/1/qna HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer AccessToken
Content-Length: 27
Host: docs.api.com
{
"content" : "내용1"
}
| Name | Description |
|---|---|
|
|
유효한 액세스 토큰 |
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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: 1126
[ {
"questionId" : 1,
"content" : "내용1",
"questioner" : {
"userId" : 1,
"email" : "user@test.com",
"nickname" : "test1",
"imageUrl" : null
},
"createdAt" : "2023-02-07T19:33:35.371372",
"modifiedAt" : "2023-02-07T19:33:35.371375",
"answers" : [ {
"answerId" : 1,
"content" : "내용1",
"answerer" : {
"userId" : 1,
"email" : "user@test.com",
"nickname" : "test1",
"imageUrl" : null
},
"createdAt" : "2023-02-07T19:33:35.371339",
"modifiedAt" : "2023-02-07T19:33:35.371351"
} ]
}, {
"questionId" : 1,
"content" : "내용1",
"questioner" : {
"userId" : 1,
"email" : "user@test.com",
"nickname" : "test1",
"imageUrl" : null
},
"createdAt" : "2023-02-07T19:33:35.371372",
"modifiedAt" : "2023-02-07T19:33:35.371375",
"answers" : [ {
"answerId" : 1,
"content" : "내용1",
"answerer" : {
"userId" : 1,
"email" : "user@test.com",
"nickname" : "test1",
"imageUrl" : null
},
"createdAt" : "2023-02-07T19:33:35.371339",
"modifiedAt" : "2023-02-07T19:33:35.371351"
} ]
} ]
| Path | Type | Description |
|---|---|---|
|
|
|
질문 아이디 |
|
|
|
질문 내용 |
|
|
|
질문자 정보 |
|
|
|
질문자 아이디 |
|
|
|
질문자 이메일 |
|
|
|
질문자 닉네임 |
|
|
|
질문자 프로필 이미지 |
|
|
|
질문 작성일 |
|
|
|
질문 수정일 |
|
|
|
답변 목록 |
|
|
|
답변 아이디 |
|
|
|
답변 내용 |
|
|
|
답변자 정보 |
|
|
|
답변자 아이디 |
|
|
|
답변자 이메일 |
|
|
|
답변자 닉네임 |
|
|
|
답변자 프로필 이미지 |
|
|
|
답변 작성일 |
|
|
|
답변 수정일 |
3. 질문 작성
3.1. 성공 201
POST /meetings/1/questions HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer AccessToken
Content-Length: 27
Host: docs.api.com
{
"content" : "내용1"
}
| Name | Description |
|---|---|
|
|
유효한 액세스 토큰 |
HTTP/1.1 201 Created
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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: 1126
[ {
"questionId" : 1,
"content" : "내용1",
"questioner" : {
"userId" : 1,
"email" : "user@test.com",
"nickname" : "test1",
"imageUrl" : null
},
"createdAt" : "2023-02-07T19:33:35.389741",
"modifiedAt" : "2023-02-07T19:33:35.389769",
"answers" : [ {
"answerId" : 1,
"content" : "내용1",
"answerer" : {
"userId" : 1,
"email" : "user@test.com",
"nickname" : "test1",
"imageUrl" : null
},
"createdAt" : "2023-02-07T19:33:35.389017",
"modifiedAt" : "2023-02-07T19:33:35.389231"
} ]
}, {
"questionId" : 1,
"content" : "내용1",
"questioner" : {
"userId" : 1,
"email" : "user@test.com",
"nickname" : "test1",
"imageUrl" : null
},
"createdAt" : "2023-02-07T19:33:35.389741",
"modifiedAt" : "2023-02-07T19:33:35.389769",
"answers" : [ {
"answerId" : 1,
"content" : "내용1",
"answerer" : {
"userId" : 1,
"email" : "user@test.com",
"nickname" : "test1",
"imageUrl" : null
},
"createdAt" : "2023-02-07T19:33:35.389017",
"modifiedAt" : "2023-02-07T19:33:35.389231"
} ]
} ]
| Path | Type | Description |
|---|---|---|
|
|
|
질문 아이디 |
|
|
|
질문 내용 |
|
|
|
질문자 정보 |
|
|
|
질문자 아이디 |
|
|
|
질문자 이메일 |
|
|
|
질문자 닉네임 |
|
|
|
질문자 프로필 이미지 |
|
|
|
질문 작성일 |
|
|
|
질문 수정일 |
|
|
|
답변 목록 |
|
|
|
답변 아이디 |
|
|
|
답변 내용 |
|
|
|
답변자 정보 |
|
|
|
답변자 아이디 |
|
|
|
답변자 이메일 |
|
|
|
답변자 닉네임 |
|
|
|
답변자 프로필 이미지 |
|
|
|
답변 작성일 |
|
|
|
답변 수정일 |
3.2. 실패 400
POST /meetings/1/questions HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer AccessToken
Content-Length: 21
Host: docs.api.com
{
"content" : " "
}
| Name | Description |
|---|---|
|
|
유효한 액세스 토큰 |
HTTP/1.1 400 Bad Request
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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: 778
{
"status" : 400,
"code" : "400 BAD_REQUEST",
"message" : "Validation failed for argument [2] in public java.util.List<com.example.momobe.question.dto.out.ResponseQuestionDto> com.example.momobe.question.ui.QuestionController.postQuestion(java.lang.Long,com.example.momobe.common.resolver.UserInfo,com.example.momobe.question.dto.in.QuestionDto): [Field error in object 'questionDto' on field 'content': rejected value [ ]; codes [NotBlank.questionDto.content,NotBlank.content,NotBlank.java.lang.String,NotBlank]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [questionDto.content,content]; arguments []; default message [content]]; default message [must not be blank]] ",
"validation" : {
"content" : "must not be blank"
}
}
4. 답변 작성
4.1. 성공 201
POST /meetings/1/questions/1/answers HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer AccessToken
Content-Length: 21
Host: localhost:8080
{"content":"내용1"}
| Name | Description |
|---|---|
|
|
유효한 액세스 토큰 |
HTTP/1.1 201 Created
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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: 837
[{"questionId":1,"content":"내용1","questioner":{"userId":1,"email":"user@test.com","nickname":"test1","imageUrl":null},"createdAt":"2023-02-07T19:33:22.967547","modifiedAt":"2023-02-07T19:33:22.967552","answers":[{"answerId":1,"content":"내용1","answerer":{"userId":1,"email":"user@test.com","nickname":"test1","imageUrl":null},"createdAt":"2023-02-07T19:33:22.967303","modifiedAt":"2023-02-07T19:33:22.967319"}]},{"questionId":1,"content":"내용1","questioner":{"userId":1,"email":"user@test.com","nickname":"test1","imageUrl":null},"createdAt":"2023-02-07T19:33:22.967547","modifiedAt":"2023-02-07T19:33:22.967552","answers":[{"answerId":1,"content":"내용1","answerer":{"userId":1,"email":"user@test.com","nickname":"test1","imageUrl":null},"createdAt":"2023-02-07T19:33:22.967303","modifiedAt":"2023-02-07T19:33:22.967319"}]}]
| Path | Type | Description |
|---|---|---|
|
|
|
질문 아이디 |
|
|
|
질문 내용 |
|
|
|
질문자 정보 |
|
|
|
질문자 아이디 |
|
|
|
질문자 이메일 |
|
|
|
질문자 닉네임 |
|
|
|
질문자 프로필 이미지 |
|
|
|
질문 작성일 |
|
|
|
질문 수정일 |
|
|
|
답변 목록 |
|
|
|
답변 아이디 |
|
|
|
답변 내용 |
|
|
|
답변자 정보 |
|
|
|
답변자 아이디 |
|
|
|
답변자 이메일 |
|
|
|
답변자 닉네임 |
|
|
|
답변자 프로필 이미지 |
|
|
|
답변 작성일 |
|
|
|
답변 수정일 |
4.2. 실패 400
POST /meetings/1/questions/1/answers HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer AccessToken
Content-Length: 15
Host: localhost:8080
{"content":" "}
| Name | Description |
|---|---|
|
|
유효한 액세스 토큰 |
HTTP/1.1 400 Bad Request
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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: 743
{"status":400,"code":"400 BAD_REQUEST","message":"Validation failed for argument [3] in public java.util.List<com.example.momobe.question.dto.out.ResponseQuestionDto> com.example.momobe.answer.ui.AnswerController.postAnswer(java.lang.Long,java.lang.Long,com.example.momobe.common.resolver.UserInfo,com.example.momobe.answer.dto.AnswerDto): [Field error in object 'answerDto' on field 'content': rejected value [ ]; codes [NotBlank.answerDto.content,NotBlank.content,NotBlank.java.lang.String,NotBlank]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [answerDto.content,content]; arguments []; default message [content]]; default message [must not be blank]] ","validation":{"content":"must not be blank"}}
5. 예약 가능 일시 조회
5.1. 성공 201
GET /meetings/1/reservations/dates/2023-02-07 HTTP/1.1
Authorization: Bearer AccessToken
Host: docs.api.com
| Name | Description |
|---|---|
|
|
AccessToken |
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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: 494
[ {
"dateTime" : "2023-02-07T10:00:00",
"date" : "2023-02-07",
"time" : "10:00:00",
"personnel" : 4,
"maxTime" : 2,
"price" : 10000,
"datePolicy" : "PERIOD",
"currentStaff" : 2,
"category" : "DESIGN",
"availability" : "true"
}, {
"dateTime" : "2023-02-07T11:00:00",
"date" : "2023-02-07",
"time" : "11:00:00",
"personnel" : 4,
"maxTime" : 4,
"price" : 10000,
"datePolicy" : "PERIOD",
"currentStaff" : 2,
"category" : "DESIGN",
"availability" : "true"
} ]
| Path | Type | Description |
|---|---|---|
|
|
|
연월일 시분초 |
|
|
|
연월일 |
|
|
|
시분초 |
|
|
|
예약 가능 여부 |
|
|
|
예약 정책 |
|
|
|
카테고리 |
|
|
|
현재 예약 인원수 |
|
|
|
최대 예약 가능 시간 |
|
|
|
예약 정원 |
|
|
|
예약 금액 (자유일 경우 시간당 금액임을 유의) |
6. 예약
6.1. 성공 201
POST /meetings/1/reservations HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer AccessToken
Content-Length: 185
Host: docs.api.com
{
"dateInfo" : {
"reservationDate" : "2023-02-07",
"startTime" : "19:33:45.041801",
"endTime" : "20:33:45.041804"
},
"amount" : 1000,
"reservationMemo" : "내용1"
}
| Name | Description |
|---|---|
|
|
AccessToken |
| Path | Type | Description |
|---|---|---|
|
|
|
예약일 |
|
|
|
예약 시작 시간 |
|
|
|
예약 종료 시간 |
|
|
|
서버에서 계산한 금액과 일치하지 않음 |
|
|
|
예약자가 남기는 메모 |
HTTP/1.1 201 Created
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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: 193
{
"amount" : 1000,
"orderId" : "id",
"orderName" : "내용1",
"customerEmail" : "user@test.com",
"customerName" : "nickname",
"successUrl" : "/testpage",
"failUrl" : "/testpage"
}
6.2. 실패 400
POST /meetings/1/reservations HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer AccessToken
Content-Length: 151
Host: docs.api.com
{
"dateInfo" : {
"reservationDate" : null,
"startTime" : null,
"endTime" : null
},
"amount" : null,
"reservationMemo" : "내용1"
}
| Name | Description |
|---|---|
|
|
AccessToken |
| Path | Type | Description |
|---|---|---|
|
|
|
비어있을 수 없습니다. |
|
|
|
비어있을 수 없습니다. |
|
|
|
비어있을 수 없습니다. |
|
|
|
비어있을 수 없습니다. |
|
|
|
예약자가 남기는 메모 |
HTTP/1.1 400 Bad Request
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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: 2389
{
"status" : 400,
"code" : "400 BAD_REQUEST",
"message" : "Validation failed for argument [1] in public com.example.momobe.reservation.dto.out.PaymentResponseDto com.example.momobe.reservation.ui.ReservationCommonController.postReservation(java.lang.Long,com.example.momobe.reservation.dto.in.PostReservationDto,com.example.momobe.common.resolver.UserInfo) with 4 errors: [Field error in object 'postReservationDto' on field 'amount': rejected value [null]; codes [NotNull.postReservationDto.amount,NotNull.amount,NotNull.java.lang.Long,NotNull]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [postReservationDto.amount,amount]; arguments []; default message [amount]]; default message [must not be null]] [Field error in object 'postReservationDto' on field 'dateInfo.endTime': rejected value [null]; codes [NotNull.postReservationDto.dateInfo.endTime,NotNull.dateInfo.endTime,NotNull.endTime,NotNull.java.time.LocalTime,NotNull]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [postReservationDto.dateInfo.endTime,dateInfo.endTime]; arguments []; default message [dateInfo.endTime]]; default message [must not be null]] [Field error in object 'postReservationDto' on field 'dateInfo.reservationDate': rejected value [null]; codes [NotNull.postReservationDto.dateInfo.reservationDate,NotNull.dateInfo.reservationDate,NotNull.reservationDate,NotNull.java.time.LocalDate,NotNull]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [postReservationDto.dateInfo.reservationDate,dateInfo.reservationDate]; arguments []; default message [dateInfo.reservationDate]]; default message [must not be null]] [Field error in object 'postReservationDto' on field 'dateInfo.startTime': rejected value [null]; codes [NotNull.postReservationDto.dateInfo.startTime,NotNull.dateInfo.startTime,NotNull.startTime,NotNull.java.time.LocalTime,NotNull]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [postReservationDto.dateInfo.startTime,dateInfo.startTime]; arguments []; default message [dateInfo.startTime]]; default message [must not be null]] ",
"validation" : {
"dateInfo.reservationDate" : "must not be null",
"amount" : "must not be null",
"dateInfo.endTime" : "must not be null",
"dateInfo.startTime" : "must not be null"
}
}
6.3. 실패 404
POST /meetings/1/reservations HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer AccessToken
Content-Length: 185
Host: docs.api.com
{
"dateInfo" : {
"reservationDate" : "2023-02-07",
"startTime" : "19:33:45.030973",
"endTime" : "20:33:45.030976"
},
"amount" : 1000,
"reservationMemo" : "내용1"
}
| Name | Description |
|---|---|
|
|
AccessToken |
| Path | Type | Description |
|---|---|---|
|
|
|
예약일 |
|
|
|
시작 시간 |
|
|
|
마지막 시간 |
|
|
|
비용 |
|
|
|
예약자가 남기는 메모 |
HTTP/1.1 404 Not Found
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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: 143
{
"status" : 404,
"code" : "404 NOT_FOUND",
"message" : "조회하려는 데이터가 존재하지 않습니다.",
"validation" : { }
}
6.4. 실패 409
409 실패 시나리오는 다음과 같습니다.
-
클라이언트에서 요청한 결제 금액과 서버에서 계산한 금액이 일치하지 않음.
-
유효한 예약 시간대가 아님.
-
예약 정원이 가득 찼음.
POST /meetings/1/reservations HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer AccessToken
Content-Length: 184
Host: docs.api.com
{
"dateInfo" : {
"reservationDate" : "2023-02-07",
"startTime" : "19:33:44.999307",
"endTime" : "20:33:44.99931"
},
"amount" : 1000,
"reservationMemo" : "내용1"
}
| Name | Description |
|---|---|
|
|
AccessToken |
| Path | Type | Description |
|---|---|---|
|
|
|
예약일 |
|
|
|
예약 시작 시간 |
|
|
|
예약 종료 시간 |
|
|
|
비용 |
|
|
|
예약자가 남기는 메모 |
HTTP/1.1 409 Conflict
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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: 124
{
"status" : 409,
"code" : "409 CONFLICT",
"message" : "예약 인원이 가득 찼습니다.",
"validation" : { }
}
7. 예약취소
7.1. 성공 204
DELETE /meetings/1/reservations/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer AccessToken
Content-Length: 60
Host: docs.api.com
{
"paymentKey" : "내용1",
"cancelReason" : "내용2"
}
| Name | Description |
|---|---|
|
|
액세스 토큰 |
| Path | Type | Description |
|---|---|---|
|
|
|
paymentKey |
|
|
|
cancelReason |
HTTP/1.1 204 No Content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
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
7.2. 실패 400
DELETE /meetings/1/reservations/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer AccessToken
Content-Length: 48
Host: docs.api.com
{
"paymentKey" : " ",
"cancelReason" : " "
}
| Name | Description |
|---|---|
|
|
AccessToken |
| Path | Type | Description |
|---|---|---|
|
|
|
paymentKey는 null, emtpy, white space일 수 없습니다. |
|
|
|
cancelReason은 null, emtpy, white space일 수 없습니다. |
HTTP/1.1 400 Bad Request
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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: 1278
{
"status" : 400,
"code" : "400 BAD_REQUEST",
"message" : "Validation failed for argument [3] in public void com.example.momobe.reservation.ui.ReservationCommonController.deleteReservation(java.lang.Long,java.lang.Long,com.example.momobe.common.resolver.UserInfo,com.example.momobe.reservation.dto.in.DeleteReservationDto) with 2 errors: [Field error in object 'deleteReservationDto' on field 'paymentKey': rejected value [ ]; codes [NotBlank.deleteReservationDto.paymentKey,NotBlank.paymentKey,NotBlank.java.lang.String,NotBlank]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [deleteReservationDto.paymentKey,paymentKey]; arguments []; default message [paymentKey]]; default message [must not be blank]] [Field error in object 'deleteReservationDto' on field 'cancelReason': rejected value [ ]; codes [NotBlank.deleteReservationDto.cancelReason,NotBlank.cancelReason,NotBlank.java.lang.String,NotBlank]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [deleteReservationDto.cancelReason,cancelReason]; arguments []; default message [cancelReason]]; default message [must not be blank]] ",
"validation" : {
"cancelReason" : "must not be blank",
"paymentKey" : "must not be blank"
}
}
7.3. 실패 403
DELETE /meetings/1/reservations/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer AccessToken
Content-Length: 60
Host: docs.api.com
{
"paymentKey" : "내용1",
"cancelReason" : "내용2"
}
| Name | Description |
|---|---|
|
|
권한 없는 유저 |
| Path | Type | Description |
|---|---|---|
|
|
|
paymentKey |
|
|
|
cancelReason |
HTTP/1.1 403 Forbidden
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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: 111
{
"status" : 403,
"code" : "403 FORBIDDEN",
"message" : "권한이 없습니다.",
"validation" : { }
}
7.4. 실패 404
DELETE /meetings/1/reservations/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer AccessToken
Content-Length: 60
Host: docs.api.com
{
"paymentKey" : "내용1",
"cancelReason" : "내용2"
}
| Name | Description |
|---|---|
|
|
액세스 토큰 |
| Path | Type | Description |
|---|---|---|
|
|
|
paymentKey |
|
|
|
cancelReason |
HTTP/1.1 404 Not Found
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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: 143
{
"status" : 404,
"code" : "404 NOT_FOUND",
"message" : "조회하려는 데이터가 존재하지 않습니다.",
"validation" : { }
}
7.5. 실패 409
DELETE /meetings/1/reservations/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer AccessToken
Content-Length: 60
Host: docs.api.com
{
"paymentKey" : "내용1",
"cancelReason" : "내용2"
}
| Name | Description |
|---|---|
|
|
액세스 토큰 |
| Path | Type | Description |
|---|---|---|
|
|
|
paymentKey |
|
|
|
cancelReason |
HTTP/1.1 409 Conflict
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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: 153
{
"status" : 409,
"code" : "409 CONFLICT",
"message" : "이미 확정된 예약입니다, 관리자에게 문의하세요.",
"validation" : { }
}
8. 예약 승인&거절
8.1. 성공 204
PATCH /meetings/1/reservations/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer AccessToken
Content-Length: 47
Host: docs.api.com
{
"isAccepted" : "true",
"message" : null
}
| Name | Description |
|---|---|
|
|
AccessToken |
| Path | Type | Description |
|---|---|---|
|
|
|
true(승인), false(거절) |
|
|
|
반려 사유 |
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
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
8.2. 실패 400
PATCH /meetings/1/reservations/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer AccessToken
Content-Length: 47
Host: docs.api.com
{
"isAccepted" : "truw",
"message" : null
}
| Name | Description |
|---|---|
|
|
AccessToken |
| Path | Type | Description |
|---|---|---|
|
|
|
요청은 반드시 대/소문자 상관 없이 true or false여야 합니다. |
|
|
|
반려 사유 |
HTTP/1.1 400 Bad Request
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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: 984
{
"status" : 400,
"code" : "400 BAD_REQUEST",
"message" : "Validation failed for argument [2] in public void com.example.momobe.reservation.ui.ReservationCommonController.patchReservation(java.lang.Long,java.lang.Long,com.example.momobe.reservation.dto.in.PatchReservationDto,com.example.momobe.common.resolver.UserInfo): [Field error in object 'patchReservationDto' on field 'isAccepted': rejected value [truw]; codes [Pattern.patchReservationDto.isAccepted,Pattern.isAccepted,Pattern.java.lang.String,Pattern]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [patchReservationDto.isAccepted,isAccepted]; arguments []; default message [isAccepted],[Ljavax.validation.constraints.Pattern$Flag;@56549935,^(?i)(true|false)$]; default message [입력값은 대소문자 관계 없이 True 혹은 False여야 합니다.]] ",
"validation" : {
"isAccepted" : "입력값은 대소문자 관계 없이 True 혹은 False여야 합니다."
}
}
8.3. 실패 403
PATCH /meetings/1/reservations/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer AccessToken
Content-Length: 47
Host: docs.api.com
{
"isAccepted" : "true",
"message" : null
}
| Name | Description |
|---|---|
|
|
해당 토큰의 id와 모임 주최자 id가 일치하지 않음 |
| Path | Type | Description |
|---|---|---|
|
|
|
요청은 반드시 대/소문자 상관 없이 true or false여야 합니다. |
|
|
|
반려 사유 |
HTTP/1.1 403 Forbidden
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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: 111
{
"status" : 403,
"code" : "403 FORBIDDEN",
"message" : "권한이 없습니다.",
"validation" : { }
}
8.4. 실패 404
PATCH /meetings/1/reservations/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer AccessToken
Content-Length: 47
Host: docs.api.com
{
"isAccepted" : "true",
"message" : null
}
| Name | Description |
|---|---|
|
|
AccessToken |
| Path | Type | Description |
|---|---|---|
|
|
|
true(승인), false(거절) |
|
|
|
반려 사유 |
HTTP/1.1 404 Not Found
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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: 143
{
"status" : 404,
"code" : "404 NOT_FOUND",
"message" : "조회하려는 데이터가 존재하지 않습니다.",
"validation" : { }
}
8.5. 실패 409
PATCH /meetings/1/reservations/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer AccessToken
Content-Length: 47
Host: docs.api.com
{
"isAccepted" : "true",
"message" : null
}
| Name | Description |
|---|---|
|
|
AccessToken |
| Path | Type | Description |
|---|---|---|
|
|
|
true(승인), false(거절) |
|
|
|
반려 사유 |
HTTP/1.1 409 Conflict
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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: 153
{
"status" : 409,
"code" : "409 CONFLICT",
"message" : "이미 확정된 예약입니다, 관리자에게 문의하세요.",
"validation" : { }
}
9. 로그인 및 회원가입
9.1. 성공 200
| Name | Description |
|---|---|
|
|
/oauth/login |
|
|
액세스 토큰 |
|
|
리프레시 토큰, 쿠키에 저장하는 것을 권장합니다. |
10. 토큰 갱신
10.1. 성공 201
PUT /auth/token HTTP/1.1
RefreshToken: Bearer RefreshToken
Host: docs.api.com
| Name | Description |
|---|---|
|
|
유효한 리프레시 토큰 |
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
AccessToken: Bearer AccessToken
RefreshToken: Bearer RefreshToken
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 |
|---|---|
|
|
액세스 토큰 |
|
|
리프레시 토큰, 쿠키에 저장하는 것을 권장합니다! |
10.2. 실패 401
PUT /auth/token HTTP/1.1
RefreshToken: Bearer RefreshToken
Host: docs.api.com
| Name | Description |
|---|---|
|
|
만료되었거나 유효하지 않은 토큰 |
HTTP/1.1 401 Unauthorized
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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: 109
{
"status" : 401,
"code" : "MALFORMED_EXCEPTION",
"message" : "malformed token",
"validation" : { }
}
10.3. 실패 404
PUT /auth/token HTTP/1.1
RefreshToken: Bearer RefreshToken
Host: docs.api.com
| Name | Description |
|---|---|
|
|
존재하지 않는 리프레시 토큰 |
HTTP/1.1 404 Not Found
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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: 143
{
"status" : 404,
"code" : "404 NOT_FOUND",
"message" : "조회하려는 데이터가 존재하지 않습니다.",
"validation" : { }
}
11. 로그아웃
11.1. 성공 204
DELETE /auth/token HTTP/1.1
RefreshToken: Bearer RefreshToken
Host: docs.api.com
| Name | Description |
|---|---|
|
|
유효한 리프레시 토큰 |
HTTP/1.1 204 No Content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
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
12. 회원
12.1. 회원 정보 조회
GET /mypage/profile HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer AccessToken
Accept: application/json
Host: docs.api.com
| Name | Description |
|---|---|
|
|
Bearer AccessToken |
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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: 102
{
"nickname" : "dodanmom",
"email" : "email@mail.com",
"point" : 100,
"avatar" : "http://ss"
}
| Path | Type | Description |
|---|---|---|
|
|
|
닉네임 |
|
|
|
이메일 |
|
|
|
포인트 |
|
|
|
프로필 사진 |
12.2. 회원 탈퇴
DELETE /mypage/profile HTTP/1.1
Authorization: Bearer AccessToken
Host: docs.api.com
| Name | Description |
|---|---|
|
|
Bearer AccessToken |
HTTP/1.1 204 No Content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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: 4
true
13. 주소
13.1. 주소 조회
GET /addresses HTTP/1.1
Authorization: Bearer AccessToken
Host: docs.api.com
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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: 173
[ {
"si" : "서울",
"gu" : [ {
"id" : 1,
"name" : "전체"
}, {
"id" : 2,
"name" : "강남구"
}, {
"id" : 3,
"name" : "강동구"
} ]
} ]
| Path | Type | Description |
|---|---|---|
|
|
|
주소 |
|
|
|
주소 (시) |
|
|
|
주소 식별자 |
|
|
|
주소 (구) |
14. 결제 성공
14.1. 성공 200
GET /payments/success?paymentKey=PAYMENT_KEY&orderId=ORDER_ID&amount=10000 HTTP/1.1
Host: docs.api.com
| Parameter | Description |
|---|---|
|
|
카드 결제 요청 시 받은 paymentKey |
|
|
서버에서 발급한 orderId |
|
|
결제 금액 |
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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: 828
{
"version" : "1.3",
"paymentKey" : "PAYMENT_KEY",
"orderId" : "ORDER_ID",
"orderName" : "내용1",
"currency" : "KRW",
"method" : "card",
"totalAmount" : "10000",
"balanceAmount" : "10000",
"suppliedAmount" : "0",
"vat" : "0",
"status" : "DONE",
"requestedAt" : "2023-02-07T19:32:34.487",
"approvedAt" : "2023-02-07T19:33:34.486942",
"useEscrow" : "false",
"cultureExpense" : "false",
"type" : null,
"card" : {
"company" : "현대",
"number" : "444444****11111",
"installmentPlanMonth" : "0",
"isInterestFree" : "false",
"approveNo" : "0000000",
"useCardPoint" : "0",
"cardType" : "신용",
"ownerType" : "개인",
"acquireStatus" : "READY",
"receiptUrl" : "https://merchants.tosspayments.com/web/serve/merchant"
},
"cancels" : null,
"mid" : "1"
}
| Path | Type | Description |
|---|---|---|
|
|
|
가맹점 ID |
|
|
|
payment 객체 응답 버전 |
|
|
|
토스로부터 발급받은 결제용 키 |
|
|
|
주문 번호 |
|
|
|
주문 명 |
|
|
|
결제 통화 |
|
|
|
결제 수단 |
|
|
|
총 결제 금액 |
|
|
|
잔액 |
|
|
|
부가세 미포함 금액 |
|
|
|
부가세 |
|
|
|
결제 처리 상태 |
|
|
|
결제 승인 일시 |
|
|
|
에스크로 이용 여부 |
|
|
|
분화비 여부 |
|
|
|
카드 결제 정보 |
|
|
|
결제 취소 이력 |
|
|
|
결제 타입 정보 |
|
|
|
결제 요청 일시 |
|
|
|
카드사 |
|
|
|
결제 승인 번호 |
|
|
|
할부 개월 |
|
|
|
무이자 여부 |
|
|
|
결제 승인번호 |
|
|
|
카드포인트 사용 여부 |
|
|
|
카드 타입 |
|
|
|
개인 법인 여부 |
|
|
|
카드 활성화 여부 |
|
|
|
결제 영수증 url |
14.2. 실패 404
GET /payments/success?paymentKey=PAYMENT_KEY&orderId=ORDER_ID&amount=10000 HTTP/1.1
Host: docs.api.com
| Parameter | Description |
|---|---|
|
|
카드 결제 요청 시 받은 paymentKey |
|
|
서버에 존재하지 않는 orderId |
|
|
결제 금액 |
HTTP/1.1 404 Not Found
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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: 143
{
"status" : 404,
"code" : "404 NOT_FOUND",
"message" : "조회하려는 데이터가 존재하지 않습니다.",
"validation" : { }
}
14.3. 실패 503
GET /payments/success?paymentKey=PAYMENT_KEY&orderId=ORDER_ID&amount=10000 HTTP/1.1
Host: docs.api.com
| Parameter | Description |
|---|---|
|
|
카드 결제 요청 시 받은 paymentKey |
|
|
서버에서 발급한 orderId |
|
|
결제 금액 |
HTTP/1.1 503 Service Unavailable
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
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: 182
{
"status" : 503,
"code" : "503 SERVICE_UNAVAILABLE",
"message" : "현재 해당 요청을 수행할 수 없습니다, 관리자에게 문의하세요.",
"validation" : { }
}