Overview
The User Management API provides endpoints for managing users, authentication, and user-related operations in jshERP. All endpoints require proper authentication unless otherwise specified. Base Path:/user
Authentication Endpoints
User Login
This endpoint does not require authentication.
User’s login name
User’s password (MD5 hashed)
Captcha verification code
UUID from captcha request
Response status code (200 for success, 500 for error)
Contains authentication token and user information
WeChat Login
WeChat authorization code
200: Success501: WeChat not bound500: Login failed
WeChat Binding
User’s login name
User’s password
WeChat authorization code
Get User Session
Response status code
User object without password
Logout
Response status code
User CRUD Operations
Get User Information
User ID
Response status code
User entity object
Get User List
JSON string containing search filters:
userName: Filter by display nameloginName: Filter by login name
Array of UserEx objects with extended information
Total number of records
Create User
Display name
Login username (must be unique)
Password (MD5 hashed)
Email address
Phone number
Department name
Job position
User status (0: disabled, 1: enabled)
Update User
User ID
Display name
Email address
Phone number
Department name
Job position
User status
Delete User
User ID to delete
Batch Delete Users
Comma-separated user IDs (e.g., “1,2,3”)
User Management
Add User with Organization
This endpoint checks tenant user limits before creating the user.
Display name
Login username
Password (MD5 hashed)
Organization ID to associate with user
Update User with Organization
User ID
New organization ID
Register User
This endpoint does not require authentication.
Login username (will also be used as display name)
Password (MD5 hashed)
Captcha verification code
UUID from captcha request
Get User List (Dropdown)
Array of objects with
id and userName fieldsPassword Management
Reset Password
User ID
New password (MD5 hashed)
Update Password
User ID
Current password (MD5 hashed)
New password (MD5 hashed)
1: Success2: Old password incorrect3: Update failed
Permissions and Roles
Get Current User’s Role Type
Role type (e.g., “public”, “tenant”)
Get Current User’s Button Permissions
Array of button permission strings
Get Current User’s Price Limit
Price limit configuration
Organization and Tree
Get Organization User Tree
Array of tree node objects with nested children
Get Users with Checked Status
User business type
User business value
Utility Endpoints
Check Login Name Exists
User ID (0 for new user)
Login name to check
true if name exists, false otherwiseGet Random Captcha
This endpoint does not require authentication.
UUID to include in login/register request
Base64-encoded captcha image
Batch Set User Status
Status to set (0: disabled, 1: enabled)
Comma-separated user IDs
Get User Info with Tenant
Tenant type (0: free, 1: paid)
Tenant expiration date
Current number of users
Maximum allowed users
Tenant ID
Data Models
User Entity
Unique user identifier
Display name
Login username
Encrypted password (never returned in responses)
Leader flag indicator
Job position/title
Department name
Email address
Phone number
Manager flag (0: no, 1: yes)
System user flag (0: no, 1: yes)
User status (0: disabled, 1: enabled)
User description
Additional remarks
WeChat Open ID for WeChat integration
Associated tenant ID
Soft delete flag
Error Codes
| Code | Description |
|---|---|
| 200 | Success |
| 500 | Internal server error |
| 501 | WeChat not bound |
Most endpoints return a standard response format with
code and data fields. Check the code field to determine success or failure.