Skip to main content
Version: 2.3.0

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:
KeyTypeDescription
idint[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​

KeyTypeDescription
successbooleanRequest processing status (true: Success, false: Failed)
codeintResponse code from the system
messagesarrayList of messages returned by the system
dataobjectObject containing user information (see details below)

Details of the data object:​

KeyTypeDescription
idintUser ID
createdDatestringUser account creation time (ISO 8601 format)
comIdintCompany ID
codestringUser code
namestringUser's full name
phonestringUser's phone number
emailstringUser's email address
addressstringUser's address
identityVerificationStatusobjectUser'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
identityVerifiedTypeobjectIdentity verification method used: {"value": int, "description": string}
0: Unknown
1: Tax code / Citizen ID
2: Passport
3: Electronic identity
identityVerifiedSourceobjectSource/channel through which identity verification was performed: {"value": int, "description": string}
0: Unknown
1: SmartCA
2: eKYC
3: VNeID
4: Manual
isValidbooleanAccount verification/validity status (true: Valid, false: Not valid)
signConfirmationEnabledbooleanWhether two-factor authentication is used for signing/approval (true: Enabled, false: Disabled)
isAccountLockedbooleanAccount lock status (true: Locked, false: Active)
accountIdstringAccount ID
signatureTextstringUser's default signature text
signMethodobjectSigning method: {"value": int, "description": string}
2: VNPT Smart CA
3: USB Token digital signature
statusobjectActivity status: {"value": int, "description": string}
1: Enabled
-1: Disabled
receiveOtpMethodobjectOTP receiving method: {"value": int, "description": string}
1: Email
2: SMS
-1: None
receiveNotificationMethodobjectDocument notification receiving method: {"value": int, "description": string}
1: Email
2: SMS
-1: None
personalCertificateIdintID of the personal digital certificate assigned to the user
usedMemoryintStorage capacity used
rolesarrayList of the user's roles (Array[object]) (see details below)
departmentsarrayList of departments the user belongs to (Array[object]) (see details below)
groupsarrayList of user groups the user is a member of
titlesarrayList of the user's job titles
userCertificatesarrayList of the user's digital certificates (SmartCA/Token) (Array[object]) (see details below)
smartCaGroupsarrayList of the user's SmartCA groups
allowedCertificateUidsarrayList of certificate UIDs allowed to be used for signing by this user
waitingChangeRequestbooleanWhether there is a pending change request awaiting approval (true/false)
twoFactorEnabledbooleanEnable/disable two-factor authentication (true/false)

Details of the roles array:​

KeyTypeDescription
idstringRole ID (GUID format)
codestringRole code (e.g., Admin, Default, etc.)
namestringDisplay name of the role
descriptionstringDetailed description of the role
roleLevelintLevel/rank of the role in the system

Details of the departments array:​

KeyTypeDescription
idintDepartment ID
namestringDepartment name
codestringDepartment code

Details of the userCertificates array:​

KeyTypeDescription
idintID of the digital certificate in the system
namestringName of the digital certificate
commonNamestringSubject name of the digital certificate (CN)
uidstringCitizen ID / passport number / tax code of the certificate owner
validFromstringStart date of the certificate's validity period (ISO 8601/UTC format)
validTostringExpiration date of the certificate (ISO 8601/UTC format)
serialNumberstringUnique serial number of the digital certificate
subjectDNstringSubject Distinguished Name string
issuerDNstringIssuer Distinguished Name string (the certificate authority that issued the certificate)
statusobjectDigital certificate status: {"value": int, "description": string}
1: Active
smartCaServiceNamestringName of the applied SmartCA service package
smartCaSignMethodobjectSmartCA signing method: {"value": int, "description": string} (e.g., Normal, etc.)
smartCaAccountTypeobjectSmartCA account type: {"value": int, "description": string} (e.g., Personal, etc.)
smartCaUsernamestringSmartCA login username (usually the citizen ID number or tax code)
isValidbooleanCurrent validity status of the certificate (true: Valid, false: Invalid/Expired)
providerobjectDigital certificate service provider: {"value": int, "description": string}
0: Self-Signed certificate
1: VNPT SmartCA
createdDatestringDate the certificate was created in the system (ISO 8601 format)
isBusinessSmartCaAccountbooleanWhether this is a business SmartCA account (true: Business, false: Personal)
ownerIdintID of the certificate owner
createdByUserIdintID of the user who created/assigned this certificate
isDefaultSmartCaCertbooleanWhether this certificate is the user's default SmartCA certificate (true/false)