Skip to main content

Flowt API (1.0.0)

Download OpenAPI specification:Download

This is Flowt's public API.

Authentication

Use the header Authorization to send authentication info.

Example:

curl -X POST -H "Authorization: Bearer $API_TOKEN" https://api.flowt.com.br/v1/workflows

Error Messages

All errors returned from one of ours APIs will follow the same pattern as shown bellow.

{
  "status": 400,
  "errors": [
    {
       "errorCode": "VAL231",
       "message": "The field 'email' is required."
    }
  ]
}

Tools API

Interact with flowt's specialized tools.

tools api diagram

Validate Document

A document is valid when there is a match between provided number and flowt's bureau data.

Authorizations:
API Key
Request Body schema: application/json
organizationId
required
string <uuid>
documentNumber
required
string
idempotencyKey
string

Responses

Request samples

Content type
application/json
{
  • "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
  • "documentNumber": "string",
  • "idempotencyKey": "string"
}

Response samples

Content type
application/json
{
  • "toolExecutionId": "156ba1b7-0c49-4e7c-bf23-f6ec140183c0",
  • "isValid": true
}

Validate Mother's Name

Verifies if the mother's name provided matches with available data in flowt's bureau.

Authorizations:
API Key
Request Body schema: application/json
organizationId
required
string <uuid>
documentNumber
required
string
motherName
required
string
idempotencyKey
string

Responses

Request samples

Content type
application/json
{
  • "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
  • "documentNumber": "string",
  • "motherName": "string",
  • "idempotencyKey": "string"
}

Response samples

Content type
application/json
{
  • "toolExecutionId": "156ba1b7-0c49-4e7c-bf23-f6ec140183c0",
  • "isValid": true
}

Validate Date of Birth

Verifies if provided date of birth matches with available data in flowt's bureau.

Authorizations:
API Key
Request Body schema: application/json
organizationId
required
string <uuid>
documentNumber
required
string
dateOfBirth
required
string
idempotencyKey
string

Responses

Request samples

Content type
application/json
{
  • "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
  • "documentNumber": "string",
  • "dateOfBirth": "string",
  • "idempotencyKey": "string"
}

Response samples

Content type
application/json
{
  • "toolExecutionId": "156ba1b7-0c49-4e7c-bf23-f6ec140183c0",
  • "isValid": true
}

Check for Sanctions

Checks if provided document or name matches with sanctions available in flowt's bureau.

Authorizations:
API Key
Request Body schema: application/json
organizationId
required
string <uuid>
documentNumber
string
name
string
idempotencyKey
string

Responses

Request samples

Content type
application/json
{
  • "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
  • "documentNumber": "string",
  • "name": "string",
  • "idempotencyKey": "string"
}

Response samples

Content type
application/json
{
  • "toolExecutionId": "156ba1b7-0c49-4e7c-bf23-f6ec140183c0",
  • "isValid": true
}

Validate Address

Authorizations:
API Key
Request Body schema: application/json
organizationId
required
string <uuid>
documentNumber
string
street
string
number
string
complement
string
state
string
zipcode
required
string
radiusKm
number
idempotencyKey
string

Responses

Request samples

Content type
application/json
{
  • "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
  • "documentNumber": "string",
  • "street": "string",
  • "number": "string",
  • "complement": "string",
  • "state": "string",
  • "zipcode": "string",
  • "radiusKm": 0,
  • "idempotencyKey": "string"
}

Response samples

Content type
application/json
{
  • "toolExecutionId": "156ba1b7-0c49-4e7c-bf23-f6ec140183c0",
  • "isValid": true
}

Get Tool Execution

Authorizations:
API Key
path Parameters
toolExecutionId
required
string

Tool Execution ID

query Parameters
organizationId
required
string

Organization ID

Responses

Response samples

Content type
application/json
{
  • "status": "string",
  • "output": null
}

Workflows API

Manage workflows and workflow executions.

workflow api diagram

Create Workflow

This is a sample workflow definition:

{
  "apiVersion": "apis.flowt.com.br/workflow/v1",
   "inputs": {
     "schema": {
       "type": "object",
       "properties": {
         "document_number": {
           "type": "string"
         },
         "birth_date": {
           "type": "string"
         },
         "zipcode": {
           "type": "string"
         }
       }
     }
   },
   "nodes": [
     {
       "name": "validate-document",
       "tool": "tools.flowt.com.br/validate-document",
       "input": {
         "documentNumber": "${{workflow.inputs.document_number}}"
       }
     },
     {
       "name": "validate-address",
       "tool": "tools.flowt.com.br/validate-address",
       "input": {
         "zipcode": "${{workflow.inputs.zipcode}}"
       }
     },
     {
       "name": "validate-dob",
       "tool": "tools.flowt.com.br/validate-dob",
       "dependencies": ["validate-document", "validate-address"],
       "input": {
         "dateOfBirth": "${{workflow.inputs.birth_date}}"
       }
     },    
     {
       "name": "save-result",
       "tool": "tools.flowt.com.br/save-result",
       "dependencies": ["validate-dob"],
       "input": {
         "is_document_valid": "${{workflow.validate-document.output.isValid}}",
         "is_birth_date_valid": "${{workflow.validate-dob.output.isValid}}",
         "is_address_valid": "${{workflow.validate-address.output.isValid}}"
       }
     }
   ]
}
Authorizations:
API Key
Request Body schema: application/json
organizationId
required
string <uuid>
name
required
string
workflowDefinition
required
string <byte>

A workflow definition like this one above encoded in Base64.

object

Responses

Request samples

Content type
application/json
{
  • "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
  • "name": "string",
  • "workflowDefinition": "string",
  • "metadata": {
    }
}

Response samples

Content type
application/json
{
  • "workflowId": "43c4fa9b-0cbc-4b57-a121-9d7d46a3eaa4",
  • "version": "string"
}

Execute Workflow

Authorizations:
API Key
path Parameters
workflowId
required
string

Workflow ID

Request Body schema: application/json
organizationId
required
string <uuid>
idempotencyKey
string
input
string <byte>

Responses

Request samples

Content type
application/json
{
  • "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
  • "idempotencyKey": "string",
  • "input": "string"
}

Response samples

Content type
application/json
{
  • "workflowExecutionId": "2e5cb21e-ca0e-443c-94c5-ee6219ea8695",
  • "output": "string"
}

Visualize Workflow

Returns a dot representation of the workflow.

To plot a visualization, paste the result here: https://dreampuf.github.io/GraphvizOnline

Authorizations:
API Key
path Parameters
workflowId
required
string

Workflow ID

query Parameters
organizationId
required
string

Organization ID

Responses

Response samples

Content type
application/json
{
  • "status": 0,
  • "errors": [
    ]
}

Get Workflow Execution

Authorizations:
API Key
path Parameters
workflowId
required
string

Workflow ID

workflowExecutionId
required
string

Workflow Execution ID

query Parameters
organizationId
required
string

Organization ID

Responses

Response samples

Content type
application/json
{
  • "status": "string",
  • "output": null
}