Update delegation
curl --request PATCH \
--url https://staging.api.us.aptlydone.com/decision/v1/delegations/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "DRAFT",
"isRootDelegation": false,
"issuerType": "ROOT_AUTHORITY",
"issuerUserId": "648fa115-52d0-4466-baff-740447a60774",
"issuerPositionId": "257fa115-52d0-4466-baff-740447a60774",
"recipientType": "PERSONNEL_IN_POSITION",
"recipientAutoIssue": false,
"decisionId": "864fa115-52d0-4466-baff-740447a60774",
"parentDelegationId": "726fa115-52d0-4466-baff-740447a60774",
"expirationDate": "2025-12-31T12:00:00Z",
"isNoExpiration": false,
"effectiveDate": "2025-01-01T12:00:00Z",
"delegationPathway": [
{
"pathwayTypeName": [
"Matrix",
"Direct Line",
"Functional"
],
"isInvalid": false
}
],
"delegationRecipients": [
{
"recipientUserId": "485fa115-52d0-4466-baff-740447a60774",
"recipientPositionId": "14f5a115-52d0-4466-baff-740447a60774",
"isInvalid": false
}
],
"delegationGroups": [
{
"groupId": "105fa115-52d0-4466-baff-740447a60774",
"tenantGroupTypeId": "105fa115-52d0-4466-baff-740447a60774",
"displayName": "Engineering Team",
"groupName": "Engineering Team",
"isInvalid": false
}
],
"delegationAuthorities": [
{
"authorityTypeId": "105fa115-52d0-4466-baff-740447a60774",
"authorityLimit": "Primary",
"authorityLimitValueType": "Currency",
"authorityLimitOperator": "<=",
"redelegable": true,
"authorityTypeOrder": 1,
"authorityLimitValue": "1000000",
"authorityLimitValueUnit": "$",
"authorityThresholdValue": "50000",
"authorityThresholdOperator": ">=",
"redelegationLimitValue": "500000",
"redelegationLimitValueUnit": "$",
"isInvalid": false,
"isLimitOverridden": false
}
],
"delegationDocuments": [
{
"documentId": "105fa115-52d0-4466-baff-740447a60774",
"isPinned": true
}
],
"isInvalid": false,
"invalidFields": [
"delegationGroups",
"delegationAuthorities"
]
}
'import requests
url = "https://staging.api.us.aptlydone.com/decision/v1/delegations/{id}"
payload = {
"status": "DRAFT",
"isRootDelegation": False,
"issuerType": "ROOT_AUTHORITY",
"issuerUserId": "648fa115-52d0-4466-baff-740447a60774",
"issuerPositionId": "257fa115-52d0-4466-baff-740447a60774",
"recipientType": "PERSONNEL_IN_POSITION",
"recipientAutoIssue": False,
"decisionId": "864fa115-52d0-4466-baff-740447a60774",
"parentDelegationId": "726fa115-52d0-4466-baff-740447a60774",
"expirationDate": "2025-12-31T12:00:00Z",
"isNoExpiration": False,
"effectiveDate": "2025-01-01T12:00:00Z",
"delegationPathway": [
{
"pathwayTypeName": ["Matrix", "Direct Line", "Functional"],
"isInvalid": False
}
],
"delegationRecipients": [
{
"recipientUserId": "485fa115-52d0-4466-baff-740447a60774",
"recipientPositionId": "14f5a115-52d0-4466-baff-740447a60774",
"isInvalid": False
}
],
"delegationGroups": [
{
"groupId": "105fa115-52d0-4466-baff-740447a60774",
"tenantGroupTypeId": "105fa115-52d0-4466-baff-740447a60774",
"displayName": "Engineering Team",
"groupName": "Engineering Team",
"isInvalid": False
}
],
"delegationAuthorities": [
{
"authorityTypeId": "105fa115-52d0-4466-baff-740447a60774",
"authorityLimit": "Primary",
"authorityLimitValueType": "Currency",
"authorityLimitOperator": "<=",
"redelegable": True,
"authorityTypeOrder": 1,
"authorityLimitValue": "1000000",
"authorityLimitValueUnit": "$",
"authorityThresholdValue": "50000",
"authorityThresholdOperator": ">=",
"redelegationLimitValue": "500000",
"redelegationLimitValueUnit": "$",
"isInvalid": False,
"isLimitOverridden": False
}
],
"delegationDocuments": [
{
"documentId": "105fa115-52d0-4466-baff-740447a60774",
"isPinned": True
}
],
"isInvalid": False,
"invalidFields": ["delegationGroups", "delegationAuthorities"]
}
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({
status: 'DRAFT',
isRootDelegation: false,
issuerType: 'ROOT_AUTHORITY',
issuerUserId: '648fa115-52d0-4466-baff-740447a60774',
issuerPositionId: '257fa115-52d0-4466-baff-740447a60774',
recipientType: 'PERSONNEL_IN_POSITION',
recipientAutoIssue: false,
decisionId: '864fa115-52d0-4466-baff-740447a60774',
parentDelegationId: '726fa115-52d0-4466-baff-740447a60774',
expirationDate: '2025-12-31T12:00:00Z',
isNoExpiration: false,
effectiveDate: '2025-01-01T12:00:00Z',
delegationPathway: [{pathwayTypeName: ['Matrix', 'Direct Line', 'Functional'], isInvalid: false}],
delegationRecipients: [
{
recipientUserId: '485fa115-52d0-4466-baff-740447a60774',
recipientPositionId: '14f5a115-52d0-4466-baff-740447a60774',
isInvalid: false
}
],
delegationGroups: [
{
groupId: '105fa115-52d0-4466-baff-740447a60774',
tenantGroupTypeId: '105fa115-52d0-4466-baff-740447a60774',
displayName: 'Engineering Team',
groupName: 'Engineering Team',
isInvalid: false
}
],
delegationAuthorities: [
{
authorityTypeId: '105fa115-52d0-4466-baff-740447a60774',
authorityLimit: 'Primary',
authorityLimitValueType: 'Currency',
authorityLimitOperator: '<=',
redelegable: true,
authorityTypeOrder: 1,
authorityLimitValue: '1000000',
authorityLimitValueUnit: '$',
authorityThresholdValue: '50000',
authorityThresholdOperator: '>=',
redelegationLimitValue: '500000',
redelegationLimitValueUnit: '$',
isInvalid: false,
isLimitOverridden: false
}
],
delegationDocuments: [{documentId: '105fa115-52d0-4466-baff-740447a60774', isPinned: true}],
isInvalid: false,
invalidFields: ['delegationGroups', 'delegationAuthorities']
})
};
fetch('https://staging.api.us.aptlydone.com/decision/v1/delegations/{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://staging.api.us.aptlydone.com/decision/v1/delegations/{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([
'status' => 'DRAFT',
'isRootDelegation' => false,
'issuerType' => 'ROOT_AUTHORITY',
'issuerUserId' => '648fa115-52d0-4466-baff-740447a60774',
'issuerPositionId' => '257fa115-52d0-4466-baff-740447a60774',
'recipientType' => 'PERSONNEL_IN_POSITION',
'recipientAutoIssue' => false,
'decisionId' => '864fa115-52d0-4466-baff-740447a60774',
'parentDelegationId' => '726fa115-52d0-4466-baff-740447a60774',
'expirationDate' => '2025-12-31T12:00:00Z',
'isNoExpiration' => false,
'effectiveDate' => '2025-01-01T12:00:00Z',
'delegationPathway' => [
[
'pathwayTypeName' => [
'Matrix',
'Direct Line',
'Functional'
],
'isInvalid' => false
]
],
'delegationRecipients' => [
[
'recipientUserId' => '485fa115-52d0-4466-baff-740447a60774',
'recipientPositionId' => '14f5a115-52d0-4466-baff-740447a60774',
'isInvalid' => false
]
],
'delegationGroups' => [
[
'groupId' => '105fa115-52d0-4466-baff-740447a60774',
'tenantGroupTypeId' => '105fa115-52d0-4466-baff-740447a60774',
'displayName' => 'Engineering Team',
'groupName' => 'Engineering Team',
'isInvalid' => false
]
],
'delegationAuthorities' => [
[
'authorityTypeId' => '105fa115-52d0-4466-baff-740447a60774',
'authorityLimit' => 'Primary',
'authorityLimitValueType' => 'Currency',
'authorityLimitOperator' => '<=',
'redelegable' => true,
'authorityTypeOrder' => 1,
'authorityLimitValue' => '1000000',
'authorityLimitValueUnit' => '$',
'authorityThresholdValue' => '50000',
'authorityThresholdOperator' => '>=',
'redelegationLimitValue' => '500000',
'redelegationLimitValueUnit' => '$',
'isInvalid' => false,
'isLimitOverridden' => false
]
],
'delegationDocuments' => [
[
'documentId' => '105fa115-52d0-4466-baff-740447a60774',
'isPinned' => true
]
],
'isInvalid' => false,
'invalidFields' => [
'delegationGroups',
'delegationAuthorities'
]
]),
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://staging.api.us.aptlydone.com/decision/v1/delegations/{id}"
payload := strings.NewReader("{\n \"status\": \"DRAFT\",\n \"isRootDelegation\": false,\n \"issuerType\": \"ROOT_AUTHORITY\",\n \"issuerUserId\": \"648fa115-52d0-4466-baff-740447a60774\",\n \"issuerPositionId\": \"257fa115-52d0-4466-baff-740447a60774\",\n \"recipientType\": \"PERSONNEL_IN_POSITION\",\n \"recipientAutoIssue\": false,\n \"decisionId\": \"864fa115-52d0-4466-baff-740447a60774\",\n \"parentDelegationId\": \"726fa115-52d0-4466-baff-740447a60774\",\n \"expirationDate\": \"2025-12-31T12:00:00Z\",\n \"isNoExpiration\": false,\n \"effectiveDate\": \"2025-01-01T12:00:00Z\",\n \"delegationPathway\": [\n {\n \"pathwayTypeName\": [\n \"Matrix\",\n \"Direct Line\",\n \"Functional\"\n ],\n \"isInvalid\": false\n }\n ],\n \"delegationRecipients\": [\n {\n \"recipientUserId\": \"485fa115-52d0-4466-baff-740447a60774\",\n \"recipientPositionId\": \"14f5a115-52d0-4466-baff-740447a60774\",\n \"isInvalid\": false\n }\n ],\n \"delegationGroups\": [\n {\n \"groupId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"tenantGroupTypeId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"displayName\": \"Engineering Team\",\n \"groupName\": \"Engineering Team\",\n \"isInvalid\": false\n }\n ],\n \"delegationAuthorities\": [\n {\n \"authorityTypeId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"authorityLimit\": \"Primary\",\n \"authorityLimitValueType\": \"Currency\",\n \"authorityLimitOperator\": \"<=\",\n \"redelegable\": true,\n \"authorityTypeOrder\": 1,\n \"authorityLimitValue\": \"1000000\",\n \"authorityLimitValueUnit\": \"$\",\n \"authorityThresholdValue\": \"50000\",\n \"authorityThresholdOperator\": \">=\",\n \"redelegationLimitValue\": \"500000\",\n \"redelegationLimitValueUnit\": \"$\",\n \"isInvalid\": false,\n \"isLimitOverridden\": false\n }\n ],\n \"delegationDocuments\": [\n {\n \"documentId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"isPinned\": true\n }\n ],\n \"isInvalid\": false,\n \"invalidFields\": [\n \"delegationGroups\",\n \"delegationAuthorities\"\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://staging.api.us.aptlydone.com/decision/v1/delegations/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"DRAFT\",\n \"isRootDelegation\": false,\n \"issuerType\": \"ROOT_AUTHORITY\",\n \"issuerUserId\": \"648fa115-52d0-4466-baff-740447a60774\",\n \"issuerPositionId\": \"257fa115-52d0-4466-baff-740447a60774\",\n \"recipientType\": \"PERSONNEL_IN_POSITION\",\n \"recipientAutoIssue\": false,\n \"decisionId\": \"864fa115-52d0-4466-baff-740447a60774\",\n \"parentDelegationId\": \"726fa115-52d0-4466-baff-740447a60774\",\n \"expirationDate\": \"2025-12-31T12:00:00Z\",\n \"isNoExpiration\": false,\n \"effectiveDate\": \"2025-01-01T12:00:00Z\",\n \"delegationPathway\": [\n {\n \"pathwayTypeName\": [\n \"Matrix\",\n \"Direct Line\",\n \"Functional\"\n ],\n \"isInvalid\": false\n }\n ],\n \"delegationRecipients\": [\n {\n \"recipientUserId\": \"485fa115-52d0-4466-baff-740447a60774\",\n \"recipientPositionId\": \"14f5a115-52d0-4466-baff-740447a60774\",\n \"isInvalid\": false\n }\n ],\n \"delegationGroups\": [\n {\n \"groupId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"tenantGroupTypeId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"displayName\": \"Engineering Team\",\n \"groupName\": \"Engineering Team\",\n \"isInvalid\": false\n }\n ],\n \"delegationAuthorities\": [\n {\n \"authorityTypeId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"authorityLimit\": \"Primary\",\n \"authorityLimitValueType\": \"Currency\",\n \"authorityLimitOperator\": \"<=\",\n \"redelegable\": true,\n \"authorityTypeOrder\": 1,\n \"authorityLimitValue\": \"1000000\",\n \"authorityLimitValueUnit\": \"$\",\n \"authorityThresholdValue\": \"50000\",\n \"authorityThresholdOperator\": \">=\",\n \"redelegationLimitValue\": \"500000\",\n \"redelegationLimitValueUnit\": \"$\",\n \"isInvalid\": false,\n \"isLimitOverridden\": false\n }\n ],\n \"delegationDocuments\": [\n {\n \"documentId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"isPinned\": true\n }\n ],\n \"isInvalid\": false,\n \"invalidFields\": [\n \"delegationGroups\",\n \"delegationAuthorities\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.us.aptlydone.com/decision/v1/delegations/{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 \"status\": \"DRAFT\",\n \"isRootDelegation\": false,\n \"issuerType\": \"ROOT_AUTHORITY\",\n \"issuerUserId\": \"648fa115-52d0-4466-baff-740447a60774\",\n \"issuerPositionId\": \"257fa115-52d0-4466-baff-740447a60774\",\n \"recipientType\": \"PERSONNEL_IN_POSITION\",\n \"recipientAutoIssue\": false,\n \"decisionId\": \"864fa115-52d0-4466-baff-740447a60774\",\n \"parentDelegationId\": \"726fa115-52d0-4466-baff-740447a60774\",\n \"expirationDate\": \"2025-12-31T12:00:00Z\",\n \"isNoExpiration\": false,\n \"effectiveDate\": \"2025-01-01T12:00:00Z\",\n \"delegationPathway\": [\n {\n \"pathwayTypeName\": [\n \"Matrix\",\n \"Direct Line\",\n \"Functional\"\n ],\n \"isInvalid\": false\n }\n ],\n \"delegationRecipients\": [\n {\n \"recipientUserId\": \"485fa115-52d0-4466-baff-740447a60774\",\n \"recipientPositionId\": \"14f5a115-52d0-4466-baff-740447a60774\",\n \"isInvalid\": false\n }\n ],\n \"delegationGroups\": [\n {\n \"groupId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"tenantGroupTypeId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"displayName\": \"Engineering Team\",\n \"groupName\": \"Engineering Team\",\n \"isInvalid\": false\n }\n ],\n \"delegationAuthorities\": [\n {\n \"authorityTypeId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"authorityLimit\": \"Primary\",\n \"authorityLimitValueType\": \"Currency\",\n \"authorityLimitOperator\": \"<=\",\n \"redelegable\": true,\n \"authorityTypeOrder\": 1,\n \"authorityLimitValue\": \"1000000\",\n \"authorityLimitValueUnit\": \"$\",\n \"authorityThresholdValue\": \"50000\",\n \"authorityThresholdOperator\": \">=\",\n \"redelegationLimitValue\": \"500000\",\n \"redelegationLimitValueUnit\": \"$\",\n \"isInvalid\": false,\n \"isLimitOverridden\": false\n }\n ],\n \"delegationDocuments\": [\n {\n \"documentId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"isPinned\": true\n }\n ],\n \"isInvalid\": false,\n \"invalidFields\": [\n \"delegationGroups\",\n \"delegationAuthorities\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "9f45f94d-20d2-4163-85d9-68f4f699e440",
"tenantId": "105fa115-52d0-4466-baff-740447a60774",
"issuerType": "ROOT_AUTHORITY",
"recipientType": "PERSONNEL_IN_POSITION",
"decisionId": "864fa115-52d0-4466-baff-740447a60774",
"issuedDate": "2025-01-01T12:00:00Z",
"acceptedDate": "2025-01-01T12:00:00Z",
"effectiveDate": "2025-01-01T12:00:00Z",
"delegationDisplayId": "12789",
"link": "/delegations/view/eyJ0ZW5hbnRJZCI6IjEwNWZhMTE1LTUyZDAtNDQ2Ni1iYWZmLTc0MDQ0N2E2MDc3NCIsImRlbGVnYXRpb25JZCI6IjMwOGNiMzMxLWYwMTgtNGJjNS1hMWE3LTQ1MTI4NTU4MTg0MyJ9",
"status": "DRAFT",
"isRootDelegation": false,
"issuerUserId": "648fa115-52d0-4466-baff-740447a60774",
"issuerPositionId": "257fa115-52d0-4466-baff-740447a60774",
"recipientAutoIssue": false,
"parentDelegationId": "726fa115-52d0-4466-baff-740447a60774",
"expirationDate": "2025-12-31T12:00:00Z",
"isNoExpiration": false,
"updatedAt": "2025-01-01T12:00:00Z",
"copiedFrom": "7df90da4-0634-40b9-abf5-6e97a222cfb8",
"delegationPathway": [],
"delegationRecipients": [],
"delegationGroups": [],
"delegationAuthorities": [],
"delegationDocuments": [],
"delegationId": "9f45f94d-20d2-4163-85d9-68f4f699e440",
"sourceDecision": {
"id": "7df90da4-0634-40b9-abf5-6e97a222cfb8",
"decisionDisplayId": "14623",
"name": "Long-term Investments",
"description": "The Long-term Investments authority involves approving strategic investments",
"guidance": "Investment decisions for long-term, strategic investments...",
"sectionId": "105fa115-52d0-4466-baff-740447a60774",
"categoryId": "248fa115-52d0-4466-baff-740447a60774"
},
"isInvalid": false,
"invalidFields": [
"delegationGroups",
"delegationAuthorities"
],
"actionIssuerApproval": true,
"actionDelegationAcceptance": true,
"actionAuthorityRequest": true,
"approvalActionExistForUser": true,
"acceptanceActionExistForUser": true
}Delegations
Update delegation
PATCH
/
v1
/
delegations
/
{id}
Update delegation
curl --request PATCH \
--url https://staging.api.us.aptlydone.com/decision/v1/delegations/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "DRAFT",
"isRootDelegation": false,
"issuerType": "ROOT_AUTHORITY",
"issuerUserId": "648fa115-52d0-4466-baff-740447a60774",
"issuerPositionId": "257fa115-52d0-4466-baff-740447a60774",
"recipientType": "PERSONNEL_IN_POSITION",
"recipientAutoIssue": false,
"decisionId": "864fa115-52d0-4466-baff-740447a60774",
"parentDelegationId": "726fa115-52d0-4466-baff-740447a60774",
"expirationDate": "2025-12-31T12:00:00Z",
"isNoExpiration": false,
"effectiveDate": "2025-01-01T12:00:00Z",
"delegationPathway": [
{
"pathwayTypeName": [
"Matrix",
"Direct Line",
"Functional"
],
"isInvalid": false
}
],
"delegationRecipients": [
{
"recipientUserId": "485fa115-52d0-4466-baff-740447a60774",
"recipientPositionId": "14f5a115-52d0-4466-baff-740447a60774",
"isInvalid": false
}
],
"delegationGroups": [
{
"groupId": "105fa115-52d0-4466-baff-740447a60774",
"tenantGroupTypeId": "105fa115-52d0-4466-baff-740447a60774",
"displayName": "Engineering Team",
"groupName": "Engineering Team",
"isInvalid": false
}
],
"delegationAuthorities": [
{
"authorityTypeId": "105fa115-52d0-4466-baff-740447a60774",
"authorityLimit": "Primary",
"authorityLimitValueType": "Currency",
"authorityLimitOperator": "<=",
"redelegable": true,
"authorityTypeOrder": 1,
"authorityLimitValue": "1000000",
"authorityLimitValueUnit": "$",
"authorityThresholdValue": "50000",
"authorityThresholdOperator": ">=",
"redelegationLimitValue": "500000",
"redelegationLimitValueUnit": "$",
"isInvalid": false,
"isLimitOverridden": false
}
],
"delegationDocuments": [
{
"documentId": "105fa115-52d0-4466-baff-740447a60774",
"isPinned": true
}
],
"isInvalid": false,
"invalidFields": [
"delegationGroups",
"delegationAuthorities"
]
}
'import requests
url = "https://staging.api.us.aptlydone.com/decision/v1/delegations/{id}"
payload = {
"status": "DRAFT",
"isRootDelegation": False,
"issuerType": "ROOT_AUTHORITY",
"issuerUserId": "648fa115-52d0-4466-baff-740447a60774",
"issuerPositionId": "257fa115-52d0-4466-baff-740447a60774",
"recipientType": "PERSONNEL_IN_POSITION",
"recipientAutoIssue": False,
"decisionId": "864fa115-52d0-4466-baff-740447a60774",
"parentDelegationId": "726fa115-52d0-4466-baff-740447a60774",
"expirationDate": "2025-12-31T12:00:00Z",
"isNoExpiration": False,
"effectiveDate": "2025-01-01T12:00:00Z",
"delegationPathway": [
{
"pathwayTypeName": ["Matrix", "Direct Line", "Functional"],
"isInvalid": False
}
],
"delegationRecipients": [
{
"recipientUserId": "485fa115-52d0-4466-baff-740447a60774",
"recipientPositionId": "14f5a115-52d0-4466-baff-740447a60774",
"isInvalid": False
}
],
"delegationGroups": [
{
"groupId": "105fa115-52d0-4466-baff-740447a60774",
"tenantGroupTypeId": "105fa115-52d0-4466-baff-740447a60774",
"displayName": "Engineering Team",
"groupName": "Engineering Team",
"isInvalid": False
}
],
"delegationAuthorities": [
{
"authorityTypeId": "105fa115-52d0-4466-baff-740447a60774",
"authorityLimit": "Primary",
"authorityLimitValueType": "Currency",
"authorityLimitOperator": "<=",
"redelegable": True,
"authorityTypeOrder": 1,
"authorityLimitValue": "1000000",
"authorityLimitValueUnit": "$",
"authorityThresholdValue": "50000",
"authorityThresholdOperator": ">=",
"redelegationLimitValue": "500000",
"redelegationLimitValueUnit": "$",
"isInvalid": False,
"isLimitOverridden": False
}
],
"delegationDocuments": [
{
"documentId": "105fa115-52d0-4466-baff-740447a60774",
"isPinned": True
}
],
"isInvalid": False,
"invalidFields": ["delegationGroups", "delegationAuthorities"]
}
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({
status: 'DRAFT',
isRootDelegation: false,
issuerType: 'ROOT_AUTHORITY',
issuerUserId: '648fa115-52d0-4466-baff-740447a60774',
issuerPositionId: '257fa115-52d0-4466-baff-740447a60774',
recipientType: 'PERSONNEL_IN_POSITION',
recipientAutoIssue: false,
decisionId: '864fa115-52d0-4466-baff-740447a60774',
parentDelegationId: '726fa115-52d0-4466-baff-740447a60774',
expirationDate: '2025-12-31T12:00:00Z',
isNoExpiration: false,
effectiveDate: '2025-01-01T12:00:00Z',
delegationPathway: [{pathwayTypeName: ['Matrix', 'Direct Line', 'Functional'], isInvalid: false}],
delegationRecipients: [
{
recipientUserId: '485fa115-52d0-4466-baff-740447a60774',
recipientPositionId: '14f5a115-52d0-4466-baff-740447a60774',
isInvalid: false
}
],
delegationGroups: [
{
groupId: '105fa115-52d0-4466-baff-740447a60774',
tenantGroupTypeId: '105fa115-52d0-4466-baff-740447a60774',
displayName: 'Engineering Team',
groupName: 'Engineering Team',
isInvalid: false
}
],
delegationAuthorities: [
{
authorityTypeId: '105fa115-52d0-4466-baff-740447a60774',
authorityLimit: 'Primary',
authorityLimitValueType: 'Currency',
authorityLimitOperator: '<=',
redelegable: true,
authorityTypeOrder: 1,
authorityLimitValue: '1000000',
authorityLimitValueUnit: '$',
authorityThresholdValue: '50000',
authorityThresholdOperator: '>=',
redelegationLimitValue: '500000',
redelegationLimitValueUnit: '$',
isInvalid: false,
isLimitOverridden: false
}
],
delegationDocuments: [{documentId: '105fa115-52d0-4466-baff-740447a60774', isPinned: true}],
isInvalid: false,
invalidFields: ['delegationGroups', 'delegationAuthorities']
})
};
fetch('https://staging.api.us.aptlydone.com/decision/v1/delegations/{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://staging.api.us.aptlydone.com/decision/v1/delegations/{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([
'status' => 'DRAFT',
'isRootDelegation' => false,
'issuerType' => 'ROOT_AUTHORITY',
'issuerUserId' => '648fa115-52d0-4466-baff-740447a60774',
'issuerPositionId' => '257fa115-52d0-4466-baff-740447a60774',
'recipientType' => 'PERSONNEL_IN_POSITION',
'recipientAutoIssue' => false,
'decisionId' => '864fa115-52d0-4466-baff-740447a60774',
'parentDelegationId' => '726fa115-52d0-4466-baff-740447a60774',
'expirationDate' => '2025-12-31T12:00:00Z',
'isNoExpiration' => false,
'effectiveDate' => '2025-01-01T12:00:00Z',
'delegationPathway' => [
[
'pathwayTypeName' => [
'Matrix',
'Direct Line',
'Functional'
],
'isInvalid' => false
]
],
'delegationRecipients' => [
[
'recipientUserId' => '485fa115-52d0-4466-baff-740447a60774',
'recipientPositionId' => '14f5a115-52d0-4466-baff-740447a60774',
'isInvalid' => false
]
],
'delegationGroups' => [
[
'groupId' => '105fa115-52d0-4466-baff-740447a60774',
'tenantGroupTypeId' => '105fa115-52d0-4466-baff-740447a60774',
'displayName' => 'Engineering Team',
'groupName' => 'Engineering Team',
'isInvalid' => false
]
],
'delegationAuthorities' => [
[
'authorityTypeId' => '105fa115-52d0-4466-baff-740447a60774',
'authorityLimit' => 'Primary',
'authorityLimitValueType' => 'Currency',
'authorityLimitOperator' => '<=',
'redelegable' => true,
'authorityTypeOrder' => 1,
'authorityLimitValue' => '1000000',
'authorityLimitValueUnit' => '$',
'authorityThresholdValue' => '50000',
'authorityThresholdOperator' => '>=',
'redelegationLimitValue' => '500000',
'redelegationLimitValueUnit' => '$',
'isInvalid' => false,
'isLimitOverridden' => false
]
],
'delegationDocuments' => [
[
'documentId' => '105fa115-52d0-4466-baff-740447a60774',
'isPinned' => true
]
],
'isInvalid' => false,
'invalidFields' => [
'delegationGroups',
'delegationAuthorities'
]
]),
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://staging.api.us.aptlydone.com/decision/v1/delegations/{id}"
payload := strings.NewReader("{\n \"status\": \"DRAFT\",\n \"isRootDelegation\": false,\n \"issuerType\": \"ROOT_AUTHORITY\",\n \"issuerUserId\": \"648fa115-52d0-4466-baff-740447a60774\",\n \"issuerPositionId\": \"257fa115-52d0-4466-baff-740447a60774\",\n \"recipientType\": \"PERSONNEL_IN_POSITION\",\n \"recipientAutoIssue\": false,\n \"decisionId\": \"864fa115-52d0-4466-baff-740447a60774\",\n \"parentDelegationId\": \"726fa115-52d0-4466-baff-740447a60774\",\n \"expirationDate\": \"2025-12-31T12:00:00Z\",\n \"isNoExpiration\": false,\n \"effectiveDate\": \"2025-01-01T12:00:00Z\",\n \"delegationPathway\": [\n {\n \"pathwayTypeName\": [\n \"Matrix\",\n \"Direct Line\",\n \"Functional\"\n ],\n \"isInvalid\": false\n }\n ],\n \"delegationRecipients\": [\n {\n \"recipientUserId\": \"485fa115-52d0-4466-baff-740447a60774\",\n \"recipientPositionId\": \"14f5a115-52d0-4466-baff-740447a60774\",\n \"isInvalid\": false\n }\n ],\n \"delegationGroups\": [\n {\n \"groupId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"tenantGroupTypeId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"displayName\": \"Engineering Team\",\n \"groupName\": \"Engineering Team\",\n \"isInvalid\": false\n }\n ],\n \"delegationAuthorities\": [\n {\n \"authorityTypeId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"authorityLimit\": \"Primary\",\n \"authorityLimitValueType\": \"Currency\",\n \"authorityLimitOperator\": \"<=\",\n \"redelegable\": true,\n \"authorityTypeOrder\": 1,\n \"authorityLimitValue\": \"1000000\",\n \"authorityLimitValueUnit\": \"$\",\n \"authorityThresholdValue\": \"50000\",\n \"authorityThresholdOperator\": \">=\",\n \"redelegationLimitValue\": \"500000\",\n \"redelegationLimitValueUnit\": \"$\",\n \"isInvalid\": false,\n \"isLimitOverridden\": false\n }\n ],\n \"delegationDocuments\": [\n {\n \"documentId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"isPinned\": true\n }\n ],\n \"isInvalid\": false,\n \"invalidFields\": [\n \"delegationGroups\",\n \"delegationAuthorities\"\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://staging.api.us.aptlydone.com/decision/v1/delegations/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"DRAFT\",\n \"isRootDelegation\": false,\n \"issuerType\": \"ROOT_AUTHORITY\",\n \"issuerUserId\": \"648fa115-52d0-4466-baff-740447a60774\",\n \"issuerPositionId\": \"257fa115-52d0-4466-baff-740447a60774\",\n \"recipientType\": \"PERSONNEL_IN_POSITION\",\n \"recipientAutoIssue\": false,\n \"decisionId\": \"864fa115-52d0-4466-baff-740447a60774\",\n \"parentDelegationId\": \"726fa115-52d0-4466-baff-740447a60774\",\n \"expirationDate\": \"2025-12-31T12:00:00Z\",\n \"isNoExpiration\": false,\n \"effectiveDate\": \"2025-01-01T12:00:00Z\",\n \"delegationPathway\": [\n {\n \"pathwayTypeName\": [\n \"Matrix\",\n \"Direct Line\",\n \"Functional\"\n ],\n \"isInvalid\": false\n }\n ],\n \"delegationRecipients\": [\n {\n \"recipientUserId\": \"485fa115-52d0-4466-baff-740447a60774\",\n \"recipientPositionId\": \"14f5a115-52d0-4466-baff-740447a60774\",\n \"isInvalid\": false\n }\n ],\n \"delegationGroups\": [\n {\n \"groupId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"tenantGroupTypeId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"displayName\": \"Engineering Team\",\n \"groupName\": \"Engineering Team\",\n \"isInvalid\": false\n }\n ],\n \"delegationAuthorities\": [\n {\n \"authorityTypeId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"authorityLimit\": \"Primary\",\n \"authorityLimitValueType\": \"Currency\",\n \"authorityLimitOperator\": \"<=\",\n \"redelegable\": true,\n \"authorityTypeOrder\": 1,\n \"authorityLimitValue\": \"1000000\",\n \"authorityLimitValueUnit\": \"$\",\n \"authorityThresholdValue\": \"50000\",\n \"authorityThresholdOperator\": \">=\",\n \"redelegationLimitValue\": \"500000\",\n \"redelegationLimitValueUnit\": \"$\",\n \"isInvalid\": false,\n \"isLimitOverridden\": false\n }\n ],\n \"delegationDocuments\": [\n {\n \"documentId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"isPinned\": true\n }\n ],\n \"isInvalid\": false,\n \"invalidFields\": [\n \"delegationGroups\",\n \"delegationAuthorities\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.us.aptlydone.com/decision/v1/delegations/{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 \"status\": \"DRAFT\",\n \"isRootDelegation\": false,\n \"issuerType\": \"ROOT_AUTHORITY\",\n \"issuerUserId\": \"648fa115-52d0-4466-baff-740447a60774\",\n \"issuerPositionId\": \"257fa115-52d0-4466-baff-740447a60774\",\n \"recipientType\": \"PERSONNEL_IN_POSITION\",\n \"recipientAutoIssue\": false,\n \"decisionId\": \"864fa115-52d0-4466-baff-740447a60774\",\n \"parentDelegationId\": \"726fa115-52d0-4466-baff-740447a60774\",\n \"expirationDate\": \"2025-12-31T12:00:00Z\",\n \"isNoExpiration\": false,\n \"effectiveDate\": \"2025-01-01T12:00:00Z\",\n \"delegationPathway\": [\n {\n \"pathwayTypeName\": [\n \"Matrix\",\n \"Direct Line\",\n \"Functional\"\n ],\n \"isInvalid\": false\n }\n ],\n \"delegationRecipients\": [\n {\n \"recipientUserId\": \"485fa115-52d0-4466-baff-740447a60774\",\n \"recipientPositionId\": \"14f5a115-52d0-4466-baff-740447a60774\",\n \"isInvalid\": false\n }\n ],\n \"delegationGroups\": [\n {\n \"groupId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"tenantGroupTypeId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"displayName\": \"Engineering Team\",\n \"groupName\": \"Engineering Team\",\n \"isInvalid\": false\n }\n ],\n \"delegationAuthorities\": [\n {\n \"authorityTypeId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"authorityLimit\": \"Primary\",\n \"authorityLimitValueType\": \"Currency\",\n \"authorityLimitOperator\": \"<=\",\n \"redelegable\": true,\n \"authorityTypeOrder\": 1,\n \"authorityLimitValue\": \"1000000\",\n \"authorityLimitValueUnit\": \"$\",\n \"authorityThresholdValue\": \"50000\",\n \"authorityThresholdOperator\": \">=\",\n \"redelegationLimitValue\": \"500000\",\n \"redelegationLimitValueUnit\": \"$\",\n \"isInvalid\": false,\n \"isLimitOverridden\": false\n }\n ],\n \"delegationDocuments\": [\n {\n \"documentId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"isPinned\": true\n }\n ],\n \"isInvalid\": false,\n \"invalidFields\": [\n \"delegationGroups\",\n \"delegationAuthorities\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "9f45f94d-20d2-4163-85d9-68f4f699e440",
"tenantId": "105fa115-52d0-4466-baff-740447a60774",
"issuerType": "ROOT_AUTHORITY",
"recipientType": "PERSONNEL_IN_POSITION",
"decisionId": "864fa115-52d0-4466-baff-740447a60774",
"issuedDate": "2025-01-01T12:00:00Z",
"acceptedDate": "2025-01-01T12:00:00Z",
"effectiveDate": "2025-01-01T12:00:00Z",
"delegationDisplayId": "12789",
"link": "/delegations/view/eyJ0ZW5hbnRJZCI6IjEwNWZhMTE1LTUyZDAtNDQ2Ni1iYWZmLTc0MDQ0N2E2MDc3NCIsImRlbGVnYXRpb25JZCI6IjMwOGNiMzMxLWYwMTgtNGJjNS1hMWE3LTQ1MTI4NTU4MTg0MyJ9",
"status": "DRAFT",
"isRootDelegation": false,
"issuerUserId": "648fa115-52d0-4466-baff-740447a60774",
"issuerPositionId": "257fa115-52d0-4466-baff-740447a60774",
"recipientAutoIssue": false,
"parentDelegationId": "726fa115-52d0-4466-baff-740447a60774",
"expirationDate": "2025-12-31T12:00:00Z",
"isNoExpiration": false,
"updatedAt": "2025-01-01T12:00:00Z",
"copiedFrom": "7df90da4-0634-40b9-abf5-6e97a222cfb8",
"delegationPathway": [],
"delegationRecipients": [],
"delegationGroups": [],
"delegationAuthorities": [],
"delegationDocuments": [],
"delegationId": "9f45f94d-20d2-4163-85d9-68f4f699e440",
"sourceDecision": {
"id": "7df90da4-0634-40b9-abf5-6e97a222cfb8",
"decisionDisplayId": "14623",
"name": "Long-term Investments",
"description": "The Long-term Investments authority involves approving strategic investments",
"guidance": "Investment decisions for long-term, strategic investments...",
"sectionId": "105fa115-52d0-4466-baff-740447a60774",
"categoryId": "248fa115-52d0-4466-baff-740447a60774"
},
"isInvalid": false,
"invalidFields": [
"delegationGroups",
"delegationAuthorities"
],
"actionIssuerApproval": true,
"actionDelegationAcceptance": true,
"actionAuthorityRequest": true,
"approvalActionExistForUser": true,
"acceptanceActionExistForUser": true
}Authorizations
Body
application/json
Response
200 - application/json
Delegation updated successfully
Source Decision
Example:
{
"id": "7df90da4-0634-40b9-abf5-6e97a222cfb8",
"decisionDisplayId": "14623",
"name": "Long-term Investments",
"description": "The Long-term Investments authority involves approving strategic investments",
"guidance": "Investment decisions for long-term, strategic investments...",
"sectionId": "105fa115-52d0-4466-baff-740447a60774",
"categoryId": "248fa115-52d0-4466-baff-740447a60774"
}
Was this page helpful?