# Entities ## List all entities `client.Entities.List(ctx, query) (*CursorPagination[Entity], error)` **get** `/entities` Retrieve a paginated list of entities (trusts, businesses, accounts, etc.) using cursor-based pagination ### Parameters - `query EntityListParams` - `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. - `ExternalID param.Field[string]` Filter by external ID (exact match within the caller's tenant) - `HouseholdID param.Field[string]` Filter entities by household ID - `Kind param.Field[EntityKind]` Filter by entity kind/type - `Limit param.Field[int64]` Maximum number of items to return ### Returns - `type Entity struct{…}` - `ID string` Unique identifier with entity_ prefix - `CreatedAt Time` Timestamp when the entity was created - `DisplayName string` Display name of the entity - `HouseholdID string` Household ID this entity belongs to - `InEstateStatus EntityInEstateStatus` Whether the entity is in or out of the estate - `const EntityInEstateStatusInEstate EntityInEstateStatus = "in_estate"` - `const EntityInEstateStatusOutOfEstate EntityInEstateStatus = "out_of_estate"` - `const EntityInEstateStatusNone EntityInEstateStatus = "none"` - `Kind EntityKind` Type of entity - determines the specific subtype and applicable fields - `const EntityKindRevocableTrust EntityKind = "REVOCABLE_TRUST"` - `const EntityKindIrrevocableTrust EntityKind = "IRREVOCABLE_TRUST"` - `const EntityKindSlatTrust EntityKind = "SLAT_TRUST"` - `const EntityKindIlitTrust EntityKind = "ILIT_TRUST"` - `const EntityKindQprtTrust EntityKind = "QPRT_TRUST"` - `const EntityKindGratTrust EntityKind = "GRAT_TRUST"` - `const EntityKindCrtTrust EntityKind = "CRT_TRUST"` - `const EntityKindCltTrust EntityKind = "CLT_TRUST"` - `const EntityKindIndividualPersonalAccount EntityKind = "INDIVIDUAL_PERSONAL_ACCOUNT"` - `const EntityKindJointPersonalAccount EntityKind = "JOINT_PERSONAL_ACCOUNT"` - `const EntityKindCustodialPersonalAccount EntityKind = "CUSTODIAL_PERSONAL_ACCOUNT"` - `const EntityKindInsurancePersonalAccount EntityKind = "INSURANCE_PERSONAL_ACCOUNT"` - `const EntityKindQualifiedTuitionPersonalAccount EntityKind = "QUALIFIED_TUITION_PERSONAL_ACCOUNT"` - `const EntityKindRetirementPersonalAccount EntityKind = "RETIREMENT_PERSONAL_ACCOUNT"` - `const EntityKindDonorAdvisedFund EntityKind = "DONOR_ADVISED_FUND"` - `const EntityKindPrivateFoundation EntityKind = "PRIVATE_FOUNDATION"` - `const EntityKindLlcBusinessEntity EntityKind = "LLC_BUSINESS_ENTITY"` - `const EntityKindLpBusinessEntity EntityKind = "LP_BUSINESS_ENTITY"` - `const EntityKindGpBusinessEntity EntityKind = "GP_BUSINESS_ENTITY"` - `const EntityKindSoleProprietorshipBusinessEntity EntityKind = "SOLE_PROPRIETORSHIP_BUSINESS_ENTITY"` - `const EntityKindScorpBusinessEntity EntityKind = "SCORP_BUSINESS_ENTITY"` - `const EntityKindCcorpBusinessEntity EntityKind = "CCORP_BUSINESS_ENTITY"` - `Stage EntityStage` Lifecycle stage of the entity - `const EntityStagePreCreated EntityStage = "PRE_CREATED"` - `const EntityStageAICreating EntityStage = "AI_CREATING"` - `const EntityStageAICreationFailed EntityStage = "AI_CREATION_FAILED"` - `const EntityStageAINeedsReview EntityStage = "AI_NEEDS_REVIEW"` - `const EntityStageDraft EntityStage = "DRAFT"` - `const EntityStageReadyForProposal EntityStage = "READY_FOR_PROPOSAL"` - `const EntityStageImplementation EntityStage = "IMPLEMENTATION"` - `const EntityStageActive EntityStage = "ACTIVE"` - `const EntityStageCompleted EntityStage = "COMPLETED"` - `const EntityStageArchived EntityStage = "ARCHIVED"` - `UpdatedAt Time` Timestamp when the entity was last updated - `ExternalID string` Customer-supplied identifier from an external system. Unique within the caller's tenant when set. ### 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.Entities.List(context.TODO(), withluminary.EntityListParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", page) } ``` #### Response ```json { "data": [ { "id": "entity_01ARZ3NDEKTSV4RRFFQ69G5FAV", "created_at": "2024-01-15T09:30:00Z", "display_name": "My Revocable Trust", "household_id": "household_01ARZ3NDEKTSV4RRFFQ69G5FAV", "in_estate_status": "in_estate", "kind": "REVOCABLE_TRUST", "stage": "PRE_CREATED", "updated_at": "2024-01-20T14:45:00Z", "external_id": "crm-entity-12345" } ], "page_info": { "has_next_page": true, "has_previous_page": false, "end_cursor": "eyJpZCI6ImhvdXNlaG9sZF8wMUFSWjNOREVLVFNWNFJSRkZRNjlHNUZBViJ9", "start_cursor": "eyJpZCI6ImhvdXNlaG9sZF8wMUFSWjNOREVLVFNWNFJSRkZRNjlHNUZBViJ9" }, "total_count": 100 } ``` ## Delete an entity `client.Entities.Delete(ctx, id) error` **delete** `/entities/{id}` Delete an entity and all of it's related 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.Entities.Delete(context.TODO(), "id") if err != nil { panic(err.Error()) } } ``` ## Get an entity by ID `client.Entities.Get(ctx, id) (*Entity, error)` **get** `/entities/{id}` Retrieve detailed information about a specific entity ### Parameters - `id string` ### Returns - `type Entity struct{…}` - `ID string` Unique identifier with entity_ prefix - `CreatedAt Time` Timestamp when the entity was created - `DisplayName string` Display name of the entity - `HouseholdID string` Household ID this entity belongs to - `InEstateStatus EntityInEstateStatus` Whether the entity is in or out of the estate - `const EntityInEstateStatusInEstate EntityInEstateStatus = "in_estate"` - `const EntityInEstateStatusOutOfEstate EntityInEstateStatus = "out_of_estate"` - `const EntityInEstateStatusNone EntityInEstateStatus = "none"` - `Kind EntityKind` Type of entity - determines the specific subtype and applicable fields - `const EntityKindRevocableTrust EntityKind = "REVOCABLE_TRUST"` - `const EntityKindIrrevocableTrust EntityKind = "IRREVOCABLE_TRUST"` - `const EntityKindSlatTrust EntityKind = "SLAT_TRUST"` - `const EntityKindIlitTrust EntityKind = "ILIT_TRUST"` - `const EntityKindQprtTrust EntityKind = "QPRT_TRUST"` - `const EntityKindGratTrust EntityKind = "GRAT_TRUST"` - `const EntityKindCrtTrust EntityKind = "CRT_TRUST"` - `const EntityKindCltTrust EntityKind = "CLT_TRUST"` - `const EntityKindIndividualPersonalAccount EntityKind = "INDIVIDUAL_PERSONAL_ACCOUNT"` - `const EntityKindJointPersonalAccount EntityKind = "JOINT_PERSONAL_ACCOUNT"` - `const EntityKindCustodialPersonalAccount EntityKind = "CUSTODIAL_PERSONAL_ACCOUNT"` - `const EntityKindInsurancePersonalAccount EntityKind = "INSURANCE_PERSONAL_ACCOUNT"` - `const EntityKindQualifiedTuitionPersonalAccount EntityKind = "QUALIFIED_TUITION_PERSONAL_ACCOUNT"` - `const EntityKindRetirementPersonalAccount EntityKind = "RETIREMENT_PERSONAL_ACCOUNT"` - `const EntityKindDonorAdvisedFund EntityKind = "DONOR_ADVISED_FUND"` - `const EntityKindPrivateFoundation EntityKind = "PRIVATE_FOUNDATION"` - `const EntityKindLlcBusinessEntity EntityKind = "LLC_BUSINESS_ENTITY"` - `const EntityKindLpBusinessEntity EntityKind = "LP_BUSINESS_ENTITY"` - `const EntityKindGpBusinessEntity EntityKind = "GP_BUSINESS_ENTITY"` - `const EntityKindSoleProprietorshipBusinessEntity EntityKind = "SOLE_PROPRIETORSHIP_BUSINESS_ENTITY"` - `const EntityKindScorpBusinessEntity EntityKind = "SCORP_BUSINESS_ENTITY"` - `const EntityKindCcorpBusinessEntity EntityKind = "CCORP_BUSINESS_ENTITY"` - `Stage EntityStage` Lifecycle stage of the entity - `const EntityStagePreCreated EntityStage = "PRE_CREATED"` - `const EntityStageAICreating EntityStage = "AI_CREATING"` - `const EntityStageAICreationFailed EntityStage = "AI_CREATION_FAILED"` - `const EntityStageAINeedsReview EntityStage = "AI_NEEDS_REVIEW"` - `const EntityStageDraft EntityStage = "DRAFT"` - `const EntityStageReadyForProposal EntityStage = "READY_FOR_PROPOSAL"` - `const EntityStageImplementation EntityStage = "IMPLEMENTATION"` - `const EntityStageActive EntityStage = "ACTIVE"` - `const EntityStageCompleted EntityStage = "COMPLETED"` - `const EntityStageArchived EntityStage = "ARCHIVED"` - `UpdatedAt Time` Timestamp when the entity was last updated - `ExternalID string` Customer-supplied identifier from an external system. Unique within the caller's tenant when set. ### 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"), ) entity, err := client.Entities.Get(context.TODO(), "id") if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", entity.ID) } ``` #### Response ```json { "id": "entity_01ARZ3NDEKTSV4RRFFQ69G5FAV", "created_at": "2024-01-15T09:30:00Z", "display_name": "My Revocable Trust", "household_id": "household_01ARZ3NDEKTSV4RRFFQ69G5FAV", "in_estate_status": "in_estate", "kind": "REVOCABLE_TRUST", "stage": "PRE_CREATED", "updated_at": "2024-01-20T14:45:00Z", "external_id": "crm-entity-12345" } ``` ## Domain Types ### Entity - `type Entity struct{…}` - `ID string` Unique identifier with entity_ prefix - `CreatedAt Time` Timestamp when the entity was created - `DisplayName string` Display name of the entity - `HouseholdID string` Household ID this entity belongs to - `InEstateStatus EntityInEstateStatus` Whether the entity is in or out of the estate - `const EntityInEstateStatusInEstate EntityInEstateStatus = "in_estate"` - `const EntityInEstateStatusOutOfEstate EntityInEstateStatus = "out_of_estate"` - `const EntityInEstateStatusNone EntityInEstateStatus = "none"` - `Kind EntityKind` Type of entity - determines the specific subtype and applicable fields - `const EntityKindRevocableTrust EntityKind = "REVOCABLE_TRUST"` - `const EntityKindIrrevocableTrust EntityKind = "IRREVOCABLE_TRUST"` - `const EntityKindSlatTrust EntityKind = "SLAT_TRUST"` - `const EntityKindIlitTrust EntityKind = "ILIT_TRUST"` - `const EntityKindQprtTrust EntityKind = "QPRT_TRUST"` - `const EntityKindGratTrust EntityKind = "GRAT_TRUST"` - `const EntityKindCrtTrust EntityKind = "CRT_TRUST"` - `const EntityKindCltTrust EntityKind = "CLT_TRUST"` - `const EntityKindIndividualPersonalAccount EntityKind = "INDIVIDUAL_PERSONAL_ACCOUNT"` - `const EntityKindJointPersonalAccount EntityKind = "JOINT_PERSONAL_ACCOUNT"` - `const EntityKindCustodialPersonalAccount EntityKind = "CUSTODIAL_PERSONAL_ACCOUNT"` - `const EntityKindInsurancePersonalAccount EntityKind = "INSURANCE_PERSONAL_ACCOUNT"` - `const EntityKindQualifiedTuitionPersonalAccount EntityKind = "QUALIFIED_TUITION_PERSONAL_ACCOUNT"` - `const EntityKindRetirementPersonalAccount EntityKind = "RETIREMENT_PERSONAL_ACCOUNT"` - `const EntityKindDonorAdvisedFund EntityKind = "DONOR_ADVISED_FUND"` - `const EntityKindPrivateFoundation EntityKind = "PRIVATE_FOUNDATION"` - `const EntityKindLlcBusinessEntity EntityKind = "LLC_BUSINESS_ENTITY"` - `const EntityKindLpBusinessEntity EntityKind = "LP_BUSINESS_ENTITY"` - `const EntityKindGpBusinessEntity EntityKind = "GP_BUSINESS_ENTITY"` - `const EntityKindSoleProprietorshipBusinessEntity EntityKind = "SOLE_PROPRIETORSHIP_BUSINESS_ENTITY"` - `const EntityKindScorpBusinessEntity EntityKind = "SCORP_BUSINESS_ENTITY"` - `const EntityKindCcorpBusinessEntity EntityKind = "CCORP_BUSINESS_ENTITY"` - `Stage EntityStage` Lifecycle stage of the entity - `const EntityStagePreCreated EntityStage = "PRE_CREATED"` - `const EntityStageAICreating EntityStage = "AI_CREATING"` - `const EntityStageAICreationFailed EntityStage = "AI_CREATION_FAILED"` - `const EntityStageAINeedsReview EntityStage = "AI_NEEDS_REVIEW"` - `const EntityStageDraft EntityStage = "DRAFT"` - `const EntityStageReadyForProposal EntityStage = "READY_FOR_PROPOSAL"` - `const EntityStageImplementation EntityStage = "IMPLEMENTATION"` - `const EntityStageActive EntityStage = "ACTIVE"` - `const EntityStageCompleted EntityStage = "COMPLETED"` - `const EntityStageArchived EntityStage = "ARCHIVED"` - `UpdatedAt Time` Timestamp when the entity was last updated - `ExternalID string` Customer-supplied identifier from an external system. Unique within the caller's tenant when set. ### Entity Kind - `type EntityKind string` Type of entity - determines the specific subtype and applicable fields - `const EntityKindRevocableTrust EntityKind = "REVOCABLE_TRUST"` - `const EntityKindIrrevocableTrust EntityKind = "IRREVOCABLE_TRUST"` - `const EntityKindSlatTrust EntityKind = "SLAT_TRUST"` - `const EntityKindIlitTrust EntityKind = "ILIT_TRUST"` - `const EntityKindQprtTrust EntityKind = "QPRT_TRUST"` - `const EntityKindGratTrust EntityKind = "GRAT_TRUST"` - `const EntityKindCrtTrust EntityKind = "CRT_TRUST"` - `const EntityKindCltTrust EntityKind = "CLT_TRUST"` - `const EntityKindIndividualPersonalAccount EntityKind = "INDIVIDUAL_PERSONAL_ACCOUNT"` - `const EntityKindJointPersonalAccount EntityKind = "JOINT_PERSONAL_ACCOUNT"` - `const EntityKindCustodialPersonalAccount EntityKind = "CUSTODIAL_PERSONAL_ACCOUNT"` - `const EntityKindInsurancePersonalAccount EntityKind = "INSURANCE_PERSONAL_ACCOUNT"` - `const EntityKindQualifiedTuitionPersonalAccount EntityKind = "QUALIFIED_TUITION_PERSONAL_ACCOUNT"` - `const EntityKindRetirementPersonalAccount EntityKind = "RETIREMENT_PERSONAL_ACCOUNT"` - `const EntityKindDonorAdvisedFund EntityKind = "DONOR_ADVISED_FUND"` - `const EntityKindPrivateFoundation EntityKind = "PRIVATE_FOUNDATION"` - `const EntityKindLlcBusinessEntity EntityKind = "LLC_BUSINESS_ENTITY"` - `const EntityKindLpBusinessEntity EntityKind = "LP_BUSINESS_ENTITY"` - `const EntityKindGpBusinessEntity EntityKind = "GP_BUSINESS_ENTITY"` - `const EntityKindSoleProprietorshipBusinessEntity EntityKind = "SOLE_PROPRIETORSHIP_BUSINESS_ENTITY"` - `const EntityKindScorpBusinessEntity EntityKind = "SCORP_BUSINESS_ENTITY"` - `const EntityKindCcorpBusinessEntity EntityKind = "CCORP_BUSINESS_ENTITY"` ### Entity List - `type EntityList struct{…}` - `Data []Entity` - `ID string` Unique identifier with entity_ prefix - `CreatedAt Time` Timestamp when the entity was created - `DisplayName string` Display name of the entity - `HouseholdID string` Household ID this entity belongs to - `InEstateStatus EntityInEstateStatus` Whether the entity is in or out of the estate - `const EntityInEstateStatusInEstate EntityInEstateStatus = "in_estate"` - `const EntityInEstateStatusOutOfEstate EntityInEstateStatus = "out_of_estate"` - `const EntityInEstateStatusNone EntityInEstateStatus = "none"` - `Kind EntityKind` Type of entity - determines the specific subtype and applicable fields - `const EntityKindRevocableTrust EntityKind = "REVOCABLE_TRUST"` - `const EntityKindIrrevocableTrust EntityKind = "IRREVOCABLE_TRUST"` - `const EntityKindSlatTrust EntityKind = "SLAT_TRUST"` - `const EntityKindIlitTrust EntityKind = "ILIT_TRUST"` - `const EntityKindQprtTrust EntityKind = "QPRT_TRUST"` - `const EntityKindGratTrust EntityKind = "GRAT_TRUST"` - `const EntityKindCrtTrust EntityKind = "CRT_TRUST"` - `const EntityKindCltTrust EntityKind = "CLT_TRUST"` - `const EntityKindIndividualPersonalAccount EntityKind = "INDIVIDUAL_PERSONAL_ACCOUNT"` - `const EntityKindJointPersonalAccount EntityKind = "JOINT_PERSONAL_ACCOUNT"` - `const EntityKindCustodialPersonalAccount EntityKind = "CUSTODIAL_PERSONAL_ACCOUNT"` - `const EntityKindInsurancePersonalAccount EntityKind = "INSURANCE_PERSONAL_ACCOUNT"` - `const EntityKindQualifiedTuitionPersonalAccount EntityKind = "QUALIFIED_TUITION_PERSONAL_ACCOUNT"` - `const EntityKindRetirementPersonalAccount EntityKind = "RETIREMENT_PERSONAL_ACCOUNT"` - `const EntityKindDonorAdvisedFund EntityKind = "DONOR_ADVISED_FUND"` - `const EntityKindPrivateFoundation EntityKind = "PRIVATE_FOUNDATION"` - `const EntityKindLlcBusinessEntity EntityKind = "LLC_BUSINESS_ENTITY"` - `const EntityKindLpBusinessEntity EntityKind = "LP_BUSINESS_ENTITY"` - `const EntityKindGpBusinessEntity EntityKind = "GP_BUSINESS_ENTITY"` - `const EntityKindSoleProprietorshipBusinessEntity EntityKind = "SOLE_PROPRIETORSHIP_BUSINESS_ENTITY"` - `const EntityKindScorpBusinessEntity EntityKind = "SCORP_BUSINESS_ENTITY"` - `const EntityKindCcorpBusinessEntity EntityKind = "CCORP_BUSINESS_ENTITY"` - `Stage EntityStage` Lifecycle stage of the entity - `const EntityStagePreCreated EntityStage = "PRE_CREATED"` - `const EntityStageAICreating EntityStage = "AI_CREATING"` - `const EntityStageAICreationFailed EntityStage = "AI_CREATION_FAILED"` - `const EntityStageAINeedsReview EntityStage = "AI_NEEDS_REVIEW"` - `const EntityStageDraft EntityStage = "DRAFT"` - `const EntityStageReadyForProposal EntityStage = "READY_FOR_PROPOSAL"` - `const EntityStageImplementation EntityStage = "IMPLEMENTATION"` - `const EntityStageActive EntityStage = "ACTIVE"` - `const EntityStageCompleted EntityStage = "COMPLETED"` - `const EntityStageArchived EntityStage = "ARCHIVED"` - `UpdatedAt Time` Timestamp when the entity was last updated - `ExternalID string` Customer-supplied identifier from an external system. Unique within the caller's tenant when set. - `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) # Valuation ## Get the current valuation for an entity `client.Entities.Valuation.Get(ctx, id) (*Valuation, error)` **get** `/entities/{id}/valuation` Retrieve the most recent valuation with flattened asset values by type ### Parameters - `id string` ### Returns - `type Valuation struct{…}` - `ID string` Unique identifier with valuationv2_ prefix - `CreatedAt Time` Timestamp when the valuation was created - `DirectlyHeldAssetValue float64` Total value of all directly held assets in USD - `DirectlyHeldAssets []ValuationDirectlyHeldAsset` List of individual assets in this valuation - `ID string` Asset ID - `AssetClass ValuationDirectlyHeldAssetAssetClass` - `ID string` Asset class ID - `DisplayName string` Display name of the asset class - `DisplayName string` Display name of the asset - `Value float64` Value of this asset in USD - `ExternalID string` External ID from the static asset (if available) - `EffectiveDate Time` The date this valuation is effective - `EntityID string` Entity ID this valuation belongs to - `TotalValue float64` Total value of all assets minus liabilities in USD - `UpdatedAt Time` Timestamp when the valuation was last updated - `Description string` Free-form notes about this valuation ### 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"), ) valuation, err := client.Entities.Valuation.Get(context.TODO(), "id") if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", valuation.ID) } ``` #### Response ```json { "id": "valuationv2_01ARZ3NDEKTSV4RRFFQ69G5FAV", "created_at": "2024-01-15T09:30:00Z", "directly_held_asset_value": 1000000, "directly_held_assets": [ { "id": "assetv2_01ARZ3NDEKTSV4RRFFQ69G5FAV", "asset_class": { "id": "asset_class_01ARZ3NDEKTSV4RRFFQ69G5FAV", "display_name": "Equities" }, "display_name": "Apple Inc. Stock", "value": 50000, "external_id": "AAPL-12345" } ], "effective_date": "2024-01-15", "entity_id": "entity_01ARZ3NDEKTSV4RRFFQ69G5FAV", "total_value": 1000000, "updated_at": "2024-01-20T14:45:00Z", "description": "description" } ``` ## Create a new valuation for an entity `client.Entities.Valuation.New(ctx, id, body) (*Valuation, error)` **post** `/entities/{id}/valuation` Add a new valuation to the entity's history ### Parameters - `id string` - `body EntityValuationNewParams` - `DirectlyHeldAssets param.Field[[]EntityValuationNewParamsDirectlyHeldAsset]` List of assets to include in this valuation - `AssetClassID string` Asset class ID to associate with this asset - `DisplayName string` Display name of the asset - `Value float64` Value of this asset in USD - `ExternalID string` External ID for the asset - `EffectiveDate param.Field[Time]` The date this valuation is effective - `Description param.Field[string]` Free-form notes about this valuation ### Returns - `type Valuation struct{…}` - `ID string` Unique identifier with valuationv2_ prefix - `CreatedAt Time` Timestamp when the valuation was created - `DirectlyHeldAssetValue float64` Total value of all directly held assets in USD - `DirectlyHeldAssets []ValuationDirectlyHeldAsset` List of individual assets in this valuation - `ID string` Asset ID - `AssetClass ValuationDirectlyHeldAssetAssetClass` - `ID string` Asset class ID - `DisplayName string` Display name of the asset class - `DisplayName string` Display name of the asset - `Value float64` Value of this asset in USD - `ExternalID string` External ID from the static asset (if available) - `EffectiveDate Time` The date this valuation is effective - `EntityID string` Entity ID this valuation belongs to - `TotalValue float64` Total value of all assets minus liabilities in USD - `UpdatedAt Time` Timestamp when the valuation was last updated - `Description string` Free-form notes about this valuation ### Example ```go package main import ( "context" "fmt" "time" "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"), ) valuation, err := client.Entities.Valuation.New( context.TODO(), "id", withluminary.EntityValuationNewParams{ DirectlyHeldAssets: []withluminary.EntityValuationNewParamsDirectlyHeldAsset{withluminary.EntityValuationNewParamsDirectlyHeldAsset{ AssetClassID: "asset_class_01ARZ3NDEKTSV4RRFFQ69G5FAV", DisplayName: "Apple Inc. Stock", Value: 50000, }}, EffectiveDate: time.Now(), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", valuation.ID) } ``` #### Response ```json { "id": "valuationv2_01ARZ3NDEKTSV4RRFFQ69G5FAV", "created_at": "2024-01-15T09:30:00Z", "directly_held_asset_value": 1000000, "directly_held_assets": [ { "id": "assetv2_01ARZ3NDEKTSV4RRFFQ69G5FAV", "asset_class": { "id": "asset_class_01ARZ3NDEKTSV4RRFFQ69G5FAV", "display_name": "Equities" }, "display_name": "Apple Inc. Stock", "value": 50000, "external_id": "AAPL-12345" } ], "effective_date": "2024-01-15", "entity_id": "entity_01ARZ3NDEKTSV4RRFFQ69G5FAV", "total_value": 1000000, "updated_at": "2024-01-20T14:45:00Z", "description": "description" } ``` ## Domain Types ### Valuation - `type Valuation struct{…}` - `ID string` Unique identifier with valuationv2_ prefix - `CreatedAt Time` Timestamp when the valuation was created - `DirectlyHeldAssetValue float64` Total value of all directly held assets in USD - `DirectlyHeldAssets []ValuationDirectlyHeldAsset` List of individual assets in this valuation - `ID string` Asset ID - `AssetClass ValuationDirectlyHeldAssetAssetClass` - `ID string` Asset class ID - `DisplayName string` Display name of the asset class - `DisplayName string` Display name of the asset - `Value float64` Value of this asset in USD - `ExternalID string` External ID from the static asset (if available) - `EffectiveDate Time` The date this valuation is effective - `EntityID string` Entity ID this valuation belongs to - `TotalValue float64` Total value of all assets minus liabilities in USD - `UpdatedAt Time` Timestamp when the valuation was last updated - `Description string` Free-form notes about this valuation