UNPKG

@simplyhomes/sos-sdk

Version:

TypeScript SDK for Simply Homes SoS API v4

250 lines 59.9 kB
/* tslint:disable */ /* eslint-disable */ /** * 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 { V4OwnersCreateOwnerBodyDtoToJSON, V4OwnersCreateOwnerResponseDtoFromJSON, V4OwnersDeleteOwnerResponseDtoFromJSON, V4OwnersGetOwnerColumnsResponseDtoFromJSON, V4OwnersGetOwnerResponseDtoFromJSON, V4OwnersGetOwnersInViewResponseDtoFromJSON, V4OwnersGetOwnersResponseDtoFromJSON, V4OwnersUpdateOwnerBodyDtoToJSON, V4OwnersUpdateOwnerResponseDtoFromJSON, } from '../models/index'; /** * */ export class OwnersAPIV4Api extends runtime.BaseAPI { /** * # POST /v4/owners ## Overview Creates a new property owner with the provided information. This endpoint allows you to add new property owners to your organization with their contact details and investment profiles. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Body The request body should contain owner information to create the new owner. ### Required Fields | Field | Type | Description | |-------|------|-------------| | `name` | string | Owner name (individual or entity name) | ### Optional Fields | Field | Type | Description | |-------|------|-------------| | `email` | string | Primary email address | | `phonePrimary` | string | Primary phone number | | `phoneSecondary` | string | Secondary phone number | | `address` | string | Mailing address | | `investmentCapacity` | number | Financial investment capacity | | `portfolioSize` | number | Number of properties currently owned | | `investmentPreferences` | array | Property type preferences | | `serviceAreas` | array | Geographic areas of interest | | `preferredContact` | string | Preferred contact method | ### Validation Rules - **Name**: Required, non-empty string, should be descriptive - **Email**: Must be a valid email format if provided - **Phone Numbers**: Must follow valid phone number format if provided - **Investment Capacity**: Must be a positive number if provided - **Organization Scoping**: Owner is automatically associated with user\'s organization ## Request Example ```json { \"name\": \"Jane Smith\", \"email\": \"jane@example.com\", \"phonePrimary\": \"+1234567890\", \"address\": \"456 Oak St, City, State 12345\", \"investmentCapacity\": 500000, \"portfolioSize\": 3, \"investmentPreferences\": [\"Residential\", \"Multi-family\"], \"serviceAreas\": [\"Downtown\", \"Suburbs\"] } ``` ## Response Structure Returns the newly created owner\'s ID and confirmation. ## Use Cases This endpoint is ideal for: - **Lead Management**: Add new potential sellers and investment partners - **Deal Sourcing**: Include property owners for acquisition opportunities - **Market Expansion**: Add owners in new geographic markets - **Relationship Building**: Build database of property owner relationships - **Integration**: Sync owners from external CRM or lead generation systems - **Prospecting**: Manage prospects and investment opportunities ## Business Rules - **Name Requirements**: Owner names should be clear and descriptive - **Default Values**: Unspecified contact details default to null and can be updated later - **Organization Association**: Owners are automatically scoped to the user\'s organization - **Data Validation**: All contact information is validated for reasonable formats - **Audit Trail**: Owner creation is logged for compliance and tracking ## Owner Profile Setup ### Initial Configuration You can provide basic information during creation or update details later: - **Contact Information**: Email addresses and phone numbers - **Investment Profile**: Capacity, preferences, and geographic focus - **Portfolio Information**: Current property holdings and investment history ### Progressive Setup - **Minimal Creation**: Create with just a name and add details progressively - **Complete Setup**: Provide all available information during initial creation - **Flexible Updates**: Update any information after creation using PATCH endpoint ## Error Handling Common validation errors include: - **Missing Required Fields**: Name not provided - **Invalid Email**: Email does not follow valid email format - **Invalid Phone Format**: Phone numbers do not follow expected format - **Invalid Investment Capacity**: Negative or unrealistic investment amounts - **Invalid Data Types**: Non-string values for text fields or non-numeric values for amounts * Create a new owner */ async v4OwnersControllerCreateOwnerV4Raw(requestParameters, initOverrides) { if (requestParameters['v4OwnersCreateOwnerBodyDto'] == null) { throw new runtime.RequiredError('v4OwnersCreateOwnerBodyDto', 'Required parameter "v4OwnersCreateOwnerBodyDto" was null or undefined when calling v4OwnersControllerCreateOwnerV4().'); } const queryParameters = {}; const headerParameters = {}; headerParameters['Content-Type'] = 'application/json'; if (this.configuration && this.configuration.apiKey) { headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // x-api-key authentication } if (this.configuration && this.configuration.apiKey) { headerParameters["organization-id"] = await this.configuration.apiKey("organization-id"); // organization-id authentication } let urlPath = `/v4/owners`; const response = await this.request({ path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, body: V4OwnersCreateOwnerBodyDtoToJSON(requestParameters['v4OwnersCreateOwnerBodyDto']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => V4OwnersCreateOwnerResponseDtoFromJSON(jsonValue)); } /** * # POST /v4/owners ## Overview Creates a new property owner with the provided information. This endpoint allows you to add new property owners to your organization with their contact details and investment profiles. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Body The request body should contain owner information to create the new owner. ### Required Fields | Field | Type | Description | |-------|------|-------------| | `name` | string | Owner name (individual or entity name) | ### Optional Fields | Field | Type | Description | |-------|------|-------------| | `email` | string | Primary email address | | `phonePrimary` | string | Primary phone number | | `phoneSecondary` | string | Secondary phone number | | `address` | string | Mailing address | | `investmentCapacity` | number | Financial investment capacity | | `portfolioSize` | number | Number of properties currently owned | | `investmentPreferences` | array | Property type preferences | | `serviceAreas` | array | Geographic areas of interest | | `preferredContact` | string | Preferred contact method | ### Validation Rules - **Name**: Required, non-empty string, should be descriptive - **Email**: Must be a valid email format if provided - **Phone Numbers**: Must follow valid phone number format if provided - **Investment Capacity**: Must be a positive number if provided - **Organization Scoping**: Owner is automatically associated with user\'s organization ## Request Example ```json { \"name\": \"Jane Smith\", \"email\": \"jane@example.com\", \"phonePrimary\": \"+1234567890\", \"address\": \"456 Oak St, City, State 12345\", \"investmentCapacity\": 500000, \"portfolioSize\": 3, \"investmentPreferences\": [\"Residential\", \"Multi-family\"], \"serviceAreas\": [\"Downtown\", \"Suburbs\"] } ``` ## Response Structure Returns the newly created owner\'s ID and confirmation. ## Use Cases This endpoint is ideal for: - **Lead Management**: Add new potential sellers and investment partners - **Deal Sourcing**: Include property owners for acquisition opportunities - **Market Expansion**: Add owners in new geographic markets - **Relationship Building**: Build database of property owner relationships - **Integration**: Sync owners from external CRM or lead generation systems - **Prospecting**: Manage prospects and investment opportunities ## Business Rules - **Name Requirements**: Owner names should be clear and descriptive - **Default Values**: Unspecified contact details default to null and can be updated later - **Organization Association**: Owners are automatically scoped to the user\'s organization - **Data Validation**: All contact information is validated for reasonable formats - **Audit Trail**: Owner creation is logged for compliance and tracking ## Owner Profile Setup ### Initial Configuration You can provide basic information during creation or update details later: - **Contact Information**: Email addresses and phone numbers - **Investment Profile**: Capacity, preferences, and geographic focus - **Portfolio Information**: Current property holdings and investment history ### Progressive Setup - **Minimal Creation**: Create with just a name and add details progressively - **Complete Setup**: Provide all available information during initial creation - **Flexible Updates**: Update any information after creation using PATCH endpoint ## Error Handling Common validation errors include: - **Missing Required Fields**: Name not provided - **Invalid Email**: Email does not follow valid email format - **Invalid Phone Format**: Phone numbers do not follow expected format - **Invalid Investment Capacity**: Negative or unrealistic investment amounts - **Invalid Data Types**: Non-string values for text fields or non-numeric values for amounts * Create a new owner */ async v4OwnersControllerCreateOwnerV4(requestParameters, initOverrides) { const response = await this.v4OwnersControllerCreateOwnerV4Raw(requestParameters, initOverrides); return await response.value(); } /** * # DELETE /v4/owners/{ownerId} ## Overview Deletes an existing property owner from the system. This is a permanent operation that removes the owner 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 | |-----------|------|----------|-------------| | `ownerId` | number | Yes | The unique identifier of the owner to delete | ## Access Control - **Organization Scope**: Owner must belong to the authenticated user\'s organization - **Owner Validation**: Invalid or non-existent owner IDs will return a 404 error - **Data Privacy**: Only owners within the user\'s organization can be deleted ## Deletion Behavior The deletion operation: - **Permanent Removal**: Owner 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 owner was successfully deleted. ## Use Cases This endpoint is ideal for: - **Data Cleanup**: Remove outdated or inactive owner records - **Lead Management**: Remove unqualified or unresponsive leads - **Privacy Compliance**: Delete owners upon request (GDPR, etc.) - **System Maintenance**: Clean up test or duplicate owner data - **Relationship Termination**: Remove owners when business relationships end - **Data Quality**: Remove owners with incorrect or incomplete information ## Important Considerations Before deleting an owner, consider: - **Active Deals**: Check if owner is involved in active property deals - **Historical Data**: Consider impact on historical deal records and analysis - **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 Owner deletion may affect: - **Property Deals**: Deals where this owner is seller or buyer - **Historical Records**: Past deals and ownership analysis - **Lead Pipeline**: Lead generation and qualification workflows - **Market Analysis**: Market research that included this owner - **Integration**: External systems that reference this owner ## Data Relationships The system handles these relationships during deletion: - **Deal References**: Deals involving this owner are updated appropriately - **Ownership History**: Historical ownership records are preserved with archived data - **User Preferences**: User preferences referencing this owner are updated - **Views and Filters**: Saved views that filter by this owner are updated - **Reports**: Report configurations are updated to handle missing owner ## Error Handling Common errors include: - **Owner Not Found**: Owner ID does not exist or belongs to different organization - **Permission Denied**: User lacks permission to delete owners - **Referential Constraints**: Owner 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 owners 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 owners can be recreated with POST /v4/owners * Delete a specific owner by ownerId */ async v4OwnersControllerDeleteOwnerV4Raw(requestParameters, initOverrides) { if (requestParameters['ownerId'] == null) { throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling v4OwnersControllerDeleteOwnerV4().'); } const queryParameters = {}; const headerParameters = {}; if (this.configuration && this.configuration.apiKey) { headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // x-api-key authentication } if (this.configuration && this.configuration.apiKey) { headerParameters["organization-id"] = await this.configuration.apiKey("organization-id"); // organization-id authentication } let urlPath = `/v4/owners/{ownerId}`; urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId']))); const response = await this.request({ path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => V4OwnersDeleteOwnerResponseDtoFromJSON(jsonValue)); } /** * # DELETE /v4/owners/{ownerId} ## Overview Deletes an existing property owner from the system. This is a permanent operation that removes the owner 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 | |-----------|------|----------|-------------| | `ownerId` | number | Yes | The unique identifier of the owner to delete | ## Access Control - **Organization Scope**: Owner must belong to the authenticated user\'s organization - **Owner Validation**: Invalid or non-existent owner IDs will return a 404 error - **Data Privacy**: Only owners within the user\'s organization can be deleted ## Deletion Behavior The deletion operation: - **Permanent Removal**: Owner 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 owner was successfully deleted. ## Use Cases This endpoint is ideal for: - **Data Cleanup**: Remove outdated or inactive owner records - **Lead Management**: Remove unqualified or unresponsive leads - **Privacy Compliance**: Delete owners upon request (GDPR, etc.) - **System Maintenance**: Clean up test or duplicate owner data - **Relationship Termination**: Remove owners when business relationships end - **Data Quality**: Remove owners with incorrect or incomplete information ## Important Considerations Before deleting an owner, consider: - **Active Deals**: Check if owner is involved in active property deals - **Historical Data**: Consider impact on historical deal records and analysis - **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 Owner deletion may affect: - **Property Deals**: Deals where this owner is seller or buyer - **Historical Records**: Past deals and ownership analysis - **Lead Pipeline**: Lead generation and qualification workflows - **Market Analysis**: Market research that included this owner - **Integration**: External systems that reference this owner ## Data Relationships The system handles these relationships during deletion: - **Deal References**: Deals involving this owner are updated appropriately - **Ownership History**: Historical ownership records are preserved with archived data - **User Preferences**: User preferences referencing this owner are updated - **Views and Filters**: Saved views that filter by this owner are updated - **Reports**: Report configurations are updated to handle missing owner ## Error Handling Common errors include: - **Owner Not Found**: Owner ID does not exist or belongs to different organization - **Permission Denied**: User lacks permission to delete owners - **Referential Constraints**: Owner 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 owners 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 owners can be recreated with POST /v4/owners * Delete a specific owner by ownerId */ async v4OwnersControllerDeleteOwnerV4(requestParameters, initOverrides) { const response = await this.v4OwnersControllerDeleteOwnerV4Raw(requestParameters, initOverrides); return await response.value(); } /** * # GET /v4/owners/{ownerId}/{columns} ## Overview Retrieves specific columns for an owner identified by its unique ID. This endpoint allows selective data retrieval, returning only the requested fields for the specified owner. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `ownerId` | number | Yes | The unique identifier of the owner | | `columns` | string | Yes | Comma-separated list of column names to retrieve | ## Column Selection Specify desired columns as a comma-separated string: - **Basic Info**: `oid,name,organizationId` - **Contact Information**: `email,phonePrimary,phoneSecondary,address` - **Investment Profile**: `investmentCapacity,portfolioSize,investmentPreferences` - **Geographic Data**: `serviceAreas,propertyLocations,marketFocus` - **Custom Selection**: Any combination of available columns ## Available Columns ### Basic Information - `oid`: Owner ID - `name`: Owner name - `organizationId`: Organization ID ### Contact Information - `email`: Primary email address - `phonePrimary`: Primary phone number - `phoneSecondary`: Secondary phone number - `address`: Mailing address - `preferredContact`: Preferred contact method ### Investment Information - `investmentCapacity`: Financial investment capacity - `portfolioSize`: Number of properties owned - `investmentPreferences`: Property type preferences - `averageHoldPeriod`: Typical property holding period - `investmentBudget`: Typical investment budget range ### Geographic and Market Data - `serviceAreas`: Areas of investment interest - `propertyLocations`: Current property locations - `marketFocus`: Target markets for investment - `geographicPreferences`: Geographic investment preferences ## Access Control - **Organization Scope**: Owner 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 owner 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 owner by ownerId */ async v4OwnersControllerGetOwnerColumnsV4Raw(requestParameters, initOverrides) { if (requestParameters['columns'] == null) { throw new runtime.RequiredError('columns', 'Required parameter "columns" was null or undefined when calling v4OwnersControllerGetOwnerColumnsV4().'); } if (requestParameters['ownerId'] == null) { throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling v4OwnersControllerGetOwnerColumnsV4().'); } const queryParameters = {}; const headerParameters = {}; if (this.configuration && this.configuration.apiKey) { headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // x-api-key authentication } if (this.configuration && this.configuration.apiKey) { headerParameters["organization-id"] = await this.configuration.apiKey("organization-id"); // organization-id authentication } let urlPath = `/v4/owners/{ownerId}/{columns}`; urlPath = urlPath.replace(`{${"columns"}}`, encodeURIComponent(String(requestParameters['columns']))); urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId']))); const response = await this.request({ path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => V4OwnersGetOwnerColumnsResponseDtoFromJSON(jsonValue)); } /** * # GET /v4/owners/{ownerId}/{columns} ## Overview Retrieves specific columns for an owner identified by its unique ID. This endpoint allows selective data retrieval, returning only the requested fields for the specified owner. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `ownerId` | number | Yes | The unique identifier of the owner | | `columns` | string | Yes | Comma-separated list of column names to retrieve | ## Column Selection Specify desired columns as a comma-separated string: - **Basic Info**: `oid,name,organizationId` - **Contact Information**: `email,phonePrimary,phoneSecondary,address` - **Investment Profile**: `investmentCapacity,portfolioSize,investmentPreferences` - **Geographic Data**: `serviceAreas,propertyLocations,marketFocus` - **Custom Selection**: Any combination of available columns ## Available Columns ### Basic Information - `oid`: Owner ID - `name`: Owner name - `organizationId`: Organization ID ### Contact Information - `email`: Primary email address - `phonePrimary`: Primary phone number - `phoneSecondary`: Secondary phone number - `address`: Mailing address - `preferredContact`: Preferred contact method ### Investment Information - `investmentCapacity`: Financial investment capacity - `portfolioSize`: Number of properties owned - `investmentPreferences`: Property type preferences - `averageHoldPeriod`: Typical property holding period - `investmentBudget`: Typical investment budget range ### Geographic and Market Data - `serviceAreas`: Areas of investment interest - `propertyLocations`: Current property locations - `marketFocus`: Target markets for investment - `geographicPreferences`: Geographic investment preferences ## Access Control - **Organization Scope**: Owner 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 owner 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 owner by ownerId */ async v4OwnersControllerGetOwnerColumnsV4(requestParameters, initOverrides) { const response = await this.v4OwnersControllerGetOwnerColumnsV4Raw(requestParameters, initOverrides); return await response.value(); } /** * # GET /v4/owners/{ownerId} ## Overview Retrieves detailed information for a specific property owner by its unique identifier. This endpoint returns complete owner data including all contact details, property portfolio, and ownership history. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `ownerId` | number | Yes | The unique identifier of the owner to retrieve | ### Query Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `viewId` | number | No | Optional view ID to apply column selection and formatting | ## Access Control - **Organization Scope**: Owner must belong to the authenticated user\'s organization - **Owner Validation**: Invalid or non-existent owner IDs will return a 404 error - **Data Privacy**: Only owners within the user\'s organization are accessible ## Response Structure Returns a complete owner object with all available fields and ownership information. ## Use Cases This endpoint is ideal for: - **Owner Detail Views**: Display complete owner information in detail pages - **Deal Preparation**: Access all owner information for deal preparation and outreach - **Due Diligence**: Get detailed owner information for investment analysis - **Relationship Management**: Access complete contact and background information - **Portfolio Analysis**: Understand owner\'s complete property portfolio and investment patterns - **Market Research**: Analyze individual owner investment strategies and preferences ## Owner Information Access The response includes comprehensive ownership information: - **Contact Details**: All available contact methods and addresses - **Property Portfolio**: Complete list of properties owned and ownership history - **Investment Profile**: Investment preferences, capacity, and historical patterns - **Financial Information**: Available financial and creditworthiness data - **Geographic Presence**: Areas of investment and property concentration - **Decision-Making**: Preferred communication methods and decision timelines ## Performance Considerations - **Single Record Fetch**: Optimized for retrieving individual owners - **Complete Data**: Returns all available owner fields and information - **Real-time Data**: Always returns current owner information - **Organization Filtering**: Automatic organization scoping ensures security * Get a specific owner by ownerId */ async v4OwnersControllerGetOwnerV4Raw(requestParameters, initOverrides) { if (requestParameters['ownerId'] == null) { throw new runtime.RequiredError('ownerId', 'Required parameter "ownerId" was null or undefined when calling v4OwnersControllerGetOwnerV4().'); } const queryParameters = {}; if (requestParameters['viewId'] != null) { queryParameters['viewId'] = requestParameters['viewId']; } const headerParameters = {}; if (this.configuration && this.configuration.apiKey) { headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // x-api-key authentication } if (this.configuration && this.configuration.apiKey) { headerParameters["organization-id"] = await this.configuration.apiKey("organization-id"); // organization-id authentication } let urlPath = `/v4/owners/{ownerId}`; urlPath = urlPath.replace(`{${"ownerId"}}`, encodeURIComponent(String(requestParameters['ownerId']))); const response = await this.request({ path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => V4OwnersGetOwnerResponseDtoFromJSON(jsonValue)); } /** * # GET /v4/owners/{ownerId} ## Overview Retrieves detailed information for a specific property owner by its unique identifier. This endpoint returns complete owner data including all contact details, property portfolio, and ownership history. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `ownerId` | number | Yes | The unique identifier of the owner to retrieve | ### Query Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `viewId` | number | No | Optional view ID to apply column selection and formatting | ## Access Control - **Organization Scope**: Owner must belong to the authenticated user\'s organization - **Owner Validation**: Invalid or non-existent owner IDs will return a 404 error - **Data Privacy**: Only owners within the user\'s organization are accessible ## Response Structure Returns a complete owner object with all available fields and ownership information. ## Use Cases This endpoint is ideal for: - **Owner Detail Views**: Display complete owner information in detail pages - **Deal Preparation**: Access all owner information for deal preparation and outreach - **Due Diligence**: Get detailed owner information for investment analysis - **Relationship Management**: Access complete contact and background information - **Portfolio Analysis**: Understand owner\'s complete property portfolio and investment patterns - **Market Research**: Analyze individual owner investment strategies and preferences ## Owner Information Access The response includes comprehensive ownership information: - **Contact Details**: All available contact methods and addresses - **Property Portfolio**: Complete list of properties owned and ownership history - **Investment Profile**: Investment preferences, capacity, and historical patterns - **Financial Information**: Available financial and creditworthiness data - **Geographic Presence**: Areas of investment and property concentration - **Decision-Making**: Preferred communication methods and decision timelines ## Performance Considerations - **Single Record Fetch**: Optimized for retrieving individual owners - **Complete Data**: Returns all available owner fields and information - **Real-time Data**: Always returns current owner information - **Organization Filtering**: Automatic organization scoping ensures security * Get a specific owner by ownerId */ async v4OwnersControllerGetOwnerV4(requestParameters, initOverrides) { const response = await this.v4OwnersControllerGetOwnerV4Raw(requestParameters, initOverrides); return await response.value(); } /** * # GET /v4/owners/viewId/{viewId} ## Overview Retrieves owners filtered by a specific view configuration. This endpoint applies view-defined filters, sorts, and column selections to provide a customized dataset of property owners. ## 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 owners to return (default: 20, max: 100) | | `offset` | number | No | Number of owners to skip for pagination (default: 0) | | `countOnly` | boolean | No | Return only the count of owners without the actual data | ## View Application The specified view configuration is applied automatically: - **Filters**: All view filters are applied to narrow the owner dataset - **Sorts**: View sort criteria determine the order of returned owners - **Columns**: View column selection determines which fields are returned - **Relationships**: Related data inclusion based on view configuration ## Access Control - **Organization Scope**: Owners are filtered by the user\'s organization - **View Ownership**: View must belong to the requesting user - **Data Privacy**: Only organization owners are accessible through views ## Response Structure Returns owners that match the specified view configuration. ## Use Cases This endpoint is ideal for: - **Custom Dashboards**: Display owners according to predefined views - **Filtered Reports**: Generate reports with specific owner criteria - **Saved Searches**: Retrieve owners using saved filter combinations - **User Preferences**: Apply user-defined owner viewing preferences - **Specialized Views**: Access owners for specific investment criteria or geographic areas ## 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 owners with a specific viewId */ async v4OwnersControllerGetOwnersInViewV4Raw(requestParameters, initOverrides) { if (requestParameters['viewId'] == null) { throw new runtime.RequiredError('viewId', 'Required parameter "viewId" was null or undefined when calling v4OwnersControllerGetOwnersInViewV4().'); } const queryParameters = {}; if (requestParameters['limit'] != null) { queryParameters['limit'] = requestParameters['limit']; } if (requestParameters['offset'] != null) { queryParameters['offset'] = requestParameters['offset']; } if (requestParameters['countOnly'] != null) { queryParameters['countOnly'] = requestParameters['countOnly']; } const headerParameters = {}; if (this.configuration && this.configuration.apiKey) { headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // x-api-key authentication } if (this.configuration && this.configuration.apiKey) { headerParameters["organization-id"] = await this.configuration.apiKey("organization-id"); // organization-id authentication } let urlPath = `/v4/owners/viewId/{viewId}`; urlPath = urlPath.replace(`{${"viewId"}}`, encodeURIComponent(String(requestParameters['viewId']))); const response = await this.request({ path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => V4OwnersGetOwnersInViewResponseDtoFromJSON(jsonValue)); } /** * # GET /v4/owners/viewId/{viewId} ## Overview Retrieves owners filtered by a specific view configuration. This endpoint applies view-defined filters, sorts, and column selections to provide a customized dataset of property owners. ## 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 owners to return (default: 20, max: 100) | | `offset` | number | No | Number of owners to skip for pagination (default: 0) | | `countOnly` | boolean | No | Return only the count of owners without the actual data | ## View Application The specified view configuration is applied automatically: - **Filters**: All view filters are applied to narrow the owner dataset - **Sorts**: View sort criteria determine the order of returned owners - **Columns**: View column selection determines which fields are returned - **Relationships**: Related data inclusion based on view configuration ## Access Control - **Organization Scope**: Owners are filtered by the user\'s organization - **View Ownership**: View must belong to the requesting user - **Data Privacy**: Only organization owners are accessible through views ## Response Structure Returns owners that match the specified view configuration. ## Use Cases This endpoint is ideal for: - **Custom Dashboards**: Display owners according to predefined views - **Filtered Reports**: Generate reports with specific owner criteria - **Saved Searches**: Retrieve owners using saved filter combinations - **User Preferences**: Apply user-defined owner viewing preferences - **Specialized Views**: Access owners for specific investment criteria or geographic areas ## 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 owners with a specific viewId */ async v4OwnersControllerGetOwnersInViewV4(requestParameters, initOverrides) { const response = await this.v4OwnersControllerGetOwnersInViewV4Raw(requestParameters, initOverrides); return await response.value(); } /** * # GET /v4/owners ## Overview Retrieves a list of property owners with optional filtering, sorting, and pagination capabilities. This endpoint provides access to owner information including contact details, property portfolio, and ownership history. ## 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 owners to return (default: 20, max: 100) | | `offset` | number | No | Number of owners to skip for pagination (default: 0) | | `countOnly` | boolean | No | Return only the count of owners without the actual data | ## Access Control - **Organization Scope**: Owners are filtered by the user\'s organization - **Data Privacy**: Only owners within the organization are accessible - **Permission**: User must have owner read permissions ## View Integration When a `viewId` is provided: - **Filters**: All view filters are applied to narrow the owner dataset - **Sorts**: View sort criteria determine the order of returned owners - **Columns**: View column selection determines which fields are returned - **Consistent Results**: Same view produces consistent response structure ## Response Structure Returns a paginated list of owners matching the specified criteria. ## Use Cases This endpoint is ideal for: - **Owner Management**: Building owner listing interfaces and dashboards - **Lead Generation**: Finding potential sellers and investment opportunities - **Deal Sourcing**: Identifying property owners for acquisition - **Portfolio Analysis**: Analyzing owner portfolios and investment patterns - **Market Research**: Understanding ownership patterns in target markets - **Relationship Building**: Managing relationships with property owners ## Owner Data Categories Owner information includes: - **Basic Information**: Name and identification - **Contact Details**: Phone numbers, email addresses, and mailing addresses - **Property Portfolio**: Properties owned and ownership history - **Investment Profile**: Investment preferences and portfolio size - **Financial Information**: Net worth estimates and investment capacity - **Geographic Presence**: Areas where owners have properties ## 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 owners with optional viewId */ async v4OwnersControllerGetOwnersV4Raw(requestParameters, initOverrides) { const queryParameters = {}; if (requestParameters['viewId'] != null) { queryParameters['viewId'] = requestParameters['viewId']; } if (requestParameters['limit'] != null) { queryParameters['limit'] = requestParameters['limit']; } if (requestParameters['offset'] != null) { queryParameters['offset'] = requestParameters['offset']; } if (requestParameters['countOnly'] != null) { queryParameters['countOnly'] = requestParameters['countOnly']; } const headerParameters = {}; if (this.configuration && this.configuration.apiKey) { headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // x-api-key authentication } if (this.configuration && this.configuration.apiKey) { headerParameters["organization-id"] = await this.configuration.apiKey("organization-id"); // organization-id authentication } let urlPath = `/v4/owners`; const response = await this.request({ path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => V4OwnersGetOwnersResponseDtoFromJSON(jsonValue)); } /** * # GET /v4/owners ## Overview Retrieves a list of property owners with optional filtering, sorting, and pagination capabilities. This endpoint provides access to owner information including contact details, property portfolio, and ownership history. ## 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 owners to return (default: 20, max: 100) | | `offset` | number | No | Number of owners to skip for pagination (default: 0) | | `countOnly` | boolean | No | Return only the count of owners without the actual data | ## Access Control - **Organization Scope**: Owners are filtered by the user\'s organization - **Data Privacy**: Only owners within the organization are accessible - **Permission**: User must have owner read permissions ## View Integration When a `viewId` is provided: - **Filters**: All view filters are applied to narrow the owner dataset - **Sorts**: View sort criteria determine the order of returned owners - **Columns**: View column selection determines which fields are returned - **Consistent Results**: Same view produces consistent response structure ## Response Structure Returns a paginated list of owners matching the specified criteria. ## Use Cases This endpoint is ideal for: - **Owner Management**: Building owner listing interfaces and dashboards - **Lead Generation**: Finding potential sellers and investment opportunities - **Deal Sourcing**: Identifying property owners for acquisition - **Portfolio Analysis**: Analyzing owner portfolios and investment patterns - **Market Research**: Understanding ownership patterns in target markets - **Relationship Building**: Managing relationships with property owners ## Owner Data Categories Owner information includes: - **Basic Information**: Name and identification - **Contact Details**: Phone numbers, email addresses, and mailing addresses - **Property Portfolio**: Properties owned and ownership history - **Investment Profile**: Investment preferences and portfolio size - **Financial Information**: Net worth estimates and investment capacity - **Geographic Presence**: Areas where owners have properties ## 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 owners with optional viewId */ async v4OwnersControllerGetOwnersV4(requestParameters = {}, initOverrides) { const response = await this.v4OwnersControllerGetOwnersV4Raw(requestParameters, initOverrides); return await response.value(); } /** * # PATCH /v4/owners/{ownerId} ## Overview Updates an existing property owner 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 | |-----------|------|----------|-------------| | `ownerId` | number | Yes | The unique identifier of the owner 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 | Owner name (individual or entity name) | | `email` | string | Primary email address | | `phonePrimary` | string | Primary phone number | | `phoneSecondary` | string | Secondary phone number | | `address` | string | Mailing address | | `investmentCapacity` | number | Financial investment capacity | | `portfolioSize` | number | Number of properti