All authenticated endpoints require a valid JWT token obtained from the login endpoint. Tokens are signed with HS256 and expire after 8 hours.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/WilliamsDevos/fleet-management-system/llms.txt
Use this file to discover all available pages before exploring further.
Login
Obtain a token by submitting valid credentials.Request body
A valid email address for the account.
The account password.
Response
Signed JWT to use on subsequent requests.
Tokens expire after 8 hours. After expiry, the client must log in again to obtain a new token.
- Request
- Response
Using the token
Pass the token as aBearer token in the Authorization header on every authenticated request.
Get current user
Returns the profile of the authenticated user.Authorization: Bearer <token>
Response
- Request
- Response
Get assigned vehicle (technician only)
Returns the active vehicle assignment for the authenticated technician, including vehicle details and maintenance status.Authorization: Bearer <token> with role technician
Response
Full vehicle record including fleet information, inspection history, and maintenance records.
Computed maintenance status for the vehicle based on current mileage and maintenance history.
- Request
- Response
Error codes
| Status | Message | Description |
|---|---|---|
401 | Missing token | The Authorization header was not provided or does not contain a Bearer token. |
401 | Invalid token | The token is malformed, has been tampered with, or has expired. |
401 | Credenciales invalidas | The email or password supplied to POST /api/auth/login is incorrect. |
403 | Forbidden | The authenticated user’s role does not have permission to access the requested endpoint. |