Create a new document with file content
Parameters
household_id: str
Household ID this document belongs to
name: str
Display name of the document
client_profile_id: Optional[str]
Client profile ID if associated with an individual
Whether this document should be used for AI suggestions
entity_id: Optional[str]
Entity ID if this document is owned by an entity
Returns
Upload a new document
from withluminary import Luminary
client = Luminary()
document = client.documents.create(
file=b"raw file contents",
household_id="household_01ARZ3NDEKTSV4RRFFQ69G5FAV",
name="Trust Agreement.pdf",
type="GRAT_DESIGN_SUMMARY",
)
print(document.id)
{
"id": "document_01ARZ3NDEKTSV4RRFFQ69G5FAV",
"created_at": "2024-01-15T09:30:00Z",
"household_id": "household_01ARZ3NDEKTSV4RRFFQ69G5FAV",
"name": "Trust Agreement.pdf",
"type": "GRAT_DESIGN_SUMMARY",
"updated_at": "2024-01-20T14:45:00Z",
"client_profile_id": "client_profile_01ARZ3NDEKTSV4RRFFQ69G5FAV",
"enable_ai_suggestions": true,
"entity_id": "entity_01ARZ3NDEKTSV4RRFFQ69G5FAV"
}
Returns Examples
{
"id": "document_01ARZ3NDEKTSV4RRFFQ69G5FAV",
"created_at": "2024-01-15T09:30:00Z",
"household_id": "household_01ARZ3NDEKTSV4RRFFQ69G5FAV",
"name": "Trust Agreement.pdf",
"type": "GRAT_DESIGN_SUMMARY",
"updated_at": "2024-01-20T14:45:00Z",
"client_profile_id": "client_profile_01ARZ3NDEKTSV4RRFFQ69G5FAV",
"enable_ai_suggestions": true,
"entity_id": "entity_01ARZ3NDEKTSV4RRFFQ69G5FAV"
}