curl --request PATCH \
--url https://staging.api.us.aptlydone.com/document/v1/documents/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"documentName": "Global Delegation of Authority Policy - ProxyComm Inc.",
"documentDescription": "Defines the framework for delegating authority across ProxyComm's global operations, outlining roles, responsibilities, and decision-making limits.",
"documentIcon": "link-outlined",
"documentOwnerId": "550e8400-e29b-41d4-a716-446655440003",
"documentOwnerUsername": "John Doe",
"documentMetadata": "{ \"code\": \"GOV-DFA-2\", \"version\": \"2024.2\" }",
"fileId": "550e8400-e29b-41d4-a716-446655440001",
"documentTypeId": "550e8400-e29b-41d4-a716-446655440002",
"documentTypeName": "Policy",
"documentStatus": "DRAFT",
"documentSharingType": "RESTRICTED",
"documentUploadType": "LINKED",
"documentUrl": "intranet.sharepoint.proxycomm.com/2024delegationofauthority.policy",
"documentSharingGroups": [
{
"groupId": "550e8400-e29b-41d4-a716-446655440013",
"tenantGroupTypeId": "550e8400-e29b-41d4-a716-446655440023"
}
],
"documentSharingUsers": [
{
"userId": "550e8400-e29b-41d4-a716-446655440033"
}
],
"documentOversights": {
"responsibleUsername": "Neha Patel",
"responsibleUserId": "550e8400-e29b-41d4-a716-446655440023"
},
"documentLinking": {
"decisionLinkAllowed": true,
"delegationLinkAllowed": true
}
}
EOFimport requests
url = "https://staging.api.us.aptlydone.com/document/v1/documents/{id}"
payload = {
"documentName": "Global Delegation of Authority Policy - ProxyComm Inc.",
"documentDescription": "Defines the framework for delegating authority across ProxyComm's global operations, outlining roles, responsibilities, and decision-making limits.",
"documentIcon": "link-outlined",
"documentOwnerId": "550e8400-e29b-41d4-a716-446655440003",
"documentOwnerUsername": "John Doe",
"documentMetadata": "{ \"code\": \"GOV-DFA-2\", \"version\": \"2024.2\" }",
"fileId": "550e8400-e29b-41d4-a716-446655440001",
"documentTypeId": "550e8400-e29b-41d4-a716-446655440002",
"documentTypeName": "Policy",
"documentStatus": "DRAFT",
"documentSharingType": "RESTRICTED",
"documentUploadType": "LINKED",
"documentUrl": "intranet.sharepoint.proxycomm.com/2024delegationofauthority.policy",
"documentSharingGroups": [
{
"groupId": "550e8400-e29b-41d4-a716-446655440013",
"tenantGroupTypeId": "550e8400-e29b-41d4-a716-446655440023"
}
],
"documentSharingUsers": [{ "userId": "550e8400-e29b-41d4-a716-446655440033" }],
"documentOversights": {
"responsibleUsername": "Neha Patel",
"responsibleUserId": "550e8400-e29b-41d4-a716-446655440023"
},
"documentLinking": {
"decisionLinkAllowed": True,
"delegationLinkAllowed": True
}
}
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({
documentName: 'Global Delegation of Authority Policy - ProxyComm Inc.',
documentDescription: 'Defines the framework for delegating authority across ProxyComm\'s global operations, outlining roles, responsibilities, and decision-making limits.',
documentIcon: 'link-outlined',
documentOwnerId: '550e8400-e29b-41d4-a716-446655440003',
documentOwnerUsername: 'John Doe',
documentMetadata: '{ "code": "GOV-DFA-2", "version": "2024.2" }',
fileId: '550e8400-e29b-41d4-a716-446655440001',
documentTypeId: '550e8400-e29b-41d4-a716-446655440002',
documentTypeName: 'Policy',
documentStatus: 'DRAFT',
documentSharingType: 'RESTRICTED',
documentUploadType: 'LINKED',
documentUrl: 'intranet.sharepoint.proxycomm.com/2024delegationofauthority.policy',
documentSharingGroups: [
{
groupId: '550e8400-e29b-41d4-a716-446655440013',
tenantGroupTypeId: '550e8400-e29b-41d4-a716-446655440023'
}
],
documentSharingUsers: [{userId: '550e8400-e29b-41d4-a716-446655440033'}],
documentOversights: {
responsibleUsername: 'Neha Patel',
responsibleUserId: '550e8400-e29b-41d4-a716-446655440023'
},
documentLinking: {decisionLinkAllowed: true, delegationLinkAllowed: true}
})
};
fetch('https://staging.api.us.aptlydone.com/document/v1/documents/{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/document/v1/documents/{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([
'documentName' => 'Global Delegation of Authority Policy - ProxyComm Inc.',
'documentDescription' => 'Defines the framework for delegating authority across ProxyComm\'s global operations, outlining roles, responsibilities, and decision-making limits.',
'documentIcon' => 'link-outlined',
'documentOwnerId' => '550e8400-e29b-41d4-a716-446655440003',
'documentOwnerUsername' => 'John Doe',
'documentMetadata' => '{ "code": "GOV-DFA-2", "version": "2024.2" }',
'fileId' => '550e8400-e29b-41d4-a716-446655440001',
'documentTypeId' => '550e8400-e29b-41d4-a716-446655440002',
'documentTypeName' => 'Policy',
'documentStatus' => 'DRAFT',
'documentSharingType' => 'RESTRICTED',
'documentUploadType' => 'LINKED',
'documentUrl' => 'intranet.sharepoint.proxycomm.com/2024delegationofauthority.policy',
'documentSharingGroups' => [
[
'groupId' => '550e8400-e29b-41d4-a716-446655440013',
'tenantGroupTypeId' => '550e8400-e29b-41d4-a716-446655440023'
]
],
'documentSharingUsers' => [
[
'userId' => '550e8400-e29b-41d4-a716-446655440033'
]
],
'documentOversights' => [
'responsibleUsername' => 'Neha Patel',
'responsibleUserId' => '550e8400-e29b-41d4-a716-446655440023'
],
'documentLinking' => [
'decisionLinkAllowed' => true,
'delegationLinkAllowed' => true
]
]),
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/document/v1/documents/{id}"
payload := strings.NewReader("{\n \"documentName\": \"Global Delegation of Authority Policy - ProxyComm Inc.\",\n \"documentDescription\": \"Defines the framework for delegating authority across ProxyComm's global operations, outlining roles, responsibilities, and decision-making limits.\",\n \"documentIcon\": \"link-outlined\",\n \"documentOwnerId\": \"550e8400-e29b-41d4-a716-446655440003\",\n \"documentOwnerUsername\": \"John Doe\",\n \"documentMetadata\": \"{ \\\"code\\\": \\\"GOV-DFA-2\\\", \\\"version\\\": \\\"2024.2\\\" }\",\n \"fileId\": \"550e8400-e29b-41d4-a716-446655440001\",\n \"documentTypeId\": \"550e8400-e29b-41d4-a716-446655440002\",\n \"documentTypeName\": \"Policy\",\n \"documentStatus\": \"DRAFT\",\n \"documentSharingType\": \"RESTRICTED\",\n \"documentUploadType\": \"LINKED\",\n \"documentUrl\": \"intranet.sharepoint.proxycomm.com/2024delegationofauthority.policy\",\n \"documentSharingGroups\": [\n {\n \"groupId\": \"550e8400-e29b-41d4-a716-446655440013\",\n \"tenantGroupTypeId\": \"550e8400-e29b-41d4-a716-446655440023\"\n }\n ],\n \"documentSharingUsers\": [\n {\n \"userId\": \"550e8400-e29b-41d4-a716-446655440033\"\n }\n ],\n \"documentOversights\": {\n \"responsibleUsername\": \"Neha Patel\",\n \"responsibleUserId\": \"550e8400-e29b-41d4-a716-446655440023\"\n },\n \"documentLinking\": {\n \"decisionLinkAllowed\": true,\n \"delegationLinkAllowed\": true\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/document/v1/documents/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"documentName\": \"Global Delegation of Authority Policy - ProxyComm Inc.\",\n \"documentDescription\": \"Defines the framework for delegating authority across ProxyComm's global operations, outlining roles, responsibilities, and decision-making limits.\",\n \"documentIcon\": \"link-outlined\",\n \"documentOwnerId\": \"550e8400-e29b-41d4-a716-446655440003\",\n \"documentOwnerUsername\": \"John Doe\",\n \"documentMetadata\": \"{ \\\"code\\\": \\\"GOV-DFA-2\\\", \\\"version\\\": \\\"2024.2\\\" }\",\n \"fileId\": \"550e8400-e29b-41d4-a716-446655440001\",\n \"documentTypeId\": \"550e8400-e29b-41d4-a716-446655440002\",\n \"documentTypeName\": \"Policy\",\n \"documentStatus\": \"DRAFT\",\n \"documentSharingType\": \"RESTRICTED\",\n \"documentUploadType\": \"LINKED\",\n \"documentUrl\": \"intranet.sharepoint.proxycomm.com/2024delegationofauthority.policy\",\n \"documentSharingGroups\": [\n {\n \"groupId\": \"550e8400-e29b-41d4-a716-446655440013\",\n \"tenantGroupTypeId\": \"550e8400-e29b-41d4-a716-446655440023\"\n }\n ],\n \"documentSharingUsers\": [\n {\n \"userId\": \"550e8400-e29b-41d4-a716-446655440033\"\n }\n ],\n \"documentOversights\": {\n \"responsibleUsername\": \"Neha Patel\",\n \"responsibleUserId\": \"550e8400-e29b-41d4-a716-446655440023\"\n },\n \"documentLinking\": {\n \"decisionLinkAllowed\": true,\n \"delegationLinkAllowed\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.us.aptlydone.com/document/v1/documents/{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 \"documentName\": \"Global Delegation of Authority Policy - ProxyComm Inc.\",\n \"documentDescription\": \"Defines the framework for delegating authority across ProxyComm's global operations, outlining roles, responsibilities, and decision-making limits.\",\n \"documentIcon\": \"link-outlined\",\n \"documentOwnerId\": \"550e8400-e29b-41d4-a716-446655440003\",\n \"documentOwnerUsername\": \"John Doe\",\n \"documentMetadata\": \"{ \\\"code\\\": \\\"GOV-DFA-2\\\", \\\"version\\\": \\\"2024.2\\\" }\",\n \"fileId\": \"550e8400-e29b-41d4-a716-446655440001\",\n \"documentTypeId\": \"550e8400-e29b-41d4-a716-446655440002\",\n \"documentTypeName\": \"Policy\",\n \"documentStatus\": \"DRAFT\",\n \"documentSharingType\": \"RESTRICTED\",\n \"documentUploadType\": \"LINKED\",\n \"documentUrl\": \"intranet.sharepoint.proxycomm.com/2024delegationofauthority.policy\",\n \"documentSharingGroups\": [\n {\n \"groupId\": \"550e8400-e29b-41d4-a716-446655440013\",\n \"tenantGroupTypeId\": \"550e8400-e29b-41d4-a716-446655440023\"\n }\n ],\n \"documentSharingUsers\": [\n {\n \"userId\": \"550e8400-e29b-41d4-a716-446655440033\"\n }\n ],\n \"documentOversights\": {\n \"responsibleUsername\": \"Neha Patel\",\n \"responsibleUserId\": \"550e8400-e29b-41d4-a716-446655440023\"\n },\n \"documentLinking\": {\n \"decisionLinkAllowed\": true,\n \"delegationLinkAllowed\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "550e8400-e29b-41d4-a716-446655440100",
"tenantId": "550e8400-e29b-41d4-a716-446655440000",
"documentName": "Global Delegation of Authority Policy - ProxyComm Inc.",
"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.",
"documentMetadata": "{ \"code\": \"GOV-DFA-2\", \"version\": \"2024.2\" }",
"fileId": "550e8400-e29b-41d4-a716-446655440001",
"documentTypeId": "550e8400-e29b-41d4-a716-446655440002",
"documentStatus": "DRAFT",
"documentSharingType": "RESTRICTED",
"documentIcon": "link-outlined",
"documentOwnerId": "550e8400-e29b-41d4-a716-446655440003",
"documentUploadType": "LINKED",
"documentUrl": "intranet.sharepoint.proxycomm.com/2024delegationofauthority.policy",
"uploadedOn": "2025-02-13T12:00:00Z",
"lastUpdatedBy": "550e8400-e29b-41d4-a716-446655440004",
"lastUpdatedOn": "2025-02-14T15:30:00Z",
"archivedOn": "2025-03-01T10:00:00Z",
"deletedOn": "2025-04-01T12:00:00Z",
"documentDisplayId": "10000",
"link": "/documents/view/eyJ0ZW5hbnRJZCI6IjU1MGU4NDAwLWUyOWItNDFkNC1hNzE2LTQ0NjY1NTQ0MDAwMCIsImRvY3VtZW50SWQiOiJjMDBjMGNkNy03ZmJjLTRmZTEtOWYxMy1lYzc5OTlmMjhjNDgifQ=="
}Update document
curl --request PATCH \
--url https://staging.api.us.aptlydone.com/document/v1/documents/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"documentName": "Global Delegation of Authority Policy - ProxyComm Inc.",
"documentDescription": "Defines the framework for delegating authority across ProxyComm's global operations, outlining roles, responsibilities, and decision-making limits.",
"documentIcon": "link-outlined",
"documentOwnerId": "550e8400-e29b-41d4-a716-446655440003",
"documentOwnerUsername": "John Doe",
"documentMetadata": "{ \"code\": \"GOV-DFA-2\", \"version\": \"2024.2\" }",
"fileId": "550e8400-e29b-41d4-a716-446655440001",
"documentTypeId": "550e8400-e29b-41d4-a716-446655440002",
"documentTypeName": "Policy",
"documentStatus": "DRAFT",
"documentSharingType": "RESTRICTED",
"documentUploadType": "LINKED",
"documentUrl": "intranet.sharepoint.proxycomm.com/2024delegationofauthority.policy",
"documentSharingGroups": [
{
"groupId": "550e8400-e29b-41d4-a716-446655440013",
"tenantGroupTypeId": "550e8400-e29b-41d4-a716-446655440023"
}
],
"documentSharingUsers": [
{
"userId": "550e8400-e29b-41d4-a716-446655440033"
}
],
"documentOversights": {
"responsibleUsername": "Neha Patel",
"responsibleUserId": "550e8400-e29b-41d4-a716-446655440023"
},
"documentLinking": {
"decisionLinkAllowed": true,
"delegationLinkAllowed": true
}
}
EOFimport requests
url = "https://staging.api.us.aptlydone.com/document/v1/documents/{id}"
payload = {
"documentName": "Global Delegation of Authority Policy - ProxyComm Inc.",
"documentDescription": "Defines the framework for delegating authority across ProxyComm's global operations, outlining roles, responsibilities, and decision-making limits.",
"documentIcon": "link-outlined",
"documentOwnerId": "550e8400-e29b-41d4-a716-446655440003",
"documentOwnerUsername": "John Doe",
"documentMetadata": "{ \"code\": \"GOV-DFA-2\", \"version\": \"2024.2\" }",
"fileId": "550e8400-e29b-41d4-a716-446655440001",
"documentTypeId": "550e8400-e29b-41d4-a716-446655440002",
"documentTypeName": "Policy",
"documentStatus": "DRAFT",
"documentSharingType": "RESTRICTED",
"documentUploadType": "LINKED",
"documentUrl": "intranet.sharepoint.proxycomm.com/2024delegationofauthority.policy",
"documentSharingGroups": [
{
"groupId": "550e8400-e29b-41d4-a716-446655440013",
"tenantGroupTypeId": "550e8400-e29b-41d4-a716-446655440023"
}
],
"documentSharingUsers": [{ "userId": "550e8400-e29b-41d4-a716-446655440033" }],
"documentOversights": {
"responsibleUsername": "Neha Patel",
"responsibleUserId": "550e8400-e29b-41d4-a716-446655440023"
},
"documentLinking": {
"decisionLinkAllowed": True,
"delegationLinkAllowed": True
}
}
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({
documentName: 'Global Delegation of Authority Policy - ProxyComm Inc.',
documentDescription: 'Defines the framework for delegating authority across ProxyComm\'s global operations, outlining roles, responsibilities, and decision-making limits.',
documentIcon: 'link-outlined',
documentOwnerId: '550e8400-e29b-41d4-a716-446655440003',
documentOwnerUsername: 'John Doe',
documentMetadata: '{ "code": "GOV-DFA-2", "version": "2024.2" }',
fileId: '550e8400-e29b-41d4-a716-446655440001',
documentTypeId: '550e8400-e29b-41d4-a716-446655440002',
documentTypeName: 'Policy',
documentStatus: 'DRAFT',
documentSharingType: 'RESTRICTED',
documentUploadType: 'LINKED',
documentUrl: 'intranet.sharepoint.proxycomm.com/2024delegationofauthority.policy',
documentSharingGroups: [
{
groupId: '550e8400-e29b-41d4-a716-446655440013',
tenantGroupTypeId: '550e8400-e29b-41d4-a716-446655440023'
}
],
documentSharingUsers: [{userId: '550e8400-e29b-41d4-a716-446655440033'}],
documentOversights: {
responsibleUsername: 'Neha Patel',
responsibleUserId: '550e8400-e29b-41d4-a716-446655440023'
},
documentLinking: {decisionLinkAllowed: true, delegationLinkAllowed: true}
})
};
fetch('https://staging.api.us.aptlydone.com/document/v1/documents/{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/document/v1/documents/{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([
'documentName' => 'Global Delegation of Authority Policy - ProxyComm Inc.',
'documentDescription' => 'Defines the framework for delegating authority across ProxyComm\'s global operations, outlining roles, responsibilities, and decision-making limits.',
'documentIcon' => 'link-outlined',
'documentOwnerId' => '550e8400-e29b-41d4-a716-446655440003',
'documentOwnerUsername' => 'John Doe',
'documentMetadata' => '{ "code": "GOV-DFA-2", "version": "2024.2" }',
'fileId' => '550e8400-e29b-41d4-a716-446655440001',
'documentTypeId' => '550e8400-e29b-41d4-a716-446655440002',
'documentTypeName' => 'Policy',
'documentStatus' => 'DRAFT',
'documentSharingType' => 'RESTRICTED',
'documentUploadType' => 'LINKED',
'documentUrl' => 'intranet.sharepoint.proxycomm.com/2024delegationofauthority.policy',
'documentSharingGroups' => [
[
'groupId' => '550e8400-e29b-41d4-a716-446655440013',
'tenantGroupTypeId' => '550e8400-e29b-41d4-a716-446655440023'
]
],
'documentSharingUsers' => [
[
'userId' => '550e8400-e29b-41d4-a716-446655440033'
]
],
'documentOversights' => [
'responsibleUsername' => 'Neha Patel',
'responsibleUserId' => '550e8400-e29b-41d4-a716-446655440023'
],
'documentLinking' => [
'decisionLinkAllowed' => true,
'delegationLinkAllowed' => true
]
]),
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/document/v1/documents/{id}"
payload := strings.NewReader("{\n \"documentName\": \"Global Delegation of Authority Policy - ProxyComm Inc.\",\n \"documentDescription\": \"Defines the framework for delegating authority across ProxyComm's global operations, outlining roles, responsibilities, and decision-making limits.\",\n \"documentIcon\": \"link-outlined\",\n \"documentOwnerId\": \"550e8400-e29b-41d4-a716-446655440003\",\n \"documentOwnerUsername\": \"John Doe\",\n \"documentMetadata\": \"{ \\\"code\\\": \\\"GOV-DFA-2\\\", \\\"version\\\": \\\"2024.2\\\" }\",\n \"fileId\": \"550e8400-e29b-41d4-a716-446655440001\",\n \"documentTypeId\": \"550e8400-e29b-41d4-a716-446655440002\",\n \"documentTypeName\": \"Policy\",\n \"documentStatus\": \"DRAFT\",\n \"documentSharingType\": \"RESTRICTED\",\n \"documentUploadType\": \"LINKED\",\n \"documentUrl\": \"intranet.sharepoint.proxycomm.com/2024delegationofauthority.policy\",\n \"documentSharingGroups\": [\n {\n \"groupId\": \"550e8400-e29b-41d4-a716-446655440013\",\n \"tenantGroupTypeId\": \"550e8400-e29b-41d4-a716-446655440023\"\n }\n ],\n \"documentSharingUsers\": [\n {\n \"userId\": \"550e8400-e29b-41d4-a716-446655440033\"\n }\n ],\n \"documentOversights\": {\n \"responsibleUsername\": \"Neha Patel\",\n \"responsibleUserId\": \"550e8400-e29b-41d4-a716-446655440023\"\n },\n \"documentLinking\": {\n \"decisionLinkAllowed\": true,\n \"delegationLinkAllowed\": true\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/document/v1/documents/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"documentName\": \"Global Delegation of Authority Policy - ProxyComm Inc.\",\n \"documentDescription\": \"Defines the framework for delegating authority across ProxyComm's global operations, outlining roles, responsibilities, and decision-making limits.\",\n \"documentIcon\": \"link-outlined\",\n \"documentOwnerId\": \"550e8400-e29b-41d4-a716-446655440003\",\n \"documentOwnerUsername\": \"John Doe\",\n \"documentMetadata\": \"{ \\\"code\\\": \\\"GOV-DFA-2\\\", \\\"version\\\": \\\"2024.2\\\" }\",\n \"fileId\": \"550e8400-e29b-41d4-a716-446655440001\",\n \"documentTypeId\": \"550e8400-e29b-41d4-a716-446655440002\",\n \"documentTypeName\": \"Policy\",\n \"documentStatus\": \"DRAFT\",\n \"documentSharingType\": \"RESTRICTED\",\n \"documentUploadType\": \"LINKED\",\n \"documentUrl\": \"intranet.sharepoint.proxycomm.com/2024delegationofauthority.policy\",\n \"documentSharingGroups\": [\n {\n \"groupId\": \"550e8400-e29b-41d4-a716-446655440013\",\n \"tenantGroupTypeId\": \"550e8400-e29b-41d4-a716-446655440023\"\n }\n ],\n \"documentSharingUsers\": [\n {\n \"userId\": \"550e8400-e29b-41d4-a716-446655440033\"\n }\n ],\n \"documentOversights\": {\n \"responsibleUsername\": \"Neha Patel\",\n \"responsibleUserId\": \"550e8400-e29b-41d4-a716-446655440023\"\n },\n \"documentLinking\": {\n \"decisionLinkAllowed\": true,\n \"delegationLinkAllowed\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.us.aptlydone.com/document/v1/documents/{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 \"documentName\": \"Global Delegation of Authority Policy - ProxyComm Inc.\",\n \"documentDescription\": \"Defines the framework for delegating authority across ProxyComm's global operations, outlining roles, responsibilities, and decision-making limits.\",\n \"documentIcon\": \"link-outlined\",\n \"documentOwnerId\": \"550e8400-e29b-41d4-a716-446655440003\",\n \"documentOwnerUsername\": \"John Doe\",\n \"documentMetadata\": \"{ \\\"code\\\": \\\"GOV-DFA-2\\\", \\\"version\\\": \\\"2024.2\\\" }\",\n \"fileId\": \"550e8400-e29b-41d4-a716-446655440001\",\n \"documentTypeId\": \"550e8400-e29b-41d4-a716-446655440002\",\n \"documentTypeName\": \"Policy\",\n \"documentStatus\": \"DRAFT\",\n \"documentSharingType\": \"RESTRICTED\",\n \"documentUploadType\": \"LINKED\",\n \"documentUrl\": \"intranet.sharepoint.proxycomm.com/2024delegationofauthority.policy\",\n \"documentSharingGroups\": [\n {\n \"groupId\": \"550e8400-e29b-41d4-a716-446655440013\",\n \"tenantGroupTypeId\": \"550e8400-e29b-41d4-a716-446655440023\"\n }\n ],\n \"documentSharingUsers\": [\n {\n \"userId\": \"550e8400-e29b-41d4-a716-446655440033\"\n }\n ],\n \"documentOversights\": {\n \"responsibleUsername\": \"Neha Patel\",\n \"responsibleUserId\": \"550e8400-e29b-41d4-a716-446655440023\"\n },\n \"documentLinking\": {\n \"decisionLinkAllowed\": true,\n \"delegationLinkAllowed\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "550e8400-e29b-41d4-a716-446655440100",
"tenantId": "550e8400-e29b-41d4-a716-446655440000",
"documentName": "Global Delegation of Authority Policy - ProxyComm Inc.",
"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.",
"documentMetadata": "{ \"code\": \"GOV-DFA-2\", \"version\": \"2024.2\" }",
"fileId": "550e8400-e29b-41d4-a716-446655440001",
"documentTypeId": "550e8400-e29b-41d4-a716-446655440002",
"documentStatus": "DRAFT",
"documentSharingType": "RESTRICTED",
"documentIcon": "link-outlined",
"documentOwnerId": "550e8400-e29b-41d4-a716-446655440003",
"documentUploadType": "LINKED",
"documentUrl": "intranet.sharepoint.proxycomm.com/2024delegationofauthority.policy",
"uploadedOn": "2025-02-13T12:00:00Z",
"lastUpdatedBy": "550e8400-e29b-41d4-a716-446655440004",
"lastUpdatedOn": "2025-02-14T15:30:00Z",
"archivedOn": "2025-03-01T10:00:00Z",
"deletedOn": "2025-04-01T12:00:00Z",
"documentDisplayId": "10000",
"link": "/documents/view/eyJ0ZW5hbnRJZCI6IjU1MGU4NDAwLWUyOWItNDFkNC1hNzE2LTQ0NjY1NTQ0MDAwMCIsImRvY3VtZW50SWQiOiJjMDBjMGNkNy03ZmJjLTRmZTEtOWYxMy1lYzc5OTlmMjhjNDgifQ=="
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
Name of the document
150"Global Delegation of Authority Policy - ProxyComm Inc."
Description of the document
250"Defines the framework for delegating authority across ProxyComm's global operations, outlining roles, responsibilities, and decision-making limits."
Icon representing the document
20"link-outlined"
Unique identifier of the document owner
"550e8400-e29b-41d4-a716-446655440003"
Document owner username
100"John Doe"
Metadata of the document in JSON format
"{ \"code\": \"GOV-DFA-2\", \"version\": \"2024.2\" }"
Unique identifier for the associated file for UPLOADED documents
"550e8400-e29b-41d4-a716-446655440001"
Optional identifier for document type
"550e8400-e29b-41d4-a716-446655440002"
Document type name
255"Policy"
Status of the document
DRAFT, PUBLISHED "DRAFT"
Sharing type of the document
PUBLIC, RESTRICTED, SHARED "RESTRICTED"
Type of document upload
LINKED, UPLOADED "LINKED"
Url for the LINKED document
"intranet.sharepoint.proxycomm.com/2024delegationofauthority.policy"
Document Sharing Groups
Show child attributes
Show child attributes
[
{
"groupId": "550e8400-e29b-41d4-a716-446655440013",
"tenantGroupTypeId": "550e8400-e29b-41d4-a716-446655440023"
}
]
Document Sharing Users
Show child attributes
Show child attributes
[
{
"userId": "550e8400-e29b-41d4-a716-446655440033"
}
]
Document Sharing Groups
Show child attributes
Show child attributes
{
"responsibleUsername": "Neha Patel",
"responsibleUserId": "550e8400-e29b-41d4-a716-446655440023"
}
Document Linking with decisions and delegations
Show child attributes
Show child attributes
{
"decisionLinkAllowed": true,
"delegationLinkAllowed": true
}
Response
Document updated successfully
Unique identifier
"550e8400-e29b-41d4-a716-446655440100"
Unique identifier for the tenant
"550e8400-e29b-41d4-a716-446655440000"
Name of the document
"Global Delegation of Authority Policy - ProxyComm Inc."
Description of the document
"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."
Metadata of the document in JSON format
"{ \"code\": \"GOV-DFA-2\", \"version\": \"2024.2\" }"
Unique identifier for the associated file
"550e8400-e29b-41d4-a716-446655440001"
Optional identifier for document type
"550e8400-e29b-41d4-a716-446655440002"
Status of the document
DRAFT, PUBLISHED, ARCHIVED, DELETED "DRAFT"
Sharing type of the document
PUBLIC, RESTRICTED, SHARED "RESTRICTED"
Icon representing the document
"link-outlined"
Unique identifier of the document owner
"550e8400-e29b-41d4-a716-446655440003"
Type of document upload
LINKED, UPLOADED "LINKED"
Url for the LINKED document
"intranet.sharepoint.proxycomm.com/2024delegationofauthority.policy"
Date when the document was uploaded
"2025-02-13T12:00:00Z"
Unique identifier of the last user who updated the document
"550e8400-e29b-41d4-a716-446655440004"
Date when the document was last updated
"2025-02-14T15:30:00Z"
Date when the document was archived
"2025-03-01T10:00:00Z"
Date when the document was deleted
"2025-04-01T12:00:00Z"
Document Display ID
"10000"
Document Link
"/documents/view/eyJ0ZW5hbnRJZCI6IjU1MGU4NDAwLWUyOWItNDFkNC1hNzE2LTQ0NjY1NTQ0MDAwMCIsImRvY3VtZW50SWQiOiJjMDBjMGNkNy03ZmJjLTRmZTEtOWYxMy1lYzc5OTlmMjhjNDgifQ=="
Was this page helpful?