cURL
curl --request POST \
--url https://api.juo.io/customer/v1/workflows/start \
--header 'Content-Type: application/json' \
--header 'X-Delegated-Token: <api-key>' \
--header 'X-Tenant-ID: <x-tenant-id>' \
--data '
{
"flowType": "<string>",
"context": {},
"workflowId": "<string>",
"dryRun": true
}
'import requests
url = "https://api.juo.io/customer/v1/workflows/start"
payload = {
"flowType": "<string>",
"context": {},
"workflowId": "<string>",
"dryRun": True
}
headers = {
"X-Tenant-ID": "<x-tenant-id>",
"X-Delegated-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Tenant-ID': '<x-tenant-id>',
'X-Delegated-Token': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({flowType: '<string>', context: {}, workflowId: '<string>', dryRun: true})
};
fetch('https://api.juo.io/customer/v1/workflows/start', 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.juo.io/customer/v1/workflows/start",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'flowType' => '<string>',
'context' => [
],
'workflowId' => '<string>',
'dryRun' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Delegated-Token: <api-key>",
"X-Tenant-ID: <x-tenant-id>"
],
]);
$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.juo.io/customer/v1/workflows/start"
payload := strings.NewReader("{\n \"flowType\": \"<string>\",\n \"context\": {},\n \"workflowId\": \"<string>\",\n \"dryRun\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Tenant-ID", "<x-tenant-id>")
req.Header.Add("X-Delegated-Token", "<api-key>")
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.post("https://api.juo.io/customer/v1/workflows/start")
.header("X-Tenant-ID", "<x-tenant-id>")
.header("X-Delegated-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"flowType\": \"<string>\",\n \"context\": {},\n \"workflowId\": \"<string>\",\n \"dryRun\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.juo.io/customer/v1/workflows/start")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Tenant-ID"] = '<x-tenant-id>'
request["X-Delegated-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"flowType\": \"<string>\",\n \"context\": {},\n \"workflowId\": \"<string>\",\n \"dryRun\": true\n}"
response = http.request(request)
puts response.read_body{
"workflowId": "<string>",
"workflowVersion": 123,
"runId": "<string>",
"runVersion": 123,
"pendingInteraction": {
"interactionId": "<string>",
"stepId": "<string>",
"actionType": "<string>",
"actionBehavior": "input",
"actionConfig": {},
"availableResponses": [
{
"type": "<string>",
"label": "<string>"
}
],
"presentedAt": "2023-11-07T05:31:56Z",
"timeoutMs": 123
},
"interactiveSteps": [
{
"stepId": "<string>",
"actionType": "<string>",
"actionConfig": {},
"availableResponses": [
{
"type": "<string>",
"label": "<string>"
}
]
}
],
"result": {},
"error": {
"message": "<string>",
"code": "<string>"
},
"invalidatedResources": [
"<string>"
],
"outcome": {
"type": "<string>",
"message": "<string>"
},
"completionData": {
"outcome": {
"type": "<string>",
"message": "<string>"
},
"endStep": {
"id": "<string>",
"category": "<string>",
"label": "<string>"
}
}
}Workflows
Start a workflow
Used to start a new workflow run.
POST
/
workflows
/
start
cURL
curl --request POST \
--url https://api.juo.io/customer/v1/workflows/start \
--header 'Content-Type: application/json' \
--header 'X-Delegated-Token: <api-key>' \
--header 'X-Tenant-ID: <x-tenant-id>' \
--data '
{
"flowType": "<string>",
"context": {},
"workflowId": "<string>",
"dryRun": true
}
'import requests
url = "https://api.juo.io/customer/v1/workflows/start"
payload = {
"flowType": "<string>",
"context": {},
"workflowId": "<string>",
"dryRun": True
}
headers = {
"X-Tenant-ID": "<x-tenant-id>",
"X-Delegated-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Tenant-ID': '<x-tenant-id>',
'X-Delegated-Token': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({flowType: '<string>', context: {}, workflowId: '<string>', dryRun: true})
};
fetch('https://api.juo.io/customer/v1/workflows/start', 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.juo.io/customer/v1/workflows/start",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'flowType' => '<string>',
'context' => [
],
'workflowId' => '<string>',
'dryRun' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Delegated-Token: <api-key>",
"X-Tenant-ID: <x-tenant-id>"
],
]);
$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.juo.io/customer/v1/workflows/start"
payload := strings.NewReader("{\n \"flowType\": \"<string>\",\n \"context\": {},\n \"workflowId\": \"<string>\",\n \"dryRun\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Tenant-ID", "<x-tenant-id>")
req.Header.Add("X-Delegated-Token", "<api-key>")
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.post("https://api.juo.io/customer/v1/workflows/start")
.header("X-Tenant-ID", "<x-tenant-id>")
.header("X-Delegated-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"flowType\": \"<string>\",\n \"context\": {},\n \"workflowId\": \"<string>\",\n \"dryRun\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.juo.io/customer/v1/workflows/start")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Tenant-ID"] = '<x-tenant-id>'
request["X-Delegated-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"flowType\": \"<string>\",\n \"context\": {},\n \"workflowId\": \"<string>\",\n \"dryRun\": true\n}"
response = http.request(request)
puts response.read_body{
"workflowId": "<string>",
"workflowVersion": 123,
"runId": "<string>",
"runVersion": 123,
"pendingInteraction": {
"interactionId": "<string>",
"stepId": "<string>",
"actionType": "<string>",
"actionBehavior": "input",
"actionConfig": {},
"availableResponses": [
{
"type": "<string>",
"label": "<string>"
}
],
"presentedAt": "2023-11-07T05:31:56Z",
"timeoutMs": 123
},
"interactiveSteps": [
{
"stepId": "<string>",
"actionType": "<string>",
"actionConfig": {},
"availableResponses": [
{
"type": "<string>",
"label": "<string>"
}
]
}
],
"result": {},
"error": {
"message": "<string>",
"code": "<string>"
},
"invalidatedResources": [
"<string>"
],
"outcome": {
"type": "<string>",
"message": "<string>"
},
"completionData": {
"outcome": {
"type": "<string>",
"message": "<string>"
},
"endStep": {
"id": "<string>",
"category": "<string>",
"label": "<string>"
}
}
}Authorizations
DelegatedTokenAccessToken
Headers
Unique identifier of the tenant in the system (usually a store identifier)
Body
application/json
Response
200 - application/json
Default Response
- Option 1
- Option 2
- SilentCompletion
Available options:
running, waiting_interaction, completed, failed, cancelled Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I