Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Braian551/viax/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Viax API uses session-based authentication. After successful login, the API returns user information that should be stored and included in subsequent requests where required.Currently, the API does not use JWT tokens or API keys. Authentication is managed through session data on the client side. Future versions may implement token-based authentication.
Authentication Flow
Login Request
To authenticate a user:Login Response
Successful authentication returns:User Types
The API supports different user types specified in thetipo_usuario field:
User role in the systemPossible values:
pasajero- Regular passenger userconductor- Driver useradmin- Administrative userempresa- Company/fleet user
Authenticated Requests
Include the user ID in requests that require authentication:As Query Parameter
In Request Body
Checking Authentication Status
Verify if a user account exists:Session Management
Session Data Structure
Store the following data from the login response:Logout
Currently, logout is handled client-side by clearing stored session data. No server-side logout endpoint is required.
- Clear stored user data from local storage
- Clear any cached information
- Redirect to login screen
Password Requirements
Security Best Practices
Use HTTPS
Always use HTTPS in production to encrypt data in transit
Store Securely
Never store passwords. Only store user IDs and non-sensitive data
Validate Input
Validate all user input before sending to API
Handle Errors
Properly handle authentication errors and timeouts
Common Authentication Errors
| Status Code | Error | Description |
|---|---|---|
| 401 | Unauthorized | Invalid credentials |
| 403 | Forbidden | User account is inactive or blocked |
| 404 | Not Found | User does not exist |
| 500 | Server Error | Internal server error |