Documentation
HomeStatusSign in ->
  • Developer guide
  • How it works?
  • Integration Quick Guide
    • Link Flow
    • Embedded Flow
    • Running Workflow
  • Production setup
  • Widget
    • Methods
    • Inline mode
  • Postman Collection
  • Records
    • Introduction
    • Migration Guide: Migrating from Cases to Records
  • TRANSACTIONLINK API
    • API Reference
      • Authentication
      • Cases (deprecated)
      • Resources
      • Parameters
      • Token
      • Link
      • Workflows
      • Records
        • Attachments
    • API Changelog
    • API Versioning
Powered by GitBook
On this page

Was this helpful?

  1. Integration Quick Guide

Running Workflow

PreviousEmbedded FlowNextProduction setup

Last updated 4 months ago

Was this helpful?

The Workflows API enables the initiation of workflows that do not involve integrations requiring interaction with the end user, such as scanning documents or completing forms. All necessary data for the execution of the process can be provided through input parameters.

Flow overview

Steps

Create Case

The initial step is to create a case, which represents an individual who will go through the workflow.

During case creation, you can provide additional data such as first name, last name, number, or company name. These details can be utilized when executing tasks in the workflow. This step must be carried out on your backend server.

Please ensure that you create a Case for every new end user, as it acts as their representation within the system. For returning users, you can utilize the previously created Case to streamline the process.

Create Parameters (optional)

The second step involves passing custom parameters to the workflow if the process requires it. Configuration of this should be done from the dashboard.

Run Workflow

Next, we can initiate the workflow by providing the workflowDefinitionId, caseId, and optional parametersId.

Check Workflow Status

The workflow result will only be available upon its completion. To check if the workflow has finished, one can implement long polling and periodically check its status through an API or receive a webhook with information about the completed process.

Get Workflow Result

Upon receiving confirmation that the workflow has finished, you can then fetch the result of the process. The specific outcome of the process is contingent upon its individual configuration.

Check Workflow Status

get

Check Workflow Status

Path parameters
workflowIdstring ยท uuidRequired

Workflow Identifier

Responses
200
Return the Workflow Status.
application/json
404
Workflow Not Found
application/json
get
GET /workflows/{workflowId} HTTP/1.1
Host: api.transactionlink.io
Accept: */*
{
  "id": "e1413f5b-acb0-4995-919a-3fc60c9592c5",
  "caseId": "c3faa0ef-e83a-41e8-b178-9fd8e4b0ee81",
  "status": "COMPLETED"
}

Get Workflow Result

get

Get Workflow Result

Path parameters
workflowIdstring ยท uuidRequired

Workflow Identifier

Responses
200
Return the Workflow Result.
application/json
404
Workflow Not Found
application/json
get
GET /workflows/{workflowId}/result HTTP/1.1
Host: api.transactionlink.io
Accept: */*
{
  "createdDate": "text",
  "caseId": "text",
  "partyId": "text",
  "partyDetails": {
    "personal": {
      "firstName": "text",
      "lastName": "text",
      "personalNumber": "text",
      "email": "text",
      "phone": {
        "countryCode": "text",
        "number": "text"
      }
    },
    "business": {
      "companyNumber": "text",
      "companyName": "text",
      "companyAddress": "text"
    },
    "documents": [
      {
        "resourceId": "text",
        "resourceName": "text",
        "resourcePath": "text"
      }
    ]
  }
}
  • Flow overview
  • Steps
  • Create Case
  • POSTCreate case
  • Create Parameters (optional)
  • POSTCreate parameters
  • Run Workflow
  • POSTRun Workflow
  • Check Workflow Status
  • GETCheck Workflow Status
  • Get Workflow Result
  • GETGet Workflow Result

Create case

post

Create a case with provided data

Body
firstNamestringOptional

First name

lastNamestringOptional

Last name

personalNumberstringOptional

Personal Number

emailstringOptional

Email

companyNamestringOptional

Comapny name

companyNumberstringOptional

Company number

companyAddressstringOptional

Company address

Responses
201
Case was created successfully
application/json
400
Bad request body
application/json
post
POST /cases HTTP/1.1
Host: api.transactionlink.io
Content-Type: application/json
Accept: */*
Content-Length: 646

{
  "firstName": "Jan",
  "lastName": "Nowak",
  "personalNumber": 17300211234,
  "email": "jn@mail.com",
  "phone": {
    "countryCode": 48,
    "number": 666666666
  },
  "companyName": "Company name",
  "companyNumber": "Company number",
  "companyAddress": "Company address",
  "documents": [
    {
      "resourceId": "20fd5007-008d-447c-8378-6f81ea48fe65",
      "resourceName": "File name.pdf",
      "resourcePath": "resources/e1413f5b-acb0-4995-919a-3fc60c9592c5/20fd5007-008d-447c-8378-6f81ea48fe65/File name.pdf"
    },
    {
      "resourceId": "20fd5007-008d-447c-8378-6f81ea48fe65",
      "resourceName": "File name.pdf",
      "resourcePath": "resources/e1413f5b-acb0-4995-919a-3fc60c9592c5/20fd5007-008d-447c-8378-6f81ea48fe65/File name.pdf"
    }
  ]
}
{
  "createdDate": "text",
  "caseId": "text",
  "partyId": "text",
  "partyDetails": {
    "personal": {
      "firstName": "text",
      "lastName": "text",
      "personalNumber": "text",
      "email": "text",
      "phone": {
        "countryCode": "text",
        "number": "text"
      }
    },
    "business": {
      "companyNumber": "text",
      "companyName": "text",
      "companyAddress": "text"
    },
    "documents": [
      {
        "resourceId": "text",
        "resourceName": "text",
        "resourcePath": "text"
      }
    ]
  }
}

Create parameters

post

Create a set of parameters for given workflow definition to use

Body
workflowDefinitionIdstringRequired

Id of the workflow definition

Example: 3b2d8a4f-579f-4e2e-a51c-f859e532fe8c
parametersanyRequiredExample: {"param0":0,"param1":1.2222,"param2":true,"param3":"text"}
Responses
201
Set of parameters for given workflow was created successfully
application/json
400
Bad Request Body
application/json
404
Not Found request body
application/json
post
POST /parameters HTTP/1.1
Host: api.transactionlink.io
Content-Type: application/json
Accept: */*
Content-Length: 135

{
  "workflowDefinitionId": "3b2d8a4f-579f-4e2e-a51c-f859e532fe8c",
  "parameters": {
    "param0": 0,
    "param1": 1.2222,
    "param2": true,
    "param3": "text"
  }
}
{
  "workflowDefinitionId": "e1413f5b-acb0-4995-919a-3fc60c9592c5",
  "parametersId": "c3faa0ef-e83a-41e8-b178-9fd8e4b0ee81",
  "parameters": {
    "param1": "value1",
    "param2": true,
    "param3": "text"
  }
}

Run Workflow

post

Run Workflow

Body
caseIdstring ยท uuidRequired

Case identifier for which we want to initiate the workflow

workflowDefinitionIdstringRequired

Id of the workflow definition

Example: 3b2d8a4f-579f-4e2e-a51c-f859e532fe8c
parametersIdstringOptional

Id of the parameters used in workflow

Example: 4b6ffcb6-ab6d-44b9-b5ab-4b5147b0b302
Responses
200
Workflow has been run.
application/json
404
Workflow Definition Not Found
application/json
post
POST /workflows/run HTTP/1.1
Host: api.transactionlink.io
Content-Type: application/json
Accept: */*
Content-Length: 165

{
  "caseId": "123e4567-e89b-12d3-a456-426614174000",
  "workflowDefinitionId": "3b2d8a4f-579f-4e2e-a51c-f859e532fe8c",
  "parametersId": "4b6ffcb6-ab6d-44b9-b5ab-4b5147b0b302"
}
{
  "id": "e1413f5b-acb0-4995-919a-3fc60c9592c5",
  "caseId": "c3faa0ef-e83a-41e8-b178-9fd8e4b0ee81",
  "status": "COMPLETED"
}