Members API

post
Sign Up (회원가입)

https://younghoonjean.com/api/members/signup/
로컬 계정을 생성하는 회원가입 API입니다. 이메일은 반드시 일반적인 이메일 형식에 맞게 작성되어야 합니다.
Request
Response
Request
Headers
Content-Type
required
string
application/json
Form Data Parameters
username
required
string
input user ID
password
required
string
input user password
last_name
optional
string
input user last name
first_name
optional
string
input user first name
email
optional
string
input user email( ex) test001@gmail.com)
phone_number
optional
string
input user phonenumber
Response
201: Created
Cake successfully retrieved.
{
"pk":4,
"username":"testaccount3",
"password":"pbkdf2_sha256$120000$X9IZZRsGO3Xk$H6P6HVkcxaKWLPvb5cVgnQ8wi4xD6uKJvYsfxGtYV18=",
"last_name":"test",
"first_name":"004",
"email":"test003@gmail.com",
"phone_number":"01000000004"
}

post
Check Unique Username(ID 중복검사)

https://younghoonjean.com/api/members/checkID/
username 중복검사입니다.
Request
Response
Request
Headers
Content-Type
required
string
application/json
Form Data Parameters
username
required
string
input username you want to check
Response
200: OK
{
"username":"testaccount4",
"message":"사용 가능한 아이디입니다."
}
400: Bad Request
{
"message": '이미 존재하는 아이디입니다.'
}

post
Sign in(Login, 로그인)

https://younghoonjean.com/api/members/login/
login에 성공하면 token이 주어집니다.
Request
Response
Request
Headers
Content-Type
required
string
application/json
Form Data Parameters
username
required
string
input username
password
required
string
input password
Response
200: OK
{
"token":"7627555aae9c37b6e48367c1737818103ab771b7"
}
400: Bad Request

post
Soical Sign up&Sign in (소셜 회원가입/로그인)

https://younghoonjean.com/api/members/social-login/
password는 자동 생성됩니다.
Request
Response
Request
Headers
Content-Type
required
string
application/json
Form Data Parameters
user_id
required
string
user_id as username(ID)
last_name
required
string
input last name
first_name
required
string
input first name
email
required
string
input user email
phone_number
required
string
input phone_number
Response
200: OK
{
"token":"7627555aae9c37b6e48367c1737818103ab771b7"
}
400: Bad Request

get
User Profile(GET method : 유저 정보 조회)

https://younghoonjean.com/api/members/profile/
회원정보 조회입니다. 로그인 시 전달받은 token값을 Header에 전달해야합니다.
Request
Response
Request
Headers
Authorization
required
string
token <token key>
Response
200: OK
{
"pk":1,
"username":"hanoul",
"password":"pbkdf2_sha256$120000$01vrFFycAqCw$zosSawuPgTTA4TUAC8frIyqhx7R89T+NRA5r/qObwBY=",
"last_name":"kim",
"first_name":"hanoul",
"email":"",
"phone_number":""
}

patch
User Profile(PATCH method : 유저 정보 수정)

https://younghoonjean.com/api/members/profile/
회원정보 수정입니다. 해당 URL로 GET요청을 하여 받은 유저정보를 바탕으로, 수정한 값을 PATCH로 전달합니다. username의 경우는 수정할 경우 Unique Constraint를 발생할 위험이 있으므로, 수정을 막는 편이 좋습니다.
Request
Response
Request
Headers
Autorization
required
string
token <token key>
Content-Type
required
string
application/json
Form Data Parameters
username
optional
string
input username
password
optional
string
input password you want to change
first_name
optional
string
input first name you want to change
last_name
optional
string
input last name you want to change
email
optional
string
input email you want to change
phone_number
optional
string
input phone number you want to change
Response
200: OK
{
"pk":1,
"username":"hanoul",
"password":"pbkdf2_sha256$120000$01vrFFycAqCw$zosSawuPgTTA4TUAC8frIyqhx7R89T+NRA5r/qObwBY=",
"last_name":"kim",
"first_name":"hanoul",
"email":"",
"phone_number":""
}

delete
Logout (Terminate Token, 로그아웃)

https://younghoonjean.com/api/members/logout/
로그아웃입니다. Header에 전달한 Token이 파기됩니다.
Request
Response
Request
Headers
Autorization
optional
string
token <token key>
Response
200: OK

get
User List

https://younghoonjean.com/api/members/user-list/
등록된 모든 유저 리스트를 보여줍니다.
Request
Response
Request
Response
200: OK
[
{
"pk":1,
"username":"hanoul",
"password":"pbkdf2_sha256$120000$01vrFFycAqCw$zosSawuPgTTA4TUAC8frIyqhx7R89T+NRA5r/qObwBY=",
"lastName":"kim",
"firstName":"hanoul",
"email":"","phoneNumber":""
},
{
"pk":2,
"username":"tester01",
"password":"pbkdf2_sha256$120000$XhO1cClRcW6a$CUah3xkm7DUpQ5nx+kcKyUxTeLoH3rI/DoA0coShGss=",
"lastName":"",
"firstName":"",
"email":"",
"phoneNumber":""
}
]

post
Check Password(for Profile access)

https://younghoonejean.com/api/memebers/check-password/
Request
Response
Request
Headers
Content-Type
optional
string
application/json
Authorization
optional
string
token <token key>
Form Data Parameters
password
required
string
input user password
Response
200: OK
{
"message": "인증에 성공했습니다."
}
400: Bad Request
{
"message": "인증에 실했습니다."
}

delete
User Account Delete

https://younghoonjean.com/api/members/user-delete/
유저 삭제 api 삭제가 완료되면 status.204
Request
Response
Request
Headers
Authorization
required
string
Token <token key>
Response
204: No Content

get
GET User Reservation History

https://younghoonjean.com/api/members/reservations/1/
로그인 한 유저의 모든 예매 기록을 가져옵니다.
Request
Response
Request
Headers
Authorization
optional
string
Token <token key>
Response
200: OK

patch
Cancel User Reservation

https://younghoonjean.com/api/members/reservations/<int:pk>/
u유저가 예매한 티켓을 비활성화합니다. int값(예매번호= 티켓 pk값)을 전달받습니다.
Request
Response
Request
Path Parameters
reservation pk
optional
integer
ticket number(=reservation instance pk)
Response
200: OK