GET/user/{username}

Get a user by username

Retrieves user details by username. Supply username to identify the user whose account details you want to retrieve. The response includes the user's identifier, contact details, and status.

1 parameter
usernamestringrequired
The name of the user to retrieve; use `user1` for testing.

4 status codes
200Returns the user object, including its identifier, username, name, email, password, phone, and status.
idintegeroptional
usernamestringoptional
firstNamestringoptional
lastNamestringoptional
emailstringoptional
passwordstringoptional
phonestringoptional
userStatusintegeroptional
User Status
400Returned when the supplied username is invalid.
404Returned when no user is found for the supplied username.
defaultReturned when an unexpected error occurs.

Error handling

A 400 is returned when the supplied username is invalid. A 404 is returned when no user is found for the username path parameter.