공통 응답 형식

i) 데이터가 있는 경우

{
"status": "OK",
"code": 200,
"message": "자주 하는 질문 조회가 완료되었습니다.",
"result": {
"articles": [
{
"id": 10,
"title": "i am title",
"content": "i am content"
},
{
"id": 9,
"title": "i am title",
"content": "i am content"
}, … ]
}

ii) 데이터가 없는 경우

{
"status": "OK",
"code": 200,
"message": "공지사항 수정이 완료되었습니다."
}

ii) 에러가 발생한 경우

{
"status": "Error",
"code": 404,
"message": "Illegal Argument"
}

배포 관련 문의

메인페이지 관련 API

기능 URI METHOD Request body Response body 참고할 사항
제목 없음 (https://mkevin-study.notion.site/e3b2ebfb27714650b78f4dfd88ae216d) /api/products/top-weekly GET 요청 파라미터: 없음 [
{
"id": 1,
"name": "Product 1",
"main_image_id": 7,
"main_image_url": "url-to-main-image-7",
"regular_price": 100,
"discount_rate": 10,
"sale_price": 90

}, { "id": 2, "name": "Product 2", "main_image_id": 8, "main_image_url": "url-to-main-image-8", "regular_price": 200, "discount_rate": 20, "sale_price": 160 }, { "id": 3, "name": "Product 3", "main_image_id": 9, "main_image_url": "url-to-main-image-9", "regular_price": 300, "discount_rate": 15, "sale_price": 255 } ] | | | | 제목 없음 (https://mkevin-study.notion.site/896df2ea82744a5fb731ec0449859d11) | /api/products/top-monthly | GET | 요청 파라미터: 없음 | 응답 데이터 예시:200 OK [ { "id": 4, "name": "Product 4", "main_image_id": 10, "main_image_url": "url-to-main-image-10", "regular_price": 400, "discount_rate": 5, "sale_price": 380 }, { "id": 5, "name": "Product 5", "main_image_id": 11, "main_image_url": "url-to-main-image-11", "regular_price": 500, "discount_rate": 10, "sale_price": 450 }, { "id": 6, "name": "Product 6", "main_image_id": 12, "main_image_url": "url-to-main-image-12", "regular_price": 600, "discount_rate": 20, "sale_price": 480 } ] | | | | 제목 없음 (https://mkevin-study.notion.site/5f07c738293c4880a4601a4060a5d1b3) | /api/products | GET | 요청 파라미터: categoryId (선택): 카테고리별 필터링을 위한 카테고리 ID. 이 파라미터가 없으면 모든 카테고리의 상품을 조회합니다. sort (선택): 정렬 방식을 선택하는 파라미터. 'newest', 'popular', 'price_low', 'price_high' 중 하나를 선택할 수 있습니다. 기본값은 'newest'입니다.

요청 URL 예시: • 전체 카테고리, 신상품 순: /products?sort=new • 특정 카테고리, 신상품 순: /products?categoryId={categoryId}&sort=new • 전체 카테고리, 인기순: /products?sort=popular • 특정 카테고리, 인기순: /products?categoryId={categoryId}&sort=popular • 전체 카테고리, 낮은 가격 순: /products?sort=low_price • 특정 카테고리, 낮은 가격 순: /products?categoryId={categoryId}&sort=low_price • 전체 카테고리, 높은 가격 순: /products?sort=high_price • 특정 카테고리, 높은 가격 순: /products?categoryId={categoryId}&sort=high_price (여기서 {categoryId}는 실제 카테고리 ID로 대체해야 합니다.) | 응답 데이터 예시: { "products": [ { "id": 1, "category_id": 1, "name": "제품 A", "main_image_id": 10, "main_image_url": "main_image_url_1", "regular_price": 10000, "discount_rate": 5, "sale_price": 9500 }, { "id": 2, "category_id": 2, "name": "제품 B", "main_image_id": 11, "main_image_url": "main_image_url_2", "regular_price": 20000, "discount_rate": 10, "sale_price": 18000 }, ... ] } | | | | 제목 없음 (https://mkevin-study.notion.site/3f5b1937710549ae9788f6fa639eda40) | /api/products/search | GET | 요청 파라미터: keyword: string (required) - 검색할 상품명 sort: string (optional) - 정렬 기준 (신상품, 인기순, 낮은가격, 높은가격) 요청 URL 예시:GET /products/search?keyword=쿠션&sort=인기순 | { "status": "OK", "code": 200, "message": "상품 검색이 완료되었습니다.", "result": { "products": [ { "id": 19, "name": "Product 19", "category_id": 9, "main_image_id": 34, "main_image_url": "https://picsum.photos/200/300?random=33", "regular_price": 19000, "discount_rate": 22, "sale_price": 14820 }, { "id": 9, "name": "Product 9", "category_id": 9, "main_image_id": 9, "main_image_url": "https://picsum.photos/200/300?random=8", "regular_price": 9000, "discount_rate": 2, "sale_price": 8820 } ] } } | | | | 구매의뢰 및 제작의뢰 추가 | /api/requests/orders | POST | [ “user_id”: 유저PID, “category”: 카테고리, “request_type”: 의뢰서종류, “product_detail” :제품세부정보, “quantity”: 주문수량, “desired_estimate_date”: 견적수령희망일, “desired_delivery_date”: 물품수령희망일, “manager_name”: 담당자 이름, “manager_call”: 담당자 번호, “request”: 제품요청사항, “image” : 제품이미지 ] | status code | 의뢰요청서 insert시에 STATE_BY_ADMIN, STATE_BY_BUYER, STATE_BY_SELLER 컬럼은 빈값로 두겠습니다, | |

로그인/회원가입 관련 API

기능 URI METHOD Request body Response body 참고할 사항
로그인 /api/users/login POST [
“username”:username,
“password”:password status code
로그아웃 /api/users/logout GET bearer token에 담겨있는 access_token에 대한 로그아웃을 진행합니다. status Code
회원가입 /api/users/signup POST “post” : {
“username”: 아이디,
“password”: 비밀번호,
“password_confirm” : 비밀번호 확인,
“business_name”: 상호명,
“representative” : 대표자이름,
“business_number”: 사업자번호,
“postal_code”: 우편주소,
“address”, 주소
“business_registration_Image”: 사업자등록,
”manager”:담당자이름,
“manager_email”: 담당자 이메일,
“manager_phone_number”: 담당자 번호,
"terms_of_service": [true, true, true, false]
}

”image” : 이미지(사업자등록증)

// 보내주실 때 http://form.data 형태로 위의 내용은 json으로 아래는 File형태로 보내주실 수 있나요? | status code | 이미지 파일을 변환하지 않고 그대로 받고 싶은 | | 회원가입 시 이메일 중복 확인 및 인증 | /api/users/emailConfirm | POST | { "email": "mailto:[email protected]" } | //사용 가능 → 인증 { "status": "OK", "code": 200, "message": "88HjfYsj" }

//이미 가입된 메일 { "status": "ERROR", "code": 409, "message": "username already exists" } | | | 이메일 인증 번호 확인 | api/users/certificationNumberConfirm | POST | { "username": "mailto:[email protected]", "certification_number": "V759LB7A" } | { "status": "OK", "code": 200, "message": "인증번호가 일치합니다." }

{ "status": "OK", "code": 406, "message": "인증번호가 일치하지 않습니다." } | | | 회원정보조회 | 전체회원조회 /api/users | GET | 본인정보 조회의 경우 bearer token에 담겨있는 access_token 이 관리자일 경우에만 사용 가능 | status code [ “username”: 아이디, “password”: 비밀번호, “password_confirm” : 비밀번호 확인, “business_name”: 상호명, “representative” : 대표자이름, “business_number”: 사업자번호, “postal_code”: 우편주소, “address”, 주소 “business_registration”: 사업자등록, ”manager”:담당자이름, “manager_email”: 담당자 이메일, “manager_phone_number”: 담당자 번호 ] | | | 회원정보수정 | api/users | PATCH | { "password": "newpassword!@", "password_confirm": "newpassword!@", "business_name": "newBusinessName", "representative": "newrepresentative", "business_number": "newBusinessNumber", "postal_code": "new우편주소", "address": "new주소", "business_registration": "new사업자등록", "manager": "new담당자이름", "manager_email": "new 담당자 이메일", "manager_phone_number": "new담당자 번호" }

”image” : 이미지(사업자등록증; 변경없으면 안보내도됨)

// 보내주실 때 http://form.data 형태로 위의 내용은 json으로 아래는 File형태로 보내주실 수 있나요? | status code | | | refresh token 재발급 | api/users/refresh | GET | bearer token에 담겨있는 refresh_token에 대한 access token 재발급을 진행합니다. (refresh_token은 변경 X; 원하면 가능) | { "status": "OK", "code": 200, "message": "refresh success", "result": { "result": { "accessToken": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyQHVzZXIuY29tIiwicm9sZSI6IlJPTEVfVVNFUiIsImlkIjozLCJpYXQiOjE2ODQ2MTcwMzksImV4cCI6MTY4NDYyMDYzOX0.MtAR2zi_0Yeb86IOG5J09Df19oYKY-6SpIElmojQL5w", "refreshToken": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyQHVzZXIuY29tIiwiaWF0IjoxNjg0NjE3MDI5LCJleHAiOjE2ODUyMjE4Mjl9.HviSfr2xczO1GylqFw3HxR8rVkdz1rXcMQf-zjoc7uc" } } } | | | 회원정보수정용 로그인 사용자 정보 받기 | api/users/check | GET | bearer token에 담겨있는 access_token에 대한 사용자의 정보 조회를 진행합니다. | [ “username”: 아이디, “password”: 비밀번호, “password_confirm” : 비밀번호 확인, “business_name”: 상호명, “representative” : 대표자이름, “business_number”: 사업자번호, “postal_code”: 우편주소, “address”, 주소 “business_registration”: 사업자등록, ”manager”:담당자이름, “manager_email”: 담당자 이메일, “manager_phone_number”: 담당자 번호 ] | | | 회원탈퇴 | api/users | DELETE | bearer token에 담겨있는 access_token에 대한 회원탈퇴를 진행합니다. | status code | | | 아이디 찾기 | api/users/findEmail | POST | { "email": "mailto:[email protected]" } | //code로 구분해놨으니까 이부분으로 체크하시면 쉬우실듯?

{ "status": "OK", "code": 409, "message": "해당 이메일은 이미 사용중입니다." }

{ "status": "OK", "code": 410, "message": "해당 이메일은 존재하지 않습니다." } | 전화번호 인증은 유료서비스입니다. | | 비밀번호 찾기 | 이메일 인증 api/users/findPassword

| POST | { "username": "mailto:[email protected]" } | { "status": "OK", "code": 200, "message": "kGM3AiU0" } | | | 비밀번호 재설정 | /api/users/setNewPwd | POST | { "username": "mailto:[email protected]", "password": "abcdef", "password_confirm": "abcdef", ”certification_number”: “V759LB7A" } | { "status": "OK", "code": 200, "message": "비밀번호 재설정이 완료되었습니다." }

{ "status": "ERROR", "code": 400, "message": "아이디 또는 비밀번호가 올바르지 않습니다." } | |


장바구니 관련 API