UNPKG

@simplyhomes/sos-sdk

Version:

TypeScript SDK for Simply Homes SoS API v4

192 lines 55.8 kB
/** * 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 { V4MarketsDeleteMarketResponseDto, V4MarketsGetMarketColumnsResponseDto, V4MarketsGetMarketResponseDto, V4MarketsGetMarketsInViewResponseDto, V4MarketsGetMarketsResponseDto, V4MarketsUpdateMarketBodyDto, V4MarketsUpdateMarketResponseDto } from '../models/index'; export interface V4MarketsControllerDeleteMarketV4Request { marketId: number; } export interface V4MarketsControllerGetMarketColumnsV4Request { columns: string; marketId: number; } export interface V4MarketsControllerGetMarketV4Request { marketId: number; viewId?: number; } export interface V4MarketsControllerGetMarketsInViewV4Request { viewId: number; limit?: number; offset?: number; countOnly?: boolean; } export interface V4MarketsControllerGetMarketsV4Request { viewId?: number; limit?: number; offset?: number; countOnly?: boolean; } export interface V4MarketsControllerUpdateMarketV4Request { marketId: number; v4MarketsUpdateMarketBodyDto: V4MarketsUpdateMarketBodyDto; } /** * MarketsAPIV4Api - interface * * @export * @interface MarketsAPIV4ApiInterface */ export interface MarketsAPIV4ApiInterface { /** * # DELETE /v4/markets/{marketId} ## Overview Deletes an existing real estate market from the system. This is a permanent operation that removes the market and may affect associated properties, territories, and business operations. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `marketId` | number | Yes | The unique identifier of the market to delete | ## Access Control - **Organization Scope**: Market must belong to the authenticated user\'s organization - **Market Validation**: Invalid or non-existent market IDs will return a 404 error - **Data Privacy**: Only markets within the user\'s organization can be deleted ## Deletion Behavior The deletion operation: - **Permanent Removal**: Market record is permanently deleted from the system - **Cascade Effects**: Associated relationships and references are handled appropriately - **Territory Impact**: May affect sales territories and coverage areas - **Property Impact**: Properties assigned to this market may need reassignment - **Immediate Effect**: Deletion is applied immediately - **Audit Trail**: Deletion is logged for audit and compliance purposes ## Response Structure Returns confirmation that the market was successfully deleted. ## Use Cases This endpoint is ideal for: - **Market Consolidation**: Remove markets during business consolidation - **Territory Reorganization**: Delete markets as part of territory restructuring - **Data Cleanup**: Remove unused or obsolete markets - **Business Restructuring**: Delete markets during organizational changes - **Market Exit**: Remove markets when exiting specific geographic areas - **System Maintenance**: Clean up test or duplicate market data ## Important Considerations Before deleting a market, consider: - **Associated Properties**: Check if properties are assigned to this market - **Territory Dependencies**: Consider impact on sales territories and coverage - **Business Operations**: Assess impact on ongoing business operations - **Historical Data**: Consider preserving historical data and reporting - **User Notification**: Consider notifying relevant users of the deletion - **Alternative Actions**: Consider deactivating instead of permanent deletion ## Error Handling Common errors include: - **Market Not Found**: Market ID does not exist or belongs to different organization - **Permission Denied**: User lacks permission to delete markets - **Referential Constraints**: Market cannot be deleted due to active references - **Business Rules**: Market deletion violates business rules or constraints - **System Errors**: Database or system issues preventing deletion ## Recovery - **No Recovery**: Deleted market records cannot be restored through the API - **Backup Systems**: Recovery may be possible through system backups - **Audit Logs**: Deletion events are recorded for audit purposes - **Business Impact**: Consider business continuity and data recovery policies * @summary Delete a specific market by marketId * @param {number} marketId The unique identifier of the market * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof MarketsAPIV4ApiInterface */ v4MarketsControllerDeleteMarketV4Raw(requestParameters: V4MarketsControllerDeleteMarketV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4MarketsDeleteMarketResponseDto>>; /** * # DELETE /v4/markets/{marketId} ## Overview Deletes an existing real estate market from the system. This is a permanent operation that removes the market and may affect associated properties, territories, and business operations. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `marketId` | number | Yes | The unique identifier of the market to delete | ## Access Control - **Organization Scope**: Market must belong to the authenticated user\'s organization - **Market Validation**: Invalid or non-existent market IDs will return a 404 error - **Data Privacy**: Only markets within the user\'s organization can be deleted ## Deletion Behavior The deletion operation: - **Permanent Removal**: Market record is permanently deleted from the system - **Cascade Effects**: Associated relationships and references are handled appropriately - **Territory Impact**: May affect sales territories and coverage areas - **Property Impact**: Properties assigned to this market may need reassignment - **Immediate Effect**: Deletion is applied immediately - **Audit Trail**: Deletion is logged for audit and compliance purposes ## Response Structure Returns confirmation that the market was successfully deleted. ## Use Cases This endpoint is ideal for: - **Market Consolidation**: Remove markets during business consolidation - **Territory Reorganization**: Delete markets as part of territory restructuring - **Data Cleanup**: Remove unused or obsolete markets - **Business Restructuring**: Delete markets during organizational changes - **Market Exit**: Remove markets when exiting specific geographic areas - **System Maintenance**: Clean up test or duplicate market data ## Important Considerations Before deleting a market, consider: - **Associated Properties**: Check if properties are assigned to this market - **Territory Dependencies**: Consider impact on sales territories and coverage - **Business Operations**: Assess impact on ongoing business operations - **Historical Data**: Consider preserving historical data and reporting - **User Notification**: Consider notifying relevant users of the deletion - **Alternative Actions**: Consider deactivating instead of permanent deletion ## Error Handling Common errors include: - **Market Not Found**: Market ID does not exist or belongs to different organization - **Permission Denied**: User lacks permission to delete markets - **Referential Constraints**: Market cannot be deleted due to active references - **Business Rules**: Market deletion violates business rules or constraints - **System Errors**: Database or system issues preventing deletion ## Recovery - **No Recovery**: Deleted market records cannot be restored through the API - **Backup Systems**: Recovery may be possible through system backups - **Audit Logs**: Deletion events are recorded for audit purposes - **Business Impact**: Consider business continuity and data recovery policies * Delete a specific market by marketId */ v4MarketsControllerDeleteMarketV4(requestParameters: V4MarketsControllerDeleteMarketV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4MarketsDeleteMarketResponseDto>; /** * # GET /v4/markets/{marketId}/{columns} ## Overview Retrieves specific columns of a market by its unique identifier. This endpoint allows you to fetch only the data you need, improving performance and reducing bandwidth usage for market information. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `marketId` | number | Yes | The unique identifier of the market | | `columns` | string | Yes | Comma-separated list of column names to retrieve | ## Column Selection Available columns include: - **mid**: Market identifier - **name**: Market name - **state**: State or region - **city**: Primary city - **organizationId**: Organization identifier - **createdAt**: Creation timestamp - **updatedAt**: Last update timestamp ### Examples - Single column: `name` - Multiple columns: `name,state,city` - Location data: `name,state,city` - All metadata: `name,state,city,createdAt,updatedAt` ## Use Cases This endpoint is ideal for: - **Performance Optimization**: Fetch only required data to reduce response size - **Bandwidth Conservation**: Minimize data transfer for mobile or limited connections - **Specific Data Needs**: Get only the columns needed for specific use cases - **List Views**: Fetch minimal data for displaying market lists - **Reporting**: Extract specific columns for reporting purposes - **Data Integration**: Get specific market data for integration with other systems * @summary Get specific columns of a market by marketId * @param {string} columns Comma-separated list of column names * @param {number} marketId The unique identifier of the market * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof MarketsAPIV4ApiInterface */ v4MarketsControllerGetMarketColumnsV4Raw(requestParameters: V4MarketsControllerGetMarketColumnsV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4MarketsGetMarketColumnsResponseDto>>; /** * # GET /v4/markets/{marketId}/{columns} ## Overview Retrieves specific columns of a market by its unique identifier. This endpoint allows you to fetch only the data you need, improving performance and reducing bandwidth usage for market information. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `marketId` | number | Yes | The unique identifier of the market | | `columns` | string | Yes | Comma-separated list of column names to retrieve | ## Column Selection Available columns include: - **mid**: Market identifier - **name**: Market name - **state**: State or region - **city**: Primary city - **organizationId**: Organization identifier - **createdAt**: Creation timestamp - **updatedAt**: Last update timestamp ### Examples - Single column: `name` - Multiple columns: `name,state,city` - Location data: `name,state,city` - All metadata: `name,state,city,createdAt,updatedAt` ## Use Cases This endpoint is ideal for: - **Performance Optimization**: Fetch only required data to reduce response size - **Bandwidth Conservation**: Minimize data transfer for mobile or limited connections - **Specific Data Needs**: Get only the columns needed for specific use cases - **List Views**: Fetch minimal data for displaying market lists - **Reporting**: Extract specific columns for reporting purposes - **Data Integration**: Get specific market data for integration with other systems * Get specific columns of a market by marketId */ v4MarketsControllerGetMarketColumnsV4(requestParameters: V4MarketsControllerGetMarketColumnsV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4MarketsGetMarketColumnsResponseDto>; /** * # GET /v4/markets/{marketId} ## Overview Retrieves a specific real estate market by its unique identifier. This endpoint provides detailed information about a single market, including all relevant market data and attributes. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `marketId` | number | Yes | The unique identifier of the market to retrieve | ### Query Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `viewId` | number | No | Optional view ID to apply specific column selection and formatting | ## Access Control - **Organization Scope**: Only markets within the authenticated user\'s organization are accessible - **Market Validation**: Invalid or non-existent market IDs will return a 404 error - **Data Privacy**: Sensitive market data is protected by organization boundaries ## Response Structure Returns detailed information about the specified market. ## Use Cases This endpoint is ideal for: - **Market Details**: Get complete information about a specific market - **Market Analysis**: Analyze specific market characteristics and performance - **Territory Management**: Access detailed information for territory planning - **Market Verification**: Verify market properties and attributes - **Portfolio Analysis**: Get detailed market data for investment analysis - **Regional Planning**: Access market details for regional business planning * @summary Get a specific market by marketId * @param {number} marketId The unique identifier of the market * @param {number} [viewId] The ID of the view to use for retrieving the repository * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof MarketsAPIV4ApiInterface */ v4MarketsControllerGetMarketV4Raw(requestParameters: V4MarketsControllerGetMarketV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4MarketsGetMarketResponseDto>>; /** * # GET /v4/markets/{marketId} ## Overview Retrieves a specific real estate market by its unique identifier. This endpoint provides detailed information about a single market, including all relevant market data and attributes. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `marketId` | number | Yes | The unique identifier of the market to retrieve | ### Query Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `viewId` | number | No | Optional view ID to apply specific column selection and formatting | ## Access Control - **Organization Scope**: Only markets within the authenticated user\'s organization are accessible - **Market Validation**: Invalid or non-existent market IDs will return a 404 error - **Data Privacy**: Sensitive market data is protected by organization boundaries ## Response Structure Returns detailed information about the specified market. ## Use Cases This endpoint is ideal for: - **Market Details**: Get complete information about a specific market - **Market Analysis**: Analyze specific market characteristics and performance - **Territory Management**: Access detailed information for territory planning - **Market Verification**: Verify market properties and attributes - **Portfolio Analysis**: Get detailed market data for investment analysis - **Regional Planning**: Access market details for regional business planning * Get a specific market by marketId */ v4MarketsControllerGetMarketV4(requestParameters: V4MarketsControllerGetMarketV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4MarketsGetMarketResponseDto>; /** * # GET /v4/markets/viewId/{viewId} ## Overview Retrieves real estate markets using a specific view configuration. Views define custom filtering, sorting, and column selection for markets, allowing for organized and consistent data presentation based on business needs and market analysis requirements. ## 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 markets to return (default: 20, max: 100) | | `offset` | number | No | Number of markets to skip for pagination (default: 0) | | `countOnly` | boolean | No | Return only the count without the actual data | ## View Configuration Views can define: - **Column Selection**: Specific columns to include in the response - **Filtering Rules**: Criteria for which markets to include (by state, region, performance, etc.) - **Sorting Options**: Default sorting for the results - **Access Controls**: Additional permission checks ## Use Cases This endpoint is ideal for: - **Market Dashboards**: Display markets according to predefined dashboard configurations - **Regional Views**: Use views to organize markets by regions or territories - **Performance Views**: Apply views that filter markets by performance metrics - **User Preferences**: Apply user-specific view settings for consistent experience - **Filtered Lists**: Show only relevant markets based on view criteria - **Specialized Reports**: Create specialized views for different types of market analysis * @summary Get markets 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 MarketsAPIV4ApiInterface */ v4MarketsControllerGetMarketsInViewV4Raw(requestParameters: V4MarketsControllerGetMarketsInViewV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4MarketsGetMarketsInViewResponseDto>>; /** * # GET /v4/markets/viewId/{viewId} ## Overview Retrieves real estate markets using a specific view configuration. Views define custom filtering, sorting, and column selection for markets, allowing for organized and consistent data presentation based on business needs and market analysis requirements. ## 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 markets to return (default: 20, max: 100) | | `offset` | number | No | Number of markets to skip for pagination (default: 0) | | `countOnly` | boolean | No | Return only the count without the actual data | ## View Configuration Views can define: - **Column Selection**: Specific columns to include in the response - **Filtering Rules**: Criteria for which markets to include (by state, region, performance, etc.) - **Sorting Options**: Default sorting for the results - **Access Controls**: Additional permission checks ## Use Cases This endpoint is ideal for: - **Market Dashboards**: Display markets according to predefined dashboard configurations - **Regional Views**: Use views to organize markets by regions or territories - **Performance Views**: Apply views that filter markets by performance metrics - **User Preferences**: Apply user-specific view settings for consistent experience - **Filtered Lists**: Show only relevant markets based on view criteria - **Specialized Reports**: Create specialized views for different types of market analysis * Get markets with a specific viewId */ v4MarketsControllerGetMarketsInViewV4(requestParameters: V4MarketsControllerGetMarketsInViewV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4MarketsGetMarketsInViewResponseDto>; /** * # GET /v4/markets ## Overview Retrieves real estate markets with optional filtering, sorting, and pagination capabilities. This endpoint provides access to all market data for real estate analysis, territory management, and geographic organization. ## 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 markets to return (default: 20, max: 100) | | `offset` | number | No | Number of markets to skip for pagination (default: 0) | | `countOnly` | boolean | No | Return only the count of markets without the actual data | ## Use Cases This endpoint is ideal for: - **Market Analysis**: Browse and analyze real estate markets for investment decisions - **Territory Management**: Organize sales territories and market coverage - **Geographic Organization**: Manage properties and operations by market regions - **Market Research**: Study market trends and performance across different areas - **Portfolio Management**: Track investment portfolios across multiple markets - **Reporting**: Generate market-based reports and analytics * @summary Get markets 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 MarketsAPIV4ApiInterface */ v4MarketsControllerGetMarketsV4Raw(requestParameters: V4MarketsControllerGetMarketsV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4MarketsGetMarketsResponseDto>>; /** * # GET /v4/markets ## Overview Retrieves real estate markets with optional filtering, sorting, and pagination capabilities. This endpoint provides access to all market data for real estate analysis, territory management, and geographic organization. ## 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 markets to return (default: 20, max: 100) | | `offset` | number | No | Number of markets to skip for pagination (default: 0) | | `countOnly` | boolean | No | Return only the count of markets without the actual data | ## Use Cases This endpoint is ideal for: - **Market Analysis**: Browse and analyze real estate markets for investment decisions - **Territory Management**: Organize sales territories and market coverage - **Geographic Organization**: Manage properties and operations by market regions - **Market Research**: Study market trends and performance across different areas - **Portfolio Management**: Track investment portfolios across multiple markets - **Reporting**: Generate market-based reports and analytics * Get markets with optional viewId */ v4MarketsControllerGetMarketsV4(requestParameters: V4MarketsControllerGetMarketsV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4MarketsGetMarketsResponseDto>; /** * # PATCH /v4/markets/{marketId} ## Overview Updates information of an existing real estate market. This endpoint allows you to modify market properties such as name, location details, and other market attributes. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `marketId` | number | Yes | The unique identifier of the market to update | ## Request Body The request body should contain the fields to update. All fields are optional. ### Optional Fields | Field | Type | Description | |-------|------|-------------| | `name` | string | Market name or description | | `state` | string | State or region where the market is located | | `city` | string | Primary city in the market | ### Validation Rules - **Name**: Must be a non-empty string if provided - **State**: Should be a valid state/region code if provided - **City**: Must be a non-empty string if provided ## Use Cases This endpoint is ideal for: - **Market Information Updates**: Update market names, locations, or descriptions - **Territory Adjustments**: Modify market boundaries or coverage areas - **Market Reorganization**: Update market structures during business reorganization - **Data Correction**: Fix incorrect market information or location data - **Market Evolution**: Update market information as business needs change - **Regional Changes**: Modify market details due to regional business changes ## Access Control - **Organization Scope**: Market must belong to the authenticated user\'s organization - **Update Validation**: Only valid market IDs can be updated - **Data Privacy**: Updates are isolated to the user\'s organization * @summary Update a specific market by marketId * @param {number} marketId The unique identifier of the market * @param {V4MarketsUpdateMarketBodyDto} v4MarketsUpdateMarketBodyDto * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof MarketsAPIV4ApiInterface */ v4MarketsControllerUpdateMarketV4Raw(requestParameters: V4MarketsControllerUpdateMarketV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4MarketsUpdateMarketResponseDto>>; /** * # PATCH /v4/markets/{marketId} ## Overview Updates information of an existing real estate market. This endpoint allows you to modify market properties such as name, location details, and other market attributes. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `marketId` | number | Yes | The unique identifier of the market to update | ## Request Body The request body should contain the fields to update. All fields are optional. ### Optional Fields | Field | Type | Description | |-------|------|-------------| | `name` | string | Market name or description | | `state` | string | State or region where the market is located | | `city` | string | Primary city in the market | ### Validation Rules - **Name**: Must be a non-empty string if provided - **State**: Should be a valid state/region code if provided - **City**: Must be a non-empty string if provided ## Use Cases This endpoint is ideal for: - **Market Information Updates**: Update market names, locations, or descriptions - **Territory Adjustments**: Modify market boundaries or coverage areas - **Market Reorganization**: Update market structures during business reorganization - **Data Correction**: Fix incorrect market information or location data - **Market Evolution**: Update market information as business needs change - **Regional Changes**: Modify market details due to regional business changes ## Access Control - **Organization Scope**: Market must belong to the authenticated user\'s organization - **Update Validation**: Only valid market IDs can be updated - **Data Privacy**: Updates are isolated to the user\'s organization * Update a specific market by marketId */ v4MarketsControllerUpdateMarketV4(requestParameters: V4MarketsControllerUpdateMarketV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4MarketsUpdateMarketResponseDto>; } /** * */ export declare class MarketsAPIV4Api extends runtime.BaseAPI implements MarketsAPIV4ApiInterface { /** * # DELETE /v4/markets/{marketId} ## Overview Deletes an existing real estate market from the system. This is a permanent operation that removes the market and may affect associated properties, territories, and business operations. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `marketId` | number | Yes | The unique identifier of the market to delete | ## Access Control - **Organization Scope**: Market must belong to the authenticated user\'s organization - **Market Validation**: Invalid or non-existent market IDs will return a 404 error - **Data Privacy**: Only markets within the user\'s organization can be deleted ## Deletion Behavior The deletion operation: - **Permanent Removal**: Market record is permanently deleted from the system - **Cascade Effects**: Associated relationships and references are handled appropriately - **Territory Impact**: May affect sales territories and coverage areas - **Property Impact**: Properties assigned to this market may need reassignment - **Immediate Effect**: Deletion is applied immediately - **Audit Trail**: Deletion is logged for audit and compliance purposes ## Response Structure Returns confirmation that the market was successfully deleted. ## Use Cases This endpoint is ideal for: - **Market Consolidation**: Remove markets during business consolidation - **Territory Reorganization**: Delete markets as part of territory restructuring - **Data Cleanup**: Remove unused or obsolete markets - **Business Restructuring**: Delete markets during organizational changes - **Market Exit**: Remove markets when exiting specific geographic areas - **System Maintenance**: Clean up test or duplicate market data ## Important Considerations Before deleting a market, consider: - **Associated Properties**: Check if properties are assigned to this market - **Territory Dependencies**: Consider impact on sales territories and coverage - **Business Operations**: Assess impact on ongoing business operations - **Historical Data**: Consider preserving historical data and reporting - **User Notification**: Consider notifying relevant users of the deletion - **Alternative Actions**: Consider deactivating instead of permanent deletion ## Error Handling Common errors include: - **Market Not Found**: Market ID does not exist or belongs to different organization - **Permission Denied**: User lacks permission to delete markets - **Referential Constraints**: Market cannot be deleted due to active references - **Business Rules**: Market deletion violates business rules or constraints - **System Errors**: Database or system issues preventing deletion ## Recovery - **No Recovery**: Deleted market records cannot be restored through the API - **Backup Systems**: Recovery may be possible through system backups - **Audit Logs**: Deletion events are recorded for audit purposes - **Business Impact**: Consider business continuity and data recovery policies * Delete a specific market by marketId */ v4MarketsControllerDeleteMarketV4Raw(requestParameters: V4MarketsControllerDeleteMarketV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4MarketsDeleteMarketResponseDto>>; /** * # DELETE /v4/markets/{marketId} ## Overview Deletes an existing real estate market from the system. This is a permanent operation that removes the market and may affect associated properties, territories, and business operations. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `marketId` | number | Yes | The unique identifier of the market to delete | ## Access Control - **Organization Scope**: Market must belong to the authenticated user\'s organization - **Market Validation**: Invalid or non-existent market IDs will return a 404 error - **Data Privacy**: Only markets within the user\'s organization can be deleted ## Deletion Behavior The deletion operation: - **Permanent Removal**: Market record is permanently deleted from the system - **Cascade Effects**: Associated relationships and references are handled appropriately - **Territory Impact**: May affect sales territories and coverage areas - **Property Impact**: Properties assigned to this market may need reassignment - **Immediate Effect**: Deletion is applied immediately - **Audit Trail**: Deletion is logged for audit and compliance purposes ## Response Structure Returns confirmation that the market was successfully deleted. ## Use Cases This endpoint is ideal for: - **Market Consolidation**: Remove markets during business consolidation - **Territory Reorganization**: Delete markets as part of territory restructuring - **Data Cleanup**: Remove unused or obsolete markets - **Business Restructuring**: Delete markets during organizational changes - **Market Exit**: Remove markets when exiting specific geographic areas - **System Maintenance**: Clean up test or duplicate market data ## Important Considerations Before deleting a market, consider: - **Associated Properties**: Check if properties are assigned to this market - **Territory Dependencies**: Consider impact on sales territories and coverage - **Business Operations**: Assess impact on ongoing business operations - **Historical Data**: Consider preserving historical data and reporting - **User Notification**: Consider notifying relevant users of the deletion - **Alternative Actions**: Consider deactivating instead of permanent deletion ## Error Handling Common errors include: - **Market Not Found**: Market ID does not exist or belongs to different organization - **Permission Denied**: User lacks permission to delete markets - **Referential Constraints**: Market cannot be deleted due to active references - **Business Rules**: Market deletion violates business rules or constraints - **System Errors**: Database or system issues preventing deletion ## Recovery - **No Recovery**: Deleted market records cannot be restored through the API - **Backup Systems**: Recovery may be possible through system backups - **Audit Logs**: Deletion events are recorded for audit purposes - **Business Impact**: Consider business continuity and data recovery policies * Delete a specific market by marketId */ v4MarketsControllerDeleteMarketV4(requestParameters: V4MarketsControllerDeleteMarketV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4MarketsDeleteMarketResponseDto>; /** * # GET /v4/markets/{marketId}/{columns} ## Overview Retrieves specific columns of a market by its unique identifier. This endpoint allows you to fetch only the data you need, improving performance and reducing bandwidth usage for market information. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `marketId` | number | Yes | The unique identifier of the market | | `columns` | string | Yes | Comma-separated list of column names to retrieve | ## Column Selection Available columns include: - **mid**: Market identifier - **name**: Market name - **state**: State or region - **city**: Primary city - **organizationId**: Organization identifier - **createdAt**: Creation timestamp - **updatedAt**: Last update timestamp ### Examples - Single column: `name` - Multiple columns: `name,state,city` - Location data: `name,state,city` - All metadata: `name,state,city,createdAt,updatedAt` ## Use Cases This endpoint is ideal for: - **Performance Optimization**: Fetch only required data to reduce response size - **Bandwidth Conservation**: Minimize data transfer for mobile or limited connections - **Specific Data Needs**: Get only the columns needed for specific use cases - **List Views**: Fetch minimal data for displaying market lists - **Reporting**: Extract specific columns for reporting purposes - **Data Integration**: Get specific market data for integration with other systems * Get specific columns of a market by marketId */ v4MarketsControllerGetMarketColumnsV4Raw(requestParameters: V4MarketsControllerGetMarketColumnsV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4MarketsGetMarketColumnsResponseDto>>; /** * # GET /v4/markets/{marketId}/{columns} ## Overview Retrieves specific columns of a market by its unique identifier. This endpoint allows you to fetch only the data you need, improving performance and reducing bandwidth usage for market information. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `marketId` | number | Yes | The unique identifier of the market | | `columns` | string | Yes | Comma-separated list of column names to retrieve | ## Column Selection Available columns include: - **mid**: Market identifier - **name**: Market name - **state**: State or region - **city**: Primary city - **organizationId**: Organization identifier - **createdAt**: Creation timestamp - **updatedAt**: Last update timestamp ### Examples - Single column: `name` - Multiple columns: `name,state,city` - Location data: `name,state,city` - All metadata: `name,state,city,createdAt,updatedAt` ## Use Cases This endpoint is ideal for: - **Performance Optimization**: Fetch only required data to reduce response size - **Bandwidth Conservation**: Minimize data transfer for mobile or limited connections - **Specific Data Needs**: Get only the columns needed for specific use cases - **List Views**: Fetch minimal data for displaying market lists - **Reporting**: Extract specific columns for reporting purposes - **Data Integration**: Get specific market data for integration with other systems * Get specific columns of a market by marketId */ v4MarketsControllerGetMarketColumnsV4(requestParameters: V4MarketsControllerGetMarketColumnsV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4MarketsGetMarketColumnsResponseDto>; /** * # GET /v4/markets/{marketId} ## Overview Retrieves a specific real estate market by its unique identifier. This endpoint provides detailed information about a single market, including all relevant market data and attributes. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `marketId` | number | Yes | The unique identifier of the market to retrieve | ### Query Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `viewId` | number | No | Optional view ID to apply specific column selection and formatting | ## Access Control - **Organization Scope**: Only markets within the authenticated user\'s organization are accessible - **Market Validation**: Invalid or non-existent market IDs will return a 404 error - **Data Privacy**: Sensitive market data is protected by organization boundaries ## Response Structure Returns detailed information about the specified market. ## Use Cases This endpoint is ideal for: - **Market Details**: Get complete information about a specific market - **Market Analysis**: Analyze specific market characteristics and performance - **Territory Management**: Access detailed information for territory planning - **Market Verification**: Verify market properties and attributes - **Portfolio Analysis**: Get detailed market data for investment analysis - **Regional Planning**: Access market details for regional business planning * Get a specific market by marketId */ v4MarketsControllerGetMarketV4Raw(requestParameters: V4MarketsControllerGetMarketV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4MarketsGetMarketResponseDto>>; /** * # GET /v4/markets/{marketId} ## Overview Retrieves a specific real estate market by its unique identifier. This endpoint provides detailed information about a single market, including all relevant market data and attributes. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `marketId` | number | Yes | The unique identifier of the market to retrieve | ### Query Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `viewId` | number | No | Optional view ID to apply specific column selection and formatting | ## Access Control - **Organization Scope**: Only markets within the authenticated user\'s organization are accessible - **Market Validation**: Invalid or non-existent market IDs will return a 404 error - **Data Privacy**: Sensitive market data is protected by organization boundaries ## Response Structure Returns detailed information about the specified market. ## Use Cases This endpoint is ideal for: - **Market Details**: Get complete information about a specific market - **Market Analysis**: Analyze specific market characteristics and performance - **Territory Management**: Access detailed information for territory planning - **Market Verification**: Verify market properties and attributes - **Portfolio Analysis**: Get detailed market data for investment analysis - **Regional Planning**: Access market details for regional business planning * Get a specific market by marketId */ v4MarketsControllerGetMarketV4(requestParameters: V4MarketsControllerGetMarketV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4MarketsGetMarketResponseDto>; /** * # GET /v4/markets/viewId/{viewId} ## Overview Retrieves real estate markets using a specific view configuration. Views define custom filtering, sorting, and column selection for markets, allowing for organized and consistent data presentation based on business needs and market analysis requirements. ## 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 markets to return (default: 20, max: 100) | | `offset` | number | No | Number of markets to skip for pagination (default: 0) | | `countOnly` | boolean | No | Return only the count without the actual data | ## View Configuration Views can define: - **Column Selection**: Specific columns to include in the response - **Filtering Rules**: Criteria for which markets to include (by state, region, performance, etc.) - **Sorting Options**: Default sorting for the results - **Access Controls**: Additional permission checks ## Use Cases This endpoint is ideal for: - **Market Dashboards**: Display markets according to predefined dashboard configurations - **Regional Views**: Use views to organize markets by regions or territories - **Performance Views**: Apply views that filter markets by performance metrics - **User Preferences**: Apply user-specific view settings for consistent experience - **Filtered Lists**: Show only relevant markets based on view criteria - **Specialized Reports**: Create specialized views for different types of market analysis * Get markets with a specific viewId */ v4MarketsControllerGetMarketsInViewV4Raw(requestParameters: V4MarketsControllerGetMarketsInViewV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4MarketsGetMarketsInViewResponseDto>>; /** * # GET /v4/markets/viewId/{viewId} ## Overview Retrieves real estate markets using a specific view configuration. Views define custom filtering, sorting, and column selection for markets, allowing for organized and consistent data presentation based on business needs and market analysis requirements. ## 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 markets to return (default: 20, max: 100) | | `offset` | number | No | Number of markets to skip for pagination (default: 0) | | `countOnly` | boolean | No | Return only the count without the actual data | ## View Configuration Views can define: - **Column Selection**: Specific columns to include in the response - **Filtering Rules**: Criteria for which markets to include (by state, region, performance, etc.) - **Sorting Options**: Default sorting for the results - **Access Controls**: Additional permission checks ## Use Cases This endpoint is ideal for: - **Market Dashboards**: Display markets according to predefined dashboard configurations - **Regional Views**: Use views to organize markets by regions or territories - **Performance Views**: Apply views that filter markets by performance metrics - **User Preferences**: Apply user-specific view settings for consistent experience - **Filtered Lists**: Show only relevant markets based on view criteria - **Specialized Reports**: Create specialized views for different types of market analysis * Get markets with a specific viewId */ v4MarketsControllerGetMarketsInViewV4(requestParameters: V4MarketsControllerGetMarketsInViewV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4MarketsGetMarketsInViewResponseDto>; /** * # GET /v4/markets ## Overview Retrieves real estate markets with optional filtering, sorting, and pagination capabilities. This endpoint provides access to all market data for real estate analysis, territory management, and geographic organization. ## 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 markets to return (default: 20, max: 100) | | `offset` | number | No | Number of markets to skip for pagination (default: 0) | | `countOnly` | boolean | No | Return only the count of markets without the actual data | ## Use Cases This endpoint is ideal for: - **Market Analysis**: Browse and analyze real estate markets for investment decisions - **Territory Management**: Organize sales territories and market coverage - **Geographic Organization**: Manage properties and operations by market regions - **Market Research**: Study market trends and performance across different areas - **Portfolio Management**: Track investment portfolios across multiple markets - **Reporting**: Generate market-based reports and analytics * Get markets with optional viewId */ v4MarketsControllerGetMarketsV4Raw(requestParameters: V4MarketsControllerGetMarketsV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4MarketsGetMarketsResponseDto>>; /** * # GET /v4/markets