curl --request PATCH \
--url https://prod.truv.com/v1/sandbox/documents/{document_id}/ \
--header 'Content-Type: application/json' \
--header 'X-Access-Client-Id: <api-key>' \
--header 'X-Access-Secret: <api-key>' \
--data '
{
"filename": "acme-w2-2025.pdf",
"documents": [
{
"document_type": "paystub",
"document_subtype": null,
"identity": {
"full_name": "John Doe",
"first_name": "John",
"last_name": "Doe",
"ssn": "991-91-9991"
},
"company_name": "Acme Inc.",
"start_page": 1,
"end_page": 2
}
],
"status": "invalid",
"validations": {
"is_readable": false
},
"last_error": "The file could not be read."
}
'import requests
url = "https://prod.truv.com/v1/sandbox/documents/{document_id}/"
payload = {
"filename": "acme-w2-2025.pdf",
"documents": [
{
"document_type": "paystub",
"document_subtype": None,
"identity": {
"full_name": "John Doe",
"first_name": "John",
"last_name": "Doe",
"ssn": "991-91-9991"
},
"company_name": "Acme Inc.",
"start_page": 1,
"end_page": 2
}
],
"status": "invalid",
"validations": { "is_readable": False },
"last_error": "The file could not be read."
}
headers = {
"X-Access-Client-Id": "<api-key>",
"X-Access-Secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-Access-Client-Id': '<api-key>',
'X-Access-Secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
filename: 'acme-w2-2025.pdf',
documents: [
{
document_type: 'paystub',
document_subtype: null,
identity: {
full_name: 'John Doe',
first_name: 'John',
last_name: 'Doe',
ssn: '991-91-9991'
},
company_name: 'Acme Inc.',
start_page: 1,
end_page: 2
}
],
status: 'invalid',
validations: {is_readable: false},
last_error: 'The file could not be read.'
})
};
fetch('https://prod.truv.com/v1/sandbox/documents/{document_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://prod.truv.com/v1/sandbox/documents/{document_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([
'filename' => 'acme-w2-2025.pdf',
'documents' => [
[
'document_type' => 'paystub',
'document_subtype' => null,
'identity' => [
'full_name' => 'John Doe',
'first_name' => 'John',
'last_name' => 'Doe',
'ssn' => '991-91-9991'
],
'company_name' => 'Acme Inc.',
'start_page' => 1,
'end_page' => 2
]
],
'status' => 'invalid',
'validations' => [
'is_readable' => false
],
'last_error' => 'The file could not be read.'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Access-Client-Id: <api-key>",
"X-Access-Secret: <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://prod.truv.com/v1/sandbox/documents/{document_id}/"
payload := strings.NewReader("{\n \"filename\": \"acme-w2-2025.pdf\",\n \"documents\": [\n {\n \"document_type\": \"paystub\",\n \"document_subtype\": null,\n \"identity\": {\n \"full_name\": \"John Doe\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"ssn\": \"991-91-9991\"\n },\n \"company_name\": \"Acme Inc.\",\n \"start_page\": 1,\n \"end_page\": 2\n }\n ],\n \"status\": \"invalid\",\n \"validations\": {\n \"is_readable\": false\n },\n \"last_error\": \"The file could not be read.\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Access-Client-Id", "<api-key>")
req.Header.Add("X-Access-Secret", "<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://prod.truv.com/v1/sandbox/documents/{document_id}/")
.header("X-Access-Client-Id", "<api-key>")
.header("X-Access-Secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"filename\": \"acme-w2-2025.pdf\",\n \"documents\": [\n {\n \"document_type\": \"paystub\",\n \"document_subtype\": null,\n \"identity\": {\n \"full_name\": \"John Doe\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"ssn\": \"991-91-9991\"\n },\n \"company_name\": \"Acme Inc.\",\n \"start_page\": 1,\n \"end_page\": 2\n }\n ],\n \"status\": \"invalid\",\n \"validations\": {\n \"is_readable\": false\n },\n \"last_error\": \"The file could not be read.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod.truv.com/v1/sandbox/documents/{document_id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Access-Client-Id"] = '<api-key>'
request["X-Access-Secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filename\": \"acme-w2-2025.pdf\",\n \"documents\": [\n {\n \"document_type\": \"paystub\",\n \"document_subtype\": null,\n \"identity\": {\n \"full_name\": \"John Doe\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"ssn\": \"991-91-9991\"\n },\n \"company_name\": \"Acme Inc.\",\n \"start_page\": 1,\n \"end_page\": 2\n }\n ],\n \"status\": \"invalid\",\n \"validations\": {\n \"is_readable\": false\n },\n \"last_error\": \"The file could not be read.\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3f1c8a90b7d2416e9a5c0e4f2b8d6a17",
"uploaded_file": {
"file_id": "3f1c8a90b7d2416e9a5c0e4f2b8d6a17",
"filename": "acme-w2-2025.pdf",
"mime_type": "application/pdf",
"size": 48219,
"md5": "9f2b1c0d4e6a8b3f5c7d9e1a2b4c6d8e",
"file": "https://s3.amazonaws.com/...",
"status": "successful",
"validations": {
"is_viable_size": true,
"is_supported_type": true,
"is_accessible": true,
"is_valid": true,
"is_readable": true,
"is_unique": true
},
"last_error": ""
},
"documents": [
{
"document_type": "paystub",
"document_subtype": null,
"identity": {
"full_name": "John Doe",
"first_name": "John",
"last_name": "Doe",
"ssn": "991-91-9991"
},
"company_name": "Acme Inc.",
"start_page": 1,
"end_page": 2
}
],
"created_at": "2026-09-17T10:11:02.104882Z",
"updated_at": "2026-09-17T10:11:02.104901Z"
}{
"error": {
"code": "reserved_credential",
"message": "Username 'goodlogin' is reserved for Truv's documented sandbox logins."
}
}{
"error": {
"code": "authentication_failed",
"message": "No such token"
}
}{
"error": {
"code": "env_not_sandbox",
"message": "Sandbox configuration requires a sandbox key; this key is 'prod'."
}
}{
"error": {
"code": "not_found",
"message": "Requested object not found."
}
}{
"error": {
"code": "resource_in_use",
"message": "Document 'acme-w2-2025.pdf' is still referenced by: Acme - salaried, biweekly."
}
}Update a sandbox document
Partially updates a library entry’s metadata. The file itself is set at create and cannot be replaced. PUT behaves identically.
curl --request PATCH \
--url https://prod.truv.com/v1/sandbox/documents/{document_id}/ \
--header 'Content-Type: application/json' \
--header 'X-Access-Client-Id: <api-key>' \
--header 'X-Access-Secret: <api-key>' \
--data '
{
"filename": "acme-w2-2025.pdf",
"documents": [
{
"document_type": "paystub",
"document_subtype": null,
"identity": {
"full_name": "John Doe",
"first_name": "John",
"last_name": "Doe",
"ssn": "991-91-9991"
},
"company_name": "Acme Inc.",
"start_page": 1,
"end_page": 2
}
],
"status": "invalid",
"validations": {
"is_readable": false
},
"last_error": "The file could not be read."
}
'import requests
url = "https://prod.truv.com/v1/sandbox/documents/{document_id}/"
payload = {
"filename": "acme-w2-2025.pdf",
"documents": [
{
"document_type": "paystub",
"document_subtype": None,
"identity": {
"full_name": "John Doe",
"first_name": "John",
"last_name": "Doe",
"ssn": "991-91-9991"
},
"company_name": "Acme Inc.",
"start_page": 1,
"end_page": 2
}
],
"status": "invalid",
"validations": { "is_readable": False },
"last_error": "The file could not be read."
}
headers = {
"X-Access-Client-Id": "<api-key>",
"X-Access-Secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-Access-Client-Id': '<api-key>',
'X-Access-Secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
filename: 'acme-w2-2025.pdf',
documents: [
{
document_type: 'paystub',
document_subtype: null,
identity: {
full_name: 'John Doe',
first_name: 'John',
last_name: 'Doe',
ssn: '991-91-9991'
},
company_name: 'Acme Inc.',
start_page: 1,
end_page: 2
}
],
status: 'invalid',
validations: {is_readable: false},
last_error: 'The file could not be read.'
})
};
fetch('https://prod.truv.com/v1/sandbox/documents/{document_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://prod.truv.com/v1/sandbox/documents/{document_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([
'filename' => 'acme-w2-2025.pdf',
'documents' => [
[
'document_type' => 'paystub',
'document_subtype' => null,
'identity' => [
'full_name' => 'John Doe',
'first_name' => 'John',
'last_name' => 'Doe',
'ssn' => '991-91-9991'
],
'company_name' => 'Acme Inc.',
'start_page' => 1,
'end_page' => 2
]
],
'status' => 'invalid',
'validations' => [
'is_readable' => false
],
'last_error' => 'The file could not be read.'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Access-Client-Id: <api-key>",
"X-Access-Secret: <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://prod.truv.com/v1/sandbox/documents/{document_id}/"
payload := strings.NewReader("{\n \"filename\": \"acme-w2-2025.pdf\",\n \"documents\": [\n {\n \"document_type\": \"paystub\",\n \"document_subtype\": null,\n \"identity\": {\n \"full_name\": \"John Doe\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"ssn\": \"991-91-9991\"\n },\n \"company_name\": \"Acme Inc.\",\n \"start_page\": 1,\n \"end_page\": 2\n }\n ],\n \"status\": \"invalid\",\n \"validations\": {\n \"is_readable\": false\n },\n \"last_error\": \"The file could not be read.\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Access-Client-Id", "<api-key>")
req.Header.Add("X-Access-Secret", "<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://prod.truv.com/v1/sandbox/documents/{document_id}/")
.header("X-Access-Client-Id", "<api-key>")
.header("X-Access-Secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"filename\": \"acme-w2-2025.pdf\",\n \"documents\": [\n {\n \"document_type\": \"paystub\",\n \"document_subtype\": null,\n \"identity\": {\n \"full_name\": \"John Doe\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"ssn\": \"991-91-9991\"\n },\n \"company_name\": \"Acme Inc.\",\n \"start_page\": 1,\n \"end_page\": 2\n }\n ],\n \"status\": \"invalid\",\n \"validations\": {\n \"is_readable\": false\n },\n \"last_error\": \"The file could not be read.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod.truv.com/v1/sandbox/documents/{document_id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Access-Client-Id"] = '<api-key>'
request["X-Access-Secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filename\": \"acme-w2-2025.pdf\",\n \"documents\": [\n {\n \"document_type\": \"paystub\",\n \"document_subtype\": null,\n \"identity\": {\n \"full_name\": \"John Doe\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"ssn\": \"991-91-9991\"\n },\n \"company_name\": \"Acme Inc.\",\n \"start_page\": 1,\n \"end_page\": 2\n }\n ],\n \"status\": \"invalid\",\n \"validations\": {\n \"is_readable\": false\n },\n \"last_error\": \"The file could not be read.\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3f1c8a90b7d2416e9a5c0e4f2b8d6a17",
"uploaded_file": {
"file_id": "3f1c8a90b7d2416e9a5c0e4f2b8d6a17",
"filename": "acme-w2-2025.pdf",
"mime_type": "application/pdf",
"size": 48219,
"md5": "9f2b1c0d4e6a8b3f5c7d9e1a2b4c6d8e",
"file": "https://s3.amazonaws.com/...",
"status": "successful",
"validations": {
"is_viable_size": true,
"is_supported_type": true,
"is_accessible": true,
"is_valid": true,
"is_readable": true,
"is_unique": true
},
"last_error": ""
},
"documents": [
{
"document_type": "paystub",
"document_subtype": null,
"identity": {
"full_name": "John Doe",
"first_name": "John",
"last_name": "Doe",
"ssn": "991-91-9991"
},
"company_name": "Acme Inc.",
"start_page": 1,
"end_page": 2
}
],
"created_at": "2026-09-17T10:11:02.104882Z",
"updated_at": "2026-09-17T10:11:02.104901Z"
}{
"error": {
"code": "reserved_credential",
"message": "Username 'goodlogin' is reserved for Truv's documented sandbox logins."
}
}{
"error": {
"code": "authentication_failed",
"message": "No such token"
}
}{
"error": {
"code": "env_not_sandbox",
"message": "Sandbox configuration requires a sandbox key; this key is 'prod'."
}
}{
"error": {
"code": "not_found",
"message": "Requested object not found."
}
}{
"error": {
"code": "resource_in_use",
"message": "Document 'acme-w2-2025.pdf' is still referenced by: Acme - salaried, biweekly."
}
}Authorizations
Client ID
Client Access Key
Path Parameters
Body
A metadata-only edit. The file itself is set at create and cannot be replaced.
Name the entry is addressed by. A rename is refused while a document-upload scenario still matches on the old name.
255"acme-w2-2025.pdf"
Test metadata describing the documents in the file, used by document-upload scenarios.
Show child attributes
Show child attributes
File-level processing outcome. A successful entry must declare at least one document.
successful, invalid, duplicate, failed "invalid"
Per-check validation results. Declaring a failure means saying which check failed.
Show child attributes
Show child attributes
{ "is_readable": false }
Message surfaced for a failed file.
500"The file could not be read."
Response
One file in your sandbox document library, plus the test metadata describing it.
Unique identifier of the library entry. This is the value a scenario payload references as document_id.
64"3f1c8a90b7d2416e9a5c0e4f2b8d6a17"
The file half of a library entry.
Show child attributes
Show child attributes
Test metadata describing the documents in the file, used by document-upload scenarios.
Show child attributes
Show child attributes
Time when the entry was created.
"2026-09-17T10:11:02.104882Z"
Time when the entry was last updated.
"2026-09-17T10:11:02.104901Z"
Was this page helpful?