Skip to content

Latest commit

 

History

History
44 lines (31 loc) · 698 Bytes

getUserID.md

File metadata and controls

44 lines (31 loc) · 698 Bytes

Get user by id

Return user with corresponding ID.

URL : /users/:id

Method : GET

"Content-type": "application/json"
"Authorization": "Bearer [valid Moderator token]"

Success Reponse

Code : 200 OK

Body :

{
    "_id": "5c6659554995bd0017faee8b",
    "email": "[email protected]",
    "password": "$2a$10$XIs/xj.K61ZPePyvT.Ha1eikd5W0eCHxXffQmAHKg9QiHFI4Uu/8m",
    "type": "Applicant",
    "verified": true,
    "__v": 0
}

Error Response

Condition : User does not exist.

Code : 404 Not Found

Body :

{
    "code": "ResourceNotFound",
    "message": "There is no user with the id 5c6659554995bd0017faee8b"
}