curl --request GET \
--url https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId} \
--header 'Authorization: <api-key>'import requests
url = "https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}', 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://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <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"
"net/http"
"io"
)
func main() {
url := "https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Acme MSA (2024)",
"file_name": "acme-msa-2024.pdf",
"source_name": "<string>",
"source_provider": "manual_upload",
"extracted_at": "<string>",
"is_extraction_active": true,
"deleted_at": "<string>",
"removed_as_duplicate_at": "<string>",
"values": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}Get One Document Row
Read one row of a vault’s document table by its document_id.
A document appears here once its first scan writes values, which is a few minutes after upload. Until then poll GET /files/{id} with the id that POST /vaults/{id}/documents returned.
The row is built by the same query that serves the list, so a document reads the same way whichever endpoint returns it. Soft-deleted documents answer 404 unless the request passes include_deleted=true.
Requires a user-scoped API key (u:gcai_...). A vault is shared with named people, so an organization-scoped key has no identity to resolve vault access with.
curl --request GET \
--url https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId} \
--header 'Authorization: <api-key>'import requests
url = "https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}', 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://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <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"
"net/http"
"io"
)
func main() {
url := "https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.gc.ai/api/external/v1/vaults/{id}/documents/{documentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Acme MSA (2024)",
"file_name": "acme-msa-2024.pdf",
"source_name": "<string>",
"source_provider": "manual_upload",
"extracted_at": "<string>",
"is_extraction_active": true,
"deleted_at": "<string>",
"removed_as_duplicate_at": "<string>",
"values": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"details": {}
}Authorizations
API key for authentication. Format: gcai_xxxxxxxxx
Create API keys in the GC AI app under Settings → API.
Path Parameters
The vault ID
The document_id of a row from GET /vaults/{id}/documents.
Query Parameters
When true, also return soft-deleted documents and the copies GC AI removed as duplicates. Reading deleted documents needs the same rights as deleting them, so this requires the editor or owner role plus the organization-level permission to manage vaults. Defaults to false.
true, false "true"
Response
The document row
Stable identifier for this row. Use it with GET, DELETE, and POST .../restore on this path. One upload can hold several documents (GC AI splits a bundled PDF into the agreements inside it), and each of those is its own row with its own document_id. A document stored before GC AI split bundled uploads carries its file_id here.
The upload this row came from: the id returned by POST /vaults/{id}/documents and the id GET /files/{id} takes. Rows that share a file_id came from one upload.
The name shown in the vault: the document title when the vault has named this row, and the upload filename otherwise.
"Acme MSA (2024)"
Filename of the upload, unchanged.
"acme-msa-2024.pdf"
The vault source this document arrived through, such as the connected folder name. Null for a source with no name.
The source type, such as manual_upload, google_drive, or sharepoint.
"manual_upload"
ISO 8601 timestamp of the most recent value written to this row, or null before the first value lands.
True while a scan of this document is queued or running, so some cells may still be empty or change. Poll the row until it is false.
ISO 8601 timestamp of the soft delete, or null for a live row. Only rows requested with include_deleted=true can carry a value.
ISO 8601 timestamp when GC AI removed this row as a copy of another document in the vault, or null. include_deleted=true also returns these copies, so this field says why a row with a null deleted_at is in that list.
One entry per column of the vault, keyed by the column field_key. Every row of a vault carries the same keys, so the response reads as a table. Read the keys, labels, and types from GET /vaults/{id}/columns.
Show child attributes
Show child attributes
Was this page helpful?