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": "$",
"authorityThresholdValue": "50000",
"authorityThresholdOperator": ">="
}
],
"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
}Decisions
Create decision
POST
/
v1
/
decisions
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": "$",
"authorityThresholdValue": "50000",
"authorityThresholdOperator": ">="
}
],
"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
Body
application/json
Response
201 - application/json
Decision created successfully
Decision guidance
Example:
"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."
Was this page helpful?