User login (Admin or Processor)
curl --request POST \
--url https://olive-gateway-a6ba.onrender.com/api/v1/admin/login \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"password": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: '<string>', password: '<string>'})
};
fetch('https://olive-gateway-a6ba.onrender.com/api/v1/admin/login', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://olive-gateway-a6ba.onrender.com/api/v1/admin/login"
payload = {
"email": "<string>",
"password": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"expires_at": 123,
"refresh_expires_at": 123,
"refresh_token": "<string>",
"success": true,
"token": "<string>",
"user": {
"account_id": "<string>",
"agent_id": "<string>",
"created_at": "<string>",
"email": "<string>",
"first_name": "<string>",
"id": "<string>",
"last_login_at": "<string>",
"last_name": "<string>",
"name": "<string>",
"pep_access_authorized": true,
"phone_number": "<string>",
"role": "<string>",
"status": "<string>",
"user_type": "<string>"
}
}{}{}{}Admin
Admin Login
Authenticate and receive JWT token
POST
/
admin
/
login
User login (Admin or Processor)
curl --request POST \
--url https://olive-gateway-a6ba.onrender.com/api/v1/admin/login \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"password": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: '<string>', password: '<string>'})
};
fetch('https://olive-gateway-a6ba.onrender.com/api/v1/admin/login', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://olive-gateway-a6ba.onrender.com/api/v1/admin/login"
payload = {
"email": "<string>",
"password": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"expires_at": 123,
"refresh_expires_at": 123,
"refresh_token": "<string>",
"success": true,
"token": "<string>",
"user": {
"account_id": "<string>",
"agent_id": "<string>",
"created_at": "<string>",
"email": "<string>",
"first_name": "<string>",
"id": "<string>",
"last_login_at": "<string>",
"last_name": "<string>",
"name": "<string>",
"pep_access_authorized": true,
"phone_number": "<string>",
"role": "<string>",
"status": "<string>",
"user_type": "<string>"
}
}{}{}{}The login endpoint authenticates admin users and processors, returning JWT tokens for session-based access.
Endpoint
POST /api/v1/admin/login
Request Body
string
required
User email address
string
required
User password
User Types
Admin Users
Dashboard users with roles like
system_admin, compliance_user, super_agentProcessors
Merchant accounts for POS terminal management
Example
- Request
- Response
curl -X POST "https://demo.api.vultlocal.com/api/v1/admin/login" \
-H "Content-Type: application/json" \
-d '{
"email": "admin@olive.sl",
"password": "SecureP@ss123"
}'
{
"success": true,
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"refresh_token": "rt_abc123xyz...",
"expires_at": 1704067200,
"refresh_expires_at": 1704672000,
"user": {
"id": "123",
"email": "admin@olive.sl",
"first_name": "Admin",
"last_name": "User",
"role": "system_admin",
"user_type": "admin",
"status": "active",
"pep_access_authorized": true,
"last_login_at": "2025-01-14T15:30:00Z"
}
}
Token Management
1
Login
Receive access token (15 min) and refresh token (7 days)
2
Use Token
Include in
Authorization: Bearer <token> header3
Refresh
When expired, use refresh endpoint to get new tokens
4
Logout
Revoke refresh token when logging out
User Roles
| Role | Access Level |
|---|---|
system_admin | Full system access |
compliance_user | Compliance monitoring |
support_user | Customer support |
sales_user | Sales operations |
audit_user | Read-only audit access |
super_agent | Agent network management |
sub_agent | Field agent operations |
processor | POS merchant dashboard |
Errors
| Code | Error | Description |
|---|---|---|
| 400 | INVALID_REQUEST | Missing email or password |
| 401 | INVALID_CREDENTIALS | Wrong email or password |
| 401 | ACCOUNT_INACTIVE | User account is not active |
| 500 | INTERNAL_ERROR | Server error |
Security Notes
- Login attempts are logged for audit
- Failed attempts may trigger account lockout
- Access tokens expire after 15 minutes
- Always use HTTPS in production
Related
Refresh Token
Get new access token
Logout
Revoke refresh token
Current User
Get current user info
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
⌘I