Xóa CTS SmartCA
Ngày cập nhật: 1 tháng 4, 2025
Người cập nhật: VNPT eContract's team
Mục đích
Hàm thực hiện xóa CTS SmartCA của người dùng. Nếu chứng thư bị xóa đang được đặt làm mặc định, hệ thống sẽ tự động chọn một chứng thư khác và đánh dấu mặc định.
Xem thêm: Thêm mới CTS SmartCA, Cập nhật CTS SmartCA
- Request URL:
/api/users/smart-ca/delete
- HTTP method:
POST
- HTTP content-type:
application/json
- Authorize:
Bearer token
- Parameter:
Key | Type | Description |
---|---|---|
id | string | [Bắt buộc] Id chứng thư số |
userId | int | [Bắt buộc] Id người dùng |
Mẫu request
{
"id": 37665,
"userId": 1234
}
Mẫu response body
{
"data": {
"id": 1234,
"createdDate": "2021-01-06T17:06:07.2893325",
"comId": 16,
"code": "mycode",
"username": "myusername",
"name": "Nguyễn Văn A",
"phone": "0919XXXXXX",
"email": "email_address",
"validFrom": "2021-12-07T09:15:00",
"validTo": "2022-12-07T09:15:00",
"isValid": true,
"signConfirmationEnabled": false,
"isAccountLocked": false,
"accountId": "c59125a9-5fee-44e2-b0ff-b229634bf0b2",
"signatureText": "Ký bởi: {{SubjectDN.CN}} / {{SubjectDN.O}} / {{SubjectDN.OU}} / {{SubjectDN.UID}}\r\nChức vụ: {{SubjectDN.T}}\r\nKý ngày: {{SignTime}}",
"roles": [
{
"id": "29e1138e-833e-4b3a-897a-08da9c3dd633",
"code": "Admin",
"name": "Admin quản lý công ty",
"description": "Tài khoản admin quản lý công ty"
}
],
"signMethod": {
"value": 2,
"description": "VNPT SmartCA"
},
"status": {
"value": 1,
"description": "Enabled"
},
"receiveOtpMethod": {
"value": 1,
"description": "Email"
},
"receiveNotificationMethod": {
"value": 0,
"description": "Email"
},
"personalCertificateId": 22105,
"smartCaId": 19843,
"extraValues": [
],
"usedMemory": 0,
"defaultSmartCa": {
"id": 37666,
"name": "Nguyễn Văn A 26",
"commonName": "Nguyễn Văn A",
"uid": "08009000000",
"validFrom": "2025-03-07T08:56:16Z",
"validTo": "2026-03-07T08:56:16Z",
"serialNumber": "540101014e4653549c5a6fdcb9c89999",
"subjectDN": "UID=CCCD:08009000000,CN=Nguyễn Văn A,L=Quận 3,ST=Hồ Chí Minh,C=VN",
"status": {
"value": 1,
"description": "Active"
},
"smartCaServiceName": "TEST_CÁ NHÂN ĐỐI TÁC",
"smartCaSignMethod": {
"value": 1,
"description": "Normal"
},
"smartCaAccountType": {
"value": 1,
"description": "Personal"
},
"smartCaUsername": "08009000000",
"isValid": true,
"provider": {
"value": 1,
"description": "VNPT SmartCA"
},
"createdDate": "2025-03-17T08:56:42.4886305+07:00",
"isBusinessSmartCaAccount": false,
"ownerId": 6,
"createdByUserId": 6
},
"userCertificates": [
{
"id": 37666,
"name": "Nguyễn Văn A 26",
"commonName": "Nguyễn Văn A",
"uid": "08009000000",
"validFrom": "2025-03-07T08:56:16Z",
"validTo": "2026-03-07T08:56:16Z",
"serialNumber": "540101014e4653549c5a6fdcb9c89999",
"subjectDN": "UID=CCCD:08009000000,CN=Nguyễn Văn A,L=Quận 3,ST=Hồ Chí Minh,C=VN",
"status": {
"value": 1,
"description": "Active"
},
"smartCaServiceName": "TEST_CÁ NHÂN ĐỐI TÁC",
"smartCaSignMethod": {
"value": 1,
"description": "Normal"
},
"smartCaAccountType": {
"value": 1,
"description": "Personal"
},
"smartCaUsername": "08009000000",
"isValid": true,
"provider": {
"value": 1,
"description": "VNPT SmartCA"
},
"createdDate": "2025-03-17T08:56:42.4886305+07:00",
"isBusinessSmartCaAccount": false,
"ownerId": 6,
"createdByUserId": 6
}
],
"smartCaGroups": [
]
},
"success": true,
"code": 0,
"messages": [
"Delete SmartCA certificate success"
]
}