You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
1. Auth (인증)
1.1 회원가입
POST
/api/v1/auth/registerusers{ "email": "user@example.com", "username": "홍길동", "password": "P@ssw0rd!", "role": "USER" }password→ BCryptPasswordEncoder로 암호화하여password_hash에 저장role(USER/ADMIN) 저장{ "status": 200, "data": null, "message": "회원가입이 완료되었습니다." }1.2 로그인 (JWT 발급)
POST
/api/v1/auth/loginusers{ "email": "user@example.com", "password": "P@ssw0rd!" }{ "status": 200, "data": { "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." }, "message": "로그인 성공" }1.3 토큰 재발급
POST
/api/v1/auth/refreshRedis(Refresh Token 저장소)Authorization: Bearer {Access_Token}(만료된 토큰이라도 파싱하여 userId 추출){ "status": 200, "data": { "accessToken": "new_access_token_..." }, "message": "토큰 재발급 성공" }2. 사용자 (User)
2.1 내 정보 조회
GET
/api/v1/users/meusers{ "status": 200, "data": { "user_id": 1, "email": "user@example.com", "name": "홍길동", "phone_number": "010-1234-5678", "budget_amount": 100000, "created_at": "2025-05-20T10:00:00" }, "message": "내 정보 조회 성공" }2.2 예산 변경
PATCH
/api/v1/users/me/budgetusers{ "budget_amount": 80000 }users.budget_amount값 업데이트 (Dirty Checking){ "status": 200, "data": { "user_id": 1, "budget_amount": 80000 }, "message": "예산이 변경되었습니다." }3. 상품 (Product)
3.1 바코드 스캔 → 상품 조회
POST
/api/v1/products/scanproducts{ "product_id": "8801234567890" // 실제 바코드 값 }products.barcode컬럼에서 해당 값 조회{ "status": 200, "data": { "product_id": "8801234567890", "name": "코카콜라 1.5L", "price": 3000, "stock": 50, "is_active": true, "updated_at": "..." }, "message": "상품 조회가 완료되었습니다." }3.2 상품 상세 조회
GET
/api/v1/products/{product_id}products3.3 상품 목록 검색
GET
/api/v1/products?keyword=콜라&page=0&size=20products{ "status": 200, "data": { "items": [ { "product_id": "...", "name": "...", ... } ], "page": 0, "size": 20, "total": 5 }, "message": "상품 목록 조회가 완료되었습니다." }4. 장바구니 (Cart)
4.1 장바구니 조회
GET
/api/v1/cartcart_items,products{ "status": 200, "data": { "items": [ { "cartItemId": 10, "productName": "코카콜라 1.5L", "price": 3000, "quantity": 2, "subtotal": 6000, "barcode": "8801234567890", "userId": 1 } ], "totalAmount": 6000, "budgetAmount": 100000, "isOverBudget": false }, "message": "장바구니 조회 성공" }4.2 장바구니 담기
POST
/api/v1/cartcart_items{ "barcode": "8801234567890" }{ "status": 200, "data": null, "message": "장바구니에 추가되었습니다." }4.3 수량 변경
PATCH
/api/v1/cart/{cartItemId}?quantity=3cart_items{ "status": 200, "data": null, "message": "수량이 변경되었습니다." }4.4 항목 삭제
DELETE
/api/v1/cart/{cartItemId}cart_items{ "status": 200, "data": null, "message": "항목이 삭제되었습니다." }5. 쇼핑리스트 (Shopping List)
5.1 전체 조회
GET
/api/v1/shopping-listsshopping_lists{ "status": 200, "data": [ { "listId": 1, "userId": 1, "itemName": "우유", "isChecked": false, "createdAt": "..." } ], "message": "쇼핑리스트 조회에 성공했습니다." }5.2 항목 추가
POST
/api/v1/shopping-listsshopping_lists{ "itemName": "계란 1판" }{ "status": 200, "data": { "listId": 2, "itemName": "계란 1판", ... }, "message": "쇼핑리스트 항목이 추가되었습니다." }5.3 수정 / 체크 토글
PATCH
/api/v1/shopping-lists/{listId}shopping_lists{ "itemName": "유기농 계란", "isChecked": true }6. 주문 & 결제 (Order)
6.1 주문 생성 (결제 전)
POST
/api/v1/ordersorders,order_details,cart_items{ "paymentMethod": "KAKAO_PAY" }CartItem내용을OrderDetail로 복사하여 저장Order생성 (상태:PENDING){ "status": 200, "data": { "order_id": "ORD-2025...", "final_price": 6000, "payment_method": "KAKAO_PAY", "status": "PENDING", "pg_redirect_url": "/payment?orderId=...", // 임시 URL "created_at": "..." }, "message": "주문 생성 완료" }6.2 결제 확정 및 토큰 발급
POST
/api/v1/orders/{orderId}/payorders,cart_items,gate_tokensOrder상태를CAPTURED로 변경cart_items) 전체 삭제GateToken생성 (유효기간 10분 JWT){ "status": 200, "data": { "order_id": "ORD-2025...", "status": "CAPTURED", "gate_token": "eyJhbGciOiJIUz...", // 이 값을 QR코드로 변환해서 사용 "final_price": 6000, ... }, "message": "결제 완료 및 게이트 토큰 발급 성공" }6.3 주문 목록 조회
GET
/api/v1/orders?status=CAPTURED&page=0&size=10orders{ "status": 200, "data": { "items": [ { "order_id": "...", "final_price": 6000, ... } ], "page": 0, "size": 10, "total": 1 }, "message": "주문 목록 조회 성공" }7. 게이트 토큰 (Gate)
7.1 토큰 발급 (수동 요청 시)
POST
/api/v1/gates/tokengate_tokens,orders{ "order_id": "ORD-2025..." }{ "status": 200, "data": { "token_id": 1, "order_id": "ORD-2025...", "token_value": "eyJhb...", "status": "ISSUED", "expires_at": "..." }, "message": "게이트 토큰이 발급되었습니다." }7.2 토큰 검증 (게이트 단말기용)
POST
/api/v1/gates/verifygate_tokens{ "token_value": "eyJhb...", "gate_id": "GATE_01", "timestamp": "..." }gate_tokens.status를USED로 변경{ "status": "OK", "message": "CAPTURED transaction verified, gate open" }Beta Was this translation helpful? Give feedback.
All reactions