Skip to main content
Version: 2.3.0

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​

KeyLocationTypeRequiredDescription
idPathintYesID 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​

KeyTypeDescription
successbooleanResponse status: true for success, false for failure.
codeintSystem response code. The success example returns 0.
messagesArray[string]Result or error messages. Empty in the success example.
dataobjectDetails of a single process template, not a paginated list.

Details of data​

KeyTypeDescription
idintProcess template ID.
namestringProcess template name.
createdDatestringCreation time in ISO 8601 format.
processInOrderbooleantrue: sequential processing; false: non-sequential processing.
isPublicbooleantrue: public/shared template; false: private template.
createdByUserIdintID of the user who created the template.
createdByUserobjectDetails of the template creator (user fields).
itemsArray[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[])​

KeyTypeDescription
orderNointProcessing order number within the template.
accessPermissionobjectPermission assigned to the step.
accessPermission.valueintNumeric permission value; the example uses 3 for Approve and 4 for Sign digital.
accessPermission.descriptionstringPermission description, such as Approve or Sign digital.
accessPermission.codestringPermission code, such as A for Approve or D for Sign digital.
processedByUserIdintID of the user assigned to the step.
processedByUserobjectDetails of the assigned user (user fields).

User fields (createdByUser, processedByUser)​

KeyTypeDescription
idintUser ID, matching the corresponding createdByUserId or processedByUserId.
codestringUser code.
namestringUser display name.
emailstringEmail address.
phonestringPhone number. May be absent, as in the second processor in the example.
comIdintCompany/organization ID.
usernamestringLogin username.
isSelectedbooleanUser selection flag.

Error response body​

Process template not found:

{
"success": false,
"code": 404,
"messages": [
"Process template not found"
]
}

Error description​

Error messageResponse body codeCauseHow to handle
Process template not found404No 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.