Update an approval section
Updates an existing approval section. The type field is required in the body and must match the section’s type. The organizationId path parameter supports both the Findity id and the partner-side externalId.
PUT
/
organizations
/
{organizationId}
/
approval
/
sections
/
{sectionId}
Update an approval section
curl --request PUT \
--url https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/approval/sections/{sectionId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "DEPARTMENT",
"active": true,
"sortOrder": 0,
"numberOfRequiredApprovals": 2,
"sendToUnauthorizedApprovers": false
}
'import requests
url = "https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/approval/sections/{sectionId}"
payload = {
"type": "DEPARTMENT",
"active": True,
"sortOrder": 0,
"numberOfRequiredApprovals": 2,
"sendToUnauthorizedApprovers": False
}
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({
type: 'DEPARTMENT',
active: true,
sortOrder: 0,
numberOfRequiredApprovals: 2,
sendToUnauthorizedApprovers: false
})
};
fetch('https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/approval/sections/{sectionId}', 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://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/approval/sections/{sectionId}",
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([
'type' => 'DEPARTMENT',
'active' => true,
'sortOrder' => 0,
'numberOfRequiredApprovals' => 2,
'sendToUnauthorizedApprovers' => 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://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/approval/sections/{sectionId}"
payload := strings.NewReader("{\n \"type\": \"DEPARTMENT\",\n \"active\": true,\n \"sortOrder\": 0,\n \"numberOfRequiredApprovals\": 2,\n \"sendToUnauthorizedApprovers\": false\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://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/approval/sections/{sectionId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"DEPARTMENT\",\n \"active\": true,\n \"sortOrder\": 0,\n \"numberOfRequiredApprovals\": 2,\n \"sendToUnauthorizedApprovers\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/approval/sections/{sectionId}")
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 \"type\": \"DEPARTMENT\",\n \"active\": true,\n \"sortOrder\": 0,\n \"numberOfRequiredApprovals\": 2,\n \"sendToUnauthorizedApprovers\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "abcdd5f401cf43549a688045b5ceef9b",
"active": true,
"type": "DEPARTMENT",
"numberOfRequiredApprovals": 2,
"sendToUnauthorizedApprovers": false,
"sortOrder": 0
}Authorizations
Path Parameters
Body
application/json
Request body for updating an existing approval section. Only the fields present in the body are updated.
Response
Approval section successfully updated
A single approval section — either based on organizational units (DEPARTMENT) or on a custom dimension (DIMENSION).
Custom dimension the section is bound to. Present only when type is DIMENSION.
Was this page helpful?
⌘I
Update an approval section
curl --request PUT \
--url https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/approval/sections/{sectionId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "DEPARTMENT",
"active": true,
"sortOrder": 0,
"numberOfRequiredApprovals": 2,
"sendToUnauthorizedApprovers": false
}
'import requests
url = "https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/approval/sections/{sectionId}"
payload = {
"type": "DEPARTMENT",
"active": True,
"sortOrder": 0,
"numberOfRequiredApprovals": 2,
"sendToUnauthorizedApprovers": False
}
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({
type: 'DEPARTMENT',
active: true,
sortOrder: 0,
numberOfRequiredApprovals: 2,
sendToUnauthorizedApprovers: false
})
};
fetch('https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/approval/sections/{sectionId}', 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://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/approval/sections/{sectionId}",
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([
'type' => 'DEPARTMENT',
'active' => true,
'sortOrder' => 0,
'numberOfRequiredApprovals' => 2,
'sendToUnauthorizedApprovers' => 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://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/approval/sections/{sectionId}"
payload := strings.NewReader("{\n \"type\": \"DEPARTMENT\",\n \"active\": true,\n \"sortOrder\": 0,\n \"numberOfRequiredApprovals\": 2,\n \"sendToUnauthorizedApprovers\": false\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://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/approval/sections/{sectionId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"DEPARTMENT\",\n \"active\": true,\n \"sortOrder\": 0,\n \"numberOfRequiredApprovals\": 2,\n \"sendToUnauthorizedApprovers\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://stage-api.findity.com/api/v1/admin/organizations/{organizationId}/approval/sections/{sectionId}")
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 \"type\": \"DEPARTMENT\",\n \"active\": true,\n \"sortOrder\": 0,\n \"numberOfRequiredApprovals\": 2,\n \"sendToUnauthorizedApprovers\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "abcdd5f401cf43549a688045b5ceef9b",
"active": true,
"type": "DEPARTMENT",
"numberOfRequiredApprovals": 2,
"sendToUnauthorizedApprovers": false,
"sortOrder": 0
}
