cURL
curl --request POST \
--url https://api.juo.io/customer/v1/workflows/{runId}/cancel \
--header 'X-Delegated-Token: <api-key>' \
--header 'X-Tenant-ID: <x-tenant-id>'import requests
url = "https://api.juo.io/customer/v1/workflows/{runId}/cancel"
headers = {
"X-Tenant-ID": "<x-tenant-id>",
"X-Delegated-Token": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Tenant-ID': '<x-tenant-id>', 'X-Delegated-Token': '<api-key>'}
};
fetch('https://api.juo.io/customer/v1/workflows/{runId}/cancel', 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/{runId}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.juo.io/customer/v1/workflows/{runId}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-Tenant-ID", "<x-tenant-id>")
req.Header.Add("X-Delegated-Token", "<api-key>")
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/{runId}/cancel")
.header("X-Tenant-ID", "<x-tenant-id>")
.header("X-Delegated-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.juo.io/customer/v1/workflows/{runId}/cancel")
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>'
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
Cancel workflow run
Used to cancel an active workflow run.
POST
/
workflows
/
{runId}
/
cancel
cURL
curl --request POST \
--url https://api.juo.io/customer/v1/workflows/{runId}/cancel \
--header 'X-Delegated-Token: <api-key>' \
--header 'X-Tenant-ID: <x-tenant-id>'import requests
url = "https://api.juo.io/customer/v1/workflows/{runId}/cancel"
headers = {
"X-Tenant-ID": "<x-tenant-id>",
"X-Delegated-Token": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Tenant-ID': '<x-tenant-id>', 'X-Delegated-Token': '<api-key>'}
};
fetch('https://api.juo.io/customer/v1/workflows/{runId}/cancel', 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/{runId}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.juo.io/customer/v1/workflows/{runId}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-Tenant-ID", "<x-tenant-id>")
req.Header.Add("X-Delegated-Token", "<api-key>")
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/{runId}/cancel")
.header("X-Tenant-ID", "<x-tenant-id>")
.header("X-Delegated-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.juo.io/customer/v1/workflows/{runId}/cancel")
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>'
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)
Path Parameters
The workflow run identifier
Response
200 - application/json
Default Response
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