Send confirmed preview
curl --request POST \
--url https://{workspace}.dekasign.com/api/v1/signature-packages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'X-Dekasign-Environment: <x-dekasign-environment>' \
--data '
{
"template_id": "<string>",
"preview_token": "<string>",
"confirmed": true
}
'import requests
url = "https://{workspace}.dekasign.com/api/v1/signature-packages"
payload = {
"template_id": "<string>",
"preview_token": "<string>",
"confirmed": True
}
headers = {
"X-Dekasign-Environment": "<x-dekasign-environment>",
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Dekasign-Environment': '<x-dekasign-environment>',
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({template_id: '<string>', preview_token: '<string>', confirmed: true})
};
fetch('https://{workspace}.dekasign.com/api/v1/signature-packages', 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://{workspace}.dekasign.com/api/v1/signature-packages",
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([
'template_id' => '<string>',
'preview_token' => '<string>',
'confirmed' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>",
"X-Dekasign-Environment: <x-dekasign-environment>"
],
]);
$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://{workspace}.dekasign.com/api/v1/signature-packages"
payload := strings.NewReader("{\n \"template_id\": \"<string>\",\n \"preview_token\": \"<string>\",\n \"confirmed\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Dekasign-Environment", "<x-dekasign-environment>")
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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://{workspace}.dekasign.com/api/v1/signature-packages")
.header("X-Dekasign-Environment", "<x-dekasign-environment>")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"template_id\": \"<string>\",\n \"preview_token\": \"<string>\",\n \"confirmed\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{workspace}.dekasign.com/api/v1/signature-packages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Dekasign-Environment"] = '<x-dekasign-environment>'
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"template_id\": \"<string>\",\n \"preview_token\": \"<string>\",\n \"confirmed\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"document_id": "<string>",
"template_version_id": "<string>",
"invitation_status": "queued",
"environment": "sandbox",
"integrity_profile": "internal_dekasign"
}signature-packages
Send confirmed preview
Memerlukan scope packages:create. Hanya sandbox; allowlist aplikasi dan kewenangan pemohon juga diperiksa.
Send confirmed preview
curl --request POST \
--url https://{workspace}.dekasign.com/api/v1/signature-packages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'X-Dekasign-Environment: <x-dekasign-environment>' \
--data '
{
"template_id": "<string>",
"preview_token": "<string>",
"confirmed": true
}
'import requests
url = "https://{workspace}.dekasign.com/api/v1/signature-packages"
payload = {
"template_id": "<string>",
"preview_token": "<string>",
"confirmed": True
}
headers = {
"X-Dekasign-Environment": "<x-dekasign-environment>",
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Dekasign-Environment': '<x-dekasign-environment>',
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({template_id: '<string>', preview_token: '<string>', confirmed: true})
};
fetch('https://{workspace}.dekasign.com/api/v1/signature-packages', 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://{workspace}.dekasign.com/api/v1/signature-packages",
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([
'template_id' => '<string>',
'preview_token' => '<string>',
'confirmed' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>",
"X-Dekasign-Environment: <x-dekasign-environment>"
],
]);
$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://{workspace}.dekasign.com/api/v1/signature-packages"
payload := strings.NewReader("{\n \"template_id\": \"<string>\",\n \"preview_token\": \"<string>\",\n \"confirmed\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Dekasign-Environment", "<x-dekasign-environment>")
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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://{workspace}.dekasign.com/api/v1/signature-packages")
.header("X-Dekasign-Environment", "<x-dekasign-environment>")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"template_id\": \"<string>\",\n \"preview_token\": \"<string>\",\n \"confirmed\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{workspace}.dekasign.com/api/v1/signature-packages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Dekasign-Environment"] = '<x-dekasign-environment>'
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"template_id\": \"<string>\",\n \"preview_token\": \"<string>\",\n \"confirmed\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"document_id": "<string>",
"template_version_id": "<string>",
"invitation_status": "queued",
"environment": "sandbox",
"integrity_profile": "internal_dekasign"
}Otorisasi
Key sandbox dks_test_, hanya untuk server.
Header
Opsi yang tersedia:
sandbox Required string length:
8 - 160Pattern:
^[!-~]+$Body
application/json
Respons
Hasil operasi. Field respons berbeda menurut endpoint dan deployment; lihat panduan.
