TAS call module - TAS 2 TAS (process creation via API)

The Endpoint Start Process API allows you to create a new case from an existing template, populate variables with input data, and immediately start the workflow with a single call. The operation is atomic — the case is either created completely or not at all.

Available in the apiExtensions plugin since version 5.7.75 and 5.17

Endpoint

Method: POST

URL: /api/plugins/api-extensions/start-process

Authentication

Each call must include a Bearer token in the HTTP header:

Authorization: Bearer <accessToken>
Content-Type: application/json

Request body

{
"processId": 27, //Header ID of the selected process
"data": {
"processVariable1": "value1",
"processVariable2": "value2"
}
}

Field

Type

Description

processId

number

The process header (template) ID from which the case is created

data

object

Key–value pairs corresponding to template variables

Supported value types in data

Type

Example

String

"value1"

Number

100

Date ( YYYY-MM-DD )

"2025-01-01"

The field must exist on the given template. For enumerated values ​​(LOV), it is necessary to use one of the existing values ​​that the LOV variable on the template contains — otherwise an error occurs and the case is not created.

Call example

try {
const accessToken = 'xxxxxx';
const configStartNewProces = {
method: "post",
url: `/api/plugins/api-extensions/start-process`,
headers: {
"Authorization": `Bearer ${accessToken}`,
"Content-Type": "application/json"
},
data: JSON.stringify({
processId: 27, //Header ID of the selected process
data: {
"processVariable1": "value1",
"processVariable2": "value2"
}
})
};
const requestStartNewProces = axios.getAxios().requestRaw(configStartNewProces);
proc.warn(`requestStartNewProces Result`, { requestStartNewProces });
} catch (error) {
proc.warn(`requestStartNewProces error`, { error });
}

The code must not contain async / await — the transpiler will fill them in automatically. Using them manually will cause an error at runtime.

Administrator recommendations

  • We recommend adding the _isCaseCreatedByAPI variable with the value "true" to the data object. This way, the template will immediately recognize that the case was created via the API and can react to this in conditions or routing.
  • All values ​​from data are already available in the Start task — the workflow can work with them immediately (conditions, routing, decision-making) without having to wait for the next step.

Example: "_isCaseCreatedByAPI": "true" — add this variable to the template as a text field and the workflow can read it right from the start.

Error behavior

If any error occurs (invalid input, non-existent processId , problem starting workflow):

  • the case will not be created ,
  • no data will be saved ,
  • No incomplete or "broken" processes will remain in the system.

Frantisek Brych Updated by Frantisek Brych

DocuSign

DB View

Contact

Syca (opens in a new tab)

Powered by HelpDocs (opens in a new tab)