The login endpoint authenticates admin users by checking theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/AndresLopezCorrales/Goods-Inventory/llms.txt
Use this file to discover all available pages before exploring further.
admin table. On success it returns a short-lived JWT access token that must be included in all subsequent admin API calls.
Request
- Method: POST
- Path:
/api/login - Auth: None
- Content-Type:
application/json
Body Parameters
Admin username stored in the
admin table.Admin password. Validated server-side against the stored credential.
Request Example
Response
200 — Success
Human-readable confirmation string. Value is always
"Login successful" on a 200 response.Signed JWT access token. Include this value in the
Authorization header of every subsequent admin API request.401 — Invalid Credentials
Token Usage
Pass the token as a Bearer token in theAuthorization header for all admin endpoints:
Token lifetime is controlled by the
JWT_EXPIRES_DAYS environment variable in the server .env file. The default lifetime is 1 day. After expiry, the client must re-authenticate via this endpoint to obtain a new token.