curl --request POST \
--url https://api.duvo.ai/v2/teams/{teamId}/modules/{slug}/automations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"convert_existing_demo": false
}
'import requests
url = "https://api.duvo.ai/v2/teams/{teamId}/modules/{slug}/automations"
payload = { "convert_existing_demo": False }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({convert_existing_demo: false})
};
fetch('https://api.duvo.ai/v2/teams/{teamId}/modules/{slug}/automations', 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.duvo.ai/v2/teams/{teamId}/modules/{slug}/automations",
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([
'convert_existing_demo' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.duvo.ai/v2/teams/{teamId}/modules/{slug}/automations"
payload := strings.NewReader("{\n \"convert_existing_demo\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.duvo.ai/v2/teams/{teamId}/modules/{slug}/automations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"convert_existing_demo\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.duvo.ai/v2/teams/{teamId}/modules/{slug}/automations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"convert_existing_demo\": false\n}"
response = http.request(request)
puts response.read_body{
"automation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"is_setting_up": true,
"link": "<string>",
"url": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Set Up Module
Set up a Duvo Module (a ready-made solution such as AP Invoice Intake & Routing or Freight Audit) as a new Automation on the team, the same as pressing Set up on the Module in the web app. Creates the Module’s Agents, code steps, Queues, Policy and dashboards in one call. If the team already has a demo of this Module open, the call is refused with 409 unless convert_existing_demo is true; then that demo becomes the Automation and its sample cases and Runs are deleted, so ask the user first. The Automation starts in setup and does not run yet: call getAutomationReadiness next to see what is left of the setup, the Policy questions, the current process and the automation proposal, whose approval builds the automation. Connections and routing come once the approved proposal is being built, so don’t raise them before. Give the user the url.
curl --request POST \
--url https://api.duvo.ai/v2/teams/{teamId}/modules/{slug}/automations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"convert_existing_demo": false
}
'import requests
url = "https://api.duvo.ai/v2/teams/{teamId}/modules/{slug}/automations"
payload = { "convert_existing_demo": False }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({convert_existing_demo: false})
};
fetch('https://api.duvo.ai/v2/teams/{teamId}/modules/{slug}/automations', 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.duvo.ai/v2/teams/{teamId}/modules/{slug}/automations",
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([
'convert_existing_demo' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.duvo.ai/v2/teams/{teamId}/modules/{slug}/automations"
payload := strings.NewReader("{\n \"convert_existing_demo\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.duvo.ai/v2/teams/{teamId}/modules/{slug}/automations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"convert_existing_demo\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.duvo.ai/v2/teams/{teamId}/modules/{slug}/automations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"convert_existing_demo\": false\n}"
response = http.request(request)
puts response.read_body{
"automation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"is_setting_up": true,
"link": "<string>",
"url": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
API key authentication. Get your API key from the Duvo dashboard.
Path Parameters
Module template to set up, for example ap-invoice-intake-routing for AP Invoice Intake & Routing or freight-audit for Freight Audit.
chargebacks, freight-audit, inbound-to-store, mode-mix, ap-invoice-intake-routing, payables-audit, demand-supply-balancing, po-management Body
Set true only after the user agreed to it: when the team already has a demo of this Module open, that demo becomes the Automation and its sample cases and Runs are deleted, with no undo. Left false, such a call is refused with 409 and nothing changes.
Response
Default Response
The team's new Automation, built from the Module template.
The new Automation's name, or null when it could not be read back after setup; the Automation exists either way.
Always true: the Automation starts in setup, with its Policy, current process and automation proposal still to do.
true Root-relative web-app path to the Automation's setup screen, or null when this viewer has no such tab.
The full web-app URL of link.
Was this page helpful?