diff --git a/src/main/resources/templates/api-guide.mustache b/src/main/resources/templates/api-guide.mustache deleted file mode 100644 index ae754430..00000000 --- a/src/main/resources/templates/api-guide.mustache +++ /dev/null @@ -1,5677 +0,0 @@ - - - - - - - - -Shoe-auction API guide - - - - - - -
-
-

HTTP Methods

-
-
-

RESTful notes tries to adhere as closely as possible to standard HTTP and REST conventions in its use of HTTP verbs.

-
- ---- - - - - - - - - - - - - - - - - - - - - - - - - -
VerbUsage

GET

Used to retrieve a resource

POST

Used to create a new resource

PATCH

Used to update an existing resource, including partial updates

DELETE

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 codeUsage

200 OK

The request completed successfully

201 Created

A new resource has been created successfully. -The resource’s URI is available from the response’s -Location header

204 No Content

An update to an existing resource has been applied successfully

400 Bad Request

The request was malformed. -The response body will include an error providing further information

401 Unauthorized

The request has not been applied because it lacks valid authentication credentials for the target resource.

403 Forbidden

The server understood the request but refuses to authorize it.

404 Not Found

The requested resource did not exist

409 Conflict

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

-
- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

email

String

The user’s email address

password

String

The user’s password

nickname

String

The user’s nickname

phone

String

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

-
- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

email

String

로그인시 사용할 이메일

password

String

8자 이상 20자 이하의 비밀번호

nickname

String

닉네임

phone

String

휴대폰 번호

-
-

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

-
- - ---- - - - - - - - - - - - - -
Table 1. /users/user-emails/{email}/exists
ParameterDescription

email

이메일

-
-

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

-
- - ---- - - - - - - - - - - - - -
Table 2. /users/user-emails/{email}/exists
ParameterDescription

email

이메일

-
-

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

-
- - ---- - - - - - - - - - - - - -
Table 3. /users/user-nicknames/{nickname}/exists
ParameterDescription

nickname

닉네임

-
-

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

-
- - ---- - - - - - - - - - - - - -
Table 4. /users/user-nicknames/{nickname}/exists
ParameterDescription

nickname

닉네임

-
-

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

-
- ----- - - - - - - - - - - - - - - -
PathTypeDescription

phone

String

인증번호를 받을 휴대폰 번호

-
-

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

-
- ----- - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

phone

String

인증번호를 받은 휴대폰 번호

certificationNumber

String

사용자가 입력한 인증번호

-
-

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

-
- ----- - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

phone

String

인증번호를 받은 휴대폰 번호

certificationNumber

String

사용자가 입력한 인증번호

-
-

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

-
- ---- - - - - - - - - - - - - - - - - -
ParameterDescription

token

회원가입시 발송되는 랜덤 토큰

email

회원가입시 입력한 이메일

-
-

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

-
- ---- - - - - - - - - - - - - - - - - -
ParameterDescription

token

회원가입시 발송되는 랜덤 토큰

email

회원가입시 입력한 이메일

-
-

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

-
- ----- - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

email

String

login ID (email)

password

String

password

token

String

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

-
- ----- - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

email

String

login ID (email)

password

String

password

token

String

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

-
- - ---- - - - - - - - - - - - - -
Table 5. /users/find/{email}
ParameterDescription

email

이메일

-
-

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

-
- - ---- - - - - - - - - - - - - -
Table 6. /users/find/{email}
ParameterDescription

email

이메일

-
-

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

-
- ----- - - - - - - - - - - - - - - -
PathTypeDescription

phone

String

인증번호를 받을 휴대폰 번호

-
-

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

-
- ----- - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

phone

String

인증번호를 받은 휴대폰 번호

certificationNumber

String

사용자가 입력한 인증번호

-
-

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

-
- ----- - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

phone

String

인증번호를 받은 휴대폰 번호

certificationNumber

String

사용자가 입력한 인증번호

-
-

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

-
- ----- - - - - - - - - - - - - - - -
PathTypeDescription

email

String

인증번호를 받을 이메일

-
-

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

-
- ----- - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

email

String

비밀번호 찾기를 원하는 이메일

certificationNumber

String

사용자가 입력한 인증번호

-
-

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

-
- ----- - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

email

String

비밀번호 찾기를 원하는 이메일

certificationNumber

String

사용자가 입력한 인증번호

-
-

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

-
- ----- - - - - - - - - - - - - - - -
PathTypeDescription

nickname

String

새로운 닉네임

-
-

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

-
- ----- - - - - - - - - - - - - - - -
PathTypeDescription

nickname

String

새로운 닉네임

-
-

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

-
- ----- - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

email

String

비밀번호 변경을 원하는 회원 ID(email

passwordAfter

String

변경할 비밀번호

passwordBefore

String

이전 비밀번호

-
-

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

-
- ----- - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

email

String

비밀번호 변경을 원하는 회원 ID(email

passwordAfter

String

변경할 비밀번호

passwordBefore

String

이전 비밀번호

-
-

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

-
- ----- - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

bankName

String

은행명

accountNumber

String

계좌 번호

depositor

String

예금주

-
-
-

2. Successful : Modification

-
-
-

request-fields

-
- ----- - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

bankName

String

은행명

accountNumber

String

계좌 번호

depositor

String

예금주

-
-

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

-
- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

addressName

String

주소록 이름

roadNameAddress

String

도로명 주소

detailedAddress

String

상세 주소

postalCode

String

우편번호

-
-

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

-
- ----- - - - - - - - - - - - - - - -
PathTypeDescription

id

Number

삭제할 주소의 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

-
- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

id

Number

ID

addressName

String

주소록 이름

roadNameAddress

String

도로명 주소

detailedAddress

String

상세 주소

postalCode

String

우편번호

-
-

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

-
- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

email

String

회원 이메일

nickname

String

회원 닉네임

phone

String

회원 휴대폰 번호

userLevel

String

이메일 인증 여부

-
- - - - - -
- - -현재 로그인되어있는 사용자의 my-infos 리소스를 가져옵니다. -
-
-
-
-
-
-
-

PRODUCT API

-
-
-

1. 상품 관련 조회

-
-
-

상품 정보 조회

-
-

curl

-
-
-
-
$ curl 'http://localhost:8080/products/1' -i -X GET \
-    -H 'Accept: application/json'
-
-
-
-

path-parameters

-
- - ---- - - - - - - - - - - - - -
Table 7. /products/{id}
ParameterDescription

id

조회할 상품의 ID

-
-

response-fields

-
- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

id

Number

조회한 상품의 ID

nameKor

String

조회한 상품의 한글명

nameEng

String

조회한 상품의 영문명

modelNumber

String

조회한 상품의 모델 넘버

color

String

조회한 상품의 색상

releaseDate

String

조회한 상품의 출시일

releasePrice

Number

조회한 상품의 출시가

currency

String

조회한 상품의 발매 통화

sizeClassification

String

조회한 상품의 사이즈 분류

sizeUnit

String

조회한 상품의 사이즈 단위

minSize

Number

조회한 상품의 최소 사이즈

maxSize

Number

조회한 상품의 최대 사이즈

sizeGap

Number

조회한 상품의 사이즈 간격

brand

Object

조회한 상품의 브랜드

resizedImagePath

String

조회한 상품의 이미지 경로

saleBids.[].tradeId

Number

판매 입찰 ID

saleBids.[].productId

Number

판매 입찰 productID

saleBids.[].productSize

Number

판매 입찰 물품 사이즈

saleBids.[].price

Number

판매 입찰 물품 가격

purchaseBids.[].tradeId

Number

구매 입찰 ID

purchaseBids.[].productId

Number

구매 입찰 productId

purchaseBids.[].productSize

Number

구매 입찰 물품 사이즈

purchaseBids.[].price

Number

구매 입찰 물품 가격

tradeCompleteInfos.[].productSize

Number

완료된 거래의 물품 사이즈

tradeCompleteInfos.[].price

Number

완료된 거래의 물품 가격

tradeCompleteInfos.[].completeTime

String

거래 완료 시간

-
-

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

-
- ---- - - - - - - - - - - - - - - - - - - - - -
ParameterDescription

brandId

조회할 상품 썸네일의 브랜드 ID

keyword

조회할 상품의 검색 키워드

orderStandard

조회할 상품의 정렬 조건

-
-

response-fields

-
- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

content.[].id

Number

조회한 상품의 ID

content.[].productThumbnailImagePath

String

조회한 상품의 썸네일 이미지 경로

content.[].brandThumbnailImagePath

String

조회한 상품의 브랜드 썸네일 이미지 경로

content.[].nameKor

String

조회한 상품의 한글명

content.[].nameEng

String

조회한 상품의 영문명

content.[].lowestPrice

Number

조회한 상품의 즉시 구매 최저가

-
-

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

-
- ----- - - - - - - - - - - - - - - -
PathTypeDescription

[]

Array

상품의 통화 단위 목록

-
-

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

-
- ----- - - - - - - - - - - - - - - -
PathTypeDescription

[]

Array

상품의 사이즈 분류 목록

-
-

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

-
- ----- - - - - - - - - - - - - - - -
PathTypeDescription

[]

Array

상품의 사이즈 단위 목록

-
-

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

-
- ----- - - - - - - - - - - - - - - -
PathTypeDescription

[]

Array

상품의 정렬 기준 목록

-
-

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

-
- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

nameKor

String

저장할 상품의 한글명

nameEng

String

저장할 상품의 영문명

modelNumber

String

저장할 상품의 모델 넘버

color

String

저장할 상품의 색상

releaseDate

String

저장할 상품의 발매일

releasePrice

Number

저장할 상품의 발매가

currency

String

저장할 상품의 발매 통화

sizeClassification

String

저장할 상품의 사이즈 분류

sizeUnit

String

저장할 상품의 사이즈 단위

minSize

Number

저장할 상품의 최소 사이즈

maxSize

Number

저장할 상품의 최대 사이즈

sizeGap

Number

저장할 상품의 사이즈 간격

brand

Object

저장할 상품의 브랜드

-
-

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

-
- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

nameKor

String

수정할 상품의 한글명

nameEng

String

수정할 상품의 영문명

modelNumber

String

수정할 상품의 모델 넘버

color

String

수정할 상품의 색상

releaseDate

String

수정할 상품의 발매일

releasePrice

Number

수정할 상품의 발매가

currency

String

수정할 상품의 발매 통화

sizeClassification

String

수정할 상품의 사이즈 분류

sizeUnit

String

수정할 상품의 사이즈 단위

minSize

Number

수정할 상품의 최소 사이즈

maxSize

Number

수정할 상품의 최대 사이즈

sizeGap

Number

수정할 상품의 사이즈 간격

brand

Object

수정할 상품의 브랜드

originImagePath

String

기존 상품 원본 이미지 경로(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

-
- - ---- - - - - - - - - - - - - -
Table 8. /products/{id}
ParameterDescription

id

삭제할 상품의 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

-
- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

id

Number

브랜드 ID

nameKor

String

브랜드 한글명

nameEng

String

브랜드 영문명

originImagePath

String

브랜드 원본 이미지 경로

thumbnailImagePath

String

브랜드 썸네일 이미지 경로

-
-

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

-
- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

[]

Array

브랜드 정보 배열

[].id

Number

브랜드 ID

[].nameKor

String

브랜드 한글명

[].nameEng

String

브랜드 영문명

[].originImagePath

String

브랜드 원본 이미지 경로

[].thumbnailImagePath

String

브랜드 썸네일 이미지 경로

-
-

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

-
- ----- - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

nameKor

String

저장할 브랜드의 한글명

nameEng

String

저장할 브랜드의 영문명

-
-

request-parts(Optional)

-
- ---- - - - - - - - - - - - - -
PartDescription

brandImage

저장할 브랜드의 이미지 파일

-
-

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

-
- ----- - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

nameKor

String

수정할 브랜드의 한글명

nameEng

String

수정할 브랜드의 영문명

originImagePath

String

기존 브랜드 원본 이미지 경로(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

-
- - ---- - - - - - - - - - - - - -
Table 9. /brands/{id}
ParameterDescription

id

삭제할 브랜드의 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

-
- - ---- - - - - - - - - - - - - -
Table 10. /trades/{productId}
ParameterDescription

productId

물품 ID[PK]

-
-

request-parameters

-
- ---- - - - - - - - - - - - - -
ParameterDescription

size

신발 사이즈

-
-

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

-
- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

price

Number

입찰 가격

productSize

Number

신발 사이즈

productId

Number

물품 ID

addressId

Number

반송 주소

-
-

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

-
- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

price

Number

입찰 가격

productSize

Number

신발 사이즈

productId

Number

물품 ID

addressId

Number

반송 주소

-
-

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

-
- ----- - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

tradeId

Number

Trade ID

addressId

Number

반송 주소 ID

productId

Number

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

-
- ----- - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

tradeId

Number

Trade ID

addressId

Number

배송지 ID

productId

Number

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

-
- ----- - - - - - - - - - - - - - - -
PathTypeDescription

tradeId

Number

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

-
- - ---- - - - - - - - - - - - - -
Table 11. /trades/{id}/receiving-tracking-number
ParameterDescription

id

운송장을 등록할 거래 ID

-
-

request-fields

-
- ----- - - - - - - - - - - - - - - -
PathTypeDescription

trackingNumber

String

등록할 입고 운송장 번호

-
-

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

-
- - ---- - - - - - - - - - - - - -
Table 12. /trades/{id}/warehousing
ParameterDescription

id

입고 완료 처리할 거래 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

-
- - ---- - - - - - - - - - - - - -
Table 13. /trades/{id}/inspection-successful
ParameterDescription

id

검수 완료 처리할 거래 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

-
- - ---- - - - - - - - - - - - - -
Table 14. /trades/{id}/inspection-failed
ParameterDescription

id

검수 부적합 처리할 거래 ID

-
-

request-fields

-
- ----- - - - - - - - - - - - - - - -
PathTypeDescription

reason

String

검수 부적합 사유

-
-

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

-
- - ---- - - - - - - - - - - - - -
Table 15. /trades/{id}/return-tracking-number
ParameterDescription

id

운송장을 등록할 거래 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

-
- - ---- - - - - - - - - - - - - -
Table 16. /trades/{id}/forwarding-tracking-number
ParameterDescription

id

운송장을 등록할 거래 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

-
- - ---- - - - - - - - - - - - - -
Table 17. /trades/{id}/purchase-confirmation
ParameterDescription

id

거래 완료 처리할 거래 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

-
- ---- - - - - - - - - - - - - -
ParameterDescription

sellersEmail

판매자 로그인 eamil

-
-

response-fields

-
- ----- - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

content.[].id

Number

ID

content.[].status

String

email

-
-

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

-
- ----- - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

content.[].id

Number

ID

content.[].email

String

email

content.[].userLevel

String

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

-
- ---- - - - - - - - - - - - - -
ParameterDescription

id

검색할 회원의 ID[PK]

-
-

response-fields

-
- ----- - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

content.[].id

Number

ID

content.[].email

String

email

-
-

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

-
- ---- - - - - - - - - - - - - -
ParameterDescription

userLevel

검색할 회원의 userLevel

-
-

response-fields

-
- ----- - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

content.[].id

Number

ID

content.[].email

String

email

content.[].userLevel

String

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

-
- ---- - - - - - - - - - - - - -
ParameterDescription

email

검색할 회원의 email

-
-

response-fields

-
- ----- - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

content.[].id

Number

ID

content.[].email

String

email

content.[].userLevel

String

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

-
- - ---- - - - - - - - - - - - - -
Table 18. /admin/users/{id}
ParameterDescription

id

상세 정보를 조회할 회원의 ID[PK]

-
-

response-fields

-
- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

id

Number

회원 ID[PK]

email

String

회원 이메일

nickname

String

회원 닉네임

phone

String

회원 휴대폰번호

account

Object

회원의 계좌정보

createDate

Varies

회원 가입 일시

modifiedDate

Varies

회원 정보 수정 일시

userLevel

String

회원 권한[UNAUTH/AUTH/ADMIN

userStatus

String

회원 상태[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

-
- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

[].id

Number

CartProduct ID

[].productId

Number

상품의 ID[PK]

[].nameKor

String

상품 이름(한글)

[].nameEng

String

상품 이름(영어

[].brand.createdDate

Varies

브랜드 생성 날짜

[].brand.modifiedDate

Varies

브랜드 정보 수정 날짜

[].brand.id

Number

브랜드 ID[PK]

[].brand.nameKor

String

브랜드 이름(한글)

[].brand.nameEng

String

브랜드 이름(영어)

[].brand.originImagePath

String

브랜드 이미지 경로

[].brand.thumbnailImagePath

String

브랜드 이미지 경로(썸네일)

-
-

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

-
- ----- - - - - - - - - - - - - - - -
PathTypeDescription

id

Number

카트상품(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

-
- ----- - - - - - - - - - - - - - - -
PathTypeDescription

chargeAmount

Number

충전할 포인트

-
-

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

-
- ----- - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

withdrawalAmount

Number

출금할 포인트

password

String

비밀번호

-
-

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

-
- ----- - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

[].time

String

생성 날짜

[].amount

Number

차감 금액

[].division

String

종류

-
-

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

-
- ----- - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

[].time

String

생성 날짜

[].amount

Number

충전 금액

[].division

String

종류

-
-

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"}]
-
-
-
-
-
-
-
- - - \ No newline at end of file