curl --request PUT \
--url https://sandbox.circularo.com/api/v1/share/document/sign/finish/file \
--header 'Content-Type: application/json' \
--data '
{
"sessionId": "sign:session:9f2c4e1b7a0d63855c1e8f04b2d97a63e5108c4fbd26a7391e0c58d4a6b7f213",
"signedFiles": [
{
"originalFile": "40umqeox836wvkis95a41eiwz80k0s3puusl7vpk1houzqi4ecg09nosl3ee0sun",
"signedFile": "2y57qfbsvgy6qgzwjrgy007p64b3xg7r4xzb5w07bopzgkck2vo1dgo457ywmlco"
}
]
}
'import requests
url = "https://sandbox.circularo.com/api/v1/share/document/sign/finish/file"
payload = {
"sessionId": "sign:session:9f2c4e1b7a0d63855c1e8f04b2d97a63e5108c4fbd26a7391e0c58d4a6b7f213",
"signedFiles": [
{
"originalFile": "40umqeox836wvkis95a41eiwz80k0s3puusl7vpk1houzqi4ecg09nosl3ee0sun",
"signedFile": "2y57qfbsvgy6qgzwjrgy007p64b3xg7r4xzb5w07bopzgkck2vo1dgo457ywmlco"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
sessionId: 'sign:session:9f2c4e1b7a0d63855c1e8f04b2d97a63e5108c4fbd26a7391e0c58d4a6b7f213',
signedFiles: [
{
originalFile: '40umqeox836wvkis95a41eiwz80k0s3puusl7vpk1houzqi4ecg09nosl3ee0sun',
signedFile: '2y57qfbsvgy6qgzwjrgy007p64b3xg7r4xzb5w07bopzgkck2vo1dgo457ywmlco'
}
]
})
};
fetch('https://sandbox.circularo.com/api/v1/share/document/sign/finish/file', 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://sandbox.circularo.com/api/v1/share/document/sign/finish/file",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'sessionId' => 'sign:session:9f2c4e1b7a0d63855c1e8f04b2d97a63e5108c4fbd26a7391e0c58d4a6b7f213',
'signedFiles' => [
[
'originalFile' => '40umqeox836wvkis95a41eiwz80k0s3puusl7vpk1houzqi4ecg09nosl3ee0sun',
'signedFile' => '2y57qfbsvgy6qgzwjrgy007p64b3xg7r4xzb5w07bopzgkck2vo1dgo457ywmlco'
]
]
]),
CURLOPT_HTTPHEADER => [
"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://sandbox.circularo.com/api/v1/share/document/sign/finish/file"
payload := strings.NewReader("{\n \"sessionId\": \"sign:session:9f2c4e1b7a0d63855c1e8f04b2d97a63e5108c4fbd26a7391e0c58d4a6b7f213\",\n \"signedFiles\": [\n {\n \"originalFile\": \"40umqeox836wvkis95a41eiwz80k0s3puusl7vpk1houzqi4ecg09nosl3ee0sun\",\n \"signedFile\": \"2y57qfbsvgy6qgzwjrgy007p64b3xg7r4xzb5w07bopzgkck2vo1dgo457ywmlco\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://sandbox.circularo.com/api/v1/share/document/sign/finish/file")
.header("Content-Type", "application/json")
.body("{\n \"sessionId\": \"sign:session:9f2c4e1b7a0d63855c1e8f04b2d97a63e5108c4fbd26a7391e0c58d4a6b7f213\",\n \"signedFiles\": [\n {\n \"originalFile\": \"40umqeox836wvkis95a41eiwz80k0s3puusl7vpk1houzqi4ecg09nosl3ee0sun\",\n \"signedFile\": \"2y57qfbsvgy6qgzwjrgy007p64b3xg7r4xzb5w07bopzgkck2vo1dgo457ywmlco\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/share/document/sign/finish/file")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"sessionId\": \"sign:session:9f2c4e1b7a0d63855c1e8f04b2d97a63e5108c4fbd26a7391e0c58d4a6b7f213\",\n \"signedFiles\": [\n {\n \"originalFile\": \"40umqeox836wvkis95a41eiwz80k0s3puusl7vpk1houzqi4ecg09nosl3ee0sun\",\n \"signedFile\": \"2y57qfbsvgy6qgzwjrgy007p64b3xg7r4xzb5w07bopzgkck2vo1dgo457ywmlco\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "SUCCESS"
}{
"status": 400,
"type": "VALIDATION:INPUT_INVALID",
"message": "Invalid input",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 401,
"type": "AUTH:UNAUTHORIZED",
"message": "Authentication failed",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 403,
"type": "AUTH:ACCESS_DENIED",
"message": "Access denied",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 404,
"type": "RESOURCE:NOT_FOUND",
"message": "Resource not found",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 409,
"type": "RESOURCE:STATE_CONFLICT",
"message": "Resource state conflict",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 410,
"type": "AUTH:IDENTITY_TOKEN_EXPIRED",
"message": "Identity token expired",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 428,
"type": "AUTH:MFA_REQUIRED",
"message": "MFA activation required",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 498,
"type": "SHARE_AUTH:TOKEN_INVALID",
"message": "Invalid share token",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Finish signing a shared document by handing back signed files
PUT /share/document/sign/finish/file
Completes a signing that was prepared earlier. The client fetched each prepared file, signed the whole PDF with the key held on the signer’s own device, put the result back through POST /share/upload/file, and names the results here; they then become the document.
Every file handed back is checked to be the prepared file with a signature added and nothing else: the prepared bytes untouched, the signatures it already carried still present and intact, at least one new signature covering the whole document, that signature made with the certificate the signing was started with and placed where it was asked for. Where a qualified token was used, the certificate is held to the rules that go with it.
One signed file is expected for every file that needs one; the files the session prepared that carried only annotations or images do not, and are finished off here instead of being part of the request. The session has to be the one this share opened and to be still alive, and the document must not have moved on since the preparation.
With the signatures in, the transaction moves on: the next recipients get their turn and are notified, shares nobody needs any more are closed, and once nobody is left to act the document is completed - sealed when the document owner’s settings seal on completion, with the owner’s seal-on-complete or default seal provider. The share itself falls back to plain reading, and its expiry and reminders are dropped.
Share authorization: Authorize using a share token and a one-time password (if required) to call this endpoint.
Allowed share object types: document
Allowed share purposes: sign
curl --request PUT \
--url https://sandbox.circularo.com/api/v1/share/document/sign/finish/file \
--header 'Content-Type: application/json' \
--data '
{
"sessionId": "sign:session:9f2c4e1b7a0d63855c1e8f04b2d97a63e5108c4fbd26a7391e0c58d4a6b7f213",
"signedFiles": [
{
"originalFile": "40umqeox836wvkis95a41eiwz80k0s3puusl7vpk1houzqi4ecg09nosl3ee0sun",
"signedFile": "2y57qfbsvgy6qgzwjrgy007p64b3xg7r4xzb5w07bopzgkck2vo1dgo457ywmlco"
}
]
}
'import requests
url = "https://sandbox.circularo.com/api/v1/share/document/sign/finish/file"
payload = {
"sessionId": "sign:session:9f2c4e1b7a0d63855c1e8f04b2d97a63e5108c4fbd26a7391e0c58d4a6b7f213",
"signedFiles": [
{
"originalFile": "40umqeox836wvkis95a41eiwz80k0s3puusl7vpk1houzqi4ecg09nosl3ee0sun",
"signedFile": "2y57qfbsvgy6qgzwjrgy007p64b3xg7r4xzb5w07bopzgkck2vo1dgo457ywmlco"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
sessionId: 'sign:session:9f2c4e1b7a0d63855c1e8f04b2d97a63e5108c4fbd26a7391e0c58d4a6b7f213',
signedFiles: [
{
originalFile: '40umqeox836wvkis95a41eiwz80k0s3puusl7vpk1houzqi4ecg09nosl3ee0sun',
signedFile: '2y57qfbsvgy6qgzwjrgy007p64b3xg7r4xzb5w07bopzgkck2vo1dgo457ywmlco'
}
]
})
};
fetch('https://sandbox.circularo.com/api/v1/share/document/sign/finish/file', 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://sandbox.circularo.com/api/v1/share/document/sign/finish/file",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'sessionId' => 'sign:session:9f2c4e1b7a0d63855c1e8f04b2d97a63e5108c4fbd26a7391e0c58d4a6b7f213',
'signedFiles' => [
[
'originalFile' => '40umqeox836wvkis95a41eiwz80k0s3puusl7vpk1houzqi4ecg09nosl3ee0sun',
'signedFile' => '2y57qfbsvgy6qgzwjrgy007p64b3xg7r4xzb5w07bopzgkck2vo1dgo457ywmlco'
]
]
]),
CURLOPT_HTTPHEADER => [
"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://sandbox.circularo.com/api/v1/share/document/sign/finish/file"
payload := strings.NewReader("{\n \"sessionId\": \"sign:session:9f2c4e1b7a0d63855c1e8f04b2d97a63e5108c4fbd26a7391e0c58d4a6b7f213\",\n \"signedFiles\": [\n {\n \"originalFile\": \"40umqeox836wvkis95a41eiwz80k0s3puusl7vpk1houzqi4ecg09nosl3ee0sun\",\n \"signedFile\": \"2y57qfbsvgy6qgzwjrgy007p64b3xg7r4xzb5w07bopzgkck2vo1dgo457ywmlco\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://sandbox.circularo.com/api/v1/share/document/sign/finish/file")
.header("Content-Type", "application/json")
.body("{\n \"sessionId\": \"sign:session:9f2c4e1b7a0d63855c1e8f04b2d97a63e5108c4fbd26a7391e0c58d4a6b7f213\",\n \"signedFiles\": [\n {\n \"originalFile\": \"40umqeox836wvkis95a41eiwz80k0s3puusl7vpk1houzqi4ecg09nosl3ee0sun\",\n \"signedFile\": \"2y57qfbsvgy6qgzwjrgy007p64b3xg7r4xzb5w07bopzgkck2vo1dgo457ywmlco\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/share/document/sign/finish/file")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"sessionId\": \"sign:session:9f2c4e1b7a0d63855c1e8f04b2d97a63e5108c4fbd26a7391e0c58d4a6b7f213\",\n \"signedFiles\": [\n {\n \"originalFile\": \"40umqeox836wvkis95a41eiwz80k0s3puusl7vpk1houzqi4ecg09nosl3ee0sun\",\n \"signedFile\": \"2y57qfbsvgy6qgzwjrgy007p64b3xg7r4xzb5w07bopzgkck2vo1dgo457ywmlco\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "SUCCESS"
}{
"status": 400,
"type": "VALIDATION:INPUT_INVALID",
"message": "Invalid input",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 401,
"type": "AUTH:UNAUTHORIZED",
"message": "Authentication failed",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 403,
"type": "AUTH:ACCESS_DENIED",
"message": "Access denied",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 404,
"type": "RESOURCE:NOT_FOUND",
"message": "Resource not found",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 409,
"type": "RESOURCE:STATE_CONFLICT",
"message": "Resource state conflict",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 410,
"type": "AUTH:IDENTITY_TOKEN_EXPIRED",
"message": "Identity token expired",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 428,
"type": "AUTH:MFA_REQUIRED",
"message": "MFA activation required",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 498,
"type": "SHARE_AUTH:TOKEN_INVALID",
"message": "Invalid share token",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}