API
Signatário preenche campos
Signatário preenche valores de campos dinâmicos pendentes antes de assinar.
PATCH
/
v1
/
sign
/
:sessionToken
/
fields
Signatário preenche campos
curl --request PATCH \
--url https://api.valid.com/v1/sign/:sessionToken/fields \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"values": [
{
"key": "<string>",
"fieldUuid": "<string>",
"value": [
"<string>"
]
}
]
}
'import requests
url = "https://api.valid.com/v1/sign/:sessionToken/fields"
payload = { "values": [
{
"key": "<string>",
"fieldUuid": "<string>",
"value": ["<string>"]
}
] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({values: [{key: '<string>', fieldUuid: '<string>', value: ['<string>']}]})
};
fetch('https://api.valid.com/v1/sign/:sessionToken/fields', 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/v1/sign/:sessionToken/fields",
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([
'values' => [
[
'key' => '<string>',
'fieldUuid' => '<string>',
'value' => [
'<string>'
]
]
]
]),
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/v1/sign/:sessionToken/fields"
payload := strings.NewReader("{\n \"values\": [\n {\n \"key\": \"<string>\",\n \"fieldUuid\": \"<string>\",\n \"value\": [\n \"<string>\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.valid.com/v1/sign/:sessionToken/fields")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"values\": [\n {\n \"key\": \"<string>\",\n \"fieldUuid\": \"<string>\",\n \"value\": [\n \"<string>\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.valid.com/v1/sign/:sessionToken/fields")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"values\": [\n {\n \"key\": \"<string>\",\n \"fieldUuid\": \"<string>\",\n \"value\": [\n \"<string>\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyHTTP/1.1 200 OK
Content-Type: application/json
{
"fields": [
{
"key": "data_assinatura",
"fieldUuid": "6ba7b811-9dad-11d1-80b4-00c04fd430c8",
"type": "date",
"label": "Data de Assinatura",
"value": "2025-12-31",
"status": "filled",
"displayState": "filled_by_signer",
"canFill": true
},
{
"key": "termos_aceitos",
"fieldUuid": "6ba7b813-9dad-11d1-80b4-00c04fd430c8",
"type": "checkbox",
"label": "Aceito os termos",
"value": ["opcao_a"],
"status": "filled",
"displayState": "filled_by_signer",
"canFill": true
}
]
}
HTTP/1.1 400 Bad Request
Content-Type: application/json
{
"statusCode": 400,
"message": "Field 'nome_cliente' is locked and cannot be edited"
}
Permite que o signatário preencha ou edite campos dinâmicos pendentes que lhe foram atribuídos. Esta operação só é válida antes da primeira assinatura.
Autenticação: use apenas o
sessionToken na URL.
Parâmetros
string
required
Token da sessão do signatário.
array
required
Lista de campos a preencher.
Respostas
Retorna a lista atualizada de campos (mesmo shape deGET .../fields).
array
Campos atualizados com novos estados.
Erros
Veja Autenticação e erros.- 400: Campo desconhecido, valor inválido, campo já preenchido e não editável, ou campo não atribuído a este signatário.
- 404: Session token inválido.
- 410: Session token expirado.
- 409: Envelope já foi assinado (congelado).
HTTP/1.1 200 OK
Content-Type: application/json
{
"fields": [
{
"key": "data_assinatura",
"fieldUuid": "6ba7b811-9dad-11d1-80b4-00c04fd430c8",
"type": "date",
"label": "Data de Assinatura",
"value": "2025-12-31",
"status": "filled",
"displayState": "filled_by_signer",
"canFill": true
},
{
"key": "termos_aceitos",
"fieldUuid": "6ba7b813-9dad-11d1-80b4-00c04fd430c8",
"type": "checkbox",
"label": "Aceito os termos",
"value": ["opcao_a"],
"status": "filled",
"displayState": "filled_by_signer",
"canFill": true
}
]
}
HTTP/1.1 400 Bad Request
Content-Type: application/json
{
"statusCode": 400,
"message": "Field 'nome_cliente' is locked and cannot be edited"
}
Exemplo
curl -X PATCH "https://signer.vcc-service.com/v1/sign/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.../fields" \
-H "Content-Type: application/json" \
-d '{
"values": [
{
"key": "data_assinatura",
"value": "2025-12-31"
},
{
"key": "termos_aceitos",
"value": ["opcao_a", "opcao_c"]
}
]
}'
Relacionado
GET /v1/sign/:sessionToken— obter estado da sessão e camposPOST /v1/sign/:sessionToken/sign— assinar após preencher campos
⌘I
Signatário preenche campos
curl --request PATCH \
--url https://api.valid.com/v1/sign/:sessionToken/fields \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"values": [
{
"key": "<string>",
"fieldUuid": "<string>",
"value": [
"<string>"
]
}
]
}
'import requests
url = "https://api.valid.com/v1/sign/:sessionToken/fields"
payload = { "values": [
{
"key": "<string>",
"fieldUuid": "<string>",
"value": ["<string>"]
}
] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({values: [{key: '<string>', fieldUuid: '<string>', value: ['<string>']}]})
};
fetch('https://api.valid.com/v1/sign/:sessionToken/fields', 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/v1/sign/:sessionToken/fields",
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([
'values' => [
[
'key' => '<string>',
'fieldUuid' => '<string>',
'value' => [
'<string>'
]
]
]
]),
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/v1/sign/:sessionToken/fields"
payload := strings.NewReader("{\n \"values\": [\n {\n \"key\": \"<string>\",\n \"fieldUuid\": \"<string>\",\n \"value\": [\n \"<string>\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.valid.com/v1/sign/:sessionToken/fields")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"values\": [\n {\n \"key\": \"<string>\",\n \"fieldUuid\": \"<string>\",\n \"value\": [\n \"<string>\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.valid.com/v1/sign/:sessionToken/fields")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"values\": [\n {\n \"key\": \"<string>\",\n \"fieldUuid\": \"<string>\",\n \"value\": [\n \"<string>\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyHTTP/1.1 200 OK
Content-Type: application/json
{
"fields": [
{
"key": "data_assinatura",
"fieldUuid": "6ba7b811-9dad-11d1-80b4-00c04fd430c8",
"type": "date",
"label": "Data de Assinatura",
"value": "2025-12-31",
"status": "filled",
"displayState": "filled_by_signer",
"canFill": true
},
{
"key": "termos_aceitos",
"fieldUuid": "6ba7b813-9dad-11d1-80b4-00c04fd430c8",
"type": "checkbox",
"label": "Aceito os termos",
"value": ["opcao_a"],
"status": "filled",
"displayState": "filled_by_signer",
"canFill": true
}
]
}
HTTP/1.1 400 Bad Request
Content-Type: application/json
{
"statusCode": 400,
"message": "Field 'nome_cliente' is locked and cannot be edited"
}