@simplyhomes/sos-sdk
Version:
TypeScript SDK for Simply Homes SoS API v4
154 lines • 103 kB
TypeScript
/**
* API v4
* Swagger documentation for API v4
*
* The version of the OpenAPI document: 4.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import * as runtime from '../runtime';
import type { V4LendersCreateLenderBodyDto, V4LendersCreateLenderResponseDto, V4LendersDeleteLenderResponseDto, V4LendersGetLenderColumnsResponseDto, V4LendersGetLenderResponseDto, V4LendersGetLendersInViewResponseDto, V4LendersGetLendersResponseDto, V4LendersUpdateLenderBodyDto, V4LendersUpdateLenderResponseDto } from '../models/index';
export interface V4LendersControllerCreateLenderV4Request {
v4LendersCreateLenderBodyDto: V4LendersCreateLenderBodyDto;
}
export interface V4LendersControllerDeleteLenderV4Request {
lenderId: number;
}
export interface V4LendersControllerGetLenderColumnsV4Request {
columns: string;
lenderId: number;
}
export interface V4LendersControllerGetLenderV4Request {
lenderId: number;
viewId?: number;
}
export interface V4LendersControllerGetLendersInViewV4Request {
viewId: number;
limit?: number;
offset?: number;
countOnly?: boolean;
}
export interface V4LendersControllerGetLendersV4Request {
viewId?: number;
limit?: number;
offset?: number;
countOnly?: boolean;
}
export interface V4LendersControllerUpdateLenderV4Request {
lenderId: number;
v4LendersUpdateLenderBodyDto: V4LendersUpdateLenderBodyDto;
}
/**
* LendersAPIV4Api - interface
*
* @export
* @interface LendersAPIV4ApiInterface
*/
export interface LendersAPIV4ApiInterface {
/**
* # POST /v4/lenders ## Overview Creates a new lender with the provided information. This endpoint allows you to add new lending institutions to your organization with their loan terms, fees, and lending criteria. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Body The request body should contain lender information to create the new lender. ### Required Fields | Field | Type | Description | |-------|------|-------------| | `name` | string | Lender company name (must be unique within organization) | ### Optional Fields | Field | Type | Description | |-------|------|-------------| | `bridgeLoanLoanToPurchasePrice` | number | Bridge loan to purchase price ratio (decimal, e.g., 0.8 for 80%) | | `bridgeLoanLoanToRefinanceCost` | number | Bridge loan to refinance cost ratio (decimal) | | `bridgeLoanInterestRate` | number | Bridge loan annual interest rate (decimal, e.g., 0.12 for 12%) | | `longTermRateAndTermInterestRate` | number | Long-term rate and term interest rate (decimal) | | `longTermCashOutInterestRate` | number | Long-term cash-out interest rate (decimal) | | `longTermRateAndTermLoanToValue` | number | Long-term rate and term LTV ratio (decimal) | | `longTermCashOutLoanToValue` | number | Long-term cash-out LTV ratio (decimal) | | `bridgeLoanLoanToCost` | number | Bridge loan to total cost ratio (decimal) | | `bridgeLoanLoanToAsIs` | number | Bridge loan to as-is value ratio (decimal) | | `bridgeLoanLoanToArv` | number | Bridge loan to ARV ratio (decimal) | | `originationPoints` | number | Origination points percentage (decimal) | | `loanProcessingFee` | number | Loan processing fee in dollars | ### Validation Rules - **Name**: Required, non-empty string, must be unique within organization - **Rates and Ratios**: Must be valid decimal numbers between 0 and 1 (for percentages) - **Fees**: Must be non-negative numbers - **Organization Scoping**: Lender is automatically associated with user\'s organization ## Request Example ```json { \"name\": \"XYZ Capital\", \"bridgeLoanLoanToPurchasePrice\": 0.8, \"bridgeLoanInterestRate\": 0.12, \"longTermRateAndTermInterestRate\": 0.07, \"originationPoints\": 2.0, \"loanProcessingFee\": 1500 } ``` ## Response Structure Returns the newly created lender\'s ID and confirmation. ## Use Cases This endpoint is ideal for: - **Lender Onboarding**: Add new lending partners to the system - **Market Expansion**: Include additional financing sources - **Competitive Analysis**: Add competitors for loan term comparison - **Deal Sourcing**: Expand available financing options for properties - **Integration**: Sync lenders from external CRM or loan systems - **Market Research**: Track lending terms across multiple institutions ## Business Rules - **Name Uniqueness**: Lender names must be unique within the organization - **Default Values**: Unspecified loan terms default to null and can be updated later - **Organization Association**: Lenders are automatically scoped to the user\'s organization - **Data Validation**: All loan terms are validated for reasonable ranges - **Audit Trail**: Lender creation is logged for compliance and tracking ## Loan Terms Setup ### Initial Configuration You can provide basic loan terms during creation or update them later: - **Bridge Loan Terms**: Short-term financing parameters - **Long-term Terms**: Permanent financing parameters - **Fee Structure**: Associated lending fees and costs ### Progressive Setup - **Minimal Creation**: Create with just a name and add terms progressively - **Complete Setup**: Provide all loan terms during initial creation - **Flexible Updates**: Update any terms after creation using PATCH endpoint ## Error Handling Common validation errors include: - **Duplicate Name**: Lender name already exists in the organization - **Invalid Rates**: Rates or ratios outside acceptable ranges - **Missing Required Fields**: Name not provided - **Invalid Data Types**: Non-numeric values for loan terms
* @summary Create a new lender
* @param {V4LendersCreateLenderBodyDto} v4LendersCreateLenderBodyDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof LendersAPIV4ApiInterface
*/
v4LendersControllerCreateLenderV4Raw(requestParameters: V4LendersControllerCreateLenderV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4LendersCreateLenderResponseDto>>;
/**
* # POST /v4/lenders ## Overview Creates a new lender with the provided information. This endpoint allows you to add new lending institutions to your organization with their loan terms, fees, and lending criteria. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Body The request body should contain lender information to create the new lender. ### Required Fields | Field | Type | Description | |-------|------|-------------| | `name` | string | Lender company name (must be unique within organization) | ### Optional Fields | Field | Type | Description | |-------|------|-------------| | `bridgeLoanLoanToPurchasePrice` | number | Bridge loan to purchase price ratio (decimal, e.g., 0.8 for 80%) | | `bridgeLoanLoanToRefinanceCost` | number | Bridge loan to refinance cost ratio (decimal) | | `bridgeLoanInterestRate` | number | Bridge loan annual interest rate (decimal, e.g., 0.12 for 12%) | | `longTermRateAndTermInterestRate` | number | Long-term rate and term interest rate (decimal) | | `longTermCashOutInterestRate` | number | Long-term cash-out interest rate (decimal) | | `longTermRateAndTermLoanToValue` | number | Long-term rate and term LTV ratio (decimal) | | `longTermCashOutLoanToValue` | number | Long-term cash-out LTV ratio (decimal) | | `bridgeLoanLoanToCost` | number | Bridge loan to total cost ratio (decimal) | | `bridgeLoanLoanToAsIs` | number | Bridge loan to as-is value ratio (decimal) | | `bridgeLoanLoanToArv` | number | Bridge loan to ARV ratio (decimal) | | `originationPoints` | number | Origination points percentage (decimal) | | `loanProcessingFee` | number | Loan processing fee in dollars | ### Validation Rules - **Name**: Required, non-empty string, must be unique within organization - **Rates and Ratios**: Must be valid decimal numbers between 0 and 1 (for percentages) - **Fees**: Must be non-negative numbers - **Organization Scoping**: Lender is automatically associated with user\'s organization ## Request Example ```json { \"name\": \"XYZ Capital\", \"bridgeLoanLoanToPurchasePrice\": 0.8, \"bridgeLoanInterestRate\": 0.12, \"longTermRateAndTermInterestRate\": 0.07, \"originationPoints\": 2.0, \"loanProcessingFee\": 1500 } ``` ## Response Structure Returns the newly created lender\'s ID and confirmation. ## Use Cases This endpoint is ideal for: - **Lender Onboarding**: Add new lending partners to the system - **Market Expansion**: Include additional financing sources - **Competitive Analysis**: Add competitors for loan term comparison - **Deal Sourcing**: Expand available financing options for properties - **Integration**: Sync lenders from external CRM or loan systems - **Market Research**: Track lending terms across multiple institutions ## Business Rules - **Name Uniqueness**: Lender names must be unique within the organization - **Default Values**: Unspecified loan terms default to null and can be updated later - **Organization Association**: Lenders are automatically scoped to the user\'s organization - **Data Validation**: All loan terms are validated for reasonable ranges - **Audit Trail**: Lender creation is logged for compliance and tracking ## Loan Terms Setup ### Initial Configuration You can provide basic loan terms during creation or update them later: - **Bridge Loan Terms**: Short-term financing parameters - **Long-term Terms**: Permanent financing parameters - **Fee Structure**: Associated lending fees and costs ### Progressive Setup - **Minimal Creation**: Create with just a name and add terms progressively - **Complete Setup**: Provide all loan terms during initial creation - **Flexible Updates**: Update any terms after creation using PATCH endpoint ## Error Handling Common validation errors include: - **Duplicate Name**: Lender name already exists in the organization - **Invalid Rates**: Rates or ratios outside acceptable ranges - **Missing Required Fields**: Name not provided - **Invalid Data Types**: Non-numeric values for loan terms
* Create a new lender
*/
v4LendersControllerCreateLenderV4(requestParameters: V4LendersControllerCreateLenderV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4LendersCreateLenderResponseDto>;
/**
* # DELETE /v4/lenders/{lenderId} ## Overview Deletes an existing lender from the system. This is a permanent operation that removes the lender and handles all associated data relationships appropriately. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `lenderId` | number | Yes | The unique identifier of the lender to delete | ## Access Control - **Organization Scope**: Lender must belong to the authenticated user\'s organization - **Lender Validation**: Invalid or non-existent lender IDs will return a 404 error - **Data Privacy**: Only lenders within the user\'s organization can be deleted ## Deletion Behavior The deletion operation: - **Permanent Removal**: Lender is permanently deleted from the system - **Cascade Handling**: Associated relationships and references are handled appropriately - **Immediate Effect**: Deletion is applied immediately - **Audit Trail**: Deletion is logged for audit and compliance purposes - **Data Integrity**: System ensures referential integrity during deletion ## Response Structure Returns confirmation that the lender was successfully deleted. ## Use Cases This endpoint is ideal for: - **Lender Cleanup**: Remove outdated or inactive lenders - **Data Management**: Maintain clean lender databases - **Market Changes**: Remove lenders that are no longer available - **Compliance**: Delete lenders upon business relationship termination - **System Maintenance**: Clean up test or duplicate lender data - **Portfolio Management**: Remove lenders not aligned with business strategy ## Important Considerations Before deleting a lender, consider: - **Active References**: Check if lender is referenced by active properties or deals - **Historical Data**: Consider impact on historical deal records - **Backup Requirements**: Ensure proper backup if recovery might be needed - **Compliance**: Follow data retention and deletion policies - **User Notification**: Consider notifying relevant users of the deletion - **Alternative Actions**: Consider deactivating instead of deleting for data preservation ## Referential Impact Lender deletion may affect: - **Property Deals**: Properties with this lender assignment - **Historical Records**: Past deals and analysis using this lender - **Reports**: Historical reports that included this lender - **Comparisons**: Lender comparison tables and analysis - **Integration**: External systems that reference this lender ## Data Relationships The system handles these relationships during deletion: - **Property References**: Properties referencing this lender are updated - **Deal History**: Historical deal records are preserved with archived lender data - **User Preferences**: User preferences referencing this lender are updated - **Views and Filters**: Saved views that filter by this lender are updated - **Reports**: Report configurations are updated to handle missing lender ## Error Handling Common errors include: - **Lender Not Found**: Lender ID does not exist or belongs to different organization - **Permission Denied**: User lacks permission to delete lenders - **Referential Constraints**: Lender cannot be deleted due to active references - **System Errors**: Database or system issues preventing deletion - **Business Rules**: Business logic preventing deletion (e.g., active deals) ## Recovery - **No API Recovery**: Deleted lenders cannot be restored through the API - **Backup Systems**: Recovery may be possible through system backups - **Audit Logs**: Deletion events are recorded for audit purposes - **Data Archival**: Consider data archival policies for compliance - **Recreation**: Deleted lenders can be recreated with POST /v4/lenders
* @summary Delete a specific lender by lenderId
* @param {number} lenderId The unique identifier of the lender
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof LendersAPIV4ApiInterface
*/
v4LendersControllerDeleteLenderV4Raw(requestParameters: V4LendersControllerDeleteLenderV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4LendersDeleteLenderResponseDto>>;
/**
* # DELETE /v4/lenders/{lenderId} ## Overview Deletes an existing lender from the system. This is a permanent operation that removes the lender and handles all associated data relationships appropriately. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `lenderId` | number | Yes | The unique identifier of the lender to delete | ## Access Control - **Organization Scope**: Lender must belong to the authenticated user\'s organization - **Lender Validation**: Invalid or non-existent lender IDs will return a 404 error - **Data Privacy**: Only lenders within the user\'s organization can be deleted ## Deletion Behavior The deletion operation: - **Permanent Removal**: Lender is permanently deleted from the system - **Cascade Handling**: Associated relationships and references are handled appropriately - **Immediate Effect**: Deletion is applied immediately - **Audit Trail**: Deletion is logged for audit and compliance purposes - **Data Integrity**: System ensures referential integrity during deletion ## Response Structure Returns confirmation that the lender was successfully deleted. ## Use Cases This endpoint is ideal for: - **Lender Cleanup**: Remove outdated or inactive lenders - **Data Management**: Maintain clean lender databases - **Market Changes**: Remove lenders that are no longer available - **Compliance**: Delete lenders upon business relationship termination - **System Maintenance**: Clean up test or duplicate lender data - **Portfolio Management**: Remove lenders not aligned with business strategy ## Important Considerations Before deleting a lender, consider: - **Active References**: Check if lender is referenced by active properties or deals - **Historical Data**: Consider impact on historical deal records - **Backup Requirements**: Ensure proper backup if recovery might be needed - **Compliance**: Follow data retention and deletion policies - **User Notification**: Consider notifying relevant users of the deletion - **Alternative Actions**: Consider deactivating instead of deleting for data preservation ## Referential Impact Lender deletion may affect: - **Property Deals**: Properties with this lender assignment - **Historical Records**: Past deals and analysis using this lender - **Reports**: Historical reports that included this lender - **Comparisons**: Lender comparison tables and analysis - **Integration**: External systems that reference this lender ## Data Relationships The system handles these relationships during deletion: - **Property References**: Properties referencing this lender are updated - **Deal History**: Historical deal records are preserved with archived lender data - **User Preferences**: User preferences referencing this lender are updated - **Views and Filters**: Saved views that filter by this lender are updated - **Reports**: Report configurations are updated to handle missing lender ## Error Handling Common errors include: - **Lender Not Found**: Lender ID does not exist or belongs to different organization - **Permission Denied**: User lacks permission to delete lenders - **Referential Constraints**: Lender cannot be deleted due to active references - **System Errors**: Database or system issues preventing deletion - **Business Rules**: Business logic preventing deletion (e.g., active deals) ## Recovery - **No API Recovery**: Deleted lenders cannot be restored through the API - **Backup Systems**: Recovery may be possible through system backups - **Audit Logs**: Deletion events are recorded for audit purposes - **Data Archival**: Consider data archival policies for compliance - **Recreation**: Deleted lenders can be recreated with POST /v4/lenders
* Delete a specific lender by lenderId
*/
v4LendersControllerDeleteLenderV4(requestParameters: V4LendersControllerDeleteLenderV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4LendersDeleteLenderResponseDto>;
/**
* # GET /v4/lenders/{lenderId}/{columns} ## Overview Retrieves specific columns for a lender identified by its unique ID. This endpoint allows selective data retrieval, returning only the requested fields for the specified lender. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `lenderId` | number | Yes | The unique identifier of the lender | | `columns` | string | Yes | Comma-separated list of column names to retrieve | ## Column Selection Specify desired columns as a comma-separated string: - **Basic Info**: `lid,name,organizationId` - **Bridge Loan Terms**: `bridgeLoanInterestRate,bridgeLoanLoanToPurchasePrice,bridgeLoanLoanToCost` - **Long-term Terms**: `longTermRateAndTermInterestRate,longTermCashOutInterestRate` - **Fees**: `originationPoints,loanProcessingFee` - **Custom Selection**: Any combination of available columns ## Available Columns ### Basic Information - `lid`: Lender ID - `name`: Lender name - `organizationId`: Organization ID ### Bridge Loan Terms - `bridgeLoanLoanToPurchasePrice`: Purchase price ratio - `bridgeLoanLoanToRefinanceCost`: Refinance cost ratio - `bridgeLoanInterestRate`: Bridge loan interest rate - `bridgeLoanLoanToCost`: Total cost ratio - `bridgeLoanLoanToAsIs`: As-is value ratio - `bridgeLoanLoanToArv`: After-repair value ratio ### Long-term Loan Terms - `longTermRateAndTermInterestRate`: Rate and term interest rate - `longTermCashOutInterestRate`: Cash-out interest rate - `longTermRateAndTermLoanToValue`: Rate and term LTV ratio - `longTermCashOutLoanToValue`: Cash-out LTV ratio ### Fees and Costs - `originationPoints`: Origination points percentage - `loanProcessingFee`: Processing fee amount ## Access Control - **Organization Scope**: Lender must belong to the user\'s organization - **Column Validation**: Invalid column names are ignored - **Data Privacy**: Only authorized columns are returned ## Use Cases This endpoint is ideal for: - **Performance Optimization**: Retrieve only needed data to reduce bandwidth - **Specific Comparisons**: Get particular fields for lender comparison tables - **Integration**: Extract specific data points for external systems - **Custom Views**: Build interfaces with selective data display - **Mobile Optimization**: Minimize data transfer for mobile applications - **API Efficiency**: Reduce response size for better performance ## Performance Benefits - **Reduced Data Transfer**: Only requested columns are returned - **Faster Processing**: Less data processing on both server and client - **Network Efficiency**: Smaller response payloads - **Selective Queries**: Database queries target only required fields - **Cache Optimization**: Smaller responses improve caching efficiency
* @summary Get specific columns of a lender by lenderId
* @param {string} columns Comma-separated list of column names
* @param {number} lenderId The unique identifier of the lender
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof LendersAPIV4ApiInterface
*/
v4LendersControllerGetLenderColumnsV4Raw(requestParameters: V4LendersControllerGetLenderColumnsV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4LendersGetLenderColumnsResponseDto>>;
/**
* # GET /v4/lenders/{lenderId}/{columns} ## Overview Retrieves specific columns for a lender identified by its unique ID. This endpoint allows selective data retrieval, returning only the requested fields for the specified lender. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `lenderId` | number | Yes | The unique identifier of the lender | | `columns` | string | Yes | Comma-separated list of column names to retrieve | ## Column Selection Specify desired columns as a comma-separated string: - **Basic Info**: `lid,name,organizationId` - **Bridge Loan Terms**: `bridgeLoanInterestRate,bridgeLoanLoanToPurchasePrice,bridgeLoanLoanToCost` - **Long-term Terms**: `longTermRateAndTermInterestRate,longTermCashOutInterestRate` - **Fees**: `originationPoints,loanProcessingFee` - **Custom Selection**: Any combination of available columns ## Available Columns ### Basic Information - `lid`: Lender ID - `name`: Lender name - `organizationId`: Organization ID ### Bridge Loan Terms - `bridgeLoanLoanToPurchasePrice`: Purchase price ratio - `bridgeLoanLoanToRefinanceCost`: Refinance cost ratio - `bridgeLoanInterestRate`: Bridge loan interest rate - `bridgeLoanLoanToCost`: Total cost ratio - `bridgeLoanLoanToAsIs`: As-is value ratio - `bridgeLoanLoanToArv`: After-repair value ratio ### Long-term Loan Terms - `longTermRateAndTermInterestRate`: Rate and term interest rate - `longTermCashOutInterestRate`: Cash-out interest rate - `longTermRateAndTermLoanToValue`: Rate and term LTV ratio - `longTermCashOutLoanToValue`: Cash-out LTV ratio ### Fees and Costs - `originationPoints`: Origination points percentage - `loanProcessingFee`: Processing fee amount ## Access Control - **Organization Scope**: Lender must belong to the user\'s organization - **Column Validation**: Invalid column names are ignored - **Data Privacy**: Only authorized columns are returned ## Use Cases This endpoint is ideal for: - **Performance Optimization**: Retrieve only needed data to reduce bandwidth - **Specific Comparisons**: Get particular fields for lender comparison tables - **Integration**: Extract specific data points for external systems - **Custom Views**: Build interfaces with selective data display - **Mobile Optimization**: Minimize data transfer for mobile applications - **API Efficiency**: Reduce response size for better performance ## Performance Benefits - **Reduced Data Transfer**: Only requested columns are returned - **Faster Processing**: Less data processing on both server and client - **Network Efficiency**: Smaller response payloads - **Selective Queries**: Database queries target only required fields - **Cache Optimization**: Smaller responses improve caching efficiency
* Get specific columns of a lender by lenderId
*/
v4LendersControllerGetLenderColumnsV4(requestParameters: V4LendersControllerGetLenderColumnsV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4LendersGetLenderColumnsResponseDto>;
/**
* # GET /v4/lenders/{lenderId} ## Overview Retrieves detailed information for a specific lender by its unique identifier. This endpoint returns complete lender data including all loan terms, fees, and lending criteria. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `lenderId` | number | Yes | The unique identifier of the lender to retrieve | ### Query Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `viewId` | number | No | Optional view ID to apply column selection and formatting | ## Access Control - **Organization Scope**: Lender must belong to the authenticated user\'s organization - **Lender Validation**: Invalid or non-existent lender IDs will return a 404 error - **Data Privacy**: Only lenders within the user\'s organization are accessible ## Response Structure Returns a complete lender object with all available fields and loan terms. ## Use Cases This endpoint is ideal for: - **Lender Detail Views**: Display complete lender information in detail pages - **Loan Analysis**: Access all loan terms for detailed financial analysis - **Lender Comparison**: Retrieve specific lenders for side-by-side comparison - **Deal Evaluation**: Get lender details when evaluating financing options - **Integration Workflows**: Access complete lender data for external system sync - **Underwriting**: Use lender terms in property underwriting calculations ## Loan Terms Access The response includes comprehensive loan terms: - **Bridge Loan Parameters**: Short-term financing terms and ratios - **Long-term Loan Parameters**: Permanent financing terms and ratios - **Fee Structure**: All associated fees and points - **Risk Parameters**: Loan-to-value and loan-to-cost ratios - **Interest Rates**: Current rates for different loan products ## Performance Considerations - **Single Record Fetch**: Optimized for retrieving individual lenders - **Complete Data**: Returns all available lender fields and terms - **Real-time Data**: Always returns current lender information - **Organization Filtering**: Automatic organization scoping ensures security
* @summary Get a specific lender by lenderId
* @param {number} lenderId The unique identifier of the lender
* @param {number} [viewId] The ID of the view to use for retrieving the repository
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof LendersAPIV4ApiInterface
*/
v4LendersControllerGetLenderV4Raw(requestParameters: V4LendersControllerGetLenderV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4LendersGetLenderResponseDto>>;
/**
* # GET /v4/lenders/{lenderId} ## Overview Retrieves detailed information for a specific lender by its unique identifier. This endpoint returns complete lender data including all loan terms, fees, and lending criteria. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `lenderId` | number | Yes | The unique identifier of the lender to retrieve | ### Query Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `viewId` | number | No | Optional view ID to apply column selection and formatting | ## Access Control - **Organization Scope**: Lender must belong to the authenticated user\'s organization - **Lender Validation**: Invalid or non-existent lender IDs will return a 404 error - **Data Privacy**: Only lenders within the user\'s organization are accessible ## Response Structure Returns a complete lender object with all available fields and loan terms. ## Use Cases This endpoint is ideal for: - **Lender Detail Views**: Display complete lender information in detail pages - **Loan Analysis**: Access all loan terms for detailed financial analysis - **Lender Comparison**: Retrieve specific lenders for side-by-side comparison - **Deal Evaluation**: Get lender details when evaluating financing options - **Integration Workflows**: Access complete lender data for external system sync - **Underwriting**: Use lender terms in property underwriting calculations ## Loan Terms Access The response includes comprehensive loan terms: - **Bridge Loan Parameters**: Short-term financing terms and ratios - **Long-term Loan Parameters**: Permanent financing terms and ratios - **Fee Structure**: All associated fees and points - **Risk Parameters**: Loan-to-value and loan-to-cost ratios - **Interest Rates**: Current rates for different loan products ## Performance Considerations - **Single Record Fetch**: Optimized for retrieving individual lenders - **Complete Data**: Returns all available lender fields and terms - **Real-time Data**: Always returns current lender information - **Organization Filtering**: Automatic organization scoping ensures security
* Get a specific lender by lenderId
*/
v4LendersControllerGetLenderV4(requestParameters: V4LendersControllerGetLenderV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4LendersGetLenderResponseDto>;
/**
* # GET /v4/lenders/viewId/{viewId} ## Overview Retrieves lenders filtered by a specific view configuration. This endpoint applies view-defined filters, sorts, and column selections to provide a customized dataset of lenders. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `viewId` | number | Yes | The unique identifier of the view to apply | ### Query Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `limit` | number | No | Maximum number of lenders to return (default: 20, max: 100) | | `offset` | number | No | Number of lenders to skip for pagination (default: 0) | | `countOnly` | boolean | No | Return only the count of lenders without the actual data | ## View Application The specified view configuration is applied automatically: - **Filters**: All view filters are applied to narrow the lender dataset - **Sorts**: View sort criteria determine the order of returned lenders - **Columns**: View column selection determines which fields are returned - **Relationships**: Related data inclusion based on view configuration ## Access Control - **Organization Scope**: Lenders are filtered by the user\'s organization - **View Ownership**: View must belong to the requesting user - **Data Privacy**: Only organization lenders are accessible through views ## Response Structure Returns lenders that match the specified view configuration. ## Use Cases This endpoint is ideal for: - **Custom Dashboards**: Display lenders according to predefined views - **Filtered Reports**: Generate reports with specific lender criteria - **Saved Searches**: Retrieve lenders using saved filter combinations - **User Preferences**: Apply user-defined lender viewing preferences - **Specialized Views**: Access lenders for specific loan types or criteria ## View Consistency - **Reproducible Results**: Same view ID produces consistent results - **Filter Persistence**: View filters remain constant across requests - **Sort Stability**: View sorting provides predictable ordering - **Column Consistency**: Same columns returned for each request ## Performance Benefits - **Optimized Queries**: View-specific optimizations improve performance - **Cached Configurations**: View settings are cached for faster execution - **Reduced Overhead**: Only requested columns are processed and returned - **Efficient Filtering**: Database-level filtering reduces data transfer
* @summary Get lenders with a specific viewId
* @param {number} viewId The unique identifier of the view
* @param {number} [limit] The maximum number of objects to return
* @param {number} [offset] The offset for pagination, used to skip a number of objects
* @param {boolean} [countOnly] Whether to return only the count of objects instead of the objects themselves
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof LendersAPIV4ApiInterface
*/
v4LendersControllerGetLendersInViewV4Raw(requestParameters: V4LendersControllerGetLendersInViewV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4LendersGetLendersInViewResponseDto>>;
/**
* # GET /v4/lenders/viewId/{viewId} ## Overview Retrieves lenders filtered by a specific view configuration. This endpoint applies view-defined filters, sorts, and column selections to provide a customized dataset of lenders. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `viewId` | number | Yes | The unique identifier of the view to apply | ### Query Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `limit` | number | No | Maximum number of lenders to return (default: 20, max: 100) | | `offset` | number | No | Number of lenders to skip for pagination (default: 0) | | `countOnly` | boolean | No | Return only the count of lenders without the actual data | ## View Application The specified view configuration is applied automatically: - **Filters**: All view filters are applied to narrow the lender dataset - **Sorts**: View sort criteria determine the order of returned lenders - **Columns**: View column selection determines which fields are returned - **Relationships**: Related data inclusion based on view configuration ## Access Control - **Organization Scope**: Lenders are filtered by the user\'s organization - **View Ownership**: View must belong to the requesting user - **Data Privacy**: Only organization lenders are accessible through views ## Response Structure Returns lenders that match the specified view configuration. ## Use Cases This endpoint is ideal for: - **Custom Dashboards**: Display lenders according to predefined views - **Filtered Reports**: Generate reports with specific lender criteria - **Saved Searches**: Retrieve lenders using saved filter combinations - **User Preferences**: Apply user-defined lender viewing preferences - **Specialized Views**: Access lenders for specific loan types or criteria ## View Consistency - **Reproducible Results**: Same view ID produces consistent results - **Filter Persistence**: View filters remain constant across requests - **Sort Stability**: View sorting provides predictable ordering - **Column Consistency**: Same columns returned for each request ## Performance Benefits - **Optimized Queries**: View-specific optimizations improve performance - **Cached Configurations**: View settings are cached for faster execution - **Reduced Overhead**: Only requested columns are processed and returned - **Efficient Filtering**: Database-level filtering reduces data transfer
* Get lenders with a specific viewId
*/
v4LendersControllerGetLendersInViewV4(requestParameters: V4LendersControllerGetLendersInViewV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4LendersGetLendersInViewResponseDto>;
/**
* # GET /v4/lenders ## Overview Retrieves a list of lenders with optional filtering, sorting, and pagination capabilities. This endpoint provides access to lender information including loan terms, fees, and other lending criteria. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Query Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `viewId` | number | No | Optional view ID to apply filters and column selection | | `limit` | number | No | Maximum number of lenders to return (default: 20, max: 100) | | `offset` | number | No | Number of lenders to skip for pagination (default: 0) | | `countOnly` | boolean | No | Return only the count of lenders without the actual data | ## Access Control - **Organization Scope**: Lenders are filtered by the user\'s organization - **Data Privacy**: Only lenders within the organization are accessible - **Permission**: User must have lender read permissions ## View Integration When a `viewId` is provided: - **Filters**: All view filters are applied to narrow the lender dataset - **Sorts**: View sort criteria determine the order of returned lenders - **Columns**: View column selection determines which fields are returned - **Consistent Results**: Same view produces consistent response structure ## Response Structure Returns a paginated list of lenders matching the specified criteria. ## Use Cases This endpoint is ideal for: - **Lender Management**: Building lender listing interfaces and dashboards - **Loan Comparison**: Comparing different lenders and their terms - **Integration**: Syncing lender data with external systems - **Reporting**: Generating lender analytics and reports - **Selection**: Choosing appropriate lenders for specific properties or deals ## Pagination - **Default Limit**: 20 lenders per request - **Maximum Limit**: 100 lenders per request - **Offset-based**: Use offset for pagination through large datasets - **Count**: Total count provided for pagination calculations ## Performance Considerations - **Optimized Queries**: Database queries are optimized for organization filtering - **View Caching**: View configurations are cached for improved performance - **Index Usage**: Queries utilize database indexes for fast retrieval - **Response Size**: Use limit parameter to control response size
* @summary Get lenders with optional viewId
* @param {number} [viewId] The ID of the view to use for retrieving the repository
* @param {number} [limit] The maximum number of objects to return
* @param {number} [offset] The offset for pagination, used to skip a number of objects
* @param {boolean} [countOnly] Whether to return only the count of objects instead of the objects themselves
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof LendersAPIV4ApiInterface
*/
v4LendersControllerGetLendersV4Raw(requestParameters: V4LendersControllerGetLendersV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4LendersGetLendersResponseDto>>;
/**
* # GET /v4/lenders ## Overview Retrieves a list of lenders with optional filtering, sorting, and pagination capabilities. This endpoint provides access to lender information including loan terms, fees, and other lending criteria. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Query Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `viewId` | number | No | Optional view ID to apply filters and column selection | | `limit` | number | No | Maximum number of lenders to return (default: 20, max: 100) | | `offset` | number | No | Number of lenders to skip for pagination (default: 0) | | `countOnly` | boolean | No | Return only the count of lenders without the actual data | ## Access Control - **Organization Scope**: Lenders are filtered by the user\'s organization - **Data Privacy**: Only lenders within the organization are accessible - **Permission**: User must have lender read permissions ## View Integration When a `viewId` is provided: - **Filters**: All view filters are applied to narrow the lender dataset - **Sorts**: View sort criteria determine the order of returned lenders - **Columns**: View column selection determines which fields are returned - **Consistent Results**: Same view produces consistent response structure ## Response Structure Returns a paginated list of lenders matching the specified criteria. ## Use Cases This endpoint is ideal for: - **Lender Management**: Building lender listing interfaces and dashboards - **Loan Comparison**: Comparing different lenders and their terms - **Integration**: Syncing lender data with external systems - **Reporting**: Generating lender analytics and reports - **Selection**: Choosing appropriate lenders for specific properties or deals ## Pagination - **Default Limit**: 20 lenders per request - **Maximum Limit**: 100 lenders per request - **Offset-based**: Use offset for pagination through large datasets - **Count**: Total count provided for pagination calculations ## Performance Considerations - **Optimized Queries**: Database queries are optimized for organization filtering - **View Caching**: View configurations are cached for improved performance - **Index Usage**: Queries utilize database indexes for fast retrieval - **Response Size**: Use limit parameter to control response size
* Get lenders with optional viewId
*/
v4LendersControllerGetLendersV4(requestParameters: V4LendersControllerGetLendersV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4LendersGetLendersResponseDto>;
/**
* # PATCH /v4/lenders/{lenderId} ## Overview Updates an existing lender with the provided information. This endpoint allows partial updates, meaning you only need to include the fields you want to change. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `lenderId` | number | Yes | The unique identifier of the lender to update | ## Request Body The request body should contain only the fields you want to update. All fields are optional for updates. ### Updateable Fields | Field | Type | Description | |-------|------|-------------| | `name` | string | Lender company name (must be unique within organization) | | `bridgeLoanLoanToPurchasePrice` | number | Bridge loan to purchase price ratio (decimal) | | `bridgeLoanLoanToRefinanceCost` | number | Bridge loan to refinance cost ratio (decimal) | | `bridgeLoanInterestRate` | number | Bridge loan annual interest rate (decimal) | | `longTermRateAndTermInterestRate` | number | Long-term rate and term interest rate (decimal) | | `longTermCashOutInterestRate` | number | Long-term cash-out interest rate (decimal) | | `longTermRateAndTermLoanToValue` | number | Long-term rate and term LTV ratio (decimal) | | `longTermCashOutLoanToValue` | number | Long-term cash-out LTV ratio (decimal) | | `bridgeLoanLoanToCost` | number | Bridge loan to total cost ratio (decimal) | | `bridgeLoanLoanToAsIs` | number | Bridge loan to as-is value ratio (decimal) | | `bridgeLoanLoanToArv` | number | Bridge loan to ARV ratio (decimal) | | `originationPoints` | number | Origination points percentage (decimal) | | `loanProcessingFee` | number | Loan processing fee in dollars | ### Validation Rules - **Name**: Must be unique within organization (if provided) - **Rates and Ratios**: Must be valid decimal numbers between 0 and 1 (if provided) - **Fees**: Must be non-negative numbers (if provided) - **Partial Updates**: Only provided fields will be updated - **Organization Scope**: Lender must belong to user\'s organization ## Request Example ```json { \"bridgeLoanInterestRate\": 0.115, \"longTermRateAndTermInterestRate\": 0.065, \"originationPoints\": 1.75 } ``` ## Access Control - **Organization Scope**: Lender must belong to the authenticated user\'s organization - **Lender Validation**: Invalid or non-existent lender IDs will return a 404 error - **Data Privacy**: Only lenders within the user\'s organization can be updated ## Response Structure Returns confirmation that the lender was successfully updated. ## Use Cases This endpoint is ideal for: - **Rate Updates**: Modify interest rates and loan terms as market conditions change - **Fee Adjustments**: Update origination points and processing fees - **Term Modifications**: Adjust loan-to-value ratios and other lending criteria - **Market Response**: Update terms based on competitive analysis - **Correction**: Fix incorrect information or update outdated terms - **Portfolio Management**: Maintain current lending terms for all financing partners ## Update Scenarios ### Rate Changes - **Market Adjustments**: Update rates based on federal rate changes - **Seasonal Terms**: Adjust terms for different market seasons - **Competitive Response**: Update rates to remain competitive ### Term Modifications - **Risk Adjustments**: Modify LTV ratios based on market conditions - **Product Changes**: Update loan products and associated terms - **Portfolio Strategy**: Adjust terms to align with business strategy ### Fee Updates - **Cost Adjustments**: Update fees based on operational cost changes - **Promotional Terms**: Temporarily adjust fees for special programs - **Market Positioning**: Modify fees for competitive positioning ## Validation and Constraints - **Name Uniqueness**: Updated names must be unique within the organization - **Rate Validation**: All rates and ratios are validated for reasonable ranges - **Data Integrity**: Updates maintain data consistency and integrity - **Organization Scoping**: Updates are scoped to the user\'s organization - **Audit Trail**: All updates are logged for compliance and tracking ## Error Handling Common validation errors include: - **Lender Not Found**: Lender ID does not exist or belongs to different organization - **Duplicate Name**: Updated name already exists in the organization - **Invalid Rates**: Rates or ratios outside acceptable ranges - **Invalid Data Types**: Non-numeric values for loan terms - **Permission Denied**: User lacks permission to update lenders
* @summary Update a specific lender by lenderId
* @param {number} lenderId The unique identifier of the lender
* @param {V4LendersUpdateLenderBodyDto} v4LendersUpdateLenderBodyDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof LendersAPIV4ApiInterface
*/
v4LendersControllerUpdateLenderV4Raw(requestParameters: V4LendersControllerUpdateLenderV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4LendersUpdateLenderResponseDto>>;
/**
* # PATCH /v4/lenders/{lenderId} ## Overview Updates an existing lender with the provided information. This endpoint allows partial updates, meaning you only need to include the fields you want to change. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `lenderId` | number | Yes | The unique identifier of the lender to update | ## Request Body The request body should contain only the fields you want to update. All fields are optional for updates. ### Updateable Fields | Field | Type | Description | |-------|------|-------------| | `name` | string | Lender company name (must be unique within organization) | | `bridgeLoanLoanToPurchasePrice` | number | Bridge loan to purchase price ratio (decimal) | | `bridgeLoanLoanToRefinanceCost` | number | Bridge loan to refinance cost ratio (decimal) | | `bridgeLoanInterestRate` | number | Bridge loan annual interest rate (decimal) | | `longTermRateAndTermInterestRate` | number | Long-term rate and term interest rate (decimal) | | `longTermCashOutInterestRate` | number | Long-term cash-out interest rate (decimal) | | `longTermRateAndTermLoanToValue` | number | Long-term rate and term LTV ratio (decimal) |