HTTP Methods
-RESTful notes tries to adhere as closely as possible to standard HTTP and REST conventions in its use of HTTP verbs.
-Verb | -Usage | -
---|---|
|
-Used to retrieve a resource |
-
|
-Used to create a new resource |
-
|
-Used to update an existing resource, including partial updates |
-
|
-Used to delete an existing resource |
-
HTTP status codes
-RESTful notes tries to adhere as closely as possible to standard HTTP and REST conventions in its use of HTTP status codes.
-Status code | -Usage | -
---|---|
|
-The request completed successfully |
-
|
-A new resource has been created successfully.
-The resource’s URI is available from the response’s
- |
-
|
-An update to an existing resource has been applied successfully |
-
|
-The request was malformed. -The response body will include an error providing further information |
-
|
-The request has not been applied because it lacks valid authentication credentials for the target resource. |
-
|
-The server understood the request but refuses to authorize it. |
-
|
-The requested resource did not exist |
-
|
-The request could not be completed due to a conflict with the current state of the target resource. -This code is used in situations where the user might be able to resolve the conflict and resubmit the request. |
-
USER API
-1. CREATE USER
-회원가입
-1. Success
request-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-The user’s email address |
-
|
-
|
-The user’s password |
-
|
-
|
-The user’s nickname |
-
|
-
|
-The user’s phone |
-
Example request
-POST /users HTTP/1.1
-Content-Type: application/json
-Content-Length: 97
-Host: localhost:8080
-
-{"nickname":"17171771","email":"jungkh405@naver.com","password":"test1234","phone":"01012345678"}
-Example response
-HTTP/1.1 201 Created
--
2. Fail
request-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-로그인시 사용할 이메일 |
-
|
-
|
-8자 이상 20자 이하의 비밀번호 |
-
|
-
|
-닉네임 |
-
|
-
|
-휴대폰 번호 |
-
Example request
-POST /users HTTP/1.1
-Content-Type: application/json
-Content-Length: 97
-Host: localhost:8080
-
-{"nickname":"17171771","email":"jungkh405@naver.com","password":"test1234","phone":"01012345678"}
-Example response
-HTTP/1.1 409 Conflict
-Content-Type: text/plain;charset=UTF-8
-Content-Length: 29
-
-중복된 이메일입니다.
-- - | -
-이메일/닉네임 중복검사 후 회원가입 버튼 클릭시 중복 검사를 한번 더 진행합니다. -이메일 또는 닉네임 중복시 에러메시지와 함께 회원가입에 실패합니다. - |
-
-
이메일 중복 검사
-1. Success
Parameter | -Description | -
---|---|
|
-이메일 |
-
Example request
-GET /users/user-emails/jungkh405@naver.com/exists HTTP/1.1
-Host: localhost:8080
-Example response
-HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 5
-
-false
--
2. Fail
Parameter | -Description | -
---|---|
|
-이메일 |
-
Example request
-GET /users/user-emails/jungkh405@naver.com/exists HTTP/1.1
-Host: localhost:8080
-Example response
-HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 4
-
-true
-- - | --중복 검사 통과시 false , 중복 검사 실패시 true가 리턴됩니다. - | -
-
닉네임 중복 검사
-1. Success
Parameter | -Description | -
---|---|
|
-닉네임 |
-
Example request
-GET /users/user-nicknames/Lewandowski/exists HTTP/1.1
-Host: localhost:8080
-Example response
-HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 5
-
-false
--
2. Fail
Parameter | -Description | -
---|---|
|
-닉네임 |
-
Example request
-GET /users/user-nicknames/Lewandowski/exists HTTP/1.1
-Host: localhost:8080
-Example response
-HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 4
-
-true
-- - | --중복 검사 통과시 false , 중복 검사 실패시 true가 리턴됩니다. - | -
-
휴대폰 인증
-1. Send SMS
request-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-인증번호를 받을 휴대폰 번호 |
-
Example request
-POST /users/sms-certification/sends HTTP/1.1
-Content-Type: application/json
-Content-Length: 50
-Host: localhost:8080
-
-{"phone":"01012345678","certificationNumber":null}
-Example response
-HTTP/1.1 201 Created
--
2. Success : Authentication Successful
-request-fields
Path | -Type | -Description | -
---|---|---|
|
-
|
-인증번호를 받은 휴대폰 번호 |
-
|
-
|
-사용자가 입력한 인증번호 |
-
Example request
-POST /users/sms-certification/confirms HTTP/1.1
-Content-Type: application/json
-Content-Length: 54
-Host: localhost:8080
-
-{"phone":"01012345678","certificationNumber":"123456"}
-Example response
-HTTP/1.1 200 OK
--
3. Fail : Authentication failed
-request-fields
Path | -Type | -Description | -
---|---|---|
|
-
|
-인증번호를 받은 휴대폰 번호 |
-
|
-
|
-사용자가 입력한 인증번호 |
-
Example request
-POST /users/sms-certification/confirms HTTP/1.1
-Content-Type: application/json
-Content-Length: 54
-Host: localhost:8080
-
-{"phone":"01012345678","certificationNumber":"123456"}
-Example response
-HTTP/1.1 400 Bad Request
--
이메일 인증(토큰)
-1. Success : Authentication Successful
request-parameters
-Parameter | -Description | -
---|---|
|
-회원가입시 발송되는 랜덤 토큰 |
-
|
-회원가입시 입력한 이메일 |
-
Example request
-GET /users/email-check-token?token=8c34f255-34df-43a2-ae77-180630877df7&email=jungkh405%40naver.com HTTP/1.1
-Host: localhost:8080
-Example response
-HTTP/1.1 200 OK
--
2. Fail : Authentication failed
request-parameters
-Parameter | -Description | -
---|---|
|
-회원가입시 발송되는 랜덤 토큰 |
-
|
-회원가입시 입력한 이메일 |
-
Example request
-GET /users/email-check-token?token=ef6ae3ec-533d-45a4-a53a-fe37fee18c8a&email=jungkh405%40naver.com HTTP/1.1
-Host: localhost:8080
-Example response
-HTTP/1.1 401 Unauthorized
-Content-Type: text/plain;charset=UTF-8
-Content-Length: 116
-
-인증 토큰이 만료되었습니다. 마이페이지에서 인증 토큰 재전송 버튼을 클릭해 주세요!
--
3. resend
Example request
-POST /users/resend-email-token HTTP/1.1
-Host: localhost:8080
-Example response
-HTTP/1.1 200 OK
-- - | --회원가입시 입력한 이메일로 인증 토큰이 전송됩니다. 해당 토큰은 24시간동안 유효하며, 24시간이 경과되었을 경우 토큰 재전송 요청을 진행해야 합니다. - | -
-
2. login / logout
-로그인
-1. Success
request-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-login ID (email) |
-
|
-
|
-password |
-
|
-
|
-FCM token |
-
Example request
-POST /users/login HTTP/1.1
-Content-Type: application/json
-Content-Length: 64
-Host: localhost:8080
-
-{"email":"test@test.com","password":"test1234","token":"abc123"}
-Example response
-HTTP/1.1 200 OK
--
2. Failed
request-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-login ID (email) |
-
|
-
|
-password |
-
|
-
|
-FCM token |
-
Example request
-POST /users/login HTTP/1.1
-Content-Type: application/json
-Content-Length: 64
-Host: localhost:8080
-
-{"email":"test@test.com","password":"test1234","token":"abc123"}
-Example response
-HTTP/1.1 404 Not Found
-Content-Type: text/plain;charset=UTF-8
-Content-Length: 72
-
-가입하지 않은 아이디이거나, 잘못된 비밀번호입니다.
--
로그아웃
-1. Success
Example request
-DELETE /users/logout HTTP/1.1
-Host: localhost:8080
-Example response
-HTTP/1.1 200 OK
--
3. 비밀번호 찾기
-회원 리소스
-1. successful get resource
Parameter | -Description | -
---|---|
|
-이메일 |
-
Example request
-GET /users/find/jungkh405@naver.com HTTP/1.1
-Host: localhost:8080
-Example response
-HTTP/1.1 200 OK
-Content-Disposition: inline;filename=f.txt
-Content-Type: application/json
-Content-Length: 53
-
-{"email":"jungkh405@naver.com","phone":"01012345678"}
--
2. Failed to get resources
Parameter | -Description | -
---|---|
|
-이메일 |
-
Example request
-GET /users/find/jungkh405@naver.com HTTP/1.1
-Host: localhost:8080
-Example response
-HTTP/1.1 404 Not Found
-Content-Disposition: inline;filename=f.txt
-Content-Type: text/plain;charset=UTF-8
-Content-Length: 72
-
-가입하지 않은 아이디이거나, 잘못된 비밀번호입니다.
--
휴대폰 인증
-1. Send SMS
request-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-인증번호를 받을 휴대폰 번호 |
-
Example request
-POST /users/sms-certification/sends HTTP/1.1
-Content-Type: application/json
-Content-Length: 50
-Host: localhost:8080
-
-{"phone":"01012345678","certificationNumber":null}
-Example response
-HTTP/1.1 201 Created
--
2. Success : Authentication Successful
-request-fields
Path | -Type | -Description | -
---|---|---|
|
-
|
-인증번호를 받은 휴대폰 번호 |
-
|
-
|
-사용자가 입력한 인증번호 |
-
Example request
-POST /users/sms-certification/confirms HTTP/1.1
-Content-Type: application/json
-Content-Length: 54
-Host: localhost:8080
-
-{"phone":"01012345678","certificationNumber":"123456"}
-Example response
-HTTP/1.1 200 OK
--
3. Fail : Authentication failed
-request-fields
Path | -Type | -Description | -
---|---|---|
|
-
|
-인증번호를 받은 휴대폰 번호 |
-
|
-
|
-사용자가 입력한 인증번호 |
-
Example request
-POST /users/sms-certification/confirms HTTP/1.1
-Content-Type: application/json
-Content-Length: 54
-Host: localhost:8080
-
-{"phone":"01012345678","certificationNumber":"123456"}
-Example response
-HTTP/1.1 400 Bad Request
--
이메일 인증
-1. Send Email
request-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-인증번호를 받을 이메일 |
-
Example request
-POST /users/email-certification/sends HTTP/1.1
-Content-Type: application/json
-Content-Length: 58
-Host: localhost:8080
-
-{"email":"jungkh405@naver.com","certificationNumber":null}
-Example response
-HTTP/1.1 201 Created
--
2. Success : Authentication Successful
-request-fields
Path | -Type | -Description | -
---|---|---|
|
-
|
-비밀번호 찾기를 원하는 이메일 |
-
|
-
|
-사용자가 입력한 인증번호 |
-
Example request
-POST /users/email-certification/confirms HTTP/1.1
-Content-Type: application/json
-Content-Length: 62
-Host: localhost:8080
-
-{"email":"jungkh405@naver.com","certificationNumber":"123456"}
-Example response
-HTTP/1.1 200 OK
--
3. Fail : Authentication failed
-request-fields
Path | -Type | -Description | -
---|---|---|
|
-
|
-비밀번호 찾기를 원하는 이메일 |
-
|
-
|
-사용자가 입력한 인증번호 |
-
Example request
-POST /users/email-certification/confirms HTTP/1.1
-Content-Type: application/json
-Content-Length: 62
-Host: localhost:8080
-
-{"email":"jungkh405@naver.com","certificationNumber":"123456"}
-Example response
-HTTP/1.1 400 Bad Request
-- - | -
-비밀번호 분실시 이메일 또는 휴대폰중 하나를 선택하여 인증을 진행한 후 비밀번호를 변경할 수 있습니다. -인증 번호는 10분동안 유효하며, 10분이 경과되면 자동으로 Redis 메모리에서 삭제됩니다. - |
-
-
4. 회원 정보 수정
-닉네임 변경
-1. Success
request-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-새로운 닉네임 |
-
Example request
-PATCH /users/nickname HTTP/1.1
-Content-Type: application/json
-Content-Length: 71
-Host: localhost:8080
-
-{"nickname":"newNickname123","email":null,"password":null,"phone":null}
-Example response
-HTTP/1.1 200 OK
--
2. Failed
request-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-새로운 닉네임 |
-
Example request
-PATCH /users/nickname HTTP/1.1
-Content-Type: application/json
-Content-Length: 71
-Host: localhost:8080
-
-{"nickname":"newNickname123","email":null,"password":null,"phone":null}
-Example response
-HTTP/1.1 400 Bad Request
-Content-Type: text/plain;charset=UTF-8
-Content-Length: 57
-
-닉네임은 7일에 한번만 변경이 가능합니다.
-- - | --닉네임은 7일에 한번만 변경이 가능합니다. 중복 검사를 통과하고 변경한지 7일이 초과되었을 경우에만 닉네임 변경에 성공합니다. - | -
-
비밀번호 변경
-1. Success
request-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-비밀번호 변경을 원하는 회원 ID(email |
-
|
-
|
-변경할 비밀번호 |
-
|
-
|
-이전 비밀번호 |
-
Example request
-PATCH /users/password HTTP/1.1
-Content-Type: application/json
-Content-Length: 94
-Host: localhost:8080
-
-{"email":"jungkh405@naver.com","passwordAfter":"test12345","passwordBefore":"newPassword1234"}
-Example response
-HTTP/1.1 200 OK
--
2. Failed
request-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-비밀번호 변경을 원하는 회원 ID(email |
-
|
-
|
-변경할 비밀번호 |
-
|
-
|
-이전 비밀번호 |
-
Example request
-PATCH /users/password HTTP/1.1
-Content-Type: application/json
-Content-Length: 94
-Host: localhost:8080
-
-{"email":"jungkh405@naver.com","passwordAfter":"test12345","passwordBefore":"newPassword1234"}
-Example response
-HTTP/1.1 401 Unauthorized
-Content-Type: text/plain;charset=UTF-8
-Content-Length: 35
-
-비밀번호를 확인해주세요.
--
환급 계좌 설정
-1. get resource
Example request
-GET /users/account HTTP/1.1
-Content-Type: application/json
-Host: localhost:8080
-Example response
-HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 75
-
-{"bankName":"농협","accountNumber":"35212345678","depositor":"정기혁"}
-response-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-은행명 |
-
|
-
|
-계좌 번호 |
-
|
-
|
-예금주 |
-
-
2. Successful : Modification
request-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-은행명 |
-
|
-
|
-계좌 번호 |
-
|
-
|
-예금주 |
-
Example request
-PATCH /users/account HTTP/1.1
-Content-Type: application/json
-Content-Length: 75
-Host: localhost:8080
-
-{"bankName":"농협","accountNumber":"35212345678","depositor":"정기혁"}
-Example response
-HTTP/1.1 200 OK
--
주소록 설정
-1. Successful : add
request-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-주소록 이름 |
-
|
-
|
-도로명 주소 |
-
|
-
|
-상세 주소 |
-
|
-
|
-우편번호 |
-
Example request
-POST /users/addressBook HTTP/1.1
-Content-Type: application/json
-Content-Length: 121
-Host: localhost:8080
-
-{"id":1,"addressName":"새 집","roadNameAddress":"새집로 123","detailedAddress":"789동 123호","postalCode":"23456"}
-Example response
-HTTP/1.1 200 OK
--
2. Successful : delete
request-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-삭제할 주소의 ID[PK] |
-
Example request
-DELETE /users/addressBook HTTP/1.1
-Content-Type: application/json
-Content-Length: 8
-Host: localhost:8080
-
-{"id":2}
-Example response
-HTTP/1.1 200 OK
--
3. Successful : Modification
-request-fields
Path | -Type | -Description | -
---|---|---|
|
-
|
-ID |
-
|
-
|
-주소록 이름 |
-
|
-
|
-도로명 주소 |
-
|
-
|
-상세 주소 |
-
|
-
|
-우편번호 |
-
Example request
-PATCH /users/addressBook HTTP/1.1
-Content-Type: application/json
-Content-Length: 121
-Host: localhost:8080
-
-{"id":1,"addressName":"새 집","roadNameAddress":"새집로 123","detailedAddress":"789동 123호","postalCode":"23456"}
-Example response
-HTTP/1.1 200 OK
--
5. 마이페이지
-1. Success : get my-infos resource
Example request
-GET /users/my-infos HTTP/1.1
-Content-Type: application/json
-Host: localhost:8080
-Example response
-HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 96
-
-{"email":"jungkh405@naver.com","nickname":"17171771","phone":"01012345678","userLevel":"UNAUTH"}
-response-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-회원 이메일 |
-
|
-
|
-회원 닉네임 |
-
|
-
|
-회원 휴대폰 번호 |
-
|
-
|
-이메일 인증 여부 |
-
- - | --현재 로그인되어있는 사용자의 my-infos 리소스를 가져옵니다. - | -
-
PRODUCT API
-1. 상품 관련 조회
--
상품 정보 조회
-curl
-$ curl 'http://localhost:8080/products/1' -i -X GET \
- -H 'Accept: application/json'
-path-parameters
-Parameter | -Description | -
---|---|
|
-조회할 상품의 ID |
-
response-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-조회한 상품의 ID |
-
|
-
|
-조회한 상품의 한글명 |
-
|
-
|
-조회한 상품의 영문명 |
-
|
-
|
-조회한 상품의 모델 넘버 |
-
|
-
|
-조회한 상품의 색상 |
-
|
-
|
-조회한 상품의 출시일 |
-
|
-
|
-조회한 상품의 출시가 |
-
|
-
|
-조회한 상품의 발매 통화 |
-
|
-
|
-조회한 상품의 사이즈 분류 |
-
|
-
|
-조회한 상품의 사이즈 단위 |
-
|
-
|
-조회한 상품의 최소 사이즈 |
-
|
-
|
-조회한 상품의 최대 사이즈 |
-
|
-
|
-조회한 상품의 사이즈 간격 |
-
|
-
|
-조회한 상품의 브랜드 |
-
|
-
|
-조회한 상품의 이미지 경로 |
-
|
-
|
-판매 입찰 ID |
-
|
-
|
-판매 입찰 productID |
-
|
-
|
-판매 입찰 물품 사이즈 |
-
|
-
|
-판매 입찰 물품 가격 |
-
|
-
|
-구매 입찰 ID |
-
|
-
|
-구매 입찰 productId |
-
|
-
|
-구매 입찰 물품 사이즈 |
-
|
-
|
-구매 입찰 물품 가격 |
-
|
-
|
-완료된 거래의 물품 사이즈 |
-
|
-
|
-완료된 거래의 물품 가격 |
-
|
-
|
-거래 완료 시간 |
-
Example request
-GET /products/1 HTTP/1.1
-Accept: application/json
-Host: localhost:8080
-Example response
-HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 876
-
-{"id":1,"nameKor":"덩크 로우","nameEng":"Dunk Low","modelNumber":"DD1391-100","color":"WHITE/BLACK","releaseDate":"2021-01-04","releasePrice":119000,"currency":"KRW","sizeClassification":"MENS","sizeUnit":"MM","minSize":240.0,"maxSize":320.0,"sizeGap":5.0,"resizedImagePath":"https://shoeauction-brands-resized.s3.ap-northeast-2.amazonaws.com/brand.png","brand":{"id":null,"nameKor":"나이키","nameEng":"Nike","originImagePath":"https://shoeauction-brands-origin.s3.ap-northeast-2.amazonaws.com/brand.png","thumbnailImagePath":"https://shoeauction-brands-thumbnail.s3.ap-northeast-2.amazonaws.com/brand.png"},"saleBids":[{"tradeId":5,"productId":1,"productSize":260.0,"price":200000}],"purchaseBids":[{"tradeId":5,"productId":1,"productSize":260.0,"price":300000}],"tradeCompleteInfos":[{"productSize":280.0,"price":300000,"completeTime":"2021-05-21T16:33:18.7126656"}]}
--
조건 별 상품 전체 조회
-curl
-$ curl 'http://localhost:8080/products?brandId=1&keyword=ka&orderStandard=LOW_PRICE' -i -X GET \
- -H 'Accept: application/json'
-request-parameters
-Parameter | -Description | -
---|---|
|
-조회할 상품 썸네일의 브랜드 ID |
-
|
-조회할 상품의 검색 키워드 |
-
|
-조회할 상품의 정렬 조건 |
-
response-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-조회한 상품의 ID |
-
|
-
|
-조회한 상품의 썸네일 이미지 경로 |
-
|
-
|
-조회한 상품의 브랜드 썸네일 이미지 경로 |
-
|
-
|
-조회한 상품의 한글명 |
-
|
-
|
-조회한 상품의 영문명 |
-
|
-
|
-조회한 상품의 즉시 구매 최저가 |
-
Example request
-GET /products?brandId=1&keyword=ka&orderStandard=LOW_PRICE HTTP/1.1
-Accept: application/json
-Host: localhost:8080
-Example response
-HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 606
-
-{"content":[{"id":99,"productThumbnailImagePath":"https://shoeauction-products-thumbnail.s3.ap-northeast-2.amazonaws.com/product.png","brandThumbnailImagePath":"https://shoeauction-brands-thumbnail.s3.ap-northeast-2.amazonaws.com/brand.png","nameKor":"사카이","nameEng":"Sakai","lowestPrice":500000}],"pageable":{"sort":{"sorted":false,"unsorted":true,"empty":true},"offset":0,"pageNumber":0,"pageSize":10,"unpaged":false,"paged":true},"last":true,"totalElements":1,"totalPages":1,"size":10,"number":0,"sort":{"sorted":false,"unsorted":true,"empty":true},"numberOfElements":1,"first":true,"empty":false}
--
상품 통화 단위 목록 조회
-curl
-$ curl 'http://localhost:8080/products/currencies' -i -X GET
-response-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-상품의 통화 단위 목록 |
-
Example request
-GET /products/currencies HTTP/1.1
-Host: localhost:8080
-Example response
-HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 25
-
-["KRW","USD","EUR","JPY"]
--
상품 사이즈 분류 목록 조회
-curl
-$ curl 'http://localhost:8080/products/size-classifications' -i -X GET
-response-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-상품의 사이즈 분류 목록 |
-
Example request
-GET /products/size-classifications HTTP/1.1
-Host: localhost:8080
-Example response
-HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 30
-
-["MENS","WMNS","GS","PS","TD"]
--
상품 사이즈 단위 목록 조회
-curl
-$ curl 'http://localhost:8080/products/size-units' -i -X GET
-response-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-상품의 사이즈 단위 목록 |
-
Example request
-GET /products/size-units HTTP/1.1
-Host: localhost:8080
-Example response
-HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 21
-
-["MM","US","UK","EU"]
--
상품 정렬 기준 목록 조회
-curl
-$ curl 'http://localhost:8080/products/order-standards' -i -X GET
-response-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-상품의 정렬 기준 목록 |
-
Example request
-GET /products/order-standards HTTP/1.1
-Host: localhost:8080
-Example response
-HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 41
-
-["LOW_PRICE","HIGH_PRICE","RELEASE_DATE"]
--
2. 상품 추가
-curl
-$ curl 'http://localhost:8080/products' -i -X POST \
- -H 'Content-Type: multipart/form-data;charset=utf-8' \
- -H 'Accept: application/json' \
- -F 'requestDto=@requestDto;type=application/json' \
- -F 'productImage=@productImage;type=image/png'
-request-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-저장할 상품의 한글명 |
-
|
-
|
-저장할 상품의 영문명 |
-
|
-
|
-저장할 상품의 모델 넘버 |
-
|
-
|
-저장할 상품의 색상 |
-
|
-
|
-저장할 상품의 발매일 |
-
|
-
|
-저장할 상품의 발매가 |
-
|
-
|
-저장할 상품의 발매 통화 |
-
|
-
|
-저장할 상품의 사이즈 분류 |
-
|
-
|
-저장할 상품의 사이즈 단위 |
-
|
-
|
-저장할 상품의 최소 사이즈 |
-
|
-
|
-저장할 상품의 최대 사이즈 |
-
|
-
|
-저장할 상품의 사이즈 간격 |
-
|
-
|
-저장할 상품의 브랜드 |
-
Example request
-POST /products HTTP/1.1
-Content-Type: multipart/form-data;charset=utf-8; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
-Accept: application/json
-Host: localhost:8080
-
---6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
-Content-Disposition: form-data; name=requestDto; filename=requestDto
-Content-Type: application/json
-
-{"nameKor":"덩크 로우","nameEng":"Dunk Low","modelNumber":"DD1391-100","color":"WHITE/BLACK","releaseDate":"2021-01-04","releasePrice":119000,"currency":"KRW","sizeClassification":"MENS","sizeUnit":"MM","minSize":240.0,"maxSize":320.0,"sizeGap":5.0,"brand":{"id":null,"nameKor":"나이키","nameEng":"Nike","originImagePath":"https://shoeauction-brands-origin.s3.ap-northeast-2.amazonaws.com/brand.png","thumbnailImagePath":"https://shoeauction-brands-thumbnail.s3.ap-northeast-2.amazonaws.com/brand.png"},"originImagePath":"https://shoeauction-brands-origin.s3.ap-northeast-2.amazonaws.com/brand.png","thumbnailImagePath":null,"resizedImagePath":null}
---6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
-Content-Disposition: form-data; name=productImage; filename=productImage
-Content-Type: image/png
-
-sample
---6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm--
-Example response
-HTTP/1.1 201 Created
--
3. 상품 정보 수정
-curl
-$ curl 'http://localhost:8080/products/1' -i -X PATCH \
- -H 'Content-Type: multipart/form-data;charset=utf-8' \
- -H 'Accept: application/json' \
- -F 'requestDto=@requestDto;type=application/json' \
- -F 'productImage=@productImage;type=image/png'
-request-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-수정할 상품의 한글명 |
-
|
-
|
-수정할 상품의 영문명 |
-
|
-
|
-수정할 상품의 모델 넘버 |
-
|
-
|
-수정할 상품의 색상 |
-
|
-
|
-수정할 상품의 발매일 |
-
|
-
|
-수정할 상품의 발매가 |
-
|
-
|
-수정할 상품의 발매 통화 |
-
|
-
|
-수정할 상품의 사이즈 분류 |
-
|
-
|
-수정할 상품의 사이즈 단위 |
-
|
-
|
-수정할 상품의 최소 사이즈 |
-
|
-
|
-수정할 상품의 최대 사이즈 |
-
|
-
|
-수정할 상품의 사이즈 간격 |
-
|
-
|
-수정할 상품의 브랜드 |
-
|
-
|
-기존 상품 원본 이미지 경로(null이라면 기존 이미지 삭제) |
-
Example request
-PATCH /products/1 HTTP/1.1
-Content-Type: multipart/form-data;charset=utf-8; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
-Accept: application/json
-Host: localhost:8080
-Example response
-HTTP/1.1 200 OK
--
4. 상품 삭제
-curl
-$ curl 'http://localhost:8080/products/1' -i -X DELETE
-path-parameters
-Parameter | -Description | -
---|---|
|
-삭제할 상품의 ID |
-
Example request
-DELETE /products/1 HTTP/1.1
-Host: localhost:8080
-Example response
-HTTP/1.1 200 OK
-BRAND API
-1. 브랜드 조회
-특정 브랜드 조회
-curl
-$ curl 'http://localhost:8080/brands/1' -i -X GET \
- -H 'Accept: application/json'
-response-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-브랜드 ID |
-
|
-
|
-브랜드 한글명 |
-
|
-
|
-브랜드 영문명 |
-
|
-
|
-브랜드 원본 이미지 경로 |
-
|
-
|
-브랜드 썸네일 이미지 경로 |
-
Example request
-GET /brands/1 HTTP/1.1
-Accept: application/json
-Host: localhost:8080
-Example response
-HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 247
-
-{"id":1,"nameKor":"나이키","nameEng":"Nike","originImagePath":"https://shoeauction-brands-origin.s3.ap-northeast-2.amazonaws.com/sample.png","thumbnailImagePath":"https://shoeauction-brands-thumbnail.s3.ap-northeast-2.amazonaws.com/sample.png"}
--
브랜드 전체 조회
-curl
-$ curl 'http://localhost:8080/brands' -i -X GET \
- -H 'Accept: application/json'
-response-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-브랜드 정보 배열 |
-
|
-
|
-브랜드 ID |
-
|
-
|
-브랜드 한글명 |
-
|
-
|
-브랜드 영문명 |
-
|
-
|
-브랜드 원본 이미지 경로 |
-
|
-
|
-브랜드 썸네일 이미지 경로 |
-
Example request
-GET /brands HTTP/1.1
-Accept: application/json
-Host: localhost:8080
-Example response
-HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 504
-
-[{"id":1,"nameKor":"나이키","nameEng":"Nike","originImagePath":"https://shoeauction-brands-origin.s3.ap-northeast-2.amazonaws.com/sample.png","thumbnailImagePath":"https://shoeauction-brands-thumbnail.s3.ap-northeast-2.amazonaws.com/sample.png"},{"id":2,"nameKor":"아디다스","nameEng":"Adidas","originImagePath":"https://shoeauction-brands-origin.s3.ap-northeast-2.amazonaws.com/sample2.png","thumbnailImagePath":"https://shoeauction-brands-thumbnail.s3.ap-northeast-2.amazonaws.com/sample2.png"}]
--
2. 브랜드 생성
-curl
-$ curl 'http://localhost:8080/brands' -i -X POST \
- -H 'Content-Type: multipart/form-data;charset=utf-8' \
- -H 'Accept: application/json' \
- -F 'requestDto=@requestDto;type=application/json' \
- -F 'brandImage=@brandImage;type=image/png'
-request-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-저장할 브랜드의 한글명 |
-
|
-
|
-저장할 브랜드의 영문명 |
-
request-parts(Optional)
-Part | -Description | -
---|---|
|
-저장할 브랜드의 이미지 파일 |
-
Example request
-POST /brands HTTP/1.1
-Content-Type: multipart/form-data;charset=utf-8; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
-Accept: application/json
-Host: localhost:8080
-
---6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
-Content-Disposition: form-data; name=requestDto; filename=requestDto
-Content-Type: application/json
-
-{"nameKor":"나이키","nameEng":"Nike","originImagePath":null,"thumbnailImagePath":null}
---6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
-Content-Disposition: form-data; name=brandImage; filename=brandImage
-Content-Type: image/png
-
-sample
---6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm--
-Example response
-HTTP/1.1 201 Created
--
3. 브랜드 수정
-curl
-$ curl 'http://localhost:8080/brands/1' -i -X PATCH \
- -H 'Content-Type: multipart/form-data;charset=utf-8' \
- -H 'Accept: application/json' \
- -F 'requestDto=@requestDto;type=application/json' \
- -F 'brandImage=@brandImage;type=image/png'
-request-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-수정할 브랜드의 한글명 |
-
|
-
|
-수정할 브랜드의 영문명 |
-
|
-
|
-기존 브랜드 원본 이미지 경로(null이라면 기존 이미지 삭제) |
-
Example request
-PATCH /brands/1 HTTP/1.1
-Content-Type: multipart/form-data;charset=utf-8; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
-Accept: application/json
-Host: localhost:8080
-Example response
-HTTP/1.1 200 OK
--
4. 브랜드 삭제
-curl
-$ curl 'http://localhost:8080/brands/1' -i -X DELETE
-path-parameters
-Parameter | -Description | -
---|---|
|
-삭제할 브랜드의 ID |
-
Example request
-DELETE /brands/1 HTTP/1.1
-Host: localhost:8080
-Example response
-HTTP/1.1 200 OK
--
TRADE API
--
입찰 등록시 필요한 정보 조회
-curl
-$ curl 'http://localhost:8080/trades/1?size=260.0' -i -X GET \
- -H 'Accept: application/json'
-path-parameters
-Parameter | -Description | -
---|---|
|
-물품 ID[PK] |
-
request-parameters
-Parameter | -Description | -
---|---|
|
-신발 사이즈 |
-
example request
-GET /trades/1?size=260.0 HTTP/1.1
-Accept: application/json
-Host: localhost:8080
-Example response
-HTTP/1.1 200 OK
-HTTP/1.1 200 OK
--
판매 입찰 등록
-curl
-$ curl 'http://localhost:8080/trades/sell/bid' -i -X POST \
- -H 'Content-Type: application/json' \
- -d '{"price":200000,"productSize":260.0,"productId":1,"addressId":4}'
-request-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-입찰 가격 |
-
|
-
|
-신발 사이즈 |
-
|
-
|
-물품 ID |
-
|
-
|
-반송 주소 |
-
example request
-POST /trades/sell/bid HTTP/1.1
-Content-Type: application/json
-Content-Length: 64
-Host: localhost:8080
-
-{"price":200000,"productSize":260.0,"productId":1,"addressId":4}
-example response
-HTTP/1.1 201 Created
--
구매 입찰 등록
-curl
-$ curl 'http://localhost:8080/trades/buy/bid' -i -X POST \
- -H 'Content-Type: application/json' \
- -d '{"price":180000,"productSize":260.0,"productId":1,"addressId":4}'
-request-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-입찰 가격 |
-
|
-
|
-신발 사이즈 |
-
|
-
|
-물품 ID |
-
|
-
|
-반송 주소 |
-
example request
-POST /trades/buy/bid HTTP/1.1
-Content-Type: application/json
-Content-Length: 64
-Host: localhost:8080
-
-{"price":180000,"productSize":260.0,"productId":1,"addressId":4}
-example response
-HTTP/1.1 201 Created
--
즉시 판매
-curl
-$ curl 'http://localhost:8080/trades/sell' -i -X POST \
- -H 'Content-Type: application/json' \
- -d '{"tradeId":11,"addressId":2,"productId":1}'
-request-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-Trade ID |
-
|
-
|
-반송 주소 ID |
-
|
-
|
-Product ID |
-
example request
-POST /trades/sell HTTP/1.1
-Content-Type: application/json
-Content-Length: 42
-Host: localhost:8080
-
-{"tradeId":11,"addressId":2,"productId":1}
-example response
-HTTP/1.1 200 OK
--
즉시 구매
-curl
-$ curl 'http://localhost:8080/trades/buy' -i -X POST \
- -H 'Content-Type: application/json' \
- -d '{"tradeId":11,"addressId":2,"productId":1}'
-request-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-Trade ID |
-
|
-
|
-배송지 ID |
-
|
-
|
-Product ID |
-
example request
-POST /trades/buy HTTP/1.1
-Content-Type: application/json
-Content-Length: 42
-Host: localhost:8080
-
-{"tradeId":11,"addressId":2,"productId":1}
-example response
-HTTP/1.1 200 OK
--
입찰 내역 삭제
-curl
-$ curl 'http://localhost:8080/trades' -i -X DELETE \
- -H 'Content-Type: application/json' \
- -d '{"tradeId":11,"price":null}'
-request-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-Trade ID |
-
example request
-DELETE /trades HTTP/1.1
-Content-Type: application/json
-Content-Length: 27
-Host: localhost:8080
-
-{"tradeId":11,"price":null}
-example response
-HTTP/1.1 200 OK
--
입고 운송장 번호 입력
-curl
-$ curl 'http://localhost:8080/trades/1/receiving-tracking-number' -i -X PATCH \
- -H 'Content-Type: application/json' \
- -d '{"trackingNumber":"1234567890"}'
-path-parameters
-Parameter | -Description | -
---|---|
|
-운송장을 등록할 거래 ID |
-
request-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-등록할 입고 운송장 번호 |
-
example request
-PATCH /trades/1/receiving-tracking-number HTTP/1.1
-Content-Type: application/json
-Content-Length: 31
-Host: localhost:8080
-
-{"trackingNumber":"1234567890"}
-example response
-HTTP/1.1 200 OK
--
입고 확인
-curl
-$ curl 'http://localhost:8080/trades/1/warehousing' -i -X PATCH
-path-parameters
-Parameter | -Description | -
---|---|
|
-입고 완료 처리할 거래 ID |
-
example request
-PATCH /trades/1/warehousing HTTP/1.1
-Host: localhost:8080
-example response
-HTTP/1.1 200 OK
--
검수 적합 처리
-curl
-$ curl 'http://localhost:8080/trades/1/inspection-successful' -i -X PATCH
-path-parameters
-Parameter | -Description | -
---|---|
|
-검수 완료 처리할 거래 ID |
-
example request
-PATCH /trades/1/inspection-successful HTTP/1.1
-Host: localhost:8080
-example response
-HTTP/1.1 200 OK
--
검수 부적합 처리
-curl
-$ curl 'http://localhost:8080/trades/1/inspection-failed' -i -X PATCH \
- -H 'Content-Type: application/json' \
- -d '{"reason":"가죽 손상"}'
-path-parameters
-Parameter | -Description | -
---|---|
|
-검수 부적합 처리할 거래 ID |
-
request-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-검수 부적합 사유 |
-
example request
-PATCH /trades/1/inspection-failed HTTP/1.1
-Content-Type: application/json
-Content-Length: 26
-Host: localhost:8080
-
-{"reason":"가죽 손상"}
-example response
-HTTP/1.1 200 OK
--
반품 운송장 번호 입력
-curl
-$ curl 'http://localhost:8080/trades/1/return-tracking-number' -i -X PATCH \
- -H 'Content-Type: application/json' \
- -d '{"trackingNumber":"1234567890"}'
-path-parameters
-Parameter | -Description | -
---|---|
|
-운송장을 등록할 거래 ID |
-
example request
-PATCH /trades/1/return-tracking-number HTTP/1.1
-Content-Type: application/json
-Content-Length: 31
-Host: localhost:8080
-
-{"trackingNumber":"1234567890"}
-example response
-HTTP/1.1 200 OK
--
출고 운송장 번호 입력
-curl
-$ curl 'http://localhost:8080/trades/1/forwarding-tracking-number' -i -X PATCH \
- -H 'Content-Type: application/json' \
- -d '{"trackingNumber":"1234567890"}'
-path-parameters
-Parameter | -Description | -
---|---|
|
-운송장을 등록할 거래 ID |
-
example request
-PATCH /trades/1/forwarding-tracking-number HTTP/1.1
-Content-Type: application/json
-Content-Length: 31
-Host: localhost:8080
-
-{"trackingNumber":"1234567890"}
-example response
-HTTP/1.1 200 OK
--
거래 완료
-curl
-$ curl 'http://localhost:8080/trades/1/purchase-confirmation' -i -X PATCH
-path-parameters
-Parameter | -Description | -
---|---|
|
-거래 완료 처리할 거래 ID |
-
example request
-PATCH /trades/1/purchase-confirmation HTTP/1.1
-Host: localhost:8080
-example response
-HTTP/1.1 200 OK
--
거래 검색
-curl
-$ curl 'http://localhost:8080/trades?sellersEmail=test123%40test.com' -i -X GET \
- -H 'Content-Type: application/json'
-request-parameters
-Parameter | -Description | -
---|---|
|
-판매자 로그인 eamil |
-
response-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-ID |
-
|
-
|
-
example request
-GET /trades?sellersEmail=test123%40test.com HTTP/1.1
-Content-Type: application/json
-Host: localhost:8080
-example response
-HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 350
-
-{"content":[{"id":2,"status":"TRADE_COMPLETE"}],"pageable":{"sort":{"sorted":false,"unsorted":true,"empty":true},"pageSize":10,"pageNumber":0,"offset":0,"unpaged":false,"paged":true},"last":true,"totalPages":1,"totalElements":1,"first":true,"numberOfElements":1,"size":10,"number":0,"sort":{"sorted":false,"unsorted":true,"empty":true},"empty":false}
-ADMIN API
--
회원 전체 조회
-curl
-$ curl 'http://localhost:8080/admin/users' -i -X GET \
- -H 'Accept: application/json'
-response-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-ID |
-
|
-
|
-|
|
-
|
-userLevel |
-
example request
-GET /admin/users HTTP/1.1
-Accept: application/json
-Host: localhost:8080
-example response
-HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 433
-
-{"content":[{"id":0,"email":"jungkh405@naver.com0","userLevel":"AUTH"},{"id":1,"email":"jungkh405@naver.com1","userLevel":"AUTH"}],"pageable":{"sort":{"sorted":false,"unsorted":true,"empty":true},"offset":0,"pageNumber":0,"pageSize":10,"paged":true,"unpaged":false},"last":true,"totalPages":1,"totalElements":2,"size":10,"number":0,"sort":{"sorted":false,"unsorted":true,"empty":true},"first":true,"numberOfElements":2,"empty":false}
--
회원 조회(IDX)
-curl
-$ curl 'http://localhost:8080/admin/users?id=1' -i -X GET \
- -H 'Accept: application/json'
-request-parameters
-Parameter | -Description | -
---|---|
|
-검색할 회원의 ID[PK] |
-
response-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-ID |
-
|
-
|
-
example request
-GET /admin/users?id=1 HTTP/1.1
-Accept: application/json
-Host: localhost:8080
-example response
-HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 433
-
-{"content":[{"id":0,"email":"jungkh405@naver.com0","userLevel":"AUTH"},{"id":1,"email":"jungkh405@naver.com1","userLevel":"AUTH"}],"pageable":{"sort":{"unsorted":true,"sorted":false,"empty":true},"offset":0,"pageSize":10,"pageNumber":0,"unpaged":false,"paged":true},"last":true,"totalElements":2,"totalPages":1,"size":10,"number":0,"sort":{"unsorted":true,"sorted":false,"empty":true},"numberOfElements":2,"first":true,"empty":false}
--
회원 조회(User Level)
-curl
-$ curl 'http://localhost:8080/admin/users?userLevel=AUTH' -i -X GET \
- -H 'Accept: application/json'
-request-parameters
-Parameter | -Description | -
---|---|
|
-검색할 회원의 userLevel |
-
response-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-ID |
-
|
-
|
-|
|
-
|
-userLevel |
-
example request
-GET /admin/users?userLevel=AUTH HTTP/1.1
-Accept: application/json
-Host: localhost:8080
-example response
-HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 433
-
-{"content":[{"id":0,"email":"jungkh405@naver.com0","userLevel":"AUTH"},{"id":1,"email":"jungkh405@naver.com1","userLevel":"AUTH"}],"pageable":{"sort":{"sorted":false,"unsorted":true,"empty":true},"offset":0,"pageNumber":0,"pageSize":10,"paged":true,"unpaged":false},"last":true,"totalPages":1,"totalElements":2,"size":10,"number":0,"sort":{"sorted":false,"unsorted":true,"empty":true},"first":true,"numberOfElements":2,"empty":false}
--
회원 조회(Email)
-curl
-$ curl 'http://localhost:8080/admin/users?email=jungkh405@naver.com0' -i -X GET \
- -H 'Accept: application/json'
-request-parameters
-Parameter | -Description | -
---|---|
|
-검색할 회원의 email |
-
response-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-ID |
-
|
-
|
-|
|
-
|
-userLevel |
-
example request
-GET /admin/users?email=jungkh405@naver.com0 HTTP/1.1
-Accept: application/json
-Host: localhost:8080
-example response
-HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 433
-
-{"content":[{"id":0,"email":"jungkh405@naver.com0","userLevel":"AUTH"},{"id":1,"email":"jungkh405@naver.com1","userLevel":"AUTH"}],"pageable":{"sort":{"sorted":false,"unsorted":true,"empty":true},"offset":0,"pageNumber":0,"pageSize":10,"paged":true,"unpaged":false},"last":true,"totalPages":1,"totalElements":2,"size":10,"number":0,"sort":{"sorted":false,"unsorted":true,"empty":true},"first":true,"numberOfElements":2,"empty":false}
--
회원 상세 조회
-curl
-$ curl 'http://localhost:8080/admin/users/1' -i -X GET \
- -H 'Accept: application/json'
-path-parameters
-Parameter | -Description | -
---|---|
|
-상세 정보를 조회할 회원의 ID[PK] |
-
response-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-회원 ID[PK] |
-
|
-
|
-회원 이메일 |
-
|
-
|
-회원 닉네임 |
-
|
-
|
-회원 휴대폰번호 |
-
|
-
|
-회원의 계좌정보 |
-
|
-
|
-회원 가입 일시 |
-
|
-
|
-회원 정보 수정 일시 |
-
|
-
|
-회원 권한[UNAUTH/AUTH/ADMIN |
-
|
-
|
-회원 상태[BAN/NORMAL] |
-
Example request
-GET /admin/users/1 HTTP/1.1
-Accept: application/json
-Host: localhost:8080
-Example response
-HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 309
-
-{"id":1,"email":"jungkh405@naver.com","nickname":"17171771","phone":"01012345678","account":{"bankName":"카카오뱅크","accountNumber":"333333333333","depositor":"마리아"},"modifiedDate":"2021-05-14T02:03:34.0274974","createDate":"2021-05-14T02:03:34.0274974","userLevel":"UNAUTH","userStatus":"NORMAL"}
--
회원 정지
-curl
-$ curl 'http://localhost:8080/admin/users/ban' -i -X POST \
- -H 'Content-Type: application/json' \
- -d '{"id":1,"userStatus":"BAN"}'
-example request
-POST /admin/users/ban HTTP/1.1
-Content-Type: application/json
-Content-Length: 27
-Host: localhost:8080
-
-{"id":1,"userStatus":"BAN"}
-example response
-HTTP/1.1 200 OK
-CART API
-장바구니 조회
-curl
-$ curl 'http://localhost:8080/carts' -i -X GET
-response-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-CartProduct ID |
-
|
-
|
-상품의 ID[PK] |
-
|
-
|
-상품 이름(한글) |
-
|
-
|
-상품 이름(영어 |
-
|
-
|
-브랜드 생성 날짜 |
-
|
-
|
-브랜드 정보 수정 날짜 |
-
|
-
|
-브랜드 ID[PK] |
-
|
-
|
-브랜드 이름(한글) |
-
|
-
|
-브랜드 이름(영어) |
-
|
-
|
-브랜드 이미지 경로 |
-
|
-
|
-브랜드 이미지 경로(썸네일) |
-
Example request
-GET /carts HTTP/1.1
-Host: localhost:8080
-Example response
-HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 210
-
-[{"id":1,"productId":2,"nameKor":"조던","nameEng":"Jordan","brand":{"createdDate":null,"modifiedDate":null,"id":3,"nameKor":"나이키","nameEng":"nike","originImagePath":"1234","thumbnailImagePath":"5678"}}]
--
장바구니 추가
-curl
-$ curl 'http://localhost:8080/carts/1' -i -X POST \
- -H 'Content-Type: application/json'
-request-fields
-Example request
-POST /carts/1 HTTP/1.1
-Content-Type: application/json
-Host: localhost:8080
-Example response
-HTTP/1.1 200 OK
--
장바구니 삭제
-curl
-$ curl 'http://localhost:8080/carts' -i -X DELETE \
- -H 'Content-Type: application/json' \
- -d '{"id":1}'
-request-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-카트상품(CartProduct)의 ID[PK] |
-
Example request
-DELETE /carts HTTP/1.1
-Content-Type: application/json
-Content-Length: 8
-Host: localhost:8080
-
-{"id":1}
-Example response
-HTTP/1.1 200 OK
-POINT API
-포인트 충전(AJAX)
-curl
-$ curl 'http://localhost:8080/points/charging' -i -X POST \
- -H 'Content-Type: application/json' \
- -d '{"chargeAmount":100000}'
-request-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-충전할 포인트 |
-
Example request
-POST /points/charging HTTP/1.1
-Content-Type: application/json
-Content-Length: 23
-Host: localhost:8080
-
-{"chargeAmount":100000}
-Example response
-HTTP/1.1 200 OK
--
포인트 출금
-curl
-$ curl 'http://localhost:8080/points/withdrawal' -i -X POST \
- -H 'Content-Type: application/json' \
- -d '{"withdrawalAmount":30000,"password":"test1234"}'
-request-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-출금할 포인트 |
-
|
-
|
-비밀번호 |
-
Example request
-POST /points/withdrawal HTTP/1.1
-Content-Type: application/json
-Content-Length: 48
-Host: localhost:8080
-
-{"withdrawalAmount":30000,"password":"test1234"}
-Example response
-HTTP/1.1 200 OK
--
포인트 차감 내역 조회
-curl
-$ curl 'http://localhost:8080/points/deduction-details' -i -X GET \
- -H 'Accept: application/json'
-response-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-생성 날짜 |
-
|
-
|
-차감 금액 |
-
|
-
|
-종류 |
-
Example request
-GET /points/deduction-details HTTP/1.1
-Accept: application/json
-Host: localhost:8080
-Example response
-HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 163
-
-[{"time":"2021-05-14T01:34:26.8914601","amount":10000,"division":"WITHDRAW"},{"time":"2021-05-14T01:34:26.8914601","amount":20000,"division":"PURCHASE_DEDUCTION"}]
--
포인트 충전(대금 수령) 내역 조회
-curl
-$ curl 'http://localhost:8080/points/charging-details' -i -X GET \
- -H 'Accept: application/json'
-response-fields
-Path | -Type | -Description | -
---|---|---|
|
-
|
-생성 날짜 |
-
|
-
|
-충전 금액 |
-
|
-
|
-종류 |
-
Example request
-GET /points/charging-details HTTP/1.1
-Accept: application/json
-Host: localhost:8080
-Example response
-HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 156
-
-[{"time":"2021-05-14T01:34:26.2032991","amount":30000,"division":"CHARGE"},{"time":"2021-05-14T01:34:26.2043043","amount":40000,"division":"SALES_REVENUE"}]
--