# Documents ## List all documents `client.Documents.List(ctx, query) (*CursorPagination[Document], error)` **get** `/documents` Retrieve a paginated list of documents using cursor-based pagination ### Parameters - `query DocumentListParams` - `After param.Field[string]` Cursor for forward pagination. Returns items after this cursor. - `Before param.Field[string]` Cursor for backward pagination. Returns items before this cursor. - `HouseholdID param.Field[string]` Filter documents by household ID - `Limit param.Field[int64]` Maximum number of items to return - `Type param.Field[DocumentType]` Filter by document type ### Returns - `type Document struct{…}` - `ID string` Unique identifier with document_ prefix - `CreatedAt Time` Timestamp when the document was created - `HouseholdID string` Household ID this document belongs to - `Name string` Display name of the document - `Type DocumentType` Type of document - `const DocumentTypeGratDesignSummary DocumentType = "GRAT_DESIGN_SUMMARY"` - `const DocumentTypeGeneratedPresentation DocumentType = "GENERATED_PRESENTATION"` - `const DocumentTypeAssetValuation DocumentType = "ASSET_VALUATION"` - `const DocumentTypeSignedTrustDocument DocumentType = "SIGNED_TRUST_DOCUMENT"` - `const DocumentTypeTrustAmendment DocumentType = "TRUST_AMENDMENT"` - `const DocumentTypeTransferConfirmation DocumentType = "TRANSFER_CONFIRMATION"` - `const DocumentTypeExistingRemainderTrustDocument DocumentType = "EXISTING_REMAINDER_TRUST_DOCUMENT"` - `const DocumentTypeBalanceSheet DocumentType = "BALANCE_SHEET"` - `const DocumentTypeWill DocumentType = "WILL"` - `const DocumentTypeWillCodicil DocumentType = "WILL_CODICIL"` - `const DocumentTypePowerOfAttorney DocumentType = "POWER_OF_ATTORNEY"` - `const DocumentTypeAssignmentOfInterest DocumentType = "ASSIGNMENT_OF_INTEREST"` - `const DocumentTypeAssignmentOfTangibleProperty DocumentType = "ASSIGNMENT_OF_TANGIBLE_PROPERTY"` - `const DocumentTypeLoanNoteAgreement DocumentType = "LOAN_NOTE_AGREEMENT"` - `const DocumentTypeArticlesOfIncorporation DocumentType = "ARTICLES_OF_INCORPORATION"` - `const DocumentTypeOperatingAgreement DocumentType = "OPERATING_AGREEMENT"` - `const DocumentTypePartnershipAgreement DocumentType = "PARTNERSHIP_AGREEMENT"` - `const DocumentTypeAccountDocumentationStatement DocumentType = "ACCOUNT_DOCUMENTATION_STATEMENT"` - `const DocumentTypeTaxIDConfirmation DocumentType = "TAX_ID_CONFIRMATION"` - `const DocumentTypeGiftTaxReturn DocumentType = "GIFT_TAX_RETURN"` - `const DocumentTypeIncomeTaxReturn DocumentType = "INCOME_TAX_RETURN"` - `const DocumentTypeTaxReceipt DocumentType = "TAX_RECEIPT"` - `const DocumentTypeTaxFiling DocumentType = "TAX_FILING"` - `const DocumentTypeCorporateBylaws DocumentType = "CORPORATE_BYLAWS"` - `const DocumentTypeLlcAgreement DocumentType = "LLC_AGREEMENT"` - `const DocumentTypeLlcAgreementAmendment DocumentType = "LLC_AGREEMENT_AMENDMENT"` - `const DocumentTypeOperatingAgreementAmendment DocumentType = "OPERATING_AGREEMENT_AMENDMENT"` - `const DocumentTypePartnershipAgreementAmendment DocumentType = "PARTNERSHIP_AGREEMENT_AMENDMENT"` - `const DocumentTypeShareholdersAgreement DocumentType = "SHAREHOLDERS_AGREEMENT"` - `const DocumentTypeStateBusinessFiling DocumentType = "STATE_BUSINESS_FILING"` - `const DocumentTypeLoggedContribution DocumentType = "LOGGED_CONTRIBUTION"` - `const DocumentTypeLoggedDistribution DocumentType = "LOGGED_DISTRIBUTION"` - `const DocumentTypeInsurancePolicy DocumentType = "INSURANCE_POLICY"` - `const DocumentTypeCrummeyLetter DocumentType = "CRUMMEY_LETTER"` - `const DocumentTypeInsurancePremiumPayment DocumentType = "INSURANCE_PREMIUM_PAYMENT"` - `const DocumentTypeBeneficialOwnershipInformationReport DocumentType = "BENEFICIAL_OWNERSHIP_INFORMATION_REPORT"` - `const DocumentTypeFincenFiling DocumentType = "FINCEN_FILING"` - `const DocumentTypeHealthcareProxy DocumentType = "HEALTHCARE_PROXY"` - `const DocumentTypeLivingWill DocumentType = "LIVING_WILL"` - `const DocumentTypeDriversLicense DocumentType = "DRIVERS_LICENSE"` - `const DocumentTypePassport DocumentType = "PASSPORT"` - `const DocumentTypeDeed DocumentType = "DEED"` - `const DocumentTypeOther DocumentType = "OTHER"` - `UpdatedAt Time` Timestamp when the document was last updated - `EnableAISuggestions bool` Whether this document should be used for AI suggestions - `EntityID string` Entity ID if this document is owned by an entity - `IndividualID string` Individual ID if this document is associated with an individual ### Example ```go package main import ( "context" "fmt" "github.com/withluminary/go-sdk" "github.com/withluminary/go-sdk/option" ) func main() { client := withluminary.NewClient( option.WithClientID("My Client ID"), option.WithClientSecret("My Client Secret"), ) page, err := client.Documents.List(context.TODO(), withluminary.DocumentListParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", page) } ``` #### Response ```json { "data": [ { "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", "enable_ai_suggestions": true, "entity_id": "entity_01ARZ3NDEKTSV4RRFFQ69G5FAV", "individual_id": "client_profile_01ARZ3NDEKTSV4RRFFQ69G5FAV" } ], "page_info": { "has_next_page": true, "has_previous_page": false, "end_cursor": "eyJpZCI6ImhvdXNlaG9sZF8wMUFSWjNOREVLVFNWNFJSRkZRNjlHNUZBViJ9", "start_cursor": "eyJpZCI6ImhvdXNlaG9sZF8wMUFSWjNOREVLVFNWNFJSRkZRNjlHNUZBViJ9" }, "total_count": 100 } ``` ## Upload a new document `client.Documents.New(ctx, body) (*Document, error)` **post** `/documents` Create a new document with file content ### Parameters - `body DocumentNewParams` - `File param.Field[Reader]` The document file to upload - `HouseholdID param.Field[string]` Household ID this document belongs to - `Name param.Field[string]` Display name of the document - `Type param.Field[DocumentType]` Type of document - `EnableAISuggestions param.Field[bool]` Whether this document should be used for AI suggestions - `EntityID param.Field[string]` Entity ID if this document is owned by an entity - `IndividualID param.Field[string]` Individual ID if associated with an individual ### Returns - `type Document struct{…}` - `ID string` Unique identifier with document_ prefix - `CreatedAt Time` Timestamp when the document was created - `HouseholdID string` Household ID this document belongs to - `Name string` Display name of the document - `Type DocumentType` Type of document - `const DocumentTypeGratDesignSummary DocumentType = "GRAT_DESIGN_SUMMARY"` - `const DocumentTypeGeneratedPresentation DocumentType = "GENERATED_PRESENTATION"` - `const DocumentTypeAssetValuation DocumentType = "ASSET_VALUATION"` - `const DocumentTypeSignedTrustDocument DocumentType = "SIGNED_TRUST_DOCUMENT"` - `const DocumentTypeTrustAmendment DocumentType = "TRUST_AMENDMENT"` - `const DocumentTypeTransferConfirmation DocumentType = "TRANSFER_CONFIRMATION"` - `const DocumentTypeExistingRemainderTrustDocument DocumentType = "EXISTING_REMAINDER_TRUST_DOCUMENT"` - `const DocumentTypeBalanceSheet DocumentType = "BALANCE_SHEET"` - `const DocumentTypeWill DocumentType = "WILL"` - `const DocumentTypeWillCodicil DocumentType = "WILL_CODICIL"` - `const DocumentTypePowerOfAttorney DocumentType = "POWER_OF_ATTORNEY"` - `const DocumentTypeAssignmentOfInterest DocumentType = "ASSIGNMENT_OF_INTEREST"` - `const DocumentTypeAssignmentOfTangibleProperty DocumentType = "ASSIGNMENT_OF_TANGIBLE_PROPERTY"` - `const DocumentTypeLoanNoteAgreement DocumentType = "LOAN_NOTE_AGREEMENT"` - `const DocumentTypeArticlesOfIncorporation DocumentType = "ARTICLES_OF_INCORPORATION"` - `const DocumentTypeOperatingAgreement DocumentType = "OPERATING_AGREEMENT"` - `const DocumentTypePartnershipAgreement DocumentType = "PARTNERSHIP_AGREEMENT"` - `const DocumentTypeAccountDocumentationStatement DocumentType = "ACCOUNT_DOCUMENTATION_STATEMENT"` - `const DocumentTypeTaxIDConfirmation DocumentType = "TAX_ID_CONFIRMATION"` - `const DocumentTypeGiftTaxReturn DocumentType = "GIFT_TAX_RETURN"` - `const DocumentTypeIncomeTaxReturn DocumentType = "INCOME_TAX_RETURN"` - `const DocumentTypeTaxReceipt DocumentType = "TAX_RECEIPT"` - `const DocumentTypeTaxFiling DocumentType = "TAX_FILING"` - `const DocumentTypeCorporateBylaws DocumentType = "CORPORATE_BYLAWS"` - `const DocumentTypeLlcAgreement DocumentType = "LLC_AGREEMENT"` - `const DocumentTypeLlcAgreementAmendment DocumentType = "LLC_AGREEMENT_AMENDMENT"` - `const DocumentTypeOperatingAgreementAmendment DocumentType = "OPERATING_AGREEMENT_AMENDMENT"` - `const DocumentTypePartnershipAgreementAmendment DocumentType = "PARTNERSHIP_AGREEMENT_AMENDMENT"` - `const DocumentTypeShareholdersAgreement DocumentType = "SHAREHOLDERS_AGREEMENT"` - `const DocumentTypeStateBusinessFiling DocumentType = "STATE_BUSINESS_FILING"` - `const DocumentTypeLoggedContribution DocumentType = "LOGGED_CONTRIBUTION"` - `const DocumentTypeLoggedDistribution DocumentType = "LOGGED_DISTRIBUTION"` - `const DocumentTypeInsurancePolicy DocumentType = "INSURANCE_POLICY"` - `const DocumentTypeCrummeyLetter DocumentType = "CRUMMEY_LETTER"` - `const DocumentTypeInsurancePremiumPayment DocumentType = "INSURANCE_PREMIUM_PAYMENT"` - `const DocumentTypeBeneficialOwnershipInformationReport DocumentType = "BENEFICIAL_OWNERSHIP_INFORMATION_REPORT"` - `const DocumentTypeFincenFiling DocumentType = "FINCEN_FILING"` - `const DocumentTypeHealthcareProxy DocumentType = "HEALTHCARE_PROXY"` - `const DocumentTypeLivingWill DocumentType = "LIVING_WILL"` - `const DocumentTypeDriversLicense DocumentType = "DRIVERS_LICENSE"` - `const DocumentTypePassport DocumentType = "PASSPORT"` - `const DocumentTypeDeed DocumentType = "DEED"` - `const DocumentTypeOther DocumentType = "OTHER"` - `UpdatedAt Time` Timestamp when the document was last updated - `EnableAISuggestions bool` Whether this document should be used for AI suggestions - `EntityID string` Entity ID if this document is owned by an entity - `IndividualID string` Individual ID if this document is associated with an individual ### Example ```go package main import ( "bytes" "context" "fmt" "io" "github.com/withluminary/go-sdk" "github.com/withluminary/go-sdk/option" ) func main() { client := withluminary.NewClient( option.WithClientID("My Client ID"), option.WithClientSecret("My Client Secret"), ) document, err := client.Documents.New(context.TODO(), withluminary.DocumentNewParams{ File: io.Reader(bytes.NewBuffer([]byte("Example data"))), HouseholdID: "household_01ARZ3NDEKTSV4RRFFQ69G5FAV", Name: "Trust Agreement.pdf", Type: withluminary.DocumentTypeGratDesignSummary, }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", document.ID) } ``` #### Response ```json { "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", "enable_ai_suggestions": true, "entity_id": "entity_01ARZ3NDEKTSV4RRFFQ69G5FAV", "individual_id": "client_profile_01ARZ3NDEKTSV4RRFFQ69G5FAV" } ``` ## Delete a document `client.Documents.Delete(ctx, id) error` **delete** `/documents/{id}` Soft delete a document (marks as deleted but preserves data) ### Parameters - `id string` ### Example ```go package main import ( "context" "github.com/withluminary/go-sdk" "github.com/withluminary/go-sdk/option" ) func main() { client := withluminary.NewClient( option.WithClientID("My Client ID"), option.WithClientSecret("My Client Secret"), ) err := client.Documents.Delete(context.TODO(), "id") if err != nil { panic(err.Error()) } } ``` ## Get a document by ID `client.Documents.Get(ctx, id) (*Document, error)` **get** `/documents/{id}` Retrieve document metadata ### Parameters - `id string` ### Returns - `type Document struct{…}` - `ID string` Unique identifier with document_ prefix - `CreatedAt Time` Timestamp when the document was created - `HouseholdID string` Household ID this document belongs to - `Name string` Display name of the document - `Type DocumentType` Type of document - `const DocumentTypeGratDesignSummary DocumentType = "GRAT_DESIGN_SUMMARY"` - `const DocumentTypeGeneratedPresentation DocumentType = "GENERATED_PRESENTATION"` - `const DocumentTypeAssetValuation DocumentType = "ASSET_VALUATION"` - `const DocumentTypeSignedTrustDocument DocumentType = "SIGNED_TRUST_DOCUMENT"` - `const DocumentTypeTrustAmendment DocumentType = "TRUST_AMENDMENT"` - `const DocumentTypeTransferConfirmation DocumentType = "TRANSFER_CONFIRMATION"` - `const DocumentTypeExistingRemainderTrustDocument DocumentType = "EXISTING_REMAINDER_TRUST_DOCUMENT"` - `const DocumentTypeBalanceSheet DocumentType = "BALANCE_SHEET"` - `const DocumentTypeWill DocumentType = "WILL"` - `const DocumentTypeWillCodicil DocumentType = "WILL_CODICIL"` - `const DocumentTypePowerOfAttorney DocumentType = "POWER_OF_ATTORNEY"` - `const DocumentTypeAssignmentOfInterest DocumentType = "ASSIGNMENT_OF_INTEREST"` - `const DocumentTypeAssignmentOfTangibleProperty DocumentType = "ASSIGNMENT_OF_TANGIBLE_PROPERTY"` - `const DocumentTypeLoanNoteAgreement DocumentType = "LOAN_NOTE_AGREEMENT"` - `const DocumentTypeArticlesOfIncorporation DocumentType = "ARTICLES_OF_INCORPORATION"` - `const DocumentTypeOperatingAgreement DocumentType = "OPERATING_AGREEMENT"` - `const DocumentTypePartnershipAgreement DocumentType = "PARTNERSHIP_AGREEMENT"` - `const DocumentTypeAccountDocumentationStatement DocumentType = "ACCOUNT_DOCUMENTATION_STATEMENT"` - `const DocumentTypeTaxIDConfirmation DocumentType = "TAX_ID_CONFIRMATION"` - `const DocumentTypeGiftTaxReturn DocumentType = "GIFT_TAX_RETURN"` - `const DocumentTypeIncomeTaxReturn DocumentType = "INCOME_TAX_RETURN"` - `const DocumentTypeTaxReceipt DocumentType = "TAX_RECEIPT"` - `const DocumentTypeTaxFiling DocumentType = "TAX_FILING"` - `const DocumentTypeCorporateBylaws DocumentType = "CORPORATE_BYLAWS"` - `const DocumentTypeLlcAgreement DocumentType = "LLC_AGREEMENT"` - `const DocumentTypeLlcAgreementAmendment DocumentType = "LLC_AGREEMENT_AMENDMENT"` - `const DocumentTypeOperatingAgreementAmendment DocumentType = "OPERATING_AGREEMENT_AMENDMENT"` - `const DocumentTypePartnershipAgreementAmendment DocumentType = "PARTNERSHIP_AGREEMENT_AMENDMENT"` - `const DocumentTypeShareholdersAgreement DocumentType = "SHAREHOLDERS_AGREEMENT"` - `const DocumentTypeStateBusinessFiling DocumentType = "STATE_BUSINESS_FILING"` - `const DocumentTypeLoggedContribution DocumentType = "LOGGED_CONTRIBUTION"` - `const DocumentTypeLoggedDistribution DocumentType = "LOGGED_DISTRIBUTION"` - `const DocumentTypeInsurancePolicy DocumentType = "INSURANCE_POLICY"` - `const DocumentTypeCrummeyLetter DocumentType = "CRUMMEY_LETTER"` - `const DocumentTypeInsurancePremiumPayment DocumentType = "INSURANCE_PREMIUM_PAYMENT"` - `const DocumentTypeBeneficialOwnershipInformationReport DocumentType = "BENEFICIAL_OWNERSHIP_INFORMATION_REPORT"` - `const DocumentTypeFincenFiling DocumentType = "FINCEN_FILING"` - `const DocumentTypeHealthcareProxy DocumentType = "HEALTHCARE_PROXY"` - `const DocumentTypeLivingWill DocumentType = "LIVING_WILL"` - `const DocumentTypeDriversLicense DocumentType = "DRIVERS_LICENSE"` - `const DocumentTypePassport DocumentType = "PASSPORT"` - `const DocumentTypeDeed DocumentType = "DEED"` - `const DocumentTypeOther DocumentType = "OTHER"` - `UpdatedAt Time` Timestamp when the document was last updated - `EnableAISuggestions bool` Whether this document should be used for AI suggestions - `EntityID string` Entity ID if this document is owned by an entity - `IndividualID string` Individual ID if this document is associated with an individual ### Example ```go package main import ( "context" "fmt" "github.com/withluminary/go-sdk" "github.com/withluminary/go-sdk/option" ) func main() { client := withluminary.NewClient( option.WithClientID("My Client ID"), option.WithClientSecret("My Client Secret"), ) document, err := client.Documents.Get(context.TODO(), "id") if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", document.ID) } ``` #### Response ```json { "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", "enable_ai_suggestions": true, "entity_id": "entity_01ARZ3NDEKTSV4RRFFQ69G5FAV", "individual_id": "client_profile_01ARZ3NDEKTSV4RRFFQ69G5FAV" } ``` ## Update a document `client.Documents.Update(ctx, id, body) (*Document, error)` **put** `/documents/{id}` Update document metadata only ### Parameters - `id string` - `body DocumentUpdateParams` - `EnableAISuggestions param.Field[bool]` Whether this document should be used for AI suggestions - `EntityID param.Field[string]` Entity ID if this document is owned by an entity - `IndividualID param.Field[string]` Individual ID if associated with an individual - `Name param.Field[string]` Display name of the document - `Type param.Field[DocumentType]` Type of document ### Returns - `type Document struct{…}` - `ID string` Unique identifier with document_ prefix - `CreatedAt Time` Timestamp when the document was created - `HouseholdID string` Household ID this document belongs to - `Name string` Display name of the document - `Type DocumentType` Type of document - `const DocumentTypeGratDesignSummary DocumentType = "GRAT_DESIGN_SUMMARY"` - `const DocumentTypeGeneratedPresentation DocumentType = "GENERATED_PRESENTATION"` - `const DocumentTypeAssetValuation DocumentType = "ASSET_VALUATION"` - `const DocumentTypeSignedTrustDocument DocumentType = "SIGNED_TRUST_DOCUMENT"` - `const DocumentTypeTrustAmendment DocumentType = "TRUST_AMENDMENT"` - `const DocumentTypeTransferConfirmation DocumentType = "TRANSFER_CONFIRMATION"` - `const DocumentTypeExistingRemainderTrustDocument DocumentType = "EXISTING_REMAINDER_TRUST_DOCUMENT"` - `const DocumentTypeBalanceSheet DocumentType = "BALANCE_SHEET"` - `const DocumentTypeWill DocumentType = "WILL"` - `const DocumentTypeWillCodicil DocumentType = "WILL_CODICIL"` - `const DocumentTypePowerOfAttorney DocumentType = "POWER_OF_ATTORNEY"` - `const DocumentTypeAssignmentOfInterest DocumentType = "ASSIGNMENT_OF_INTEREST"` - `const DocumentTypeAssignmentOfTangibleProperty DocumentType = "ASSIGNMENT_OF_TANGIBLE_PROPERTY"` - `const DocumentTypeLoanNoteAgreement DocumentType = "LOAN_NOTE_AGREEMENT"` - `const DocumentTypeArticlesOfIncorporation DocumentType = "ARTICLES_OF_INCORPORATION"` - `const DocumentTypeOperatingAgreement DocumentType = "OPERATING_AGREEMENT"` - `const DocumentTypePartnershipAgreement DocumentType = "PARTNERSHIP_AGREEMENT"` - `const DocumentTypeAccountDocumentationStatement DocumentType = "ACCOUNT_DOCUMENTATION_STATEMENT"` - `const DocumentTypeTaxIDConfirmation DocumentType = "TAX_ID_CONFIRMATION"` - `const DocumentTypeGiftTaxReturn DocumentType = "GIFT_TAX_RETURN"` - `const DocumentTypeIncomeTaxReturn DocumentType = "INCOME_TAX_RETURN"` - `const DocumentTypeTaxReceipt DocumentType = "TAX_RECEIPT"` - `const DocumentTypeTaxFiling DocumentType = "TAX_FILING"` - `const DocumentTypeCorporateBylaws DocumentType = "CORPORATE_BYLAWS"` - `const DocumentTypeLlcAgreement DocumentType = "LLC_AGREEMENT"` - `const DocumentTypeLlcAgreementAmendment DocumentType = "LLC_AGREEMENT_AMENDMENT"` - `const DocumentTypeOperatingAgreementAmendment DocumentType = "OPERATING_AGREEMENT_AMENDMENT"` - `const DocumentTypePartnershipAgreementAmendment DocumentType = "PARTNERSHIP_AGREEMENT_AMENDMENT"` - `const DocumentTypeShareholdersAgreement DocumentType = "SHAREHOLDERS_AGREEMENT"` - `const DocumentTypeStateBusinessFiling DocumentType = "STATE_BUSINESS_FILING"` - `const DocumentTypeLoggedContribution DocumentType = "LOGGED_CONTRIBUTION"` - `const DocumentTypeLoggedDistribution DocumentType = "LOGGED_DISTRIBUTION"` - `const DocumentTypeInsurancePolicy DocumentType = "INSURANCE_POLICY"` - `const DocumentTypeCrummeyLetter DocumentType = "CRUMMEY_LETTER"` - `const DocumentTypeInsurancePremiumPayment DocumentType = "INSURANCE_PREMIUM_PAYMENT"` - `const DocumentTypeBeneficialOwnershipInformationReport DocumentType = "BENEFICIAL_OWNERSHIP_INFORMATION_REPORT"` - `const DocumentTypeFincenFiling DocumentType = "FINCEN_FILING"` - `const DocumentTypeHealthcareProxy DocumentType = "HEALTHCARE_PROXY"` - `const DocumentTypeLivingWill DocumentType = "LIVING_WILL"` - `const DocumentTypeDriversLicense DocumentType = "DRIVERS_LICENSE"` - `const DocumentTypePassport DocumentType = "PASSPORT"` - `const DocumentTypeDeed DocumentType = "DEED"` - `const DocumentTypeOther DocumentType = "OTHER"` - `UpdatedAt Time` Timestamp when the document was last updated - `EnableAISuggestions bool` Whether this document should be used for AI suggestions - `EntityID string` Entity ID if this document is owned by an entity - `IndividualID string` Individual ID if this document is associated with an individual ### Example ```go package main import ( "context" "fmt" "github.com/withluminary/go-sdk" "github.com/withluminary/go-sdk/option" ) func main() { client := withluminary.NewClient( option.WithClientID("My Client ID"), option.WithClientSecret("My Client Secret"), ) document, err := client.Documents.Update( context.TODO(), "id", withluminary.DocumentUpdateParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", document.ID) } ``` #### Response ```json { "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", "enable_ai_suggestions": true, "entity_id": "entity_01ARZ3NDEKTSV4RRFFQ69G5FAV", "individual_id": "client_profile_01ARZ3NDEKTSV4RRFFQ69G5FAV" } ``` ## Get summaries for a document `client.Documents.GetSummaries(ctx, id) (*DocumentGetSummariesResponse, error)` **get** `/documents/{id}/document-summaries` Retrieve all summaries associated with a specific document ### Parameters - `id string` ### Returns - `type DocumentGetSummariesResponse struct{…}` - `Data []DocumentSummary` - `ID string` Unique identifier for the document summary - `CreatedAt Time` Timestamp when the summary was created - `DisplayName string` Display name for the summary - `DocumentID string` ID of the document this summary belongs to - `HouseholdID string` ID of the household this summary belongs to - `Summary string` The summary text content - `UpdatedAt Time` Timestamp when the summary was last updated - `EntryMode DocumentSummaryEntryMode` Indicates if the summary was AI-generated or user-entered - `const DocumentSummaryEntryModeAIAuto DocumentSummaryEntryMode = "AI_AUTO"` - `const DocumentSummaryEntryModeUser DocumentSummaryEntryMode = "USER"` - `SummaryFormat DocumentSummaryFormat` Format of the summary content - `const DocumentSummaryFormatMarkdown DocumentSummaryFormat = "MARKDOWN"` - `const DocumentSummaryFormatPlainText DocumentSummaryFormat = "PLAIN_TEXT"` ### Example ```go package main import ( "context" "fmt" "github.com/withluminary/go-sdk" "github.com/withluminary/go-sdk/option" ) func main() { client := withluminary.NewClient( option.WithClientID("My Client ID"), option.WithClientSecret("My Client Secret"), ) response, err := client.Documents.GetSummaries(context.TODO(), "id") if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": [ { "id": "document_summary_01ARZ3NDEKTSV4RRFFQ69G5FAV", "created_at": "2019-12-27T18:11:19.117Z", "display_name": "Default summary", "document_id": "document_01ARZ3NDEKTSV4RRFFQ69G5FAV", "household_id": "household_01ARZ3NDEKTSV4RRFFQ69G5FAV", "summary": "summary", "updated_at": "2019-12-27T18:11:19.117Z", "entry_mode": "AI_AUTO", "summary_format": "MARKDOWN" } ] } ``` ## Download document file content `client.Documents.Download(ctx, id) (*Response, error)` **get** `/documents/{id}/download` Download the binary content of the document file ### Parameters - `id string` ### Returns - `type DocumentDownloadResponse interface{…}` ### Example ```go package main import ( "context" "fmt" "github.com/withluminary/go-sdk" "github.com/withluminary/go-sdk/option" ) func main() { client := withluminary.NewClient( option.WithClientID("My Client ID"), option.WithClientSecret("My Client Secret"), ) response, err := client.Documents.Download(context.TODO(), "id") if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response) } ``` ## Domain Types ### Document - `type Document struct{…}` - `ID string` Unique identifier with document_ prefix - `CreatedAt Time` Timestamp when the document was created - `HouseholdID string` Household ID this document belongs to - `Name string` Display name of the document - `Type DocumentType` Type of document - `const DocumentTypeGratDesignSummary DocumentType = "GRAT_DESIGN_SUMMARY"` - `const DocumentTypeGeneratedPresentation DocumentType = "GENERATED_PRESENTATION"` - `const DocumentTypeAssetValuation DocumentType = "ASSET_VALUATION"` - `const DocumentTypeSignedTrustDocument DocumentType = "SIGNED_TRUST_DOCUMENT"` - `const DocumentTypeTrustAmendment DocumentType = "TRUST_AMENDMENT"` - `const DocumentTypeTransferConfirmation DocumentType = "TRANSFER_CONFIRMATION"` - `const DocumentTypeExistingRemainderTrustDocument DocumentType = "EXISTING_REMAINDER_TRUST_DOCUMENT"` - `const DocumentTypeBalanceSheet DocumentType = "BALANCE_SHEET"` - `const DocumentTypeWill DocumentType = "WILL"` - `const DocumentTypeWillCodicil DocumentType = "WILL_CODICIL"` - `const DocumentTypePowerOfAttorney DocumentType = "POWER_OF_ATTORNEY"` - `const DocumentTypeAssignmentOfInterest DocumentType = "ASSIGNMENT_OF_INTEREST"` - `const DocumentTypeAssignmentOfTangibleProperty DocumentType = "ASSIGNMENT_OF_TANGIBLE_PROPERTY"` - `const DocumentTypeLoanNoteAgreement DocumentType = "LOAN_NOTE_AGREEMENT"` - `const DocumentTypeArticlesOfIncorporation DocumentType = "ARTICLES_OF_INCORPORATION"` - `const DocumentTypeOperatingAgreement DocumentType = "OPERATING_AGREEMENT"` - `const DocumentTypePartnershipAgreement DocumentType = "PARTNERSHIP_AGREEMENT"` - `const DocumentTypeAccountDocumentationStatement DocumentType = "ACCOUNT_DOCUMENTATION_STATEMENT"` - `const DocumentTypeTaxIDConfirmation DocumentType = "TAX_ID_CONFIRMATION"` - `const DocumentTypeGiftTaxReturn DocumentType = "GIFT_TAX_RETURN"` - `const DocumentTypeIncomeTaxReturn DocumentType = "INCOME_TAX_RETURN"` - `const DocumentTypeTaxReceipt DocumentType = "TAX_RECEIPT"` - `const DocumentTypeTaxFiling DocumentType = "TAX_FILING"` - `const DocumentTypeCorporateBylaws DocumentType = "CORPORATE_BYLAWS"` - `const DocumentTypeLlcAgreement DocumentType = "LLC_AGREEMENT"` - `const DocumentTypeLlcAgreementAmendment DocumentType = "LLC_AGREEMENT_AMENDMENT"` - `const DocumentTypeOperatingAgreementAmendment DocumentType = "OPERATING_AGREEMENT_AMENDMENT"` - `const DocumentTypePartnershipAgreementAmendment DocumentType = "PARTNERSHIP_AGREEMENT_AMENDMENT"` - `const DocumentTypeShareholdersAgreement DocumentType = "SHAREHOLDERS_AGREEMENT"` - `const DocumentTypeStateBusinessFiling DocumentType = "STATE_BUSINESS_FILING"` - `const DocumentTypeLoggedContribution DocumentType = "LOGGED_CONTRIBUTION"` - `const DocumentTypeLoggedDistribution DocumentType = "LOGGED_DISTRIBUTION"` - `const DocumentTypeInsurancePolicy DocumentType = "INSURANCE_POLICY"` - `const DocumentTypeCrummeyLetter DocumentType = "CRUMMEY_LETTER"` - `const DocumentTypeInsurancePremiumPayment DocumentType = "INSURANCE_PREMIUM_PAYMENT"` - `const DocumentTypeBeneficialOwnershipInformationReport DocumentType = "BENEFICIAL_OWNERSHIP_INFORMATION_REPORT"` - `const DocumentTypeFincenFiling DocumentType = "FINCEN_FILING"` - `const DocumentTypeHealthcareProxy DocumentType = "HEALTHCARE_PROXY"` - `const DocumentTypeLivingWill DocumentType = "LIVING_WILL"` - `const DocumentTypeDriversLicense DocumentType = "DRIVERS_LICENSE"` - `const DocumentTypePassport DocumentType = "PASSPORT"` - `const DocumentTypeDeed DocumentType = "DEED"` - `const DocumentTypeOther DocumentType = "OTHER"` - `UpdatedAt Time` Timestamp when the document was last updated - `EnableAISuggestions bool` Whether this document should be used for AI suggestions - `EntityID string` Entity ID if this document is owned by an entity - `IndividualID string` Individual ID if this document is associated with an individual ### Document List - `type DocumentList struct{…}` - `Data []Document` - `ID string` Unique identifier with document_ prefix - `CreatedAt Time` Timestamp when the document was created - `HouseholdID string` Household ID this document belongs to - `Name string` Display name of the document - `Type DocumentType` Type of document - `const DocumentTypeGratDesignSummary DocumentType = "GRAT_DESIGN_SUMMARY"` - `const DocumentTypeGeneratedPresentation DocumentType = "GENERATED_PRESENTATION"` - `const DocumentTypeAssetValuation DocumentType = "ASSET_VALUATION"` - `const DocumentTypeSignedTrustDocument DocumentType = "SIGNED_TRUST_DOCUMENT"` - `const DocumentTypeTrustAmendment DocumentType = "TRUST_AMENDMENT"` - `const DocumentTypeTransferConfirmation DocumentType = "TRANSFER_CONFIRMATION"` - `const DocumentTypeExistingRemainderTrustDocument DocumentType = "EXISTING_REMAINDER_TRUST_DOCUMENT"` - `const DocumentTypeBalanceSheet DocumentType = "BALANCE_SHEET"` - `const DocumentTypeWill DocumentType = "WILL"` - `const DocumentTypeWillCodicil DocumentType = "WILL_CODICIL"` - `const DocumentTypePowerOfAttorney DocumentType = "POWER_OF_ATTORNEY"` - `const DocumentTypeAssignmentOfInterest DocumentType = "ASSIGNMENT_OF_INTEREST"` - `const DocumentTypeAssignmentOfTangibleProperty DocumentType = "ASSIGNMENT_OF_TANGIBLE_PROPERTY"` - `const DocumentTypeLoanNoteAgreement DocumentType = "LOAN_NOTE_AGREEMENT"` - `const DocumentTypeArticlesOfIncorporation DocumentType = "ARTICLES_OF_INCORPORATION"` - `const DocumentTypeOperatingAgreement DocumentType = "OPERATING_AGREEMENT"` - `const DocumentTypePartnershipAgreement DocumentType = "PARTNERSHIP_AGREEMENT"` - `const DocumentTypeAccountDocumentationStatement DocumentType = "ACCOUNT_DOCUMENTATION_STATEMENT"` - `const DocumentTypeTaxIDConfirmation DocumentType = "TAX_ID_CONFIRMATION"` - `const DocumentTypeGiftTaxReturn DocumentType = "GIFT_TAX_RETURN"` - `const DocumentTypeIncomeTaxReturn DocumentType = "INCOME_TAX_RETURN"` - `const DocumentTypeTaxReceipt DocumentType = "TAX_RECEIPT"` - `const DocumentTypeTaxFiling DocumentType = "TAX_FILING"` - `const DocumentTypeCorporateBylaws DocumentType = "CORPORATE_BYLAWS"` - `const DocumentTypeLlcAgreement DocumentType = "LLC_AGREEMENT"` - `const DocumentTypeLlcAgreementAmendment DocumentType = "LLC_AGREEMENT_AMENDMENT"` - `const DocumentTypeOperatingAgreementAmendment DocumentType = "OPERATING_AGREEMENT_AMENDMENT"` - `const DocumentTypePartnershipAgreementAmendment DocumentType = "PARTNERSHIP_AGREEMENT_AMENDMENT"` - `const DocumentTypeShareholdersAgreement DocumentType = "SHAREHOLDERS_AGREEMENT"` - `const DocumentTypeStateBusinessFiling DocumentType = "STATE_BUSINESS_FILING"` - `const DocumentTypeLoggedContribution DocumentType = "LOGGED_CONTRIBUTION"` - `const DocumentTypeLoggedDistribution DocumentType = "LOGGED_DISTRIBUTION"` - `const DocumentTypeInsurancePolicy DocumentType = "INSURANCE_POLICY"` - `const DocumentTypeCrummeyLetter DocumentType = "CRUMMEY_LETTER"` - `const DocumentTypeInsurancePremiumPayment DocumentType = "INSURANCE_PREMIUM_PAYMENT"` - `const DocumentTypeBeneficialOwnershipInformationReport DocumentType = "BENEFICIAL_OWNERSHIP_INFORMATION_REPORT"` - `const DocumentTypeFincenFiling DocumentType = "FINCEN_FILING"` - `const DocumentTypeHealthcareProxy DocumentType = "HEALTHCARE_PROXY"` - `const DocumentTypeLivingWill DocumentType = "LIVING_WILL"` - `const DocumentTypeDriversLicense DocumentType = "DRIVERS_LICENSE"` - `const DocumentTypePassport DocumentType = "PASSPORT"` - `const DocumentTypeDeed DocumentType = "DEED"` - `const DocumentTypeOther DocumentType = "OTHER"` - `UpdatedAt Time` Timestamp when the document was last updated - `EnableAISuggestions bool` Whether this document should be used for AI suggestions - `EntityID string` Entity ID if this document is owned by an entity - `IndividualID string` Individual ID if this document is associated with an individual - `PageInfo PageInfo` - `HasNextPage bool` When paginating forwards, are there more items? - `HasPreviousPage bool` When paginating backwards, are there more items? - `EndCursor string` Cursor pointing to the last item in the current page - `StartCursor string` Cursor pointing to the first item in the current page - `TotalCount int64` Total number of items matching the query (across all pages) ### Document Type - `type DocumentType string` Type of document - `const DocumentTypeGratDesignSummary DocumentType = "GRAT_DESIGN_SUMMARY"` - `const DocumentTypeGeneratedPresentation DocumentType = "GENERATED_PRESENTATION"` - `const DocumentTypeAssetValuation DocumentType = "ASSET_VALUATION"` - `const DocumentTypeSignedTrustDocument DocumentType = "SIGNED_TRUST_DOCUMENT"` - `const DocumentTypeTrustAmendment DocumentType = "TRUST_AMENDMENT"` - `const DocumentTypeTransferConfirmation DocumentType = "TRANSFER_CONFIRMATION"` - `const DocumentTypeExistingRemainderTrustDocument DocumentType = "EXISTING_REMAINDER_TRUST_DOCUMENT"` - `const DocumentTypeBalanceSheet DocumentType = "BALANCE_SHEET"` - `const DocumentTypeWill DocumentType = "WILL"` - `const DocumentTypeWillCodicil DocumentType = "WILL_CODICIL"` - `const DocumentTypePowerOfAttorney DocumentType = "POWER_OF_ATTORNEY"` - `const DocumentTypeAssignmentOfInterest DocumentType = "ASSIGNMENT_OF_INTEREST"` - `const DocumentTypeAssignmentOfTangibleProperty DocumentType = "ASSIGNMENT_OF_TANGIBLE_PROPERTY"` - `const DocumentTypeLoanNoteAgreement DocumentType = "LOAN_NOTE_AGREEMENT"` - `const DocumentTypeArticlesOfIncorporation DocumentType = "ARTICLES_OF_INCORPORATION"` - `const DocumentTypeOperatingAgreement DocumentType = "OPERATING_AGREEMENT"` - `const DocumentTypePartnershipAgreement DocumentType = "PARTNERSHIP_AGREEMENT"` - `const DocumentTypeAccountDocumentationStatement DocumentType = "ACCOUNT_DOCUMENTATION_STATEMENT"` - `const DocumentTypeTaxIDConfirmation DocumentType = "TAX_ID_CONFIRMATION"` - `const DocumentTypeGiftTaxReturn DocumentType = "GIFT_TAX_RETURN"` - `const DocumentTypeIncomeTaxReturn DocumentType = "INCOME_TAX_RETURN"` - `const DocumentTypeTaxReceipt DocumentType = "TAX_RECEIPT"` - `const DocumentTypeTaxFiling DocumentType = "TAX_FILING"` - `const DocumentTypeCorporateBylaws DocumentType = "CORPORATE_BYLAWS"` - `const DocumentTypeLlcAgreement DocumentType = "LLC_AGREEMENT"` - `const DocumentTypeLlcAgreementAmendment DocumentType = "LLC_AGREEMENT_AMENDMENT"` - `const DocumentTypeOperatingAgreementAmendment DocumentType = "OPERATING_AGREEMENT_AMENDMENT"` - `const DocumentTypePartnershipAgreementAmendment DocumentType = "PARTNERSHIP_AGREEMENT_AMENDMENT"` - `const DocumentTypeShareholdersAgreement DocumentType = "SHAREHOLDERS_AGREEMENT"` - `const DocumentTypeStateBusinessFiling DocumentType = "STATE_BUSINESS_FILING"` - `const DocumentTypeLoggedContribution DocumentType = "LOGGED_CONTRIBUTION"` - `const DocumentTypeLoggedDistribution DocumentType = "LOGGED_DISTRIBUTION"` - `const DocumentTypeInsurancePolicy DocumentType = "INSURANCE_POLICY"` - `const DocumentTypeCrummeyLetter DocumentType = "CRUMMEY_LETTER"` - `const DocumentTypeInsurancePremiumPayment DocumentType = "INSURANCE_PREMIUM_PAYMENT"` - `const DocumentTypeBeneficialOwnershipInformationReport DocumentType = "BENEFICIAL_OWNERSHIP_INFORMATION_REPORT"` - `const DocumentTypeFincenFiling DocumentType = "FINCEN_FILING"` - `const DocumentTypeHealthcareProxy DocumentType = "HEALTHCARE_PROXY"` - `const DocumentTypeLivingWill DocumentType = "LIVING_WILL"` - `const DocumentTypeDriversLicense DocumentType = "DRIVERS_LICENSE"` - `const DocumentTypePassport DocumentType = "PASSPORT"` - `const DocumentTypeDeed DocumentType = "DEED"` - `const DocumentTypeOther DocumentType = "OTHER"`