Update Config Field Definition
curl --request PATCH \
--url https://api.duvo.ai/v2/automations/{automation_id}/config-fields/{field_id}/definition \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<string>",
"key": "<string>",
"question": "<string>",
"guidance": "<string>",
"example": "<string>",
"section": "<string>",
"options": [
"<string>"
],
"columns": [
"<string>"
],
"roles": [
"<string>"
]
}
'import requests
url = "https://api.duvo.ai/v2/automations/{automation_id}/config-fields/{field_id}/definition"
payload = {
"label": "<string>",
"key": "<string>",
"question": "<string>",
"guidance": "<string>",
"example": "<string>",
"section": "<string>",
"options": ["<string>"],
"columns": ["<string>"],
"roles": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
label: '<string>',
key: '<string>',
question: '<string>',
guidance: '<string>',
example: '<string>',
section: '<string>',
options: ['<string>'],
columns: ['<string>'],
roles: ['<string>']
})
};
fetch('https://api.duvo.ai/v2/automations/{automation_id}/config-fields/{field_id}/definition', 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/automations/{automation_id}/config-fields/{field_id}/definition",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'label' => '<string>',
'key' => '<string>',
'question' => '<string>',
'guidance' => '<string>',
'example' => '<string>',
'section' => '<string>',
'options' => [
'<string>'
],
'columns' => [
'<string>'
],
'roles' => [
'<string>'
]
]),
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/automations/{automation_id}/config-fields/{field_id}/definition"
payload := strings.NewReader("{\n \"label\": \"<string>\",\n \"key\": \"<string>\",\n \"question\": \"<string>\",\n \"guidance\": \"<string>\",\n \"example\": \"<string>\",\n \"section\": \"<string>\",\n \"options\": [\n \"<string>\"\n ],\n \"columns\": [\n \"<string>\"\n ],\n \"roles\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.duvo.ai/v2/automations/{automation_id}/config-fields/{field_id}/definition")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"<string>\",\n \"key\": \"<string>\",\n \"question\": \"<string>\",\n \"guidance\": \"<string>\",\n \"example\": \"<string>\",\n \"section\": \"<string>\",\n \"options\": [\n \"<string>\"\n ],\n \"columns\": [\n \"<string>\"\n ],\n \"roles\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.duvo.ai/v2/automations/{automation_id}/config-fields/{field_id}/definition")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"label\": \"<string>\",\n \"key\": \"<string>\",\n \"question\": \"<string>\",\n \"guidance\": \"<string>\",\n \"example\": \"<string>\",\n \"section\": \"<string>\",\n \"options\": [\n \"<string>\"\n ],\n \"columns\": [\n \"<string>\"\n ],\n \"roles\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"field": {
"id": "<string>",
"key": "<string>",
"section": "<string>",
"position": 123,
"label": "<string>",
"question": "<string>",
"guidance": null,
"example": null,
"type": "freeText",
"type_config": {},
"labels": null,
"bindings": [
"context"
],
"required": true,
"fill_mode": "interview",
"roles": [],
"value": "<string>",
"default_value": "<string>",
"status": "default",
"provenance": {
"filled_via": "<string>",
"filled_by_user_id": "<string>",
"filled_by_name": "<string>",
"filled_at": "<string>",
"filled_by_email": null,
"source_capture_id": "<string>",
"source_file_name": null
},
"origin": "template",
"customized": false,
"active": true
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Automations
Update Config Field Definition
Edit a Policy question: its label, question, guidance, example answer, section, the roles that answer it, the options of a select or multiSelect field, and the columns of an unanswered table field a person added. A reworded question gets a new version, and a new section moves the field to that section’s end. The type of a field added through the API can change while it has no answer; a field from the module template keeps its type. The answer is never changed, and a module template reinstall keeps the edit.
PATCH
/
v2
/
automations
/
{automation_id}
/
config-fields
/
{field_id}
/
definition
Update Config Field Definition
curl --request PATCH \
--url https://api.duvo.ai/v2/automations/{automation_id}/config-fields/{field_id}/definition \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<string>",
"key": "<string>",
"question": "<string>",
"guidance": "<string>",
"example": "<string>",
"section": "<string>",
"options": [
"<string>"
],
"columns": [
"<string>"
],
"roles": [
"<string>"
]
}
'import requests
url = "https://api.duvo.ai/v2/automations/{automation_id}/config-fields/{field_id}/definition"
payload = {
"label": "<string>",
"key": "<string>",
"question": "<string>",
"guidance": "<string>",
"example": "<string>",
"section": "<string>",
"options": ["<string>"],
"columns": ["<string>"],
"roles": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
label: '<string>',
key: '<string>',
question: '<string>',
guidance: '<string>',
example: '<string>',
section: '<string>',
options: ['<string>'],
columns: ['<string>'],
roles: ['<string>']
})
};
fetch('https://api.duvo.ai/v2/automations/{automation_id}/config-fields/{field_id}/definition', 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/automations/{automation_id}/config-fields/{field_id}/definition",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'label' => '<string>',
'key' => '<string>',
'question' => '<string>',
'guidance' => '<string>',
'example' => '<string>',
'section' => '<string>',
'options' => [
'<string>'
],
'columns' => [
'<string>'
],
'roles' => [
'<string>'
]
]),
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/automations/{automation_id}/config-fields/{field_id}/definition"
payload := strings.NewReader("{\n \"label\": \"<string>\",\n \"key\": \"<string>\",\n \"question\": \"<string>\",\n \"guidance\": \"<string>\",\n \"example\": \"<string>\",\n \"section\": \"<string>\",\n \"options\": [\n \"<string>\"\n ],\n \"columns\": [\n \"<string>\"\n ],\n \"roles\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.duvo.ai/v2/automations/{automation_id}/config-fields/{field_id}/definition")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"<string>\",\n \"key\": \"<string>\",\n \"question\": \"<string>\",\n \"guidance\": \"<string>\",\n \"example\": \"<string>\",\n \"section\": \"<string>\",\n \"options\": [\n \"<string>\"\n ],\n \"columns\": [\n \"<string>\"\n ],\n \"roles\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.duvo.ai/v2/automations/{automation_id}/config-fields/{field_id}/definition")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"label\": \"<string>\",\n \"key\": \"<string>\",\n \"question\": \"<string>\",\n \"guidance\": \"<string>\",\n \"example\": \"<string>\",\n \"section\": \"<string>\",\n \"options\": [\n \"<string>\"\n ],\n \"columns\": [\n \"<string>\"\n ],\n \"roles\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"field": {
"id": "<string>",
"key": "<string>",
"section": "<string>",
"position": 123,
"label": "<string>",
"question": "<string>",
"guidance": null,
"example": null,
"type": "freeText",
"type_config": {},
"labels": null,
"bindings": [
"context"
],
"required": true,
"fill_mode": "interview",
"roles": [],
"value": "<string>",
"default_value": "<string>",
"status": "default",
"provenance": {
"filled_via": "<string>",
"filled_by_user_id": "<string>",
"filled_by_name": "<string>",
"filled_at": "<string>",
"filled_by_email": null,
"source_capture_id": "<string>",
"source_file_name": null
},
"origin": "template",
"customized": false,
"active": true
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Path Parameters
Body
application/json
Was this page helpful?