curl --request POST \
--url https://staging.api.us.aptlydone.com/decision/v1/decisions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tenantId": "105fa115-52d0-4466-baff-740447a60774",
"name": "Long-term Investments",
"sectionId": "105fa115-52d0-4466-baff-740447a60774",
"sectionName": "Financial Authority",
"createdBy": "105fa115-52d0-4466-baff-740447a60774",
"createdByUsername": "John Doe",
"description": "The Long-term Investments authority involves approving strategic investments",
"guidance": "Investment decisions for long-term, strategic investments...",
"categoryId": "105fa115-52d0-4466-baff-740447a60774",
"categoryName": "Budget Approval",
"status": "DRAFT",
"owner": "105fa115-52d0-4466-baff-740447a60774",
"ownerUsername": "John Doe",
"conditionEnabled": false,
"roleEnabled": false,
"delegable": false,
"delegationPathway": [
"Matrix",
"Direct Line",
"Functional"
],
"decisionAuthorities": [],
"decisionGroups": [],
"decisionDocuments": [],
"copiedFrom": "7df90da4-0634-40b9-abf5-6e97a222cfb8",
"updatedBy": "105fa115-52d0-4466-baff-740447a60774",
"updatedByUsername": "John Doe"
}
'import requests
url = "https://staging.api.us.aptlydone.com/decision/v1/decisions"
payload = {
"tenantId": "105fa115-52d0-4466-baff-740447a60774",
"name": "Long-term Investments",
"sectionId": "105fa115-52d0-4466-baff-740447a60774",
"sectionName": "Financial Authority",
"createdBy": "105fa115-52d0-4466-baff-740447a60774",
"createdByUsername": "John Doe",
"description": "The Long-term Investments authority involves approving strategic investments",
"guidance": "Investment decisions for long-term, strategic investments...",
"categoryId": "105fa115-52d0-4466-baff-740447a60774",
"categoryName": "Budget Approval",
"status": "DRAFT",
"owner": "105fa115-52d0-4466-baff-740447a60774",
"ownerUsername": "John Doe",
"conditionEnabled": False,
"roleEnabled": False,
"delegable": False,
"delegationPathway": ["Matrix", "Direct Line", "Functional"],
"decisionAuthorities": [],
"decisionGroups": [],
"decisionDocuments": [],
"copiedFrom": "7df90da4-0634-40b9-abf5-6e97a222cfb8",
"updatedBy": "105fa115-52d0-4466-baff-740447a60774",
"updatedByUsername": "John Doe"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tenantId: '105fa115-52d0-4466-baff-740447a60774',
name: 'Long-term Investments',
sectionId: '105fa115-52d0-4466-baff-740447a60774',
sectionName: 'Financial Authority',
createdBy: '105fa115-52d0-4466-baff-740447a60774',
createdByUsername: 'John Doe',
description: 'The Long-term Investments authority involves approving strategic investments',
guidance: 'Investment decisions for long-term, strategic investments...',
categoryId: '105fa115-52d0-4466-baff-740447a60774',
categoryName: 'Budget Approval',
status: 'DRAFT',
owner: '105fa115-52d0-4466-baff-740447a60774',
ownerUsername: 'John Doe',
conditionEnabled: false,
roleEnabled: false,
delegable: false,
delegationPathway: ['Matrix', 'Direct Line', 'Functional'],
decisionAuthorities: [],
decisionGroups: [],
decisionDocuments: [],
copiedFrom: '7df90da4-0634-40b9-abf5-6e97a222cfb8',
updatedBy: '105fa115-52d0-4466-baff-740447a60774',
updatedByUsername: 'John Doe'
})
};
fetch('https://staging.api.us.aptlydone.com/decision/v1/decisions', 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/decisions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'tenantId' => '105fa115-52d0-4466-baff-740447a60774',
'name' => 'Long-term Investments',
'sectionId' => '105fa115-52d0-4466-baff-740447a60774',
'sectionName' => 'Financial Authority',
'createdBy' => '105fa115-52d0-4466-baff-740447a60774',
'createdByUsername' => 'John Doe',
'description' => 'The Long-term Investments authority involves approving strategic investments',
'guidance' => 'Investment decisions for long-term, strategic investments...',
'categoryId' => '105fa115-52d0-4466-baff-740447a60774',
'categoryName' => 'Budget Approval',
'status' => 'DRAFT',
'owner' => '105fa115-52d0-4466-baff-740447a60774',
'ownerUsername' => 'John Doe',
'conditionEnabled' => false,
'roleEnabled' => false,
'delegable' => false,
'delegationPathway' => [
'Matrix',
'Direct Line',
'Functional'
],
'decisionAuthorities' => [
],
'decisionGroups' => [
],
'decisionDocuments' => [
],
'copiedFrom' => '7df90da4-0634-40b9-abf5-6e97a222cfb8',
'updatedBy' => '105fa115-52d0-4466-baff-740447a60774',
'updatedByUsername' => 'John Doe'
]),
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/decisions"
payload := strings.NewReader("{\n \"tenantId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"name\": \"Long-term Investments\",\n \"sectionId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"sectionName\": \"Financial Authority\",\n \"createdBy\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"createdByUsername\": \"John Doe\",\n \"description\": \"The Long-term Investments authority involves approving strategic investments\",\n \"guidance\": \"Investment decisions for long-term, strategic investments...\",\n \"categoryId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"categoryName\": \"Budget Approval\",\n \"status\": \"DRAFT\",\n \"owner\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"ownerUsername\": \"John Doe\",\n \"conditionEnabled\": false,\n \"roleEnabled\": false,\n \"delegable\": false,\n \"delegationPathway\": [\n \"Matrix\",\n \"Direct Line\",\n \"Functional\"\n ],\n \"decisionAuthorities\": [],\n \"decisionGroups\": [],\n \"decisionDocuments\": [],\n \"copiedFrom\": \"7df90da4-0634-40b9-abf5-6e97a222cfb8\",\n \"updatedBy\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"updatedByUsername\": \"John Doe\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://staging.api.us.aptlydone.com/decision/v1/decisions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tenantId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"name\": \"Long-term Investments\",\n \"sectionId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"sectionName\": \"Financial Authority\",\n \"createdBy\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"createdByUsername\": \"John Doe\",\n \"description\": \"The Long-term Investments authority involves approving strategic investments\",\n \"guidance\": \"Investment decisions for long-term, strategic investments...\",\n \"categoryId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"categoryName\": \"Budget Approval\",\n \"status\": \"DRAFT\",\n \"owner\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"ownerUsername\": \"John Doe\",\n \"conditionEnabled\": false,\n \"roleEnabled\": false,\n \"delegable\": false,\n \"delegationPathway\": [\n \"Matrix\",\n \"Direct Line\",\n \"Functional\"\n ],\n \"decisionAuthorities\": [],\n \"decisionGroups\": [],\n \"decisionDocuments\": [],\n \"copiedFrom\": \"7df90da4-0634-40b9-abf5-6e97a222cfb8\",\n \"updatedBy\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"updatedByUsername\": \"John Doe\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.us.aptlydone.com/decision/v1/decisions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tenantId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"name\": \"Long-term Investments\",\n \"sectionId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"sectionName\": \"Financial Authority\",\n \"createdBy\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"createdByUsername\": \"John Doe\",\n \"description\": \"The Long-term Investments authority involves approving strategic investments\",\n \"guidance\": \"Investment decisions for long-term, strategic investments...\",\n \"categoryId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"categoryName\": \"Budget Approval\",\n \"status\": \"DRAFT\",\n \"owner\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"ownerUsername\": \"John Doe\",\n \"conditionEnabled\": false,\n \"roleEnabled\": false,\n \"delegable\": false,\n \"delegationPathway\": [\n \"Matrix\",\n \"Direct Line\",\n \"Functional\"\n ],\n \"decisionAuthorities\": [],\n \"decisionGroups\": [],\n \"decisionDocuments\": [],\n \"copiedFrom\": \"7df90da4-0634-40b9-abf5-6e97a222cfb8\",\n \"updatedBy\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"updatedByUsername\": \"John Doe\"\n}"
response = http.request(request)
puts response.read_body{
"id": "7df90da4-0634-40b9-abf5-6e97a222cfb8",
"tenantId": "105fa115-52d0-4466-baff-740447a60774",
"name": "Long-term Investments",
"description": "The Long-term Investments authority involves approving strategic investments, including equity stakes, acquisitions, and other business ventures.",
"guidance": "Investment decisions for long-term, strategic investments, such as acquisitions and equity stakes, require a structured process that ensures alignment with corporate strategy, rigorous financial analysis, risk assessment, and strong governance. These investments should enhance the company's competitive positioning, growth potential, and long-term vision. Financial modeling is critical, incorporating valuation methods, cash flow impacts, and sensitivity analysis to forecast returns under different scenarios.",
"sectionId": "105fa115-52d0-4466-baff-740447a60774",
"categoryId": "105fa115-52d0-4466-baff-740447a60774",
"status": "PUBLISHED",
"createdBy": null,
"owner": null,
"createdAt": "2024-12-18T09:50:43.338Z",
"updatedBy": null,
"updatedAt": "2024-12-18T09:50:43.338Z",
"copiedFrom": null,
"conditionEnabled": false,
"roleEnabled": false,
"delegable": true,
"decisionDisplayId": "14623",
"delegationPathway": [
"Matrix",
"Direct Line",
"Functional"
],
"link": "/decisions/view/eyJ0ZW5hbnRJZCI6MSwiZGVjaXNpb25JZCI6ImU4YTEzYmQ0LTExYzItNDNkMi1hM2RjLWUxOGQ2ODU1NTU4OCJ9",
"decisionId": "7df90da4-0634-40b9-abf5-6e97a222cfb8",
"sectionName": "Financial Authority",
"categoryName": "Budget Approval",
"createdByUsername": "John Doe",
"ownerUsername": "John Doe",
"updatedByUsername": null,
"decisionGroups": [
{
"id": "7df90da4-0634-40b9-abf5-6e97a222cfb8",
"denormalizedDecisionId": "7df90da4-0634-40b9-abf5-6e97a222cfb8",
"groupId": "105fa115-52d0-4466-baff-740447a60774",
"tenantGroupTypeId": "105fa115-52d0-4466-baff-740447a60774",
"displayName": "Engineering Team",
"groupName": "Engineering Team"
}
],
"decisionAuthorities": [
{
"id": "7df90da4-0634-40b9-abf5-6e97a222cfb8",
"denormalizedDecisionId": "7df90da4-0634-40b9-abf5-6e97a222cfb8",
"authorityTypeId": "105fa115-52d0-4466-baff-740447a60774",
"authorityType": "Approval",
"authorityTypeOrder": 1,
"authorityTypeIcon": "check-square",
"authorityLimit": "Primary",
"authorityLimitValueType": "Currency",
"authorityLimitOperator": "<",
"authorityLimitValue": "1000",
"authorityLimitValueUnit": "$"
}
],
"decisionDocuments": [
{
"id": "7df90da4-0634-40b9-abf5-6e97a222cfb8",
"denormalizedDecisionId": "7df90da4-0634-40b9-abf5-6e97a222cfb8",
"documentId": "105fa115-52d0-4466-baff-740447a60774",
"documentName": "Proxy Comm Delegation of Authority Policy",
"documentUrl": "https://filesamples.com/samples/document/pdf/sample1.pdf",
"documentTypeName": "Policy",
"documentIcon": "file_text_outlined",
"documentDescription": "Defines the framework for delegating authority across ProxyComm's global operations, outlining roles, responsibilities, and decision-making limits to ensure compliance, accountability, and operational consistency.",
"documentFileType": "pdf",
"isPinned": true,
"documentDisplayId": "10000",
"documentStatus": "PUBLISHED",
"documentFileLink": "https://example.com/files/project_document.pdf"
}
],
"delegations": 0,
"ownerUserProfileUrl": "http://test.jpg",
"createdByUserProfileUrl": "http://test.jpg",
"updatedByUserProfileUrl": "http://test.jpg",
"permissions": [
{
"relationship_key": "<string>",
"allowed": true
}
],
"createdByDetails": {},
"updatedByDetails": {},
"ownerDetails": {},
"isRequestActionCompleted": true
}Create decision
curl --request POST \
--url https://staging.api.us.aptlydone.com/decision/v1/decisions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tenantId": "105fa115-52d0-4466-baff-740447a60774",
"name": "Long-term Investments",
"sectionId": "105fa115-52d0-4466-baff-740447a60774",
"sectionName": "Financial Authority",
"createdBy": "105fa115-52d0-4466-baff-740447a60774",
"createdByUsername": "John Doe",
"description": "The Long-term Investments authority involves approving strategic investments",
"guidance": "Investment decisions for long-term, strategic investments...",
"categoryId": "105fa115-52d0-4466-baff-740447a60774",
"categoryName": "Budget Approval",
"status": "DRAFT",
"owner": "105fa115-52d0-4466-baff-740447a60774",
"ownerUsername": "John Doe",
"conditionEnabled": false,
"roleEnabled": false,
"delegable": false,
"delegationPathway": [
"Matrix",
"Direct Line",
"Functional"
],
"decisionAuthorities": [],
"decisionGroups": [],
"decisionDocuments": [],
"copiedFrom": "7df90da4-0634-40b9-abf5-6e97a222cfb8",
"updatedBy": "105fa115-52d0-4466-baff-740447a60774",
"updatedByUsername": "John Doe"
}
'import requests
url = "https://staging.api.us.aptlydone.com/decision/v1/decisions"
payload = {
"tenantId": "105fa115-52d0-4466-baff-740447a60774",
"name": "Long-term Investments",
"sectionId": "105fa115-52d0-4466-baff-740447a60774",
"sectionName": "Financial Authority",
"createdBy": "105fa115-52d0-4466-baff-740447a60774",
"createdByUsername": "John Doe",
"description": "The Long-term Investments authority involves approving strategic investments",
"guidance": "Investment decisions for long-term, strategic investments...",
"categoryId": "105fa115-52d0-4466-baff-740447a60774",
"categoryName": "Budget Approval",
"status": "DRAFT",
"owner": "105fa115-52d0-4466-baff-740447a60774",
"ownerUsername": "John Doe",
"conditionEnabled": False,
"roleEnabled": False,
"delegable": False,
"delegationPathway": ["Matrix", "Direct Line", "Functional"],
"decisionAuthorities": [],
"decisionGroups": [],
"decisionDocuments": [],
"copiedFrom": "7df90da4-0634-40b9-abf5-6e97a222cfb8",
"updatedBy": "105fa115-52d0-4466-baff-740447a60774",
"updatedByUsername": "John Doe"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tenantId: '105fa115-52d0-4466-baff-740447a60774',
name: 'Long-term Investments',
sectionId: '105fa115-52d0-4466-baff-740447a60774',
sectionName: 'Financial Authority',
createdBy: '105fa115-52d0-4466-baff-740447a60774',
createdByUsername: 'John Doe',
description: 'The Long-term Investments authority involves approving strategic investments',
guidance: 'Investment decisions for long-term, strategic investments...',
categoryId: '105fa115-52d0-4466-baff-740447a60774',
categoryName: 'Budget Approval',
status: 'DRAFT',
owner: '105fa115-52d0-4466-baff-740447a60774',
ownerUsername: 'John Doe',
conditionEnabled: false,
roleEnabled: false,
delegable: false,
delegationPathway: ['Matrix', 'Direct Line', 'Functional'],
decisionAuthorities: [],
decisionGroups: [],
decisionDocuments: [],
copiedFrom: '7df90da4-0634-40b9-abf5-6e97a222cfb8',
updatedBy: '105fa115-52d0-4466-baff-740447a60774',
updatedByUsername: 'John Doe'
})
};
fetch('https://staging.api.us.aptlydone.com/decision/v1/decisions', 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/decisions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'tenantId' => '105fa115-52d0-4466-baff-740447a60774',
'name' => 'Long-term Investments',
'sectionId' => '105fa115-52d0-4466-baff-740447a60774',
'sectionName' => 'Financial Authority',
'createdBy' => '105fa115-52d0-4466-baff-740447a60774',
'createdByUsername' => 'John Doe',
'description' => 'The Long-term Investments authority involves approving strategic investments',
'guidance' => 'Investment decisions for long-term, strategic investments...',
'categoryId' => '105fa115-52d0-4466-baff-740447a60774',
'categoryName' => 'Budget Approval',
'status' => 'DRAFT',
'owner' => '105fa115-52d0-4466-baff-740447a60774',
'ownerUsername' => 'John Doe',
'conditionEnabled' => false,
'roleEnabled' => false,
'delegable' => false,
'delegationPathway' => [
'Matrix',
'Direct Line',
'Functional'
],
'decisionAuthorities' => [
],
'decisionGroups' => [
],
'decisionDocuments' => [
],
'copiedFrom' => '7df90da4-0634-40b9-abf5-6e97a222cfb8',
'updatedBy' => '105fa115-52d0-4466-baff-740447a60774',
'updatedByUsername' => 'John Doe'
]),
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/decisions"
payload := strings.NewReader("{\n \"tenantId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"name\": \"Long-term Investments\",\n \"sectionId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"sectionName\": \"Financial Authority\",\n \"createdBy\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"createdByUsername\": \"John Doe\",\n \"description\": \"The Long-term Investments authority involves approving strategic investments\",\n \"guidance\": \"Investment decisions for long-term, strategic investments...\",\n \"categoryId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"categoryName\": \"Budget Approval\",\n \"status\": \"DRAFT\",\n \"owner\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"ownerUsername\": \"John Doe\",\n \"conditionEnabled\": false,\n \"roleEnabled\": false,\n \"delegable\": false,\n \"delegationPathway\": [\n \"Matrix\",\n \"Direct Line\",\n \"Functional\"\n ],\n \"decisionAuthorities\": [],\n \"decisionGroups\": [],\n \"decisionDocuments\": [],\n \"copiedFrom\": \"7df90da4-0634-40b9-abf5-6e97a222cfb8\",\n \"updatedBy\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"updatedByUsername\": \"John Doe\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://staging.api.us.aptlydone.com/decision/v1/decisions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tenantId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"name\": \"Long-term Investments\",\n \"sectionId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"sectionName\": \"Financial Authority\",\n \"createdBy\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"createdByUsername\": \"John Doe\",\n \"description\": \"The Long-term Investments authority involves approving strategic investments\",\n \"guidance\": \"Investment decisions for long-term, strategic investments...\",\n \"categoryId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"categoryName\": \"Budget Approval\",\n \"status\": \"DRAFT\",\n \"owner\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"ownerUsername\": \"John Doe\",\n \"conditionEnabled\": false,\n \"roleEnabled\": false,\n \"delegable\": false,\n \"delegationPathway\": [\n \"Matrix\",\n \"Direct Line\",\n \"Functional\"\n ],\n \"decisionAuthorities\": [],\n \"decisionGroups\": [],\n \"decisionDocuments\": [],\n \"copiedFrom\": \"7df90da4-0634-40b9-abf5-6e97a222cfb8\",\n \"updatedBy\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"updatedByUsername\": \"John Doe\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.us.aptlydone.com/decision/v1/decisions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tenantId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"name\": \"Long-term Investments\",\n \"sectionId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"sectionName\": \"Financial Authority\",\n \"createdBy\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"createdByUsername\": \"John Doe\",\n \"description\": \"The Long-term Investments authority involves approving strategic investments\",\n \"guidance\": \"Investment decisions for long-term, strategic investments...\",\n \"categoryId\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"categoryName\": \"Budget Approval\",\n \"status\": \"DRAFT\",\n \"owner\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"ownerUsername\": \"John Doe\",\n \"conditionEnabled\": false,\n \"roleEnabled\": false,\n \"delegable\": false,\n \"delegationPathway\": [\n \"Matrix\",\n \"Direct Line\",\n \"Functional\"\n ],\n \"decisionAuthorities\": [],\n \"decisionGroups\": [],\n \"decisionDocuments\": [],\n \"copiedFrom\": \"7df90da4-0634-40b9-abf5-6e97a222cfb8\",\n \"updatedBy\": \"105fa115-52d0-4466-baff-740447a60774\",\n \"updatedByUsername\": \"John Doe\"\n}"
response = http.request(request)
puts response.read_body{
"id": "7df90da4-0634-40b9-abf5-6e97a222cfb8",
"tenantId": "105fa115-52d0-4466-baff-740447a60774",
"name": "Long-term Investments",
"description": "The Long-term Investments authority involves approving strategic investments, including equity stakes, acquisitions, and other business ventures.",
"guidance": "Investment decisions for long-term, strategic investments, such as acquisitions and equity stakes, require a structured process that ensures alignment with corporate strategy, rigorous financial analysis, risk assessment, and strong governance. These investments should enhance the company's competitive positioning, growth potential, and long-term vision. Financial modeling is critical, incorporating valuation methods, cash flow impacts, and sensitivity analysis to forecast returns under different scenarios.",
"sectionId": "105fa115-52d0-4466-baff-740447a60774",
"categoryId": "105fa115-52d0-4466-baff-740447a60774",
"status": "PUBLISHED",
"createdBy": null,
"owner": null,
"createdAt": "2024-12-18T09:50:43.338Z",
"updatedBy": null,
"updatedAt": "2024-12-18T09:50:43.338Z",
"copiedFrom": null,
"conditionEnabled": false,
"roleEnabled": false,
"delegable": true,
"decisionDisplayId": "14623",
"delegationPathway": [
"Matrix",
"Direct Line",
"Functional"
],
"link": "/decisions/view/eyJ0ZW5hbnRJZCI6MSwiZGVjaXNpb25JZCI6ImU4YTEzYmQ0LTExYzItNDNkMi1hM2RjLWUxOGQ2ODU1NTU4OCJ9",
"decisionId": "7df90da4-0634-40b9-abf5-6e97a222cfb8",
"sectionName": "Financial Authority",
"categoryName": "Budget Approval",
"createdByUsername": "John Doe",
"ownerUsername": "John Doe",
"updatedByUsername": null,
"decisionGroups": [
{
"id": "7df90da4-0634-40b9-abf5-6e97a222cfb8",
"denormalizedDecisionId": "7df90da4-0634-40b9-abf5-6e97a222cfb8",
"groupId": "105fa115-52d0-4466-baff-740447a60774",
"tenantGroupTypeId": "105fa115-52d0-4466-baff-740447a60774",
"displayName": "Engineering Team",
"groupName": "Engineering Team"
}
],
"decisionAuthorities": [
{
"id": "7df90da4-0634-40b9-abf5-6e97a222cfb8",
"denormalizedDecisionId": "7df90da4-0634-40b9-abf5-6e97a222cfb8",
"authorityTypeId": "105fa115-52d0-4466-baff-740447a60774",
"authorityType": "Approval",
"authorityTypeOrder": 1,
"authorityTypeIcon": "check-square",
"authorityLimit": "Primary",
"authorityLimitValueType": "Currency",
"authorityLimitOperator": "<",
"authorityLimitValue": "1000",
"authorityLimitValueUnit": "$"
}
],
"decisionDocuments": [
{
"id": "7df90da4-0634-40b9-abf5-6e97a222cfb8",
"denormalizedDecisionId": "7df90da4-0634-40b9-abf5-6e97a222cfb8",
"documentId": "105fa115-52d0-4466-baff-740447a60774",
"documentName": "Proxy Comm Delegation of Authority Policy",
"documentUrl": "https://filesamples.com/samples/document/pdf/sample1.pdf",
"documentTypeName": "Policy",
"documentIcon": "file_text_outlined",
"documentDescription": "Defines the framework for delegating authority across ProxyComm's global operations, outlining roles, responsibilities, and decision-making limits to ensure compliance, accountability, and operational consistency.",
"documentFileType": "pdf",
"isPinned": true,
"documentDisplayId": "10000",
"documentStatus": "PUBLISHED",
"documentFileLink": "https://example.com/files/project_document.pdf"
}
],
"delegations": 0,
"ownerUserProfileUrl": "http://test.jpg",
"createdByUserProfileUrl": "http://test.jpg",
"updatedByUserProfileUrl": "http://test.jpg",
"permissions": [
{
"relationship_key": "<string>",
"allowed": true
}
],
"createdByDetails": {},
"updatedByDetails": {},
"ownerDetails": {},
"isRequestActionCompleted": true
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Tenant ID
"105fa115-52d0-4466-baff-740447a60774"
Decision name
150"Long-term Investments"
Section ID
"105fa115-52d0-4466-baff-740447a60774"
Section Name
50"Financial Authority"
Created by user ID
"105fa115-52d0-4466-baff-740447a60774"
Created By Username
50"John Doe"
Decision description
250"The Long-term Investments authority involves approving strategic investments"
Decision guidance
"Investment decisions for long-term, strategic investments..."
Category ID
"105fa115-52d0-4466-baff-740447a60774"
Category Name
50"Budget Approval"
Decision status
DRAFT, PUBLISHED "DRAFT"
Owner user ID
"105fa115-52d0-4466-baff-740447a60774"
Owner Username
50"John Doe"
Indicates if Conditions are enabled
false
Indicates if Roles are enabled
false
Indicates if the Decision is delegable
false
Delegation Pathway
["Matrix", "Direct Line", "Functional"]
Decision Authorities
Show child attributes
Show child attributes
Decision Groups
Show child attributes
Show child attributes
Decision Documents
Show child attributes
Show child attributes
ID of Decision which was copied to create current decision
"7df90da4-0634-40b9-abf5-6e97a222cfb8"
Updated by user ID
"105fa115-52d0-4466-baff-740447a60774"
Updated By Username
50"John Doe"
Response
Decision created successfully
Unique identifier
"7df90da4-0634-40b9-abf5-6e97a222cfb8"
Tenant ID
"105fa115-52d0-4466-baff-740447a60774"
Decision name
"Long-term Investments"
Decision description
"The Long-term Investments authority involves approving strategic investments, including equity stakes, acquisitions, and other business ventures."
Decision guidance
"Investment decisions for long-term, strategic investments, such as acquisitions and equity stakes, require a structured process that ensures alignment with corporate strategy, rigorous financial analysis, risk assessment, and strong governance. These investments should enhance the company's competitive positioning, growth potential, and long-term vision. Financial modeling is critical, incorporating valuation methods, cash flow impacts, and sensitivity analysis to forecast returns under different scenarios."
Section ID
"105fa115-52d0-4466-baff-740447a60774"
Category ID
"105fa115-52d0-4466-baff-740447a60774"
Decision status
"PUBLISHED"
Created by user ID
null
Owner user ID
null
Creation timestamp
"2024-12-18T09:50:43.338Z"
Updated by user ID
null
Last update timestamp
"2024-12-18T09:50:43.338Z"
ID of Decision which was copied to create current decision
null
Indicates if Conditions are enable for the Decision
false
Indicates if Roles are enable for the Decision
false
Indicates if the Decision is delegable or not
true
Decision Display ID
"14623"
Delegation Pathway values for the delegable Decision
["Matrix", "Direct Line", "Functional"]
Decision Link
"/decisions/view/eyJ0ZW5hbnRJZCI6MSwiZGVjaXNpb25JZCI6ImU4YTEzYmQ0LTExYzItNDNkMi1hM2RjLWUxOGQ2ODU1NTU4OCJ9"
Original Decision ID for current denormalized record. This ID should be used for REST operations.
"7df90da4-0634-40b9-abf5-6e97a222cfb8"
Section Name
"Financial Authority"
Category Name
"Budget Approval"
Created By Username
"John Doe"
Owner Username
"John Doe"
Updated By Username
null
Decision Groups
Show child attributes
Show child attributes
Decision Authorities
Show child attributes
Show child attributes
Decision Documents
Show child attributes
Show child attributes
No. of delegations for the decision ('Reserved' if not delegable)
0
profile url of the owner user
"http://test.jpg"
profile url of the created by user
"http://test.jpg"
profile url of the updated by user
"http://test.jpg"
permissions
Show child attributes
Show child attributes
Created By user details
Updated By user details
Owner By user details
Check whether the user's decision request is Approved or Rejected
Was this page helpful?