• 오픈마켓 API

1. 계정 (users)

1.1. 회원가입

1.1.1. buyer

request
POST /users/signup/buyer HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 164
Host: localhost:8080

{
  "username" : "vince_buyer",
  "password" : "password123",
  "email" : "vince_buyer@example.com",
  "phoneNumber" : "01012341234",
  "name" : "빈스구매자"
}
Table 1. request-fields
Path Type Description Constraints

username

String

유저명 (아이디)

- Must match the regular expression \w{3,20}

- Must not be empty

password

String

패스워드

- Must not be empty

- Size must be between 8 and 2147483647 inclusive

email

String

이메일

- Must be a well-formed email address

phoneNumber

String

핸드폰 번호

- Must match the regular expression 010\d{7,8}

name

String

이름

- Must not be empty

1.2. 로그인

request
POST /login HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 54
Host: localhost:8080

{
  "password" : "hodu0910",
  "username" : "buyer1"
}
Table 2. request-fields
Path Type Description Constraints

username

String

유저명

password

String

비밀번호

response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJidXllcjEiLCJhdXRoIjpbIkJVWUVSIl0sImV4cCI6MTY2NzAyNTUyN30.G6WZ-ohciu04-G9NDMMzA0AyszM2XYZpHQBkecO7jBJsydLQju6b1fs-1U8TrjxIwpFnFrD-4YbAnJOqZOKltg
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Table 3. response-headers
Name Description

Authorization

Bearer Token (JWT)

2. 상품 (products)

3. 장바구니 (cart)

4. 주문 (orders)