canonical: https://jentic.com/apis/googleapis.com/contentwarehouse

# Google Document AI Warehouse API

Google Document AI Warehouse API stores, organises, and searches structured and unstructured business documents. It exposes location lifecycle, document and folder resources, document schemas that constrain extracted properties, and rule-based access policies. Documents can be uploaded directly or referenced from Cloud Storage and are then searchable by extracted entities, full text, and structured metadata. The API also supports linking documents into folders, creating semantic relationships, and integrating with Document AI processors for automatic property extraction.

## For AI agents

Upload, classify, search, and link enterprise documents in a managed warehouse so an agent can find and act on contracts, invoices, and forms by their extracted properties.

## Scope

Does not perform OCR, extract entities, or render documents - use for governed storage, schema-typed properties, and search of documents only.

## Capabilities

- Initialize and manage Document AI Warehouse locations per project
- Upload documents with structured properties or reference Cloud Storage URIs
- Define document schemas to constrain valid property types
- Search documents by full text, extracted entities, and metadata filters
- Organise documents into folders and link related documents together
- Apply ACL rules to restrict who can read or edit specific documents
- Update document properties as downstream Document AI processors enrich them

## Use cases

### Invoice Search and Retrieval

Finance uploads scanned invoices to Document AI Warehouse and runs Document AI processors that extract supplier, amount, and date as structured properties. Auditors then search by supplier name or date range without hand-tagging. Document AI Warehouse returns ranked matches with entity highlights.

Example prompt: Search documents in folder 'invoices' for property supplier='Acme Ltd' AND date>='2026-01-01', and return the top 10 matches with their resource names.

### Contract Lifecycle Vault

Legal stores executed contracts in Document AI Warehouse with extracted parties, effective date, and renewal date as schema-validated properties. A renewal alert job runs documents.search filtered to renewals in the next 60 days. Each contract is access-controlled with rules so only the owning team can read it.

Example prompt: Search documents with schema=Contract where renewalDate is within the next 60 days, and return parties and renewalDate for each match.

### Multi-Tenant Document Isolation

A B2B SaaS uses Document AI Warehouse to host documents on behalf of customers, with strict per-tenant ACLs enforced through document rules. The API's rule-based access controls ensure that one tenant's search never returns another tenant's documents, even if both share the same location resource.

Example prompt: Create a document for tenant 'tenant-42' with rule restricting read access to group tenant42-readers@example.com, and confirm the rule applied.

### AI Agent Document Q&A

A customer support AI agent receives a question that requires policy lookup. The agent asks Jentic to search Document AI Warehouse for the relevant policy document, retrieves the matching property values, and answers. Jentic isolates the Google service account credential and rotates tokens per call.

Example prompt: Search documents with schema=Policy and full-text query 'refund window', return the top 3 documents and their summary properties.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /v1/{+location}:initialize | Initialize a Document AI Warehouse location |
| GET | /v1/{+location}:getStatus | Get initialization status for a location |
| GET | /v1/{+name} | Get a document, schema, or folder resource |
| POST | /v1/{+name}:get | Fetch a document with optional ACL evaluation |
| POST | /v1/{+name}:delete | Delete a document |

## Key resources

- **Locations** — Per-project regional warehouse instances initialised before any document operations
- **Documents** — Individual document records with content reference and structured properties
- **Document Schemas** — Type definitions that constrain property names and value types per document class
- **Folders** — Organisational containers for grouping related documents
- **Rules** — Access control entries restricting read or edit permissions on documents

## Why Jentic

- **Setup:** Wiring Document AI Warehouse by hand means setting up Google OAuth, minting short-lived tokens from a service account instead of an embedded JSON key, and addressing location and document resources on contentwarehouse.googleapis.com. Through Jentic you install once, import the Document AI Warehouse API from the API Directory, store the Google credential once, and your agent calls it.
- **Permission scoping:** The API carries the location and document name in the URL path (/v1/{location} and /v1/{name}), so a rule can pin your agent to one location or document. You choose the operations it may call, so it can get and search documents while document deletion is not included unless you add it.
- **Credential handling:** Your Google service account credential is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'find a document by property', and Jentic returns the matching Document AI Warehouse operation with its filter syntax and input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Google Cloud Storage API** — Holds the raw document files referenced by Document AI Warehouse
- **Google Cloud Data Catalog API** — Catalogues structured datasets rather than documents
- **Google Drive API** — Consumer and workspace-grade document storage and sharing

## FAQ

### What authentication does the Document AI Warehouse API use?

The Document AI Warehouse API uses Google OAuth 2.0 with the cloud-platform scope. Through Jentic the service account credentials are stored encrypted in your Jentic One instance and the agent receives scoped access tokens minted per call.

### Can I search documents by extracted properties with Document AI Warehouse?

Yes. Once a document has properties (set manually at upload or extracted by a Document AI processor), use the documents.search endpoint with a structured filter referencing schema property names. Results return ranked documents with the matching property values.

### What are the rate limits for the Document AI Warehouse API?

Document AI Warehouse applies per-project quotas with stricter caps on documents.create and documents.search than on metadata reads. Inspect the Cloud Console Quotas page for the precise per-method limits in your project.

### How do I search documents by property through Jentic?

Run pip install jentic, search Jentic for 'search document ai warehouse', load the schema for the documents.search operation on contentwarehouse.googleapis.com, and execute it with your location name and a property filter.

### Does Document AI Warehouse run OCR or extract entities itself?

No. The warehouse stores and serves documents and their structured properties. Extraction happens via Document AI processors that you invoke separately and then write the results back as document properties.

### Can I limit what my agent is allowed to do with the Google Document AI Warehouse API?

Yes. Because you run Jentic One yourself, your own rules decide which Document AI Warehouse operations and credentials the agent may use. Since the API carries the location and document name in the URL path, you can pin the agent to a single location or document and let it get and search documents while leaving out document deletion. Only the operations you allow are callable, so the agent can read and query your warehouse without gaining the ability to remove records.
