đ§Ž ValuationProfileController Documentation
đ§Ž QUICK DOCUMENTATIONâ
- File Path: /API/Controllers/ValuationProfileController.cs
- Primary Purpose: Manages valuation profiles, which define the parameters and rules for calculating asset values.
- Key Endpoints:
- âī¸ POST /List - Retrieves list of valuation profiles
- âī¸ POST /Get - Gets a specific valuation profile with its scores
- đ POST /Update - Updates a valuation profile
- đī¸ POST /Delete - Deletes a valuation profile
- Related Models: ValuationProfileDto, ValuationProfileWithScoresDto
- Used By:
- Valuation framework configuration screens
- Job setup process
- Valuation calculation engine
đī¸ DETAILED DOCUMENTATIONâ
đī¸ Overviewâ
The ValuationProfileController handles the management of valuation profiles, which are core components of the valuation framework in Asset Valuer Pro. Valuation profiles define how assets are valued based on various parameters, factors, and scoring methods. They serve as templates that can be applied to different asset classes within a valuation job.
đ§ Controller Dependenciesâ
- Namespace: AVP.API.Controllers
- Services Used:
- Mediator (CQRS pattern implementation)
- Other Dependencies: None specified
đ Endpointsâ
đ List Valuation Profilesâ
- HTTP Method: POST
- URL Pattern: /List
- Authentication: đ Required (inherited from ApiController)
- Description: Retrieves a list of valuation profiles based on query parameters
Request Parametersâ
| Parameter | Type | Required | Description |
|---|---|---|---|
| query | ListValuationProfilesQuery | Yes | Query parameters for filtering profiles |
Response Formatâ
[
{
"id": 123,
"name": "Standard Building Valuation",
"description": "Profile for standard building valuation",
"clientId": 456,
"isGlobal": true,
"isActive": true,
"valuationMethod": "CostApproach"
}
]
đ Get Valuation Profileâ
- HTTP Method: POST
- URL Pattern: /Get
- Authentication: đ Required
- Description: Retrieves a specific valuation profile with its associated scores
Request Parametersâ
| Parameter | Type | Required | Description |
|---|---|---|---|
| query | GetValuationProfileQuery | Yes | Contains ProfileId to retrieve |
Response Formatâ
{
"id": 123,
"name": "Standard Building Valuation",
"description": "Profile for standard building valuation",
"clientId": 456,
"isGlobal": true,
"isActive": true,
"valuationMethod": "CostApproach",
"scores": [
{
"id": 789,
"name": "Condition",
"description": "Physical condition score",
"weight": 0.4,
"valueRangeMin": 1,
"valueRangeMax": 5
},
{
"id": 790,
"name": "Functionality",
"description": "Functional utility score",
"weight": 0.3,
"valueRangeMin": 1,
"valueRangeMax": 5
}
]
}
đ Update Valuation Profileâ
- HTTP Method: POST
- URL Pattern: /Update
- Authentication: đ Required
- Description: Updates an existing valuation profile or creates a new one
Request Parametersâ
| Parameter | Type | Required | Description |
|---|---|---|---|
| command | UpdateValuationProfileCommand | Yes | Contains profile data to update |
Response Formatâ
123
(Returns the profile ID)
đī¸ Delete Valuation Profileâ
- HTTP Method: POST
- URL Pattern: /Delete
- Authentication: đ Required
- Description: Deletes a valuation profile
Request Parametersâ
| Parameter | Type | Required | Description |
|---|---|---|---|
| command | DeleteValuationProfileCommand | Yes | Contains ProfileId to delete |
Response Formatâ
true
(Returns success status)
đ Business Contextâ
Valuation profiles are a critical part of the APV system as they define:
- The scoring methodology for evaluating asset conditions
- Weights applied to different scoring factors
- The mapping between condition scores and depreciation percentages
- How different valuation approaches are applied to assets
đĄ Tip: Valuation profiles can be global (accessible to all clients) or client-specific, allowing customized valuation methodologies per organization.
đ Security Notesâ
âšī¸ Note: Only users with specific permissions can create or modify global valuation profiles, while client administrators can manage their own client-specific profiles.
đ§Ž Calculation Impactâ
â ī¸ Warning: Changes to valuation profiles directly affect valuation calculations. When updating existing profiles, consider refreshing affected jobs to ensure consistency.