Update workflow
curl --request PATCH \
--url https://api.quentli.com/v1/workflows/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input": {
"id": "<string>",
"expectedPublishedVersionId": "<string>",
"expectedUpdatedAt": "<string>",
"name": "<string>",
"description": "<string>",
"variables": [
{
"key": "<string>",
"name": "<string>",
"required": true
}
],
"triggers": [
{
"enabled": true,
"expectedWorkflowId": "<string>"
}
],
"steps": [
{
"type": "ATTEMPT_CHARGE",
"invoiceVariableKey": "<string>"
}
]
}
}
'import requests
url = "https://api.quentli.com/v1/workflows/{id}"
payload = { "input": {
"id": "<string>",
"expectedPublishedVersionId": "<string>",
"expectedUpdatedAt": "<string>",
"name": "<string>",
"description": "<string>",
"variables": [
{
"key": "<string>",
"name": "<string>",
"required": True
}
],
"triggers": [
{
"enabled": True,
"expectedWorkflowId": "<string>"
}
],
"steps": [
{
"type": "ATTEMPT_CHARGE",
"invoiceVariableKey": "<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({
input: {
id: '<string>',
expectedPublishedVersionId: '<string>',
expectedUpdatedAt: '<string>',
name: '<string>',
description: '<string>',
variables: [{key: '<string>', name: '<string>', required: true}],
triggers: [{enabled: true, expectedWorkflowId: '<string>'}],
steps: [{type: 'ATTEMPT_CHARGE', invoiceVariableKey: '<string>'}]
}
})
};
fetch('https://api.quentli.com/v1/workflows/{id}', 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.quentli.com/v1/workflows/{id}",
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([
'input' => [
'id' => '<string>',
'expectedPublishedVersionId' => '<string>',
'expectedUpdatedAt' => '<string>',
'name' => '<string>',
'description' => '<string>',
'variables' => [
[
'key' => '<string>',
'name' => '<string>',
'required' => true
]
],
'triggers' => [
[
'enabled' => true,
'expectedWorkflowId' => '<string>'
]
],
'steps' => [
[
'type' => 'ATTEMPT_CHARGE',
'invoiceVariableKey' => '<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.quentli.com/v1/workflows/{id}"
payload := strings.NewReader("{\n \"input\": {\n \"id\": \"<string>\",\n \"expectedPublishedVersionId\": \"<string>\",\n \"expectedUpdatedAt\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"variables\": [\n {\n \"key\": \"<string>\",\n \"name\": \"<string>\",\n \"required\": true\n }\n ],\n \"triggers\": [\n {\n \"enabled\": true,\n \"expectedWorkflowId\": \"<string>\"\n }\n ],\n \"steps\": [\n {\n \"type\": \"ATTEMPT_CHARGE\",\n \"invoiceVariableKey\": \"<string>\"\n }\n ]\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.quentli.com/v1/workflows/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"input\": {\n \"id\": \"<string>\",\n \"expectedPublishedVersionId\": \"<string>\",\n \"expectedUpdatedAt\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"variables\": [\n {\n \"key\": \"<string>\",\n \"name\": \"<string>\",\n \"required\": true\n }\n ],\n \"triggers\": [\n {\n \"enabled\": true,\n \"expectedWorkflowId\": \"<string>\"\n }\n ],\n \"steps\": [\n {\n \"type\": \"ATTEMPT_CHARGE\",\n \"invoiceVariableKey\": \"<string>\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.quentli.com/v1/workflows/{id}")
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 \"input\": {\n \"id\": \"<string>\",\n \"expectedPublishedVersionId\": \"<string>\",\n \"expectedUpdatedAt\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"variables\": [\n {\n \"key\": \"<string>\",\n \"name\": \"<string>\",\n \"required\": true\n }\n ],\n \"triggers\": [\n {\n \"enabled\": true,\n \"expectedWorkflowId\": \"<string>\"\n }\n ],\n \"steps\": [\n {\n \"type\": \"ATTEMPT_CHARGE\",\n \"invoiceVariableKey\": \"<string>\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"workflow": {
"id": "wf_1234567890abcdefghij",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"organizationId": "<string>",
"key": "<string>",
"name": "Cobranza estándar",
"description": "<string>",
"status": "DRAFT",
"publishedVersionId": "<string>",
"deletedAt": "2023-11-07T05:31:56Z"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}Management
Update workflow
Updates supplied fields. Supplied arrays replace existing arrays; steps or variables publish a new version. Concurrency fields are required. ACTIVE workflows run on new matching events.
PATCH
/
v1
/
workflows
/
{id}
Update workflow
curl --request PATCH \
--url https://api.quentli.com/v1/workflows/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input": {
"id": "<string>",
"expectedPublishedVersionId": "<string>",
"expectedUpdatedAt": "<string>",
"name": "<string>",
"description": "<string>",
"variables": [
{
"key": "<string>",
"name": "<string>",
"required": true
}
],
"triggers": [
{
"enabled": true,
"expectedWorkflowId": "<string>"
}
],
"steps": [
{
"type": "ATTEMPT_CHARGE",
"invoiceVariableKey": "<string>"
}
]
}
}
'import requests
url = "https://api.quentli.com/v1/workflows/{id}"
payload = { "input": {
"id": "<string>",
"expectedPublishedVersionId": "<string>",
"expectedUpdatedAt": "<string>",
"name": "<string>",
"description": "<string>",
"variables": [
{
"key": "<string>",
"name": "<string>",
"required": True
}
],
"triggers": [
{
"enabled": True,
"expectedWorkflowId": "<string>"
}
],
"steps": [
{
"type": "ATTEMPT_CHARGE",
"invoiceVariableKey": "<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({
input: {
id: '<string>',
expectedPublishedVersionId: '<string>',
expectedUpdatedAt: '<string>',
name: '<string>',
description: '<string>',
variables: [{key: '<string>', name: '<string>', required: true}],
triggers: [{enabled: true, expectedWorkflowId: '<string>'}],
steps: [{type: 'ATTEMPT_CHARGE', invoiceVariableKey: '<string>'}]
}
})
};
fetch('https://api.quentli.com/v1/workflows/{id}', 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.quentli.com/v1/workflows/{id}",
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([
'input' => [
'id' => '<string>',
'expectedPublishedVersionId' => '<string>',
'expectedUpdatedAt' => '<string>',
'name' => '<string>',
'description' => '<string>',
'variables' => [
[
'key' => '<string>',
'name' => '<string>',
'required' => true
]
],
'triggers' => [
[
'enabled' => true,
'expectedWorkflowId' => '<string>'
]
],
'steps' => [
[
'type' => 'ATTEMPT_CHARGE',
'invoiceVariableKey' => '<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.quentli.com/v1/workflows/{id}"
payload := strings.NewReader("{\n \"input\": {\n \"id\": \"<string>\",\n \"expectedPublishedVersionId\": \"<string>\",\n \"expectedUpdatedAt\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"variables\": [\n {\n \"key\": \"<string>\",\n \"name\": \"<string>\",\n \"required\": true\n }\n ],\n \"triggers\": [\n {\n \"enabled\": true,\n \"expectedWorkflowId\": \"<string>\"\n }\n ],\n \"steps\": [\n {\n \"type\": \"ATTEMPT_CHARGE\",\n \"invoiceVariableKey\": \"<string>\"\n }\n ]\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.quentli.com/v1/workflows/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"input\": {\n \"id\": \"<string>\",\n \"expectedPublishedVersionId\": \"<string>\",\n \"expectedUpdatedAt\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"variables\": [\n {\n \"key\": \"<string>\",\n \"name\": \"<string>\",\n \"required\": true\n }\n ],\n \"triggers\": [\n {\n \"enabled\": true,\n \"expectedWorkflowId\": \"<string>\"\n }\n ],\n \"steps\": [\n {\n \"type\": \"ATTEMPT_CHARGE\",\n \"invoiceVariableKey\": \"<string>\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.quentli.com/v1/workflows/{id}")
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 \"input\": {\n \"id\": \"<string>\",\n \"expectedPublishedVersionId\": \"<string>\",\n \"expectedUpdatedAt\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"variables\": [\n {\n \"key\": \"<string>\",\n \"name\": \"<string>\",\n \"required\": true\n }\n ],\n \"triggers\": [\n {\n \"enabled\": true,\n \"expectedWorkflowId\": \"<string>\"\n }\n ],\n \"steps\": [\n {\n \"type\": \"ATTEMPT_CHARGE\",\n \"invoiceVariableKey\": \"<string>\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"workflow": {
"id": "wf_1234567890abcdefghij",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"organizationId": "<string>",
"key": "<string>",
"name": "Cobranza estándar",
"description": "<string>",
"status": "DRAFT",
"publishedVersionId": "<string>",
"deletedAt": "2023-11-07T05:31:56Z"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}Authorizations
organizationApiKeyoauthAccessToken
Body
application/json
Was this page helpful?