curl --request PUT \
--url https://api.hyperline.co/v1/approvals/workflows/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Enterprise quote approval",
"description": "Requires approval for high-value subscription quotes.",
"applicable_flows": [
"quote_subscription"
],
"is_active": true,
"priority": 10,
"step_execution": "sequential",
"email_notification_enabled": true,
"rules": [
{
"operator": "and",
"conditions": [
{
"field": "total_amount",
"operator": "gte",
"value": 100000
}
]
}
],
"steps": [
{
"name": "Finance approval",
"order": 1,
"approver_requirement": "any",
"id": "aps_DKL4Xcb5VSa8CQ",
"approver_role_ids": [
"rol_DKL4Xcb5VSa8CQ"
],
"approver_user_ids": [
"usr_DKL4Xcb5VSa8CQ"
]
}
]
}
'import requests
url = "https://api.hyperline.co/v1/approvals/workflows/{id}"
payload = {
"name": "Enterprise quote approval",
"description": "Requires approval for high-value subscription quotes.",
"applicable_flows": ["quote_subscription"],
"is_active": True,
"priority": 10,
"step_execution": "sequential",
"email_notification_enabled": True,
"rules": [
{
"operator": "and",
"conditions": [
{
"field": "total_amount",
"operator": "gte",
"value": 100000
}
]
}
],
"steps": [
{
"name": "Finance approval",
"order": 1,
"approver_requirement": "any",
"id": "aps_DKL4Xcb5VSa8CQ",
"approver_role_ids": ["rol_DKL4Xcb5VSa8CQ"],
"approver_user_ids": ["usr_DKL4Xcb5VSa8CQ"]
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Enterprise quote approval',
description: 'Requires approval for high-value subscription quotes.',
applicable_flows: ['quote_subscription'],
is_active: true,
priority: 10,
step_execution: 'sequential',
email_notification_enabled: true,
rules: [
{
operator: 'and',
conditions: [{field: 'total_amount', operator: 'gte', value: 100000}]
}
],
steps: [
{
name: 'Finance approval',
order: 1,
approver_requirement: 'any',
id: 'aps_DKL4Xcb5VSa8CQ',
approver_role_ids: ['rol_DKL4Xcb5VSa8CQ'],
approver_user_ids: ['usr_DKL4Xcb5VSa8CQ']
}
]
})
};
fetch('https://api.hyperline.co/v1/approvals/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.hyperline.co/v1/approvals/workflows/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Enterprise quote approval',
'description' => 'Requires approval for high-value subscription quotes.',
'applicable_flows' => [
'quote_subscription'
],
'is_active' => true,
'priority' => 10,
'step_execution' => 'sequential',
'email_notification_enabled' => true,
'rules' => [
[
'operator' => 'and',
'conditions' => [
[
'field' => 'total_amount',
'operator' => 'gte',
'value' => 100000
]
]
]
],
'steps' => [
[
'name' => 'Finance approval',
'order' => 1,
'approver_requirement' => 'any',
'id' => 'aps_DKL4Xcb5VSa8CQ',
'approver_role_ids' => [
'rol_DKL4Xcb5VSa8CQ'
],
'approver_user_ids' => [
'usr_DKL4Xcb5VSa8CQ'
]
]
]
]),
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.hyperline.co/v1/approvals/workflows/{id}"
payload := strings.NewReader("{\n \"name\": \"Enterprise quote approval\",\n \"description\": \"Requires approval for high-value subscription quotes.\",\n \"applicable_flows\": [\n \"quote_subscription\"\n ],\n \"is_active\": true,\n \"priority\": 10,\n \"step_execution\": \"sequential\",\n \"email_notification_enabled\": true,\n \"rules\": [\n {\n \"operator\": \"and\",\n \"conditions\": [\n {\n \"field\": \"total_amount\",\n \"operator\": \"gte\",\n \"value\": 100000\n }\n ]\n }\n ],\n \"steps\": [\n {\n \"name\": \"Finance approval\",\n \"order\": 1,\n \"approver_requirement\": \"any\",\n \"id\": \"aps_DKL4Xcb5VSa8CQ\",\n \"approver_role_ids\": [\n \"rol_DKL4Xcb5VSa8CQ\"\n ],\n \"approver_user_ids\": [\n \"usr_DKL4Xcb5VSa8CQ\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.hyperline.co/v1/approvals/workflows/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Enterprise quote approval\",\n \"description\": \"Requires approval for high-value subscription quotes.\",\n \"applicable_flows\": [\n \"quote_subscription\"\n ],\n \"is_active\": true,\n \"priority\": 10,\n \"step_execution\": \"sequential\",\n \"email_notification_enabled\": true,\n \"rules\": [\n {\n \"operator\": \"and\",\n \"conditions\": [\n {\n \"field\": \"total_amount\",\n \"operator\": \"gte\",\n \"value\": 100000\n }\n ]\n }\n ],\n \"steps\": [\n {\n \"name\": \"Finance approval\",\n \"order\": 1,\n \"approver_requirement\": \"any\",\n \"id\": \"aps_DKL4Xcb5VSa8CQ\",\n \"approver_role_ids\": [\n \"rol_DKL4Xcb5VSa8CQ\"\n ],\n \"approver_user_ids\": [\n \"usr_DKL4Xcb5VSa8CQ\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperline.co/v1/approvals/workflows/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Enterprise quote approval\",\n \"description\": \"Requires approval for high-value subscription quotes.\",\n \"applicable_flows\": [\n \"quote_subscription\"\n ],\n \"is_active\": true,\n \"priority\": 10,\n \"step_execution\": \"sequential\",\n \"email_notification_enabled\": true,\n \"rules\": [\n {\n \"operator\": \"and\",\n \"conditions\": [\n {\n \"field\": \"total_amount\",\n \"operator\": \"gte\",\n \"value\": 100000\n }\n ]\n }\n ],\n \"steps\": [\n {\n \"name\": \"Finance approval\",\n \"order\": 1,\n \"approver_requirement\": \"any\",\n \"id\": \"aps_DKL4Xcb5VSa8CQ\",\n \"approver_role_ids\": [\n \"rol_DKL4Xcb5VSa8CQ\"\n ],\n \"approver_user_ids\": [\n \"usr_DKL4Xcb5VSa8CQ\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "apw_DKL4Xcb5VSa8CQ",
"name": "Enterprise quote approval",
"description": "Requires approval for high-value subscription quotes.",
"applicable_flows": [
"quote_subscription"
],
"is_active": true,
"priority": 10,
"rules": [
{
"id": "apr_DKL4Xcb5VSa8CQ",
"operator": "and",
"conditions": [
{
"field": "total_amount",
"operator": "gte",
"value": 100000
}
]
}
],
"step_execution": "sequential",
"email_notification_enabled": true,
"steps": [
{
"id": "aps_DKL4Xcb5VSa8CQ",
"name": "Finance approval",
"order": 1,
"approver_requirement": "any",
"approver_role_ids": [
"rol_DKL4Xcb5VSa8CQ"
],
"approver_user_ids": [
"usr_DKL4Xcb5VSa8CQ"
]
}
],
"version": 1,
"original_workflow_id": null,
"created_at": "2024-12-20T16:04:11Z"
}{
"message": "<string>"
}Update approval workflow
Update an existing approval workflow.
curl --request PUT \
--url https://api.hyperline.co/v1/approvals/workflows/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Enterprise quote approval",
"description": "Requires approval for high-value subscription quotes.",
"applicable_flows": [
"quote_subscription"
],
"is_active": true,
"priority": 10,
"step_execution": "sequential",
"email_notification_enabled": true,
"rules": [
{
"operator": "and",
"conditions": [
{
"field": "total_amount",
"operator": "gte",
"value": 100000
}
]
}
],
"steps": [
{
"name": "Finance approval",
"order": 1,
"approver_requirement": "any",
"id": "aps_DKL4Xcb5VSa8CQ",
"approver_role_ids": [
"rol_DKL4Xcb5VSa8CQ"
],
"approver_user_ids": [
"usr_DKL4Xcb5VSa8CQ"
]
}
]
}
'import requests
url = "https://api.hyperline.co/v1/approvals/workflows/{id}"
payload = {
"name": "Enterprise quote approval",
"description": "Requires approval for high-value subscription quotes.",
"applicable_flows": ["quote_subscription"],
"is_active": True,
"priority": 10,
"step_execution": "sequential",
"email_notification_enabled": True,
"rules": [
{
"operator": "and",
"conditions": [
{
"field": "total_amount",
"operator": "gte",
"value": 100000
}
]
}
],
"steps": [
{
"name": "Finance approval",
"order": 1,
"approver_requirement": "any",
"id": "aps_DKL4Xcb5VSa8CQ",
"approver_role_ids": ["rol_DKL4Xcb5VSa8CQ"],
"approver_user_ids": ["usr_DKL4Xcb5VSa8CQ"]
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Enterprise quote approval',
description: 'Requires approval for high-value subscription quotes.',
applicable_flows: ['quote_subscription'],
is_active: true,
priority: 10,
step_execution: 'sequential',
email_notification_enabled: true,
rules: [
{
operator: 'and',
conditions: [{field: 'total_amount', operator: 'gte', value: 100000}]
}
],
steps: [
{
name: 'Finance approval',
order: 1,
approver_requirement: 'any',
id: 'aps_DKL4Xcb5VSa8CQ',
approver_role_ids: ['rol_DKL4Xcb5VSa8CQ'],
approver_user_ids: ['usr_DKL4Xcb5VSa8CQ']
}
]
})
};
fetch('https://api.hyperline.co/v1/approvals/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.hyperline.co/v1/approvals/workflows/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Enterprise quote approval',
'description' => 'Requires approval for high-value subscription quotes.',
'applicable_flows' => [
'quote_subscription'
],
'is_active' => true,
'priority' => 10,
'step_execution' => 'sequential',
'email_notification_enabled' => true,
'rules' => [
[
'operator' => 'and',
'conditions' => [
[
'field' => 'total_amount',
'operator' => 'gte',
'value' => 100000
]
]
]
],
'steps' => [
[
'name' => 'Finance approval',
'order' => 1,
'approver_requirement' => 'any',
'id' => 'aps_DKL4Xcb5VSa8CQ',
'approver_role_ids' => [
'rol_DKL4Xcb5VSa8CQ'
],
'approver_user_ids' => [
'usr_DKL4Xcb5VSa8CQ'
]
]
]
]),
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.hyperline.co/v1/approvals/workflows/{id}"
payload := strings.NewReader("{\n \"name\": \"Enterprise quote approval\",\n \"description\": \"Requires approval for high-value subscription quotes.\",\n \"applicable_flows\": [\n \"quote_subscription\"\n ],\n \"is_active\": true,\n \"priority\": 10,\n \"step_execution\": \"sequential\",\n \"email_notification_enabled\": true,\n \"rules\": [\n {\n \"operator\": \"and\",\n \"conditions\": [\n {\n \"field\": \"total_amount\",\n \"operator\": \"gte\",\n \"value\": 100000\n }\n ]\n }\n ],\n \"steps\": [\n {\n \"name\": \"Finance approval\",\n \"order\": 1,\n \"approver_requirement\": \"any\",\n \"id\": \"aps_DKL4Xcb5VSa8CQ\",\n \"approver_role_ids\": [\n \"rol_DKL4Xcb5VSa8CQ\"\n ],\n \"approver_user_ids\": [\n \"usr_DKL4Xcb5VSa8CQ\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.hyperline.co/v1/approvals/workflows/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Enterprise quote approval\",\n \"description\": \"Requires approval for high-value subscription quotes.\",\n \"applicable_flows\": [\n \"quote_subscription\"\n ],\n \"is_active\": true,\n \"priority\": 10,\n \"step_execution\": \"sequential\",\n \"email_notification_enabled\": true,\n \"rules\": [\n {\n \"operator\": \"and\",\n \"conditions\": [\n {\n \"field\": \"total_amount\",\n \"operator\": \"gte\",\n \"value\": 100000\n }\n ]\n }\n ],\n \"steps\": [\n {\n \"name\": \"Finance approval\",\n \"order\": 1,\n \"approver_requirement\": \"any\",\n \"id\": \"aps_DKL4Xcb5VSa8CQ\",\n \"approver_role_ids\": [\n \"rol_DKL4Xcb5VSa8CQ\"\n ],\n \"approver_user_ids\": [\n \"usr_DKL4Xcb5VSa8CQ\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperline.co/v1/approvals/workflows/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Enterprise quote approval\",\n \"description\": \"Requires approval for high-value subscription quotes.\",\n \"applicable_flows\": [\n \"quote_subscription\"\n ],\n \"is_active\": true,\n \"priority\": 10,\n \"step_execution\": \"sequential\",\n \"email_notification_enabled\": true,\n \"rules\": [\n {\n \"operator\": \"and\",\n \"conditions\": [\n {\n \"field\": \"total_amount\",\n \"operator\": \"gte\",\n \"value\": 100000\n }\n ]\n }\n ],\n \"steps\": [\n {\n \"name\": \"Finance approval\",\n \"order\": 1,\n \"approver_requirement\": \"any\",\n \"id\": \"aps_DKL4Xcb5VSa8CQ\",\n \"approver_role_ids\": [\n \"rol_DKL4Xcb5VSa8CQ\"\n ],\n \"approver_user_ids\": [\n \"usr_DKL4Xcb5VSa8CQ\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "apw_DKL4Xcb5VSa8CQ",
"name": "Enterprise quote approval",
"description": "Requires approval for high-value subscription quotes.",
"applicable_flows": [
"quote_subscription"
],
"is_active": true,
"priority": 10,
"rules": [
{
"id": "apr_DKL4Xcb5VSa8CQ",
"operator": "and",
"conditions": [
{
"field": "total_amount",
"operator": "gte",
"value": 100000
}
]
}
],
"step_execution": "sequential",
"email_notification_enabled": true,
"steps": [
{
"id": "aps_DKL4Xcb5VSa8CQ",
"name": "Finance approval",
"order": 1,
"approver_requirement": "any",
"approver_role_ids": [
"rol_DKL4Xcb5VSa8CQ"
],
"approver_user_ids": [
"usr_DKL4Xcb5VSa8CQ"
]
}
],
"version": 1,
"original_workflow_id": null,
"created_at": "2024-12-20T16:04:11Z"
}{
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
Approval workflow update payload.
Approval workflow name.
1"Enterprise quote approval"
Approval workflow description.
"Requires approval for high-value subscription quotes."
Quote or subscription flows where the workflow applies.
1quote_subscription, quote_subscription_update, quote_one_off, subscription_update ["quote_subscription"]
Whether the workflow is active.
true
Workflow priority. Lower values are evaluated first when multiple workflows match.
10
How workflow steps execute. Sequential steps run by order; parallel steps run together.
sequential, parallel "sequential"
Whether approvers receive email notifications for this workflow.
true
Rules that determine when the workflow applies.
1Show child attributes
Show child attributes
Approval steps required by the workflow.
1Show child attributes
Show child attributes
Response
Approval workflow ID.
"apw_DKL4Xcb5VSa8CQ"
Approval workflow name.
"Enterprise quote approval"
Approval workflow description.
"Requires approval for high-value subscription quotes."
Quote or subscription flows where the workflow applies.
quote_subscription, quote_subscription_update, quote_one_off, subscription_update ["quote_subscription"]
Whether the workflow is active.
true
Workflow priority. Lower values are evaluated first when multiple workflows match.
10
Rules that determine when the workflow applies.
Show child attributes
Show child attributes
How workflow steps execute. Sequential steps run by order; parallel steps run together.
sequential, parallel "sequential"
Whether approvers receive email notifications for this workflow.
true
Approval steps required by the workflow.
Show child attributes
Show child attributes
Workflow version number.
1
Original workflow ID when this workflow is an archived version.
null
Was this page helpful?

