Update document approval
curl --request PATCH \
--url https://staging.api.us.aptlydone.com/document/v1/documents/document-approval/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reviewerUserId": "550e8400-e29b-41d4-a716-446655440003",
"reviewerUsername": "John Doe",
"reviewerPositionId": "550e8400-e29b-41d4-a716-446655440004",
"reviewerPositionName": "Sr. Corporate Counsel",
"approverUserId": "550e8400-e29b-41d4-a716-446655440005",
"approverUsername": "John Doe",
"approverPositionId": "550e8400-e29b-41d4-a716-446655440006",
"approverPositionName": "Sr. Corporate Counsel",
"reviewStatus": "REVIEWED",
"approvalStatus": "APPROVED"
}
'import requests
url = "https://staging.api.us.aptlydone.com/document/v1/documents/document-approval/{id}"
payload = {
"reviewerUserId": "550e8400-e29b-41d4-a716-446655440003",
"reviewerUsername": "John Doe",
"reviewerPositionId": "550e8400-e29b-41d4-a716-446655440004",
"reviewerPositionName": "Sr. Corporate Counsel",
"approverUserId": "550e8400-e29b-41d4-a716-446655440005",
"approverUsername": "John Doe",
"approverPositionId": "550e8400-e29b-41d4-a716-446655440006",
"approverPositionName": "Sr. Corporate Counsel",
"reviewStatus": "REVIEWED",
"approvalStatus": "APPROVED"
}
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({
reviewerUserId: '550e8400-e29b-41d4-a716-446655440003',
reviewerUsername: 'John Doe',
reviewerPositionId: '550e8400-e29b-41d4-a716-446655440004',
reviewerPositionName: 'Sr. Corporate Counsel',
approverUserId: '550e8400-e29b-41d4-a716-446655440005',
approverUsername: 'John Doe',
approverPositionId: '550e8400-e29b-41d4-a716-446655440006',
approverPositionName: 'Sr. Corporate Counsel',
reviewStatus: 'REVIEWED',
approvalStatus: 'APPROVED'
})
};
fetch('https://staging.api.us.aptlydone.com/document/v1/documents/document-approval/{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/document-approval/{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([
'reviewerUserId' => '550e8400-e29b-41d4-a716-446655440003',
'reviewerUsername' => 'John Doe',
'reviewerPositionId' => '550e8400-e29b-41d4-a716-446655440004',
'reviewerPositionName' => 'Sr. Corporate Counsel',
'approverUserId' => '550e8400-e29b-41d4-a716-446655440005',
'approverUsername' => 'John Doe',
'approverPositionId' => '550e8400-e29b-41d4-a716-446655440006',
'approverPositionName' => 'Sr. Corporate Counsel',
'reviewStatus' => 'REVIEWED',
'approvalStatus' => 'APPROVED'
]),
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/document-approval/{id}"
payload := strings.NewReader("{\n \"reviewerUserId\": \"550e8400-e29b-41d4-a716-446655440003\",\n \"reviewerUsername\": \"John Doe\",\n \"reviewerPositionId\": \"550e8400-e29b-41d4-a716-446655440004\",\n \"reviewerPositionName\": \"Sr. Corporate Counsel\",\n \"approverUserId\": \"550e8400-e29b-41d4-a716-446655440005\",\n \"approverUsername\": \"John Doe\",\n \"approverPositionId\": \"550e8400-e29b-41d4-a716-446655440006\",\n \"approverPositionName\": \"Sr. Corporate Counsel\",\n \"reviewStatus\": \"REVIEWED\",\n \"approvalStatus\": \"APPROVED\"\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/document-approval/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reviewerUserId\": \"550e8400-e29b-41d4-a716-446655440003\",\n \"reviewerUsername\": \"John Doe\",\n \"reviewerPositionId\": \"550e8400-e29b-41d4-a716-446655440004\",\n \"reviewerPositionName\": \"Sr. Corporate Counsel\",\n \"approverUserId\": \"550e8400-e29b-41d4-a716-446655440005\",\n \"approverUsername\": \"John Doe\",\n \"approverPositionId\": \"550e8400-e29b-41d4-a716-446655440006\",\n \"approverPositionName\": \"Sr. Corporate Counsel\",\n \"reviewStatus\": \"REVIEWED\",\n \"approvalStatus\": \"APPROVED\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.us.aptlydone.com/document/v1/documents/document-approval/{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 \"reviewerUserId\": \"550e8400-e29b-41d4-a716-446655440003\",\n \"reviewerUsername\": \"John Doe\",\n \"reviewerPositionId\": \"550e8400-e29b-41d4-a716-446655440004\",\n \"reviewerPositionName\": \"Sr. Corporate Counsel\",\n \"approverUserId\": \"550e8400-e29b-41d4-a716-446655440005\",\n \"approverUsername\": \"John Doe\",\n \"approverPositionId\": \"550e8400-e29b-41d4-a716-446655440006\",\n \"approverPositionName\": \"Sr. Corporate Counsel\",\n \"reviewStatus\": \"REVIEWED\",\n \"approvalStatus\": \"APPROVED\"\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 approval
PATCH
/
v1
/
documents
/
document-approval
/
{id}
Update document approval
curl --request PATCH \
--url https://staging.api.us.aptlydone.com/document/v1/documents/document-approval/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reviewerUserId": "550e8400-e29b-41d4-a716-446655440003",
"reviewerUsername": "John Doe",
"reviewerPositionId": "550e8400-e29b-41d4-a716-446655440004",
"reviewerPositionName": "Sr. Corporate Counsel",
"approverUserId": "550e8400-e29b-41d4-a716-446655440005",
"approverUsername": "John Doe",
"approverPositionId": "550e8400-e29b-41d4-a716-446655440006",
"approverPositionName": "Sr. Corporate Counsel",
"reviewStatus": "REVIEWED",
"approvalStatus": "APPROVED"
}
'import requests
url = "https://staging.api.us.aptlydone.com/document/v1/documents/document-approval/{id}"
payload = {
"reviewerUserId": "550e8400-e29b-41d4-a716-446655440003",
"reviewerUsername": "John Doe",
"reviewerPositionId": "550e8400-e29b-41d4-a716-446655440004",
"reviewerPositionName": "Sr. Corporate Counsel",
"approverUserId": "550e8400-e29b-41d4-a716-446655440005",
"approverUsername": "John Doe",
"approverPositionId": "550e8400-e29b-41d4-a716-446655440006",
"approverPositionName": "Sr. Corporate Counsel",
"reviewStatus": "REVIEWED",
"approvalStatus": "APPROVED"
}
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({
reviewerUserId: '550e8400-e29b-41d4-a716-446655440003',
reviewerUsername: 'John Doe',
reviewerPositionId: '550e8400-e29b-41d4-a716-446655440004',
reviewerPositionName: 'Sr. Corporate Counsel',
approverUserId: '550e8400-e29b-41d4-a716-446655440005',
approverUsername: 'John Doe',
approverPositionId: '550e8400-e29b-41d4-a716-446655440006',
approverPositionName: 'Sr. Corporate Counsel',
reviewStatus: 'REVIEWED',
approvalStatus: 'APPROVED'
})
};
fetch('https://staging.api.us.aptlydone.com/document/v1/documents/document-approval/{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/document-approval/{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([
'reviewerUserId' => '550e8400-e29b-41d4-a716-446655440003',
'reviewerUsername' => 'John Doe',
'reviewerPositionId' => '550e8400-e29b-41d4-a716-446655440004',
'reviewerPositionName' => 'Sr. Corporate Counsel',
'approverUserId' => '550e8400-e29b-41d4-a716-446655440005',
'approverUsername' => 'John Doe',
'approverPositionId' => '550e8400-e29b-41d4-a716-446655440006',
'approverPositionName' => 'Sr. Corporate Counsel',
'reviewStatus' => 'REVIEWED',
'approvalStatus' => 'APPROVED'
]),
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/document-approval/{id}"
payload := strings.NewReader("{\n \"reviewerUserId\": \"550e8400-e29b-41d4-a716-446655440003\",\n \"reviewerUsername\": \"John Doe\",\n \"reviewerPositionId\": \"550e8400-e29b-41d4-a716-446655440004\",\n \"reviewerPositionName\": \"Sr. Corporate Counsel\",\n \"approverUserId\": \"550e8400-e29b-41d4-a716-446655440005\",\n \"approverUsername\": \"John Doe\",\n \"approverPositionId\": \"550e8400-e29b-41d4-a716-446655440006\",\n \"approverPositionName\": \"Sr. Corporate Counsel\",\n \"reviewStatus\": \"REVIEWED\",\n \"approvalStatus\": \"APPROVED\"\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/document-approval/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reviewerUserId\": \"550e8400-e29b-41d4-a716-446655440003\",\n \"reviewerUsername\": \"John Doe\",\n \"reviewerPositionId\": \"550e8400-e29b-41d4-a716-446655440004\",\n \"reviewerPositionName\": \"Sr. Corporate Counsel\",\n \"approverUserId\": \"550e8400-e29b-41d4-a716-446655440005\",\n \"approverUsername\": \"John Doe\",\n \"approverPositionId\": \"550e8400-e29b-41d4-a716-446655440006\",\n \"approverPositionName\": \"Sr. Corporate Counsel\",\n \"reviewStatus\": \"REVIEWED\",\n \"approvalStatus\": \"APPROVED\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.us.aptlydone.com/document/v1/documents/document-approval/{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 \"reviewerUserId\": \"550e8400-e29b-41d4-a716-446655440003\",\n \"reviewerUsername\": \"John Doe\",\n \"reviewerPositionId\": \"550e8400-e29b-41d4-a716-446655440004\",\n \"reviewerPositionName\": \"Sr. Corporate Counsel\",\n \"approverUserId\": \"550e8400-e29b-41d4-a716-446655440005\",\n \"approverUsername\": \"John Doe\",\n \"approverPositionId\": \"550e8400-e29b-41d4-a716-446655440006\",\n \"approverPositionName\": \"Sr. Corporate Counsel\",\n \"reviewStatus\": \"REVIEWED\",\n \"approvalStatus\": \"APPROVED\"\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?