Trulioo Platform API (1.0.0)

Download OpenAPI specification:Download

Customer Support: support@trulioo.com

Introduction

The Trulioo Platform is used to create fast and compliant onboarding flows. The flow can be published from the dashboard in the Launcher page.

Purpose

Our new API helps you take advantage of our flow builder and access our catalog of KYC services. Build the flow that fits your requirements thanks to our no-code platform, embed it into your application, and onboard all your end-clients seamlessly, Trulioo Platform takes care of the rest. The orchestration document provides a flow execution API.

Key features

The Trulioo Platform API grants control of the flow execution and user state to the client. The user state is associated with a session id (x-hf-session). See the diagram below for an overview of the integration.

workflow studio diagram

Using the API

Four most important API Calls are:

  • Initialize
  • Submit data
  • Retrieve profile data from a client
  • Client Credential flow

Other end points

  1. FlowStep operation

    Requests data about the current state of a user in the flow. Creates a state if none is provided by returning a Header (x-hf-session) which represents a session ID. If the header is passed in the request, the operation will return the step response according to the flow execution state, otherwise, it will generate a session and initialize the flow from the first step.

  2. SubmitStep operation

    Submits data - triggers the execution of the current step, modifies the state with the data provided, and returns the next step in the flow. The flow execution always ends with an END step even if it is not added to the flow.

  3. getBackStep operation

    Returns to the previous step in the flow - computes a backward step in the flow. Multiple backward steps can be performed until the root (first) step of the flow. Non-interactive services are re-executed if they exist between a backward and a forward step.

Other Considerations

  • Flow steps defined in the builder may not coincide with the orchestration flow of execution. This can occur due to non-interactive services which are triggered in the background and condition logic which creates mutually exclusive reachable paths.
  • Some services can take a long time to execute and will return a pending state rather than wait until the next step is computed. In this case, you can call FlowStep repeatedly until you get the next step.
  • Field ids in the client form are automatically generated, therefore, we suggest implementing dynamic field mapping between the form and WF API.
  • To test version of a flow rather than the live (published) version, prefix the endpoint path with /test.
  • Flows can be published as authenticated using the flow builder UI. By restricting integration access exclusively to the Trulioo Platform API, this action enhances security and enables a regulated interaction with your flow.
  • National ID and Social service number may have different names based on country. When applicable, a tooltip is added next to the field with the proper name based on the country chosen.

Resources

Get current step or initialize a flow

path Parameters
flowId
required
string

The ID of the flow

header Parameters
x-hf-session
string

UUID for a user state in the execution flow (generated in the first interaction with a flow)

x-hf-language
string

Selected language for flow execution

Responses

Response samples

Content type
application/json
Example
{
  • "id": "string",
  • "title": "string",
  • "subtitle": "string",
  • "elements": [
    ],
  • "canGoBack": false,
  • "countryOfResidence": "string",
  • "countryOfIncorporation": "string"
}

Submit data for the current step of a flow

path Parameters
flowId
required
string

The ID of the flow

header Parameters
x-hf-session
string

ID for a user state in the execution flow (generated in the first interaction with a flow).

Alternatively, this header can be omitted to directly submit data for the first form node. Note that direct submission is only supported for form nodes.

x-hf-language
string

Selected language for flow execution

x-hf-retry-on-pending
boolean

This header determines whether the conditional node should block the flow’s execution until the service completes and returns the next node. When set to true, the system will attempt to return the next node within 30 seconds.

  • Interactive Node: If the next node is interactive (e.g. a form node or an interactive service node), it will be returned.
  • End Node: If the next node is an end node, the end node will be returned.
  • Pending Response: If the process exceeds 30 seconds, the response will include "type": "pending", along with the header "x-hf-session", containing the session ID for tracking the user’s state in the flow. This session ID can be used for continued polling to retrieve information related to that specific execution.

This mechanism allows the flow to continue progressing, even if the complete result is not immediately available.

Request Body schema: application/json
One of
property name*
additional property
object

Responses

Request samples

Content type
application/json
Example
{
  • "firstNameFieldId": "John",
  • "lastNameFieldId": "Doe",
  • "streetFieldId": "main street",
  • "aNumberFieldId": 4,
  • "aCheckBoxGroupElementId": [
    ]
}

Response samples

Content type
application/json
Example
{
  • "id": "string",
  • "title": "string",
  • "subtitle": "string",
  • "elements": [
    ],
  • "canGoBack": false,
  • "countryOfResidence": "string",
  • "countryOfIncorporation": "string"
}

Submit file for the current step of a flow

path Parameters
flowId
required
string

The ID of the flow

header Parameters
x-hf-session
required
string

UUID for a user state in the execution flow (generated in the first interaction with a flow)

Request Body schema: multipart/form-data
string <binary>

Responses

Response samples

Content type
application/json
{
  • "key": "string"
}

Computes a backward step in the flow execution.

path Parameters
flowId
required
string

The ID of the flow

header Parameters
x-hf-session
string

UUID for a user state in the execution flow (generated in the first interaction with a flow)

x-hf-language
string

Selected language for flow execution

Responses

Response samples

Content type
application/json
Example
{
  • "id": "string",
  • "title": "string",
  • "subtitle": "string",
  • "elements": [
    ],
  • "canGoBack": false,
  • "countryOfResidence": "string",
  • "countryOfIncorporation": "string"
}

Flow connector

Use these endpoints when you want to connect an existing client to a flow.

Connect a clientId to a flow by generating a token

path Parameters
clientId
required
string

UUID for a user state in the execution flow (generated in the first interaction with a flow)

flowId
required
string

The ID of the flow

Responses

Response samples

Content type
application/json
{
  • "token": "string"
}

Connects a user with a flow with a token

path Parameters
token
required
string

The token generated in #connector endpoint

Responses

Response samples

Content type
application/json
{
  • "flowId": "string"
}

Error codes

Error code Description
4000 Flow not found
4001 Flow theme not found
4002 Node not found
4003 Flow is empty
4005 Root node is not a subsequent token node
4006 Missing data for required element
4007 Submitted data is malformed
4008 Failed validation for submitted data
4009 Service execution failed
4011 Invalid token
4012 Token has expired
4013 Flow already finished
4014 Invalid submit data
4015 Invalid direct submit on root not form node
4050 Invalid credentials
4100 Client not found
4101 Client has no flow with given ID
4102 Subsequent token not found
4103 Illegal back action
4105 Create linked leads invalid request
4106 Delete linked leads invalid request
4109 EndClient marked as abandoned
4110 Could not retrieve full end client data
4200 Service not configured
4201 Service not configured for country
5000 Internal error
5300 Invalid Twilio code
5301 Failed to send SMS to phone number
5302 Twilio internal error
6504 Service has timed out

EndClient API

Use these endpoints when you want to link/unlink end clients.

Create a link between two end clients

Request Body schema: application/json
One of
to
string

EndClient ID to link to

from
string

EndClient ID to link from

type
string
Enum: "RELATES_TO" "DUPLICATE_OF" "OWNS" "OWNED_BY"

Type of the link to be created

Responses

Request samples

Content type
application/json
{
  • "to": "string",
  • "from": "string",
  • "type": "RELATES_TO"
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "code": 0
}

Delete a link between two end clients

Request Body schema: application/json
One of
to
string

EndClient ID to link to

from
string

EndClient ID to link from

Responses

Request samples

Content type
application/json
{
  • "to": "string",
  • "from": "string"
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "code": 0
}