curl --request PUT \
--url https://api.uat.frankie.one/v2/workflowDefinitions/{workflowDefinitionId} \
--header 'Content-Type: application/json' \
--header 'X-Frankie-CustomerID: <x-frankie-customerid>' \
--header 'X-Frankie-RequestID: <x-frankie-requestid>' \
--header 'api_key: <api-key>' \
--data @- <<EOF
{
"id": "customer-verification-workflow",
"name": "Customer Verification Workflow",
"tasks": [
{
"id": "verify-identity",
"name": "Verify Identity",
"configuration": {},
"description": "Runs identity verification checks against the customer",
"errorHandling": {
"ignoreErrors": false,
"fallbackState": {},
"retryConfig": {
"maxAttempts": 3,
"delayMs": 1000,
"backoffFactor": 2
}
}
}
],
"description": "Workflow to verify new customer identities",
"owner": "SYSTEM",
"isDraft": false,
"isTemplate": false,
"tags": [
"customer-verification",
"kyc"
],
"initialState": {
"name": "John Doe",
"age": 30
},
"defaultErrorHandling": {
"ignoreErrors": false,
"fallbackState": {},
"retryConfig": {
"maxAttempts": 3,
"delayMs": 1000,
"backoffFactor": 2
}
},
"variables": [
{
"name": "customerEmail",
"type": "STRING",
"description": "Customer's email address",
"example": "customer@example.com",
"default": ""
}
],
"versions": [
1,
2,
3
],
"version": 3,
"versionId": "01KCNG5VAH4ZQC5T1H4A2ZZHWA",
"createdAt": "2023-01-01T12:00:00Z",
"updatedAt": "2023-01-02T14:30:00Z",
"createdBy": "John Doe",
"updatedBy": "Jane Smith"
}
EOFimport requests
url = "https://api.uat.frankie.one/v2/workflowDefinitions/{workflowDefinitionId}"
payload = {
"id": "customer-verification-workflow",
"name": "Customer Verification Workflow",
"tasks": [
{
"id": "verify-identity",
"name": "Verify Identity",
"configuration": {},
"description": "Runs identity verification checks against the customer",
"errorHandling": {
"ignoreErrors": False,
"fallbackState": {},
"retryConfig": {
"maxAttempts": 3,
"delayMs": 1000,
"backoffFactor": 2
}
}
}
],
"description": "Workflow to verify new customer identities",
"owner": "SYSTEM",
"isDraft": False,
"isTemplate": False,
"tags": ["customer-verification", "kyc"],
"initialState": {
"name": "John Doe",
"age": 30
},
"defaultErrorHandling": {
"ignoreErrors": False,
"fallbackState": {},
"retryConfig": {
"maxAttempts": 3,
"delayMs": 1000,
"backoffFactor": 2
}
},
"variables": [
{
"name": "customerEmail",
"type": "STRING",
"description": "Customer's email address",
"example": "customer@example.com",
"default": ""
}
],
"versions": [1, 2, 3],
"version": 3,
"versionId": "01KCNG5VAH4ZQC5T1H4A2ZZHWA",
"createdAt": "2023-01-01T12:00:00Z",
"updatedAt": "2023-01-02T14:30:00Z",
"createdBy": "John Doe",
"updatedBy": "Jane Smith"
}
headers = {
"api_key": "<api-key>",
"X-Frankie-CustomerID": "<x-frankie-customerid>",
"X-Frankie-RequestID": "<x-frankie-requestid>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
api_key: '<api-key>',
'X-Frankie-CustomerID': '<x-frankie-customerid>',
'X-Frankie-RequestID': '<x-frankie-requestid>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
id: 'customer-verification-workflow',
name: 'Customer Verification Workflow',
tasks: [
{
id: 'verify-identity',
name: 'Verify Identity',
configuration: {},
description: 'Runs identity verification checks against the customer',
errorHandling: {
ignoreErrors: false,
fallbackState: {},
retryConfig: {maxAttempts: 3, delayMs: 1000, backoffFactor: 2}
}
}
],
description: 'Workflow to verify new customer identities',
owner: 'SYSTEM',
isDraft: false,
isTemplate: false,
tags: ['customer-verification', 'kyc'],
initialState: {name: 'John Doe', age: 30},
defaultErrorHandling: {
ignoreErrors: false,
fallbackState: {},
retryConfig: {maxAttempts: 3, delayMs: 1000, backoffFactor: 2}
},
variables: [
{
name: 'customerEmail',
type: 'STRING',
description: 'Customer\'s email address',
example: 'customer@example.com',
default: ''
}
],
versions: [1, 2, 3],
version: 3,
versionId: '01KCNG5VAH4ZQC5T1H4A2ZZHWA',
createdAt: '2023-01-01T12:00:00Z',
updatedAt: '2023-01-02T14:30:00Z',
createdBy: 'John Doe',
updatedBy: 'Jane Smith'
})
};
fetch('https://api.uat.frankie.one/v2/workflowDefinitions/{workflowDefinitionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.uat.frankie.one/v2/workflowDefinitions/{workflowDefinitionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'id' => 'customer-verification-workflow',
'name' => 'Customer Verification Workflow',
'tasks' => [
[
'id' => 'verify-identity',
'name' => 'Verify Identity',
'configuration' => [
],
'description' => 'Runs identity verification checks against the customer',
'errorHandling' => [
'ignoreErrors' => false,
'fallbackState' => [
],
'retryConfig' => [
'maxAttempts' => 3,
'delayMs' => 1000,
'backoffFactor' => 2
]
]
]
],
'description' => 'Workflow to verify new customer identities',
'owner' => 'SYSTEM',
'isDraft' => false,
'isTemplate' => false,
'tags' => [
'customer-verification',
'kyc'
],
'initialState' => [
'name' => 'John Doe',
'age' => 30
],
'defaultErrorHandling' => [
'ignoreErrors' => false,
'fallbackState' => [
],
'retryConfig' => [
'maxAttempts' => 3,
'delayMs' => 1000,
'backoffFactor' => 2
]
],
'variables' => [
[
'name' => 'customerEmail',
'type' => 'STRING',
'description' => 'Customer\'s email address',
'example' => 'customer@example.com',
'default' => ''
]
],
'versions' => [
1,
2,
3
],
'version' => 3,
'versionId' => '01KCNG5VAH4ZQC5T1H4A2ZZHWA',
'createdAt' => '2023-01-01T12:00:00Z',
'updatedAt' => '2023-01-02T14:30:00Z',
'createdBy' => 'John Doe',
'updatedBy' => 'Jane Smith'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Frankie-CustomerID: <x-frankie-customerid>",
"X-Frankie-RequestID: <x-frankie-requestid>",
"api_key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.uat.frankie.one/v2/workflowDefinitions/{workflowDefinitionId}"
payload := strings.NewReader("{\n \"id\": \"customer-verification-workflow\",\n \"name\": \"Customer Verification Workflow\",\n \"tasks\": [\n {\n \"id\": \"verify-identity\",\n \"name\": \"Verify Identity\",\n \"configuration\": {},\n \"description\": \"Runs identity verification checks against the customer\",\n \"errorHandling\": {\n \"ignoreErrors\": false,\n \"fallbackState\": {},\n \"retryConfig\": {\n \"maxAttempts\": 3,\n \"delayMs\": 1000,\n \"backoffFactor\": 2\n }\n }\n }\n ],\n \"description\": \"Workflow to verify new customer identities\",\n \"owner\": \"SYSTEM\",\n \"isDraft\": false,\n \"isTemplate\": false,\n \"tags\": [\n \"customer-verification\",\n \"kyc\"\n ],\n \"initialState\": {\n \"name\": \"John Doe\",\n \"age\": 30\n },\n \"defaultErrorHandling\": {\n \"ignoreErrors\": false,\n \"fallbackState\": {},\n \"retryConfig\": {\n \"maxAttempts\": 3,\n \"delayMs\": 1000,\n \"backoffFactor\": 2\n }\n },\n \"variables\": [\n {\n \"name\": \"customerEmail\",\n \"type\": \"STRING\",\n \"description\": \"Customer's email address\",\n \"example\": \"customer@example.com\",\n \"default\": \"\"\n }\n ],\n \"versions\": [\n 1,\n 2,\n 3\n ],\n \"version\": 3,\n \"versionId\": \"01KCNG5VAH4ZQC5T1H4A2ZZHWA\",\n \"createdAt\": \"2023-01-01T12:00:00Z\",\n \"updatedAt\": \"2023-01-02T14:30:00Z\",\n \"createdBy\": \"John Doe\",\n \"updatedBy\": \"Jane Smith\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("api_key", "<api-key>")
req.Header.Add("X-Frankie-CustomerID", "<x-frankie-customerid>")
req.Header.Add("X-Frankie-RequestID", "<x-frankie-requestid>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.uat.frankie.one/v2/workflowDefinitions/{workflowDefinitionId}")
.header("api_key", "<api-key>")
.header("X-Frankie-CustomerID", "<x-frankie-customerid>")
.header("X-Frankie-RequestID", "<x-frankie-requestid>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"customer-verification-workflow\",\n \"name\": \"Customer Verification Workflow\",\n \"tasks\": [\n {\n \"id\": \"verify-identity\",\n \"name\": \"Verify Identity\",\n \"configuration\": {},\n \"description\": \"Runs identity verification checks against the customer\",\n \"errorHandling\": {\n \"ignoreErrors\": false,\n \"fallbackState\": {},\n \"retryConfig\": {\n \"maxAttempts\": 3,\n \"delayMs\": 1000,\n \"backoffFactor\": 2\n }\n }\n }\n ],\n \"description\": \"Workflow to verify new customer identities\",\n \"owner\": \"SYSTEM\",\n \"isDraft\": false,\n \"isTemplate\": false,\n \"tags\": [\n \"customer-verification\",\n \"kyc\"\n ],\n \"initialState\": {\n \"name\": \"John Doe\",\n \"age\": 30\n },\n \"defaultErrorHandling\": {\n \"ignoreErrors\": false,\n \"fallbackState\": {},\n \"retryConfig\": {\n \"maxAttempts\": 3,\n \"delayMs\": 1000,\n \"backoffFactor\": 2\n }\n },\n \"variables\": [\n {\n \"name\": \"customerEmail\",\n \"type\": \"STRING\",\n \"description\": \"Customer's email address\",\n \"example\": \"customer@example.com\",\n \"default\": \"\"\n }\n ],\n \"versions\": [\n 1,\n 2,\n 3\n ],\n \"version\": 3,\n \"versionId\": \"01KCNG5VAH4ZQC5T1H4A2ZZHWA\",\n \"createdAt\": \"2023-01-01T12:00:00Z\",\n \"updatedAt\": \"2023-01-02T14:30:00Z\",\n \"createdBy\": \"John Doe\",\n \"updatedBy\": \"Jane Smith\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.uat.frankie.one/v2/workflowDefinitions/{workflowDefinitionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["api_key"] = '<api-key>'
request["X-Frankie-CustomerID"] = '<x-frankie-customerid>'
request["X-Frankie-RequestID"] = '<x-frankie-requestid>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"customer-verification-workflow\",\n \"name\": \"Customer Verification Workflow\",\n \"tasks\": [\n {\n \"id\": \"verify-identity\",\n \"name\": \"Verify Identity\",\n \"configuration\": {},\n \"description\": \"Runs identity verification checks against the customer\",\n \"errorHandling\": {\n \"ignoreErrors\": false,\n \"fallbackState\": {},\n \"retryConfig\": {\n \"maxAttempts\": 3,\n \"delayMs\": 1000,\n \"backoffFactor\": 2\n }\n }\n }\n ],\n \"description\": \"Workflow to verify new customer identities\",\n \"owner\": \"SYSTEM\",\n \"isDraft\": false,\n \"isTemplate\": false,\n \"tags\": [\n \"customer-verification\",\n \"kyc\"\n ],\n \"initialState\": {\n \"name\": \"John Doe\",\n \"age\": 30\n },\n \"defaultErrorHandling\": {\n \"ignoreErrors\": false,\n \"fallbackState\": {},\n \"retryConfig\": {\n \"maxAttempts\": 3,\n \"delayMs\": 1000,\n \"backoffFactor\": 2\n }\n },\n \"variables\": [\n {\n \"name\": \"customerEmail\",\n \"type\": \"STRING\",\n \"description\": \"Customer's email address\",\n \"example\": \"customer@example.com\",\n \"default\": \"\"\n }\n ],\n \"versions\": [\n 1,\n 2,\n 3\n ],\n \"version\": 3,\n \"versionId\": \"01KCNG5VAH4ZQC5T1H4A2ZZHWA\",\n \"createdAt\": \"2023-01-01T12:00:00Z\",\n \"updatedAt\": \"2023-01-02T14:30:00Z\",\n \"createdBy\": \"John Doe\",\n \"updatedBy\": \"Jane Smith\"\n}"
response = http.request(request)
puts response.read_body{
"workflowDefinition": {
"id": "customer-verification-workflow",
"name": "Customer Verification Workflow",
"description": "<string>",
"owner": "SYSTEM",
"isDraft": true,
"version": 1,
"versions": [
1,
2,
3
],
"versionId": "01KCNG5VAH4ZQC5T1H4A2ZZHWA",
"tags": [
"<string>"
],
"tasks": [
{}
],
"variables": [
{}
],
"createdAt": "2023-01-01T12:00:00Z",
"updatedAt": "2023-01-02T14:30:00Z",
"createdBy": "John Doe",
"updatedBy": "Jane Smith"
}
}Create or update a workflow definition
Forwards the request to the FLOW Workflow Engine to create or update a workflow definition. The request body and headers are forwarded as-is to the upstream service. When isDraft is true, the definition is saved as a draft (version -1). When isDraft is false, a new published version is created.
curl --request PUT \
--url https://api.uat.frankie.one/v2/workflowDefinitions/{workflowDefinitionId} \
--header 'Content-Type: application/json' \
--header 'X-Frankie-CustomerID: <x-frankie-customerid>' \
--header 'X-Frankie-RequestID: <x-frankie-requestid>' \
--header 'api_key: <api-key>' \
--data @- <<EOF
{
"id": "customer-verification-workflow",
"name": "Customer Verification Workflow",
"tasks": [
{
"id": "verify-identity",
"name": "Verify Identity",
"configuration": {},
"description": "Runs identity verification checks against the customer",
"errorHandling": {
"ignoreErrors": false,
"fallbackState": {},
"retryConfig": {
"maxAttempts": 3,
"delayMs": 1000,
"backoffFactor": 2
}
}
}
],
"description": "Workflow to verify new customer identities",
"owner": "SYSTEM",
"isDraft": false,
"isTemplate": false,
"tags": [
"customer-verification",
"kyc"
],
"initialState": {
"name": "John Doe",
"age": 30
},
"defaultErrorHandling": {
"ignoreErrors": false,
"fallbackState": {},
"retryConfig": {
"maxAttempts": 3,
"delayMs": 1000,
"backoffFactor": 2
}
},
"variables": [
{
"name": "customerEmail",
"type": "STRING",
"description": "Customer's email address",
"example": "customer@example.com",
"default": ""
}
],
"versions": [
1,
2,
3
],
"version": 3,
"versionId": "01KCNG5VAH4ZQC5T1H4A2ZZHWA",
"createdAt": "2023-01-01T12:00:00Z",
"updatedAt": "2023-01-02T14:30:00Z",
"createdBy": "John Doe",
"updatedBy": "Jane Smith"
}
EOFimport requests
url = "https://api.uat.frankie.one/v2/workflowDefinitions/{workflowDefinitionId}"
payload = {
"id": "customer-verification-workflow",
"name": "Customer Verification Workflow",
"tasks": [
{
"id": "verify-identity",
"name": "Verify Identity",
"configuration": {},
"description": "Runs identity verification checks against the customer",
"errorHandling": {
"ignoreErrors": False,
"fallbackState": {},
"retryConfig": {
"maxAttempts": 3,
"delayMs": 1000,
"backoffFactor": 2
}
}
}
],
"description": "Workflow to verify new customer identities",
"owner": "SYSTEM",
"isDraft": False,
"isTemplate": False,
"tags": ["customer-verification", "kyc"],
"initialState": {
"name": "John Doe",
"age": 30
},
"defaultErrorHandling": {
"ignoreErrors": False,
"fallbackState": {},
"retryConfig": {
"maxAttempts": 3,
"delayMs": 1000,
"backoffFactor": 2
}
},
"variables": [
{
"name": "customerEmail",
"type": "STRING",
"description": "Customer's email address",
"example": "customer@example.com",
"default": ""
}
],
"versions": [1, 2, 3],
"version": 3,
"versionId": "01KCNG5VAH4ZQC5T1H4A2ZZHWA",
"createdAt": "2023-01-01T12:00:00Z",
"updatedAt": "2023-01-02T14:30:00Z",
"createdBy": "John Doe",
"updatedBy": "Jane Smith"
}
headers = {
"api_key": "<api-key>",
"X-Frankie-CustomerID": "<x-frankie-customerid>",
"X-Frankie-RequestID": "<x-frankie-requestid>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
api_key: '<api-key>',
'X-Frankie-CustomerID': '<x-frankie-customerid>',
'X-Frankie-RequestID': '<x-frankie-requestid>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
id: 'customer-verification-workflow',
name: 'Customer Verification Workflow',
tasks: [
{
id: 'verify-identity',
name: 'Verify Identity',
configuration: {},
description: 'Runs identity verification checks against the customer',
errorHandling: {
ignoreErrors: false,
fallbackState: {},
retryConfig: {maxAttempts: 3, delayMs: 1000, backoffFactor: 2}
}
}
],
description: 'Workflow to verify new customer identities',
owner: 'SYSTEM',
isDraft: false,
isTemplate: false,
tags: ['customer-verification', 'kyc'],
initialState: {name: 'John Doe', age: 30},
defaultErrorHandling: {
ignoreErrors: false,
fallbackState: {},
retryConfig: {maxAttempts: 3, delayMs: 1000, backoffFactor: 2}
},
variables: [
{
name: 'customerEmail',
type: 'STRING',
description: 'Customer\'s email address',
example: 'customer@example.com',
default: ''
}
],
versions: [1, 2, 3],
version: 3,
versionId: '01KCNG5VAH4ZQC5T1H4A2ZZHWA',
createdAt: '2023-01-01T12:00:00Z',
updatedAt: '2023-01-02T14:30:00Z',
createdBy: 'John Doe',
updatedBy: 'Jane Smith'
})
};
fetch('https://api.uat.frankie.one/v2/workflowDefinitions/{workflowDefinitionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.uat.frankie.one/v2/workflowDefinitions/{workflowDefinitionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'id' => 'customer-verification-workflow',
'name' => 'Customer Verification Workflow',
'tasks' => [
[
'id' => 'verify-identity',
'name' => 'Verify Identity',
'configuration' => [
],
'description' => 'Runs identity verification checks against the customer',
'errorHandling' => [
'ignoreErrors' => false,
'fallbackState' => [
],
'retryConfig' => [
'maxAttempts' => 3,
'delayMs' => 1000,
'backoffFactor' => 2
]
]
]
],
'description' => 'Workflow to verify new customer identities',
'owner' => 'SYSTEM',
'isDraft' => false,
'isTemplate' => false,
'tags' => [
'customer-verification',
'kyc'
],
'initialState' => [
'name' => 'John Doe',
'age' => 30
],
'defaultErrorHandling' => [
'ignoreErrors' => false,
'fallbackState' => [
],
'retryConfig' => [
'maxAttempts' => 3,
'delayMs' => 1000,
'backoffFactor' => 2
]
],
'variables' => [
[
'name' => 'customerEmail',
'type' => 'STRING',
'description' => 'Customer\'s email address',
'example' => 'customer@example.com',
'default' => ''
]
],
'versions' => [
1,
2,
3
],
'version' => 3,
'versionId' => '01KCNG5VAH4ZQC5T1H4A2ZZHWA',
'createdAt' => '2023-01-01T12:00:00Z',
'updatedAt' => '2023-01-02T14:30:00Z',
'createdBy' => 'John Doe',
'updatedBy' => 'Jane Smith'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Frankie-CustomerID: <x-frankie-customerid>",
"X-Frankie-RequestID: <x-frankie-requestid>",
"api_key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.uat.frankie.one/v2/workflowDefinitions/{workflowDefinitionId}"
payload := strings.NewReader("{\n \"id\": \"customer-verification-workflow\",\n \"name\": \"Customer Verification Workflow\",\n \"tasks\": [\n {\n \"id\": \"verify-identity\",\n \"name\": \"Verify Identity\",\n \"configuration\": {},\n \"description\": \"Runs identity verification checks against the customer\",\n \"errorHandling\": {\n \"ignoreErrors\": false,\n \"fallbackState\": {},\n \"retryConfig\": {\n \"maxAttempts\": 3,\n \"delayMs\": 1000,\n \"backoffFactor\": 2\n }\n }\n }\n ],\n \"description\": \"Workflow to verify new customer identities\",\n \"owner\": \"SYSTEM\",\n \"isDraft\": false,\n \"isTemplate\": false,\n \"tags\": [\n \"customer-verification\",\n \"kyc\"\n ],\n \"initialState\": {\n \"name\": \"John Doe\",\n \"age\": 30\n },\n \"defaultErrorHandling\": {\n \"ignoreErrors\": false,\n \"fallbackState\": {},\n \"retryConfig\": {\n \"maxAttempts\": 3,\n \"delayMs\": 1000,\n \"backoffFactor\": 2\n }\n },\n \"variables\": [\n {\n \"name\": \"customerEmail\",\n \"type\": \"STRING\",\n \"description\": \"Customer's email address\",\n \"example\": \"customer@example.com\",\n \"default\": \"\"\n }\n ],\n \"versions\": [\n 1,\n 2,\n 3\n ],\n \"version\": 3,\n \"versionId\": \"01KCNG5VAH4ZQC5T1H4A2ZZHWA\",\n \"createdAt\": \"2023-01-01T12:00:00Z\",\n \"updatedAt\": \"2023-01-02T14:30:00Z\",\n \"createdBy\": \"John Doe\",\n \"updatedBy\": \"Jane Smith\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("api_key", "<api-key>")
req.Header.Add("X-Frankie-CustomerID", "<x-frankie-customerid>")
req.Header.Add("X-Frankie-RequestID", "<x-frankie-requestid>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.uat.frankie.one/v2/workflowDefinitions/{workflowDefinitionId}")
.header("api_key", "<api-key>")
.header("X-Frankie-CustomerID", "<x-frankie-customerid>")
.header("X-Frankie-RequestID", "<x-frankie-requestid>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"customer-verification-workflow\",\n \"name\": \"Customer Verification Workflow\",\n \"tasks\": [\n {\n \"id\": \"verify-identity\",\n \"name\": \"Verify Identity\",\n \"configuration\": {},\n \"description\": \"Runs identity verification checks against the customer\",\n \"errorHandling\": {\n \"ignoreErrors\": false,\n \"fallbackState\": {},\n \"retryConfig\": {\n \"maxAttempts\": 3,\n \"delayMs\": 1000,\n \"backoffFactor\": 2\n }\n }\n }\n ],\n \"description\": \"Workflow to verify new customer identities\",\n \"owner\": \"SYSTEM\",\n \"isDraft\": false,\n \"isTemplate\": false,\n \"tags\": [\n \"customer-verification\",\n \"kyc\"\n ],\n \"initialState\": {\n \"name\": \"John Doe\",\n \"age\": 30\n },\n \"defaultErrorHandling\": {\n \"ignoreErrors\": false,\n \"fallbackState\": {},\n \"retryConfig\": {\n \"maxAttempts\": 3,\n \"delayMs\": 1000,\n \"backoffFactor\": 2\n }\n },\n \"variables\": [\n {\n \"name\": \"customerEmail\",\n \"type\": \"STRING\",\n \"description\": \"Customer's email address\",\n \"example\": \"customer@example.com\",\n \"default\": \"\"\n }\n ],\n \"versions\": [\n 1,\n 2,\n 3\n ],\n \"version\": 3,\n \"versionId\": \"01KCNG5VAH4ZQC5T1H4A2ZZHWA\",\n \"createdAt\": \"2023-01-01T12:00:00Z\",\n \"updatedAt\": \"2023-01-02T14:30:00Z\",\n \"createdBy\": \"John Doe\",\n \"updatedBy\": \"Jane Smith\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.uat.frankie.one/v2/workflowDefinitions/{workflowDefinitionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["api_key"] = '<api-key>'
request["X-Frankie-CustomerID"] = '<x-frankie-customerid>'
request["X-Frankie-RequestID"] = '<x-frankie-requestid>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"customer-verification-workflow\",\n \"name\": \"Customer Verification Workflow\",\n \"tasks\": [\n {\n \"id\": \"verify-identity\",\n \"name\": \"Verify Identity\",\n \"configuration\": {},\n \"description\": \"Runs identity verification checks against the customer\",\n \"errorHandling\": {\n \"ignoreErrors\": false,\n \"fallbackState\": {},\n \"retryConfig\": {\n \"maxAttempts\": 3,\n \"delayMs\": 1000,\n \"backoffFactor\": 2\n }\n }\n }\n ],\n \"description\": \"Workflow to verify new customer identities\",\n \"owner\": \"SYSTEM\",\n \"isDraft\": false,\n \"isTemplate\": false,\n \"tags\": [\n \"customer-verification\",\n \"kyc\"\n ],\n \"initialState\": {\n \"name\": \"John Doe\",\n \"age\": 30\n },\n \"defaultErrorHandling\": {\n \"ignoreErrors\": false,\n \"fallbackState\": {},\n \"retryConfig\": {\n \"maxAttempts\": 3,\n \"delayMs\": 1000,\n \"backoffFactor\": 2\n }\n },\n \"variables\": [\n {\n \"name\": \"customerEmail\",\n \"type\": \"STRING\",\n \"description\": \"Customer's email address\",\n \"example\": \"customer@example.com\",\n \"default\": \"\"\n }\n ],\n \"versions\": [\n 1,\n 2,\n 3\n ],\n \"version\": 3,\n \"versionId\": \"01KCNG5VAH4ZQC5T1H4A2ZZHWA\",\n \"createdAt\": \"2023-01-01T12:00:00Z\",\n \"updatedAt\": \"2023-01-02T14:30:00Z\",\n \"createdBy\": \"John Doe\",\n \"updatedBy\": \"Jane Smith\"\n}"
response = http.request(request)
puts response.read_body{
"workflowDefinition": {
"id": "customer-verification-workflow",
"name": "Customer Verification Workflow",
"description": "<string>",
"owner": "SYSTEM",
"isDraft": true,
"version": 1,
"versions": [
1,
2,
3
],
"versionId": "01KCNG5VAH4ZQC5T1H4A2ZZHWA",
"tags": [
"<string>"
],
"tasks": [
{}
],
"variables": [
{}
],
"createdAt": "2023-01-01T12:00:00Z",
"updatedAt": "2023-01-02T14:30:00Z",
"createdBy": "John Doe",
"updatedBy": "Jane Smith"
}
}Authorizations
Headers
Your API key provided by FrankieOne
"245c765b124a098d09ef8765...."
Your Customer ID provided by FrankieOne
"12345678-1234-1234-1234-123456789012"
Your Customer Child ID provided by FrankieOne
"87654321-4321-4321-4321-210987654321"
Open string that can be used to define the "channel" the request comes in from. It can potentially be used in routing and risk calculations upon request. Default values that can be used are: api portal smartui Any alphanumeric string is supported though. Anything over 64 characters will be truncated.
Username provided by API caller
"fred.flintstone@frankieone.com"
GUID identifier for request
"82988375-1F9C-40C7-8543-ECCA0D94CC7C"
Path Parameters
The unique identifier of the workflow definition to create or update
"customer-verification-workflow"
Body
Request body for creating or updating a workflow definition
Unique identifier for the workflow
"customer-verification-workflow"
Human-readable name for the workflow
"Customer Verification Workflow"
Array of workflow tasks
Show child attributes
Show child attributes
Optional detailed description of the workflow
"Workflow to verify new customer identities"
Owner of the workflow
"SYSTEM"
true = save as draft (version -1), false = publish new version
Whether the workflow is a template
Tags associated with the workflow
["customer-verification", "kyc"]
Initial state for the workflow execution
{ "name": "John Doe", "age": 30 }
Error handling configuration for workflow tasks
Show child attributes
Show child attributes
Workflow-level variables that can be referenced in task configurations using template syntax, these would be validated into the initial state on workflow execution
Show child attributes
Show child attributes
List of available versions for this workflow definition
[1, 2, 3]
The version number of this workflow definition
3
Version Identifier to refer to
"01KCNG5VAH4ZQC5T1H4A2ZZHWA"
Timestamp when the workflow definition was first created
"2023-01-01T12:00:00Z"
Timestamp when the workflow definition was last updated
"2023-01-02T14:30:00Z"
User who created the workflow definition
"John Doe"
User who last updated the workflow definition
"Jane Smith"
Response
OK
The created or updated workflow definition
Show child attributes
Show child attributes
Was this page helpful?