Get process template by ID
Updated date: 22/10/2026
Updated by: VNPT eContract's team
Purpose
Retrieves the details of a process template by its ID, including its creator, workflow configuration, and processing steps with their assigned users and permissions.
See also: Get list of document processes.
- Request URL:
{{HOST}}/process-templates/{id} - HTTP method:
GET - Authorize:
Bearer token
Parameters
| Key | Location | Type | Required | Description |
|---|---|---|---|---|
id | Path | int | Yes | ID of the process template to retrieve. Can be obtained from the process template list API. |
Sample request
GET {{HOST}}/process-templates/9706
Authorization: Bearer <access_token>
Sample response body
{
"data": {
"id": 9706,
"name": "VB Nội bộ 2 cấp",
"createdDate": "2026-10-22T10:47:00.8796442",
"processInOrder": true,
"isPublic": false,
"createdByUser": {
"id": 101,
"code": "USER_A",
"name": "Nguyễn Văn A",
"email": "user.a@example.com",
"phone": "09XXXXXXXX",
"comId": 100,
"username": "user.a@example.com",
"isSelected": false
},
"createdByUserId": 101,
"items": [
{
"orderNo": 1,
"accessPermission": {
"value": 3,
"description": "Approve",
"code": "A"
},
"processedByUserId": 101,
"processedByUser": {
"id": 101,
"code": "USER_A",
"name": "Nguyễn Văn A",
"email": "user.a@example.com",
"phone": "09XXXXXXXX",
"comId": 100,
"username": "user.a@example.com",
"isSelected": false
}
},
{
"orderNo": 2,
"accessPermission": {
"value": 4,
"description": "Sign digital",
"code": "D"
},
"processedByUserId": 102,
"processedByUser": {
"id": 102,
"code": "USER_B",
"name": "Nguyễn Thị B",
"email": "user.b@example.com",
"comId": 100,
"username": "user.b@example.com",
"isSelected": false
}
}
]
},
"success": true,
"code": 0,
"messages": []
}
Response body description
| Key | Type | Description |
|---|---|---|
success | boolean | Response status: true for success, false for failure. |
code | int | System response code. The success example returns 0. |
messages | Array[string] | Result or error messages. Empty in the success example. |
data | object | Details of a single process template, not a paginated list. |
Details of data
| Key | Type | Description |
|---|---|---|
id | int | Process template ID. |
name | string | Process template name. |
createdDate | string | Creation time in ISO 8601 format. |
processInOrder | boolean | true: sequential processing; false: non-sequential processing. |
isPublic | boolean | true: public/shared template; false: private template. |
createdByUserId | int | ID of the user who created the template. |
createdByUser | object | Details of the template creator (user fields). |
items | Array[object] | Processing steps defined in this template (step fields). This is not a list of templates. |
In this example, the template has two sequential steps: Approve (A, value 3), then Sign digital (D, value 4).
Details of processing steps (data.items[])
| Key | Type | Description |
|---|---|---|
orderNo | int | Processing order number within the template. |
accessPermission | object | Permission assigned to the step. |
accessPermission.value | int | Numeric permission value; the example uses 3 for Approve and 4 for Sign digital. |
accessPermission.description | string | Permission description, such as Approve or Sign digital. |
accessPermission.code | string | Permission code, such as A for Approve or D for Sign digital. |
processedByUserId | int | ID of the user assigned to the step. |
processedByUser | object | Details of the assigned user (user fields). |
User fields (createdByUser, processedByUser)
| Key | Type | Description |
|---|---|---|
id | int | User ID, matching the corresponding createdByUserId or processedByUserId. |
code | string | User code. |
name | string | User display name. |
email | string | Email address. |
phone | string | Phone number. May be absent, as in the second processor in the example. |
comId | int | Company/organization ID. |
username | string | Login username. |
isSelected | boolean | User selection flag. |
Error response body
Process template not found:
{
"success": false,
"code": 404,
"messages": [
"Process template not found"
]
}
Error description
| Error message | Response body code | Cause | How to handle |
|---|---|---|---|
Process template not found | 404 | No process template was found for the supplied ID. | Check the path parameter id and compare it with IDs returned by the process template list API. |