API
Criar template
Cria um novo modelo de processo de assinatura e as posições de assinatura dos signatários no documento.
POST
/
api
/
signature-process-templates
Criar template
curl --request POST \
--url https://api.valid.com/api/signature-process-templates \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"numbers_signers": 123,
"numbers_pages": 123,
"show_signatures_page_at_end": true,
"show_manifest_at_end": true,
"show_process_history_in_document": true,
"force_all_signatures_to_end_page": true,
"active": true,
"signers": [
{
"queue_order": 123,
"current_page": 123,
"initialLeft": 123,
"initialTop": 123,
"position_left": 123,
"position_top": 123
}
]
}
'import requests
url = "https://api.valid.com/api/signature-process-templates"
payload = {
"name": "<string>",
"numbers_signers": 123,
"numbers_pages": 123,
"show_signatures_page_at_end": True,
"show_manifest_at_end": True,
"show_process_history_in_document": True,
"force_all_signatures_to_end_page": True,
"active": True,
"signers": [
{
"queue_order": 123,
"current_page": 123,
"initialLeft": 123,
"initialTop": 123,
"position_left": 123,
"position_top": 123
}
]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
numbers_signers: 123,
numbers_pages: 123,
show_signatures_page_at_end: true,
show_manifest_at_end: true,
show_process_history_in_document: true,
force_all_signatures_to_end_page: true,
active: true,
signers: [
{
queue_order: 123,
current_page: 123,
initialLeft: 123,
initialTop: 123,
position_left: 123,
position_top: 123
}
]
})
};
fetch('https://api.valid.com/api/signature-process-templates', 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://api.valid.com/api/signature-process-templates",
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([
'name' => '<string>',
'numbers_signers' => 123,
'numbers_pages' => 123,
'show_signatures_page_at_end' => true,
'show_manifest_at_end' => true,
'show_process_history_in_document' => true,
'force_all_signatures_to_end_page' => true,
'active' => true,
'signers' => [
[
'queue_order' => 123,
'current_page' => 123,
'initialLeft' => 123,
'initialTop' => 123,
'position_left' => 123,
'position_top' => 123
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://api.valid.com/api/signature-process-templates"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"numbers_signers\": 123,\n \"numbers_pages\": 123,\n \"show_signatures_page_at_end\": true,\n \"show_manifest_at_end\": true,\n \"show_process_history_in_document\": true,\n \"force_all_signatures_to_end_page\": true,\n \"active\": true,\n \"signers\": [\n {\n \"queue_order\": 123,\n \"current_page\": 123,\n \"initialLeft\": 123,\n \"initialTop\": 123,\n \"position_left\": 123,\n \"position_top\": 123\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://api.valid.com/api/signature-process-templates")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"numbers_signers\": 123,\n \"numbers_pages\": 123,\n \"show_signatures_page_at_end\": true,\n \"show_manifest_at_end\": true,\n \"show_process_history_in_document\": true,\n \"force_all_signatures_to_end_page\": true,\n \"active\": true,\n \"signers\": [\n {\n \"queue_order\": 123,\n \"current_page\": 123,\n \"initialLeft\": 123,\n \"initialTop\": 123,\n \"position_left\": 123,\n \"position_top\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.valid.com/api/signature-process-templates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"numbers_signers\": 123,\n \"numbers_pages\": 123,\n \"show_signatures_page_at_end\": true,\n \"show_manifest_at_end\": true,\n \"show_process_history_in_document\": true,\n \"force_all_signatures_to_end_page\": true,\n \"active\": true,\n \"signers\": [\n {\n \"queue_order\": 123,\n \"current_page\": 123,\n \"initialLeft\": 123,\n \"initialTop\": 123,\n \"position_left\": 123,\n \"position_top\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyRequest Body
Nome do template. Exemplo:
Template Contrato PadrãoNúmero de signatários. Exemplo:
2Número de páginas. Exemplo:
5Mostrar página de assinaturas no final. Exemplo:
trueMostrar manifesto no final. Exemplo:
trueMostrar histórico do processo no documento. Exemplo:
trueForçar todas as assinaturas para a página final. Exemplo:
falseStatus do template. Exemplo:
trueLista de posições dos signatários no template.
Show properties
Show properties
Ordem do signatário na fila de assinatura. Exemplo:
1Página do documento onde o campo será posicionado. Exemplo:
1Coordenada X inicial em pixels (distância do lado esquerdo do PDF).
Exemplo:
533Coordenada Y inicial em pixels (distância do topo do PDF).
Exemplo:
899Coordenada X final em PT, distância em relação ao lado direito do
documento. Exemplo:
414Coordenada Y final em PT, distância em relação ao lado inferior do
documento. Exemplo:
143⌘I
Criar template
curl --request POST \
--url https://api.valid.com/api/signature-process-templates \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"numbers_signers": 123,
"numbers_pages": 123,
"show_signatures_page_at_end": true,
"show_manifest_at_end": true,
"show_process_history_in_document": true,
"force_all_signatures_to_end_page": true,
"active": true,
"signers": [
{
"queue_order": 123,
"current_page": 123,
"initialLeft": 123,
"initialTop": 123,
"position_left": 123,
"position_top": 123
}
]
}
'import requests
url = "https://api.valid.com/api/signature-process-templates"
payload = {
"name": "<string>",
"numbers_signers": 123,
"numbers_pages": 123,
"show_signatures_page_at_end": True,
"show_manifest_at_end": True,
"show_process_history_in_document": True,
"force_all_signatures_to_end_page": True,
"active": True,
"signers": [
{
"queue_order": 123,
"current_page": 123,
"initialLeft": 123,
"initialTop": 123,
"position_left": 123,
"position_top": 123
}
]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
numbers_signers: 123,
numbers_pages: 123,
show_signatures_page_at_end: true,
show_manifest_at_end: true,
show_process_history_in_document: true,
force_all_signatures_to_end_page: true,
active: true,
signers: [
{
queue_order: 123,
current_page: 123,
initialLeft: 123,
initialTop: 123,
position_left: 123,
position_top: 123
}
]
})
};
fetch('https://api.valid.com/api/signature-process-templates', 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://api.valid.com/api/signature-process-templates",
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([
'name' => '<string>',
'numbers_signers' => 123,
'numbers_pages' => 123,
'show_signatures_page_at_end' => true,
'show_manifest_at_end' => true,
'show_process_history_in_document' => true,
'force_all_signatures_to_end_page' => true,
'active' => true,
'signers' => [
[
'queue_order' => 123,
'current_page' => 123,
'initialLeft' => 123,
'initialTop' => 123,
'position_left' => 123,
'position_top' => 123
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://api.valid.com/api/signature-process-templates"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"numbers_signers\": 123,\n \"numbers_pages\": 123,\n \"show_signatures_page_at_end\": true,\n \"show_manifest_at_end\": true,\n \"show_process_history_in_document\": true,\n \"force_all_signatures_to_end_page\": true,\n \"active\": true,\n \"signers\": [\n {\n \"queue_order\": 123,\n \"current_page\": 123,\n \"initialLeft\": 123,\n \"initialTop\": 123,\n \"position_left\": 123,\n \"position_top\": 123\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://api.valid.com/api/signature-process-templates")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"numbers_signers\": 123,\n \"numbers_pages\": 123,\n \"show_signatures_page_at_end\": true,\n \"show_manifest_at_end\": true,\n \"show_process_history_in_document\": true,\n \"force_all_signatures_to_end_page\": true,\n \"active\": true,\n \"signers\": [\n {\n \"queue_order\": 123,\n \"current_page\": 123,\n \"initialLeft\": 123,\n \"initialTop\": 123,\n \"position_left\": 123,\n \"position_top\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.valid.com/api/signature-process-templates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"numbers_signers\": 123,\n \"numbers_pages\": 123,\n \"show_signatures_page_at_end\": true,\n \"show_manifest_at_end\": true,\n \"show_process_history_in_document\": true,\n \"force_all_signatures_to_end_page\": true,\n \"active\": true,\n \"signers\": [\n {\n \"queue_order\": 123,\n \"current_page\": 123,\n \"initialLeft\": 123,\n \"initialTop\": 123,\n \"position_left\": 123,\n \"position_top\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body