Skip to main content
POST
Login

Endpoint

Authenticate a user with email and password credentials.

Headers

string
required
Must be application/json
string
required
Must be application/json

Request Body

string
required
User’s email address
string
required
User’s password

Response

boolean
required
Indicates if login was successful
string
Success or error message
object
Authenticated user object with complete profile
string
Authentication token (currently null, reserved for future use)
string
Token expiration timestamp (currently null)

Request Example

Response Example

Error Responses

Bad Request
Missing required fields or invalid request format
Unauthorized
Invalid email or password combination
Forbidden
User account is inactive or suspended
Not Found
User with provided email does not exist
Internal Server Error
Server error during authentication

Session Management

After successful login, store the user data securely:
Never store passwords locally. Only store the user ID and non-sensitive information.

User Types

The tipo_usuario field indicates the user’s role:
  • pasajero - Regular passenger who can book rides
  • conductor - Driver who can accept and complete trips
  • admin - Administrator with access to admin endpoints
  • empresa - Company/fleet manager
Use this field to determine which features to show in your application.

See Also