API ReferenceDocument
document.create
Type: Mutation · Auth: Workspace-aware
Input
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| customerId | string | No | — | ID of the associated customer |
| vendorId | string | No | — | ID of the associated vendor |
| siteId | string | No | — | ID of the associated site |
| relatedEntityType | string | No | — | Related entity type |
| relatedEntityId | string | No | — | ID of the associated related entity |
| documentType | enum(proposal, contract, drawing, as_built, submittal, report, invoice, photo_set, configuration, certificate, permit, product_manual, other) | Yes | — | Document type |
| filename | string | Yes | — | Filename |
| objectStorageKey | string | Yes | — | Object storage key |
| mimeType | string | No | — | Mime type |
| uploadedByUserId | string | No | — | ID of the associated uploaded by user |
| documentDate | string.date-time | No | — | Document date |
| version | integer | Yes | 1 | Version |
| extractionStatus | enum(pending, processing, completed, failed, not_applicable) | Yes | "pending" | Extraction status |
| aiSummary | string | No | — | Ai summary |
| classificationTags | string[] | No | — | Classification tags |
| workspaceId | string | No | — | ID of the associated workspace |
| visibilityMode | enum(global, workspace_local, shared) | Yes | "workspace_local" | Visibility mode |
Example
{
"customerId": "550e8400-e29b-41d4-a716-446655440000",
"vendorId": "550e8400-e29b-41d4-a716-446655440000",
"siteId": "550e8400-e29b-41d4-a716-446655440000",
"relatedEntityType": "example",
"relatedEntityId": "550e8400-e29b-41d4-a716-446655440000",
"documentType": "proposal",
"filename": "example",
"objectStorageKey": "example",
"version": 1,
"extractionStatus": "pending",
"visibilityMode": "global"
}