Process Instance in TrustX API

Introduction

This guide will describe how activities in a Process Definition can be navigated programatically using the API. Requests and responses are provided for each activity that would be used as part of a typical ID&V flow in TrustX.

For information on configuring a Process Definition using the Backoffice Process Designer, see the Process Definition Guide.

Create a Process Token

Example Request:

POST https://skyqc1.oak.trustx-qc.com/api/process-manager/processTokens
Content-Type: application/json
Authorization: Bearer {{token}}

{
"name": "{{$randomIngverb}}-{{$randomNoun}}",
"description": "{{$randomPhrase}}",
"status": "ACTIVE",
"type": "UNLIMITED",
"processDefnName": "{{processdefname}}",
"processDefnVersion": {{processdefversion}},
"uiUrl": "{{$randomUrl}}",
"parameters": {
"firstName": "{{$randomFirstName}}",
"lastName": "{{$randomLastName}}",
"email": "{{$randomEmail}}",
"phoneNumber": "{{$randomPhoneNumber}}",
"referenceID": "asdasd"
}
}

Example Response:

{
"createdDtm": "2023-12-14T22:44:06.219Z",
"lastUpdatedDtm": "2023-12-14T22:44:06.219Z",
"createdBy": "API Key: jasontestapikey",
"lastUpdatedBy": "API Key: jasontestapikey",
"id": "IRV4KRZC4UGNUUBGT47N7K27IQ",
"tenantId": "skyqc1",
"name": "synthesizing-panel",
"processDefnName": "xProofTrustXIntegrationDocoSampleProcess",
"processDefnVersion": 3,
"uiUrl": "http://constance.net",
"status": "ACTIVE",
"type": "UNLIMITED",
"counter": 0,
"maxProcessDuration": "PT48H",
"parameters": {
"firstName": "Cathy",
"lastName": "Cassin",
"email": "Myrl_Rempel89@yahoo.com",
"phoneNumber": "310-443-0819",
"referenceID": "asdasd"
},
"forTest": false,

Create Process Instance

Example Request:

POST https://skyqc1.oak.trustx-qc.com/api/process-manager/processInstances/create?pt={{processTokenId}}
Authorization: Bearer {{token}}
{}

Example Response:

{
"redirectUrl": "https://alek.org?ps=https%3A%2F%2Fskyqc1.oak.trustx-qc.com%2Fapi%2Fprocess-server%2FstartProcess%3Fpi%3DFHYDHK7SJ5QRHDKUNAXGUB4OUE",
"processInstanceId": "FHYDHK7SJ5QRHDKUNAXGUB4OUE"
}

Start a Process Instance

Example Request:

POST https://skyprodqc.oak.trustx.com/api/process-server/startProcess?pi=NY3YGDMK3MECEOHVDE7AYDQT74
Content-Type: application/json

{
     "isMobile":true
}

Example Response:

{
"code": 202,
"message": "Successful processing.",
"status": "SUCCESSFUL_PROCESSING",
"tenantId": "skyqc1",
"businessKey": "6KT7ETUKDYYZGZR7I3JOQPKQUU",
"stepId": "face-capture",
"screenId": "instructions",
"screens": [
"instructions",
"capture"
],
"variables": {
"preSignedHeaders": {
"Content-Type": "image/jpeg",
"x-amz-server-side-encryption": "aws:kms",
"x-amz-tagging": "RemoveAfter=30d",
"x-amz-server-side-encryption-aws-kms-key-id": "8965bbca-14f2-4edd-8d77-ab9c8fad1c84"
},
"continueProcessUrl": "https://skyqc1.oak.trustx-qc.com/api/process-server/processes/v1_activities/businessKeys/6KT7ETUKDYYZGZR7I3JOQPKQUU/topicName/L-f64d40d6-1d15-41c1-a345-31a3b4dc3f1a/continue",
"activityConfig": {
"faceImageFormat": "jpeg",
"faceKey": "face1",

Introduction Screen

Introduction activity in Process Designer

Screen in Trust Web Flow:


Example Request:

POST https://skyprodqc.oak.trustx.com/api/process-server/processes/v1_activities/businessKeys/NY3YGDMK3MECEOHVDE7AYDQT74/topicName/L-1c61b9f2-3657-421d-ac27-1e84cc67c1f3/continue?currentLanguage=en
Content-Type: application/json

{}

Example Response:

{
"code": 202,
"message": "Successful processing.",
"status": "SUCCESSFUL_PROCESSING",
"tenantId": "skyprodqc",
"businessKey": "NY3YGDMK3MECEOHVDE7AYDQT74",
"stepId": "consent",
"screenId": "consent",
"screens": [
"consent"
],
"variables": {
"continueProcessUrl": "https://skyprodqc.oak.trustx.com/api/process-server/processes/v1_activities/businessKeys/NY3YGDMK3MECEOHVDE7AYDQT74/topicName/L-fb798eb0-19a2-4bb8-9529-951835263bf0/continue",
"activityConfig": {
"activities": [
null,
"consent",
"face-capture",
"document-capture",
"additional-documents"
],
"items": [
"{\"title\":\"Terms and Conditions\",\"label\":\"termsAndConditions\",\"url\":\"https://cdn.trustx.com/consents/2023-08-29-term_of_use_consent.html\",\"type\":\"url\"}",
Capture Consent activity in the Process Designer

Screen in Trust Web Flow:


Example Request:

POST https://skyprodqc.oak.trustx.com/api/process-server/processes/v1_activities/businessKeys/NY3YGDMK3MECEOHVDE7AYDQT74/topicName/L-fb798eb0-19a2-4bb8-9529-951835263bf0/continue?currentLanguage=en
Content-Type: application/json

{}

Example Response:

{
"code": 202,
"message": "Successful processing.",
"status": "SUCCESSFUL_PROCESSING",
"tenantId": "skyprodqc",
"businessKey": "NY3YGDMK3MECEOHVDE7AYDQT74",
"stepId": "face-capture",
"screenId": "instructions",
"screens": [
"instructions",
"capture"
],
"variables": {
"preSignedHeaders": {
"x-amz-server-side-encryption": "aws:kms",
"x-amz-tagging": "RemoveAfter=30d",
"x-amz-server-side-encryption-aws-kms-key-id": "2e4180f4-3f49-4cda-8e75-56ee977e0996",
"Content-Type": "image/jpeg"
},
"continueProcessUrl": "https://skyprodqc.oak.trustx.com/api/process-server/processes/v1_activities/businessKeys/NY3YGDMK3MECEOHVDE7AYDQT74/topicName/L-648c37b4-cc5b-417c-9437-d97b344f4c8f/continue",
"activityConfig": {
"faceImageFormat": "jpeg",
"faceKey": "face1",

Capture Face Image Screen

Capture Face Image activity in Process Designer

Screen in Trust Web Flow:


Example Request:

PUT https://sky-qc-oak-data-eu-west-1.s3.eu-west-1.amazonaws.com/tenants/skyqc1/processDefinitions/3TS76CKBQXUYXRV6ZVC3XTDY2Y/processInstances/6KT7ETUKDYYZGZR7I3JOQPKQUU/faces/face1/c8da0912-209f-464c-a3b4-48a7845a6ace/face.jpeg?...

Host: {aws_url}
User-Agent: {browser_user_agent}
Accept: */*
Content-Length: 121212
Content-Type: image/jpeg

<the raw bytes>

Example Response:

200 OK

Continue After Face Upload

Example Request:

POST https://skyqc1.oak.trustx-qc.com/api/process-server/processes/v1_activities/businessKeys/6KT7ETUKDYYZGZR7I3JOQPKQUU/topicName/L-f64d40d6-1d15-41c1-a345-31a3b4dc3f1a/continue
Content-Type: application/json

{}

Example Response:

{
"code": 202,
"message": "Successful processing.",
"status": "SUCCESSFUL_PROCESSING",
"tenantId": "skyqc1",
"businessKey": "H7G3BG4WSYM2UA2RKYEXDXHDBU",
"stepId": "face-capture",
"screenId": "preview",
"screens": [
"preview"
],
"variables": {
"continueProcessUrl": "https://skyqc1.oak.trustx-qc.com/api/process-server/processes/v1_activities/businessKeys/H7G3BG4WSYM2UA2RKYEXDXHDBU/topicName/L-cbf8dd31-8aaf-4b18-a4ea-77bd838f07eb/continue",
"activityConfig": {
"activities": null
}
},
"redirectUrl": null,
"themeUrl": null,
"currentLanguage": null,
"defaultLanguage": "en",
"supportedLanguages": [],
"localizationConfigUrl": "https://cdn.oak.trustx-qc.com/"
{
"code": 748,
"message": "No face could be found in the image. ",
"status": "NO_FACE",
"tenantId": "skyqc1",
"businessKey": "SVJTRN4LYMIUZRHJWLNFL6C65Y",
"stepId": "face-capture",
"screenId": "preview",
"screens": [
"instructions",
"capture"
],
"variables": {
"preSignedHeaders": {
"x-amz-server-side-encryption": "aws:kms",
"x-amz-tagging": "RemoveAfter=30d",
"x-amz-server-side-encryption-aws-kms-key-id": "8965bbca-14f2-4edd-8d77-ab9c8fad1c84",
"Content-Type": "image/jpeg"
},
"continueProcessUrl": "https://skyqc1.oak.trustx-qc.com/api/process-server/processes/v1_activities/businessKeys/SVJTRN4LYMIUZRHJWLNFL6C65Y/topicName/L-8e31f35e-cd06-47b6-aecf-7663a1702a2d/continue",
"activityConfig": {
"faceImageFormat": "jpeg",
"faceKey": "face1",
"cameraHeight": 720,
{
"code": 802,
"message": "Face too small. Please move closer to camera.",
"status": "TOO_SMALL",
"tenantId": "skyqc1",
"businessKey": "6KQATJG5OLK5APL2I7LL3TAM5Q",
"stepId": "face-capture",
"screenId": "preview",
"screens": [
"instructions",
"capture"
],
"variables": {
"preSignedHeaders": {
"x-amz-server-side-encryption": "aws:kms",
"x-amz-tagging": "RemoveAfter=30d",
"x-amz-server-side-encryption-aws-kms-key-id": "8965bbca-14f2-4edd-8d77-ab9c8fad1c84",
"Content-Type": "image/jpeg"
},
"continueProcessUrl": "https://skyqc1.oak.trustx-qc.com/api/process-server/processes/v1_activities/businessKeys/6KQATJG5OLK5APL2I7LL3TAM5Q/topicName/L-c045dc2d-e49c-4b29-b034-c224799c0042/continue",
"activityConfig": {
"faceImageFormat": "jpeg",
"faceKey": "face1",
{
"code": 120,
"message": "Error while trying to check face liveness",
"status": "FACE_LIVENESS_CHECK_FAILED",
"tenantId": "skyqc1",
"businessKey": "6RNPABWVSO5C7IFO3D3KCCEEX4",
"stepId": "face-capture",
"screenId": "preview",
"screens": [
"instructions",
"capture"
],
"variables": {
"preSignedHeaders": {
"Content-Type": "image/jpeg",
"x-amz-server-side-encryption": "aws:kms",
"x-amz-tagging": "RemoveAfter=30d",
"x-amz-server-side-encryption-aws-kms-key-id": "8965bbca-14f2-4edd-8d77-ab9c8fad1c84"
},
"continueProcessUrl": "https://skyqc1.oak.trustx-qc.com/api/process-server/processes/v1_activities/businessKeys/6RNPABWVSO5C7IFO3D3KCCEEX4/topicName/L-5e69fa6d-0bfe-4c63-95af-351e63f6bc54/continue",
"activityConfig": {
"faceImageFormat": "jpeg",
"faceKey": "face1",

Confirm Face Image

Confirm Face Image activity in the Process Designer

Example Request:

POST https://skyqc1.oak.trustx-qc.com/api/process-server/processes/v1_activities/businessKeys/H7G3BG4WSYM2UA2RKYEXDXHDBU/topicName/L-cbf8dd31-8aaf-4b18-a4ea-77bd838f07eb/continue
Content-Type: application/json

{
"photoConfirmed": true
}

Example Response:

{
    "code": 202,
    "message": "Successful processing.",
    "status": "SUCCESSFUL_PROCESSING",
    "tenantId": "skyqc1",
    "businessKey": "AIZKI75MR2CBXGGK3DI7MDYMBM",
    "stepId": "document-capture",
    "screenId": "document-type-selection",
    "screens": [
        "document-type-selection",
        "country-selection"
    ],
    "variables": {
        "continueProcessUrl": "https://skyqc1.oak.trustx-qc.com/api/process-server/processes/v1_activities/businessKeys/AIZKI75MR2CBXGGK3DI7MDYMBM/topicName/L-d886f3ea-1c7b-409d-b85e-6f68ec7de2e1/continue",
        "activityConfig": {
            "activities": null,
            "documentTypes": [
                "DRIVERS_LICENSE",
                "ID_CARD",
                "PASSPORT",
{
"code": 202,
"message": "Successful processing.",
"status": "SUCCESSFUL_PROCESSING",
"tenantId": "skyqc1",
"businessKey": "UNGMGCWIGRRNGG424OHY2OJ2MU",
"stepId": "face-capture",
"screenId": "instructions",
"screens": [
"instructions",
"capture"
],
"variables": {
"preSignedHeaders": {
"Content-Type": "image/jpeg",
"x-amz-server-side-encryption": "aws:kms",
"x-amz-tagging": "RemoveAfter=30d",
"x-amz-server-side-encryption-aws-kms-key-id": "8965bbca-14f2-4edd-8d77-ab9c8fad1c84"
},
"continueProcessUrl": "https://skyqc1.oak.trustx-qc.com/api/process-server/processes/v1_activities/businessKeys/UNGMGCWIGRRNGG424OHY2OJ2MU/topicName/L-50b64894-863c-4357-9e4d-329f4d28317a/continue",
"activityConfig": {
"faceImageFormat": "jpeg",
"faceKey": "face1",

Select Document Type Screen

Select Document Type activity in the Process Designer

Screen in Trust Web Flow:


Example Request:

POST https://skyprodqc.oak.trustx.com/api/process-server/processes/v1_activities/businessKeys/NY3YGDMK3MECEOHVDE7AYDQT74/topicName/L-2652b742-e385-4460-8084-4a0b7cbb822f/continue?currentLanguage=en
Content-Type: application/json

{
  "documentType": "DRIVERS_LICENSE",
  "countryCode": "us"
}

Accepted document types include:

  • "DRIVERS_LICENSE"

  • "ID_CARD"

  • "PASSPORT"

  • "OTHER"

countryCode is the 2 digit ISO country code: https://www.iso.org/obp/ui/#search

Example Response:

{
"code": 202,
"message": "Successful processing.",
"status": "SUCCESSFUL_PROCESSING",
"tenantId": "skyprodqc",
"businessKey": "NY3YGDMK3MECEOHVDE7AYDQT74",
"stepId": "document-capture",
"screenId": "instructions",
"screens": [
"instructions",
"capture"
],
"variables": {
"preSignedHeaders": {
"x-amz-server-side-encryption": "aws:kms",
"x-amz-tagging": "RemoveAfter=30d",
"x-amz-server-side-encryption-aws-kms-key-id": "2e4180f4-3f49-4cda-8e75-56ee977e0996",
"Content-Type": "image/jpeg"
},
"continueProcessUrl": "https://skyprodqc.oak.trustx.com/api/process-server/processes/v1_activities/businessKeys/NY3YGDMK3MECEOHVDE7AYDQT74/topicName/L-88808b52-7bad-4f17-b5d3-96a05e3b0520/continue",

Capture Document Image (Front-Side)

Capture Document Image activity in the Process Designer

Screen in Trust Web Flow:


Example Request:

PUT https://sky-dev-oak-data-eu-west-1.s3.eu-west-1.amazonaws.com/tenants/skydev1/processDefinitions/SBO5X6LWGGLIAT5MEGUGW7FARQ/processInstances/QWK2KEAKG2DRJFLCZ4Y2UYKNG4/idDocs/doc1/ca91e176-a948-4070-b710-f49e59d4f058/cb3082bd-56f1-40b2-a7ed-f39fb85a538a/FRONT.Uncropped.id.bin?....

Host: {aws_url}
User-Agent: {browser_user_agent}
Accept: */*
Content-Length: 121212
Content-Type: image/jpeg

<the raw bytes>

Example Response:

Continue After Document Upload

Example Request:

POST https://skyprodqc.oak.trustx.com/api/process-server/processes/v1_activities/businessKeys/NY3YGDMK3MECEOHVDE7AYDQT74/topicName/L-08bcf511-fb1e-43a9-80e7-51b160a0d4e5/continue?currentLanguage=en
Content-Type: application/json

{}

Example Response:

{
"code": 202,
"message": "Successful processing.",
"status": "SUCCESSFUL_PROCESSING",
"tenantId": "skyprodqc",
"businessKey": "NY3YGDMK3MECEOHVDE7AYDQT74",
"stepId": "document-capture",
"screenId": "instructions",
"screens": [
"instructions",
"capture",
"preview"
],
"variables": {
"preSignedHeaders": {
"x-amz-server-side-encryption": "aws:kms",
"x-amz-tagging": "RemoveAfter=30d",
"x-amz-server-side-encryption-aws-kms-key-id": "2e4180f4-3f49-4cda-8e75-56ee977e0996",
"Content-Type": "image/jpeg"
},
"continueProcessUrl": "https://skyprodqc.oak.trustx.com/api/process-server/processes/v1_activities/businessKeys/NY3YGDMK3MECEOHVDE7AYDQT74/topicName/L-27ef62e0-0100-4e7c-ae69-4a80f48eb180/continue",

Capture Document Image (Back-side)

Capture Document Image activity in the Process Designer

Example Request:

PUT https://sky-dev-oak-data-eu-west-1.s3.eu-west-1.amazonaws.com/tenants/skydev1/processDefinitions/SBO5X6LWGGLIAT5MEGUGW7FARQ/processInstances/QWK2KEAKG2DRJFLCZ4Y2UYKNG4/idDocs/doc1/ca91e176-a948-4070-b710-f49e59d4f058/cb3082bd-56f1-40b2-a7ed-f39fb85a538a/FRONT.Uncropped.id.bin?....

Host: {aws_url}
User-Agent: {browser_user_agent}
Accept: */*
Content-Length: 121212
Content-Type: image/jpeg

<the raw bytes>

Example Response:

200 OK

Continue after Upload

Example Request:

POST https://skyprodqc.oak.trustx.com/api/process-server/processes/v1_activities/businessKeys/NY3YGDMK3MECEOHVDE7AYDQT74/topicName/L-e112c5e5-cbf1-4483-a5c6-d15944b4048e/continue?currentLanguage=en
Content-Type: application/json

{}

Example Response:

{
"code": 202,
"message": "Successful processing.",
"status": "SUCCESSFUL_PROCESSING",
"tenantId": "skyprodqc",
"businessKey": "NY3YGDMK3MECEOHVDE7AYDQT74",
"stepId": "additional-documents",
"screenId": "selection",
"screens": [
"selection"
],
"variables": {
"continueProcessUrl": "https://skyprodqc.oak.trustx.com/api/process-server/processes/v1_activities/businessKeys/NY3YGDMK3MECEOHVDE7AYDQT74/topicName/L-91644859-a345-4fe7-b91a-48c01b97cb14/continue",
"activityConfig": {
"additionalDocsVersion": 1,
"additionalDocuments": [
{
"id": "healthInsuranceCard",
"required": true,

Confirm Document Image


Select Additional Document Type


Example Request:

POST https://skyprodqc.oak.trustx.com/api/process-server/processes/v1_activities/businessKeys/NY3YGDMK3MECEOHVDE7AYDQT74/topicName/L-91644859-a345-4fe7-b91a-48c01b97cb14/continue?currentLanguage=en
Content-Type: application/json

{}

Example Response:

{
"code": 202,
"message": "Successful processing.",
"status": "SUCCESSFUL_PROCESSING",
"tenantId": "skyprodqc",
"businessKey": "NY3YGDMK3MECEOHVDE7AYDQT74",
"stepId": "additional-documents",
"screenId": "instructions",
"screens": [
"instructions",
"processing"
],
"variables": {
"preSignedHeaders": {
"x-amz-server-side-encryption": "aws:kms",
"x-amz-tagging": "RemoveAfter=30d",
"x-amz-server-side-encryption-aws-kms-key-id": "2e4180f4-3f49-4cda-8e75-56ee977e0996",
"Content-Type": "image/jpeg"
},
"continueProcessUrl": "https://skyprodqc.oak.trustx.com/api/process-server/processes/v1_activities/businessKeys/NY3YGDMK3MECEOHVDE7AYDQT74/topicName/L-cc5e44c7-c888-451e-bb79-0c34a5853b94/continue",

Custom Data Form

Example Request:

POST https://skyprodqc.oak.trustx.com/api/process-server/processes/v1_activities/businessKeys/NY3YGDMK3MECEOHVDE7AYDQT74/topicName/L-5f15146f-ed12-4774-999e-18244b046538/continue?currentLanguage=en
Content-Type: application/json

{}

Example Response:

{
"code": 200,
"message": "Successful processing.",
"status": "SUCCESSFUL_PROCESSING",
"tenantId": "skyprodqc",
"businessKey": "NY3YGDMK3MECEOHVDE7AYDQT74",
"stepId": "thank-you",
"screenId": "thank-you",
"screens": [
"thank-you"
],
"variables": {
"activityConfig": {
"activities": [
null,
"consent",
"face-capture",
"document-capture",
"additional-documents"
]
}
},
"redirectUrl": null,
"themeUrl": null,
"currentLanguage": "en",