Get user information
Updated date: 18/09/2026
Updated by: VNPT eContract's team
Purpose
Function to retrieve user information by user Id
- Request URL:
/api/users/{id} - HTTP method:
GET - Authorize:
Bearer token - Parameter:
| Key | Type | Description |
|---|---|---|
id | int | [Required] Id of user |
Sample request
Id of user: id = 2328
Request: /api/users/2328
Sample response body
{
"data": {
"id": 2328,
"createdDate": "2022-09-08T08:48:53.8316168",
"comId": 164,
"code": "USER01",
"name": "Nguyen Van A",
"phone": "0919XXXXXX",
"email": "email_address",
"address": "user_address",
"identityVerificationStatus": {
"value": 0,
"description": "Not verified"
},
"identityVerifiedType": {
"value": 0,
"description": "Unknown"
},
"identityVerifiedSource": {
"value": 0,
"description": "Unknown"
},
"isValid": false,
"signConfirmationEnabled": true,
"isAccountLocked": false,
"accountId": "e06d8b9c-6f49-4751-87d0-6367c524a6ce",
"signatureText": "",
"roles": [
{
"id": "29e1138e-833e-4b3a-897a-08da9c3dd633",
"code": "Default",
"name": "Default",
"description": "Default role with document processing permissions"
}
],
"departments": [
{
"id": 1,
"name": "Human Resouce",
"code": "HR"
}
],
"groups": [],
"signMethod": {
"value": 3,
"description": "Sign token"
},
"status": {
"value": 1,
"description": "Enabled"
},
"receiveOtpMethod": {
"value": 1,
"description": "Email"
},
"receiveNotificationMethod": {
"value": 0,
"description": "Email"
},
"personalCertificateId": 1940,
"usedMemory": 0,
"userCertificates": [
{
"id": 1,
"name": "Nguyen Van A",
"commonName": "Nguyen Van A",
"uid": "id:2382",
"validFrom": "2025-03-07T08:56:16Z",
"validTo": "2026-03-07T08:56:16Z",
"serialNumber": "08BF97F59CXXXXXX",
"subjectDN": "C=VN,ST=Ho Chi Minh,L=Ho Chi Minh City,CN=Nguyen Van A,UID=id:2382",
"status": {
"value": 1,
"description": "Active"
},
"isValid": true,
"issuerDN": "C=VN,OU=VNPT eContract Premium,O=VNPT,CN=VNPT eContract Premium Certificate",
"provider": {
"value": 0,
"description": "Self-Signed certificate"
},
"createdDate": "2025-03-17T08:56:42.4886305+07:00",
"isBusinessSmartCaAccount": false,
"ownerId": 6,
"createdByUserId": 6,
"isDefaultSmartCaCert": false
}
],
"smartCaGroups": [],
"waitingChangeRequest": false,
"twoFactorEnabled": true,
"titles": [],
"allowedCertificateUids": []
},
"success": true,
"code": 0,
"messages": []
}
Response Body Description
| Key | Type | Description |
|---|---|---|
success | boolean | Request processing status (true: Success, false: Failed) |
code | int | Response code from the system |
messages | array | List of messages returned by the system |
data | object | Object containing user information (see details below) |
Details of the data object:
| Key | Type | Description |
|---|---|---|
id | int | User ID |
createdDate | string | User account creation time (ISO 8601 format) |
comId | int | Company ID |
code | string | User code |
name | string | User's full name |
phone | string | User's phone number |
email | string | User's email address |
address | string | User's address |
identityVerificationStatus | object | User's identity verification status (used when a document requires the signer's identity to be verified): {"value": int, "description": string} 0: Not verified 1: Verified 2: Failed 3: Expired 4: Manual review |
identityVerifiedType | object | Identity verification method used: {"value": int, "description": string} 0: Unknown 1: Tax code / Citizen ID 2: Passport 3: Electronic identity |
identityVerifiedSource | object | Source/channel through which identity verification was performed: {"value": int, "description": string} 0: Unknown 1: SmartCA 2: eKYC 3: VNeID 4: Manual |
isValid | boolean | Account verification/validity status (true: Valid, false: Not valid) |
signConfirmationEnabled | boolean | Whether two-factor authentication is used for signing/approval (true: Enabled, false: Disabled) |
isAccountLocked | boolean | Account lock status (true: Locked, false: Active) |
accountId | string | Account ID |
signatureText | string | User's default signature text |
signMethod | object | Signing method: {"value": int, "description": string} 2: VNPT Smart CA 3: USB Token digital signature |
status | object | Activity status: {"value": int, "description": string}1: Enabled -1: Disabled |
receiveOtpMethod | object | OTP receiving method: {"value": int, "description": string} 1: Email 2: SMS -1: None |
receiveNotificationMethod | object | Document notification receiving method: {"value": int, "description": string} 1: Email 2: SMS -1: None |
personalCertificateId | int | ID of the personal digital certificate assigned to the user |
usedMemory | int | Storage capacity used |
roles | array | List of the user's roles (Array[object]) (see details below) |
departments | array | List of departments the user belongs to (Array[object]) (see details below) |
groups | array | List of user groups the user is a member of |
titles | array | List of the user's job titles |
userCertificates | array | List of the user's digital certificates (SmartCA/Token) (Array[object]) (see details below) |
smartCaGroups | array | List of the user's SmartCA groups |
allowedCertificateUids | array | List of certificate UIDs allowed to be used for signing by this user |
waitingChangeRequest | boolean | Whether there is a pending change request awaiting approval (true/false) |
twoFactorEnabled | boolean | Enable/disable two-factor authentication (true/false) |
Details of the roles array:
| Key | Type | Description |
|---|---|---|
id | string | Role ID (GUID format) |
code | string | Role code (e.g., Admin, Default, etc.) |
name | string | Display name of the role |
description | string | Detailed description of the role |
roleLevel | int | Level/rank of the role in the system |
Details of the departments array:
| Key | Type | Description |
|---|---|---|
id | int | Department ID |
name | string | Department name |
code | string | Department code |
Details of the userCertificates array:
| Key | Type | Description |
|---|---|---|
id | int | ID of the digital certificate in the system |
name | string | Name of the digital certificate |
commonName | string | Subject name of the digital certificate (CN) |
uid | string | Citizen ID / passport number / tax code of the certificate owner |
validFrom | string | Start date of the certificate's validity period (ISO 8601/UTC format) |
validTo | string | Expiration date of the certificate (ISO 8601/UTC format) |
serialNumber | string | Unique serial number of the digital certificate |
subjectDN | string | Subject Distinguished Name string |
issuerDN | string | Issuer Distinguished Name string (the certificate authority that issued the certificate) |
status | object | Digital certificate status: {"value": int, "description": string}1: Active |
smartCaServiceName | string | Name of the applied SmartCA service package |
smartCaSignMethod | object | SmartCA signing method: {"value": int, "description": string} (e.g., Normal, etc.) |
smartCaAccountType | object | SmartCA account type: {"value": int, "description": string} (e.g., Personal, etc.) |
smartCaUsername | string | SmartCA login username (usually the citizen ID number or tax code) |
isValid | boolean | Current validity status of the certificate (true: Valid, false: Invalid/Expired) |
provider | object | Digital certificate service provider: {"value": int, "description": string} 0: Self-Signed certificate 1: VNPT SmartCA |
createdDate | string | Date the certificate was created in the system (ISO 8601 format) |
isBusinessSmartCaAccount | boolean | Whether this is a business SmartCA account (true: Business, false: Personal) |
ownerId | int | ID of the certificate owner |
createdByUserId | int | ID of the user who created/assigned this certificate |
isDefaultSmartCaCert | boolean | Whether this certificate is the user's default SmartCA certificate (true/false) |