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=="
}Documents
Update document
PATCH
/
v1
/
documents
/
{id}
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
Body
application/json
Response
200 - application/json
Document updated successfully
Was this page helpful?