Contract Intelligence

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.

get/vaults/{id}/documents/{documentId}

Request

Path parameters

idstring uuid required

The vault ID

documentIdstring uuid required

The document_id of a row from GET /vaults/{id}/documents.

Query parameters

include_deleted'true' | 'false'

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.

Example:true

Response

The document row

document_idstring uuid required

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.

file_idstring uuid required

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.

namestring required

The name shown in the vault: the document title when the vault has named this row, and the upload filename otherwise.

file_namestring required

Filename of the upload, unchanged.

source_namestring nullable required

The vault source this document arrived through, such as the connected folder name. Null for a source with no name.

source_providerstring nullable required

The source type, such as manual_upload, google_drive, or sharepoint.

extracted_atstring nullable required

ISO 8601 timestamp of the most recent value written to this row, or null before the first value lands.

is_extraction_activeboolean required

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.

deleted_atstring nullable required

ISO 8601 timestamp of the soft delete, or null for a live row. Only rows requested with include_deleted=true can carry a value.

removed_as_duplicate_atstring nullable required

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.

valuesobject required

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.

Example response

{
  "name": "Acme MSA (2024)",
  "file_name": "acme-msa-2024.pdf",
  "source_provider": "manual_upload"
}

Changes

No recorded changes to this operation across all 1 revision of this API.