Planu ๋ฐฑ์๋ API์ ์ ์ฒด ์๋ํฌ์ธํธ ๋ช ์ธ์์ ๋๋ค.
- ์ธ์ฆ API
- ์ฌ์ฉ์ ํ๋กํ API
- ํ๋ก์ฐ API
- ์นดํ ๊ณ ๋ฆฌ API
- Todo API
- Someday API
- ์คํฐ์ปค API
- ์์ API
- ๊ตฌ๋งค API
- ์ฟ ํฐ API
POST /auth/checkDuplicateEmail
Content-Type: application/json
{
"email": "user@example.com"
}์๋ต: "true" (์ฌ์ฉ ๊ฐ๋ฅ) ๋๋ "false" (์ค๋ณต)
POST /auth/checkExistEmail
Content-Type: application/json
{
"email": "user@example.com"
}์๋ต: User ๊ฐ์ฒด ๋๋ 404
POST /auth/sendVerificationCode?email=user@example.com์๋ต: ์ธ์ฆ ์ฝ๋ ๋ฐ์ก ์๋ฃ ๋ฉ์์ง
POST /auth/checkVerificationCode?email=user@example.com&code=123456์๋ต: ์ธ์ฆ ์๋ฃ ๋ฉ์์ง
POST /auth/register
Content-Type: application/json
{
"email": "user@example.com",
"password": "password123",
"name": "ํ๊ธธ๋"
}์๋ต: ํ์๊ฐ์ ์๋ฃ ๋ฉ์์ง
POST /auth/login
Content-Type: application/json
{
"email": "user@example.com",
"password": "password123"
}์๋ต:
{
"accessToken": "eyJhbGciOiJIUzI1NiIs...",
"refreshToken": "eyJhbGciOiJIUzI1NiIs..."
}POST /auth/login/google
Content-Type: application/json
{
"idToken": "google_id_token"
}์๋ต: Access Token + Refresh Token
POST /auth/login/kakao
Content-Type: application/json
{
"email": "user@example.com",
"name": "ํ๊ธธ๋"
}์๋ต: Access Token + Refresh Token
POST /auth/updatePassword
Content-Type: application/json
{
"email": "user@example.com",
"newPassword": "newPassword123"
}์๋ต: ๋น๋ฐ๋ฒํธ ๋ณ๊ฒฝ ์๋ฃ ๋ฉ์์ง
๋ชจ๋ ์ธ์ฆ ํ์ API๋ ํค๋์ ๋ค์์ ํฌํจํด์ผ ํฉ๋๋ค:
Authorization: Bearer {accessToken}POST /auth/changePassword
Authorization: Bearer {token}
Content-Type: application/json
{
"currentPassword": "oldPassword",
"newPassword": "newPassword123"
}POST /auth/logout
Authorization: Bearer {token}
Refresh-Token: {refreshToken}POST /auth/unregister
Authorization: Bearer {token}POST /auth/refresh-token
Authorization: Bearer {refreshToken}์๋ต: ์๋ก์ด Access Token
GET /auth/validate-token
Authorization: Bearer {token}์๋ต: 200 (์ ํจ) ๋๋ 401 (๋ฌดํจ)
GET /auth/profile
Authorization: Bearer {token}์๋ต:
{
"userReferenceId": "uuid",
"email": "user@example.com",
"name": "ํ๊ธธ๋",
"profileImageUrl": "https://...",
"introduction": "์๋
ํ์ธ์",
"isPrivate": false
}POST /auth/updateProfile
Authorization: Bearer {token}
Content-Type: application/json
{
"name": "ํ๊ธธ๋",
"introduction": "์๋
ํ์ธ์",
"isPrivate": false
}POST /auth/updateProfileImage
Authorization: Bearer {token}
Content-Type: multipart/form-data
file: [์ด๋ฏธ์ง ํ์ผ]POST /auth/deleteProfileImage
Authorization: Bearer {token}POST /auth/findUser
Authorization: Bearer {token}
Content-Type: application/json
{
"email": "user@example.com",
"name": "ํ๊ธธ๋"
}์๋ต: ์ฌ์ฉ์ ํ๋กํ ๋ชฉ๋ก
POST /auth/follow
Authorization: Bearer {token}
Content-Type: application/json
{
"followedEmail": "target@example.com"
}POST /auth/unfollow
Authorization: Bearer {token}
Content-Type: application/json
{
"followedEmail": "target@example.com"
}GET /auth/following
Authorization: Bearer {token}์๋ต: ํ๋ก์ ์ฌ์ฉ์ ๋ชฉ๋ก
GET /auth/followers
Authorization: Bearer {token}์๋ต: ํ๋ก์ ์ฌ์ฉ์ ๋ชฉ๋ก
GET /auth/followings/{email}
Authorization: Bearer {token}GET /auth/followers/{email}
Authorization: Bearer {token}POST /category/
Authorization: Bearer {token}
Content-Type: application/json
{
"title": "์
๋ฌด",
"color": "#FF5733"
}์๋ต:
{
"categoryId": 1,
"title": "์
๋ฌด",
"color": "#FF5733"
}GET /category/
Authorization: Bearer {token}GET /category/{email}
Authorization: Bearer {token}PUT /category/{categoryId}
Authorization: Bearer {token}
Content-Type: application/json
{
"title": "๊ฐ์ธ",
"color": "#3498DB"
}DELETE /category/?categoryIds=1,2,3
Authorization: Bearer {token}Query Parameter: ์ญ์ ํ ์นดํ ๊ณ ๋ฆฌ ID ๋ชฉ๋ก
POST /todo/
Authorization: Bearer {token}
Content-Type: application/json
{
"title": "ํ์ ์ค๋นํ๊ธฐ",
"date": "2024-10-21",
"categoryId": 1,
"isCompleted": false
}POST /todo/todos
Authorization: Bearer {token}
Content-Type: application/json
{
"todos": [
{
"title": "ํ์ ์ค๋น",
"date": "2024-10-21",
"categoryId": 1
},
{
"title": "๋ณด๊ณ ์ ์์ฑ",
"date": "2024-10-21",
"categoryId": 1
}
]
}GET /todo/
Authorization: Bearer {token}์๋ต: Todo ๋ชฉ๋ก
GET /todo/{email}
Authorization: Bearer {token}PUT /todo/{todoId}
Authorization: Bearer {token}
Content-Type: application/json
{
"title": "ํ์ ์ค๋น ์๋ฃ",
"date": "2024-10-21",
"categoryId": 1,
"isCompleted": true
}DELETE /todo/{todoId}
Authorization: Bearer {token}DELETE /todo/todos?todoIds=1,2,3
Authorization: Bearer {token}POST /todo_someday/
Authorization: Bearer {token}
Content-Type: application/json
{
"title": "์ธ์ ๊ฐ ํด์ผ ํ ์ผ",
"categoryId": 1
}GET /todo_someday/
Authorization: Bearer {token}PUT /todo_someday/{todoSomedayId}
Authorization: Bearer {token}
Content-Type: application/json
{
"title": "์์ ๋ ์ ๋ชฉ",
"categoryId": 2
}DELETE /todo_someday/{todoSomedayId}
Authorization: Bearer {token}POST /sticker/
Authorization: Bearer {token}
Content-Type: application/json
{
"name": "ํํธ ์คํฐ์ปค",
"imageUrl": "https://..."
}GET /sticker/
Authorization: Bearer {token}์๋ต:
[
{
"stickerId": 1,
"name": "ํํธ ์คํฐ์ปค",
"imageUrl": "https://..."
}
]DELETE /sticker/{stickerId}
Authorization: Bearer {token}GET /shop_sticker/
Authorization: Bearer {token}์๋ต:
[
{
"shopStickerId": 1,
"name": "ํ๋ฆฌ๋ฏธ์ ์คํฐ์ปค",
"price": 1000,
"imageUrl": "https://...",
"description": "ํ๋ฆฌ๋ฏธ์ ์คํฐ์ปค์
๋๋ค"
}
]GET /shop_sticker/sales
Authorization: Bearer {token}GET /shop_color/
Authorization: Bearer {token}์๋ต:
[
{
"shopColorId": 1,
"name": "๋ฏผํธ ์ปฌ๋ฌ",
"price": 500,
"colorCode": "#98D8C8"
}
]GET /shop_color/sales
Authorization: Bearer {token}POST /purchase_sticker/
Authorization: Bearer {token}
Content-Type: application/json
{
"shopStickerId": 1
}์๋ต:
{
"purchaseStickerId": 1,
"shopStickerId": 1,
"purchaseDate": "2024-10-21T10:30:00"
}GET /purchase_sticker/
Authorization: Bearer {token}POST /purchase_color/
Authorization: Bearer {token}
Content-Type: application/json
{
"shopColorId": 1
}GET /purchase_color/
Authorization: Bearer {token}GET /coupon/
Authorization: Bearer {token}์๋ต:
[
{
"couponId": 1,
"name": "์ ๊ท ํ์ ์ฟ ํฐ",
"discountAmount": 1000,
"expiryDate": "2024-12-31"
}
]POST /coupon/
Authorization: Bearer {token}
Content-Type: application/json
{
"couponId": 1
}์๋ต:
{
"usageId": 1,
"couponId": 1,
"usedAt": "2024-10-21T10:30:00"
}GET /coupon_usage/
Authorization: Bearer {token}{
"data": { },
"message": "์ฑ๊ณต ๋ฉ์์ง"
}{
"status": 400,
"code": "ERROR_CODE",
"message": "์๋ฌ ๋ฉ์์ง"
}๋ชจ๋ ์ธ์ฆ์ด ํ์ํ API๋ ๋ค์ ํค๋๋ฅผ ํฌํจํด์ผ ํฉ๋๋ค:
Authorization: Bearer {accessToken}Refresh Token์ด ํ์ํ ๊ฒฝ์ฐ:
Refresh-Token: {refreshToken}- Swagger UI:
http://localhost:8080/swagger-ui.html์์ ์ค์๊ฐ API ํ ์คํธ ๊ฐ๋ฅ - ๋ ์ง ํ์:
YYYY-MM-DD - ์๊ฐ ํ์: ISO 8601 (
YYYY-MM-DDTHH:mm:ss) - ํ ํฐ ๋ง๋ฃ: Access Token - 1์๊ฐ, Refresh Token - 7์ผ
- ํ์ผ ์
๋ก๋:
multipart/form-dataํ์ ์ฌ์ฉ - ์ต๋ ํ์ผ ํฌ๊ธฐ: 10MB
| ์ฝ๋ | ์ค๋ช |
|---|---|
| 400 | ์๋ชป๋ ์์ฒญ |
| 401 | ์ธ์ฆ ์คํจ |
| 403 | ๊ถํ ์์ |
| 404 | ๋ฆฌ์์ค ์์ |
| 409 | ์ถฉ๋ (์ค๋ณต ๋ฑ) |
| 500 | ์๋ฒ ์๋ฌ |
๋ ์์ธํ ๋ด์ฉ์ Swagger ๋ฌธ์๋ฅผ ์ฐธ๊ณ ํ์ธ์.