@simplyhomes/sos-sdk
Version:
TypeScript SDK for Simply Homes SoS API v4
363 lines • 114 kB
JavaScript
/* 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 { V4PropertiesAddToAirtableResponseDtoFromJSON, V4PropertiesCheckAirtableResponseDtoFromJSON, V4PropertiesCheckExistingResponseDtoFromJSON, V4PropertiesCreateOnePagerReturnFromJSON, V4PropertiesCreatePropertyBodyDtoToJSON, V4PropertiesCreatePropertyResponseDtoFromJSON, V4PropertiesDeletePropertyResponseDtoFromJSON, V4PropertiesGetAddressAutocompleteResponseDtoFromJSON, V4PropertiesGetPropertiesFilteredByResponseDtoFromJSON, V4PropertiesGetPropertiesInViewResponseDtoFromJSON, V4PropertiesGetPropertiesResponseDtoFromJSON, V4PropertiesGetPropertyColumnsResponseDtoFromJSON, V4PropertiesGetPropertyResponseDtoFromJSON, V4PropertiesGetUniqueValuesResponseDtoFromJSON, V4PropertiesRefreshRentometerReturnDtoFromJSON, V4PropertiesRefreshTractTierReturnDtoFromJSON, V4PropertiesUpdatePropertyBodyDtoToJSON, V4PropertiesUpdatePropertyResponseDtoFromJSON, } from '../models/index';
/**
*
*/
export class PropertiesAPIV4Api extends runtime.BaseAPI {
/**
* Submit a property to Airtable through the AIO service integration. This endpoint: - Validates that the property exists in the organization - Retrieves complete property data including units and latest source pricing - Calls the AIO service to validate the address and get defaults - Formats the property data according to AIO requirements - Submits the property to Airtable via AIO\'s /property-form/submit-property endpoint **Property Data Included:** - Address and location information - Market, neighborhood, housing authority, and zipcode IDs (from AIO validation) - Property details (state, sqft, year built, renovation cost) - Unit information (beds/baths combinations) - Latest asking price from sources - Place ID for unique identification **AIO Integration:** - Address validation via AIO /property-form/validate-address - Property submission via AIO /property-form/submit-property - Automatic assignment of market and housing authority based on location **Requirements:** - Property must exist in the requesting organization - Property must have an address - AIO service must be accessible and configured **Use Cases:** - Submit new properties to Airtable for underwriting - Sync property data from SoS to Airtable workflow - Initial property submission for lead generation
* Add a property to Airtable
*/
async v4PropertiesControllerAddToAirtableV4Raw(requestParameters, initOverrides) {
if (requestParameters['propertyId'] == null) {
throw new runtime.RequiredError('propertyId', 'Required parameter "propertyId" was null or undefined when calling v4PropertiesControllerAddToAirtableV4().');
}
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/properties/{propertyId}/add-to-airtable`;
urlPath = urlPath.replace(`{${"propertyId"}}`, encodeURIComponent(String(requestParameters['propertyId'])));
const response = await this.request({
path: urlPath,
method: 'POST',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => V4PropertiesAddToAirtableResponseDtoFromJSON(jsonValue));
}
/**
* Submit a property to Airtable through the AIO service integration. This endpoint: - Validates that the property exists in the organization - Retrieves complete property data including units and latest source pricing - Calls the AIO service to validate the address and get defaults - Formats the property data according to AIO requirements - Submits the property to Airtable via AIO\'s /property-form/submit-property endpoint **Property Data Included:** - Address and location information - Market, neighborhood, housing authority, and zipcode IDs (from AIO validation) - Property details (state, sqft, year built, renovation cost) - Unit information (beds/baths combinations) - Latest asking price from sources - Place ID for unique identification **AIO Integration:** - Address validation via AIO /property-form/validate-address - Property submission via AIO /property-form/submit-property - Automatic assignment of market and housing authority based on location **Requirements:** - Property must exist in the requesting organization - Property must have an address - AIO service must be accessible and configured **Use Cases:** - Submit new properties to Airtable for underwriting - Sync property data from SoS to Airtable workflow - Initial property submission for lead generation
* Add a property to Airtable
*/
async v4PropertiesControllerAddToAirtableV4(requestParameters, initOverrides) {
const response = await this.v4PropertiesControllerAddToAirtableV4Raw(requestParameters, initOverrides);
return await response.value();
}
/**
* Check if a property exists in Airtable by using the property\'s place_id to query the Airtable properties table. This endpoint: - Validates that the property exists in the organization - Retrieves the property\'s place_id from the database - Queries Airtable using the AirtableService to check for existing records - Returns the existence status and Airtable record ID if found **Requirements:** - Property must exist in the requesting organization - Property must have a place_id (Google Places identifier) **Use Cases:** - Before adding a property to Airtable, check if it already exists - Sync status verification between SoS and Airtable systems - Avoiding duplicate property submissions
* Check if a property exists in Airtable
*/
async v4PropertiesControllerCheckAirtableV4Raw(requestParameters, initOverrides) {
if (requestParameters['propertyId'] == null) {
throw new runtime.RequiredError('propertyId', 'Required parameter "propertyId" was null or undefined when calling v4PropertiesControllerCheckAirtableV4().');
}
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/properties/{propertyId}/check-airtable`;
urlPath = urlPath.replace(`{${"propertyId"}}`, encodeURIComponent(String(requestParameters['propertyId'])));
const response = await this.request({
path: urlPath,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => V4PropertiesCheckAirtableResponseDtoFromJSON(jsonValue));
}
/**
* Check if a property exists in Airtable by using the property\'s place_id to query the Airtable properties table. This endpoint: - Validates that the property exists in the organization - Retrieves the property\'s place_id from the database - Queries Airtable using the AirtableService to check for existing records - Returns the existence status and Airtable record ID if found **Requirements:** - Property must exist in the requesting organization - Property must have a place_id (Google Places identifier) **Use Cases:** - Before adding a property to Airtable, check if it already exists - Sync status verification between SoS and Airtable systems - Avoiding duplicate property submissions
* Check if a property exists in Airtable
*/
async v4PropertiesControllerCheckAirtableV4(requestParameters, initOverrides) {
const response = await this.v4PropertiesControllerCheckAirtableV4Raw(requestParameters, initOverrides);
return await response.value();
}
/**
* **Overview:** Checks if a property already exists in the organization based on the provided address using Google Places API for address normalization. **Authentication:** - Requires valid API key via \'x-api-key\' header - Requires organization ID via \'organization-id\' header **Parameters:** - `address` (required): Address to check for existing property (e.g., \"123 Main Street, Pittsburgh, PA\") **Use Cases:** - Pre-validation before property creation - Preventing duplicate property entries - Address-based property lookup - User interface feedback for existing properties **Response:** Returns whether the property exists and the property ID if found.
* Check if a property exists by address
*/
async v4PropertiesControllerCheckExistingV4Raw(requestParameters, initOverrides) {
if (requestParameters['address'] == null) {
throw new runtime.RequiredError('address', 'Required parameter "address" was null or undefined when calling v4PropertiesControllerCheckExistingV4().');
}
const queryParameters = {};
if (requestParameters['address'] != null) {
queryParameters['address'] = requestParameters['address'];
}
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/properties/check-existing`;
const response = await this.request({
path: urlPath,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => V4PropertiesCheckExistingResponseDtoFromJSON(jsonValue));
}
/**
* **Overview:** Checks if a property already exists in the organization based on the provided address using Google Places API for address normalization. **Authentication:** - Requires valid API key via \'x-api-key\' header - Requires organization ID via \'organization-id\' header **Parameters:** - `address` (required): Address to check for existing property (e.g., \"123 Main Street, Pittsburgh, PA\") **Use Cases:** - Pre-validation before property creation - Preventing duplicate property entries - Address-based property lookup - User interface feedback for existing properties **Response:** Returns whether the property exists and the property ID if found.
* Check if a property exists by address
*/
async v4PropertiesControllerCheckExistingV4(requestParameters, initOverrides) {
const response = await this.v4PropertiesControllerCheckExistingV4Raw(requestParameters, initOverrides);
return await response.value();
}
/**
* Generates a Google Sheets one pager financing document with property data populated from template variables.
* Create one pager financing document for a property
*/
async v4PropertiesControllerCreateOnePagerV4Raw(requestParameters, initOverrides) {
if (requestParameters['propertyId'] == null) {
throw new runtime.RequiredError('propertyId', 'Required parameter "propertyId" was null or undefined when calling v4PropertiesControllerCreateOnePagerV4().');
}
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/properties/{propertyId}/create-one-pager`;
urlPath = urlPath.replace(`{${"propertyId"}}`, encodeURIComponent(String(requestParameters['propertyId'])));
const response = await this.request({
path: urlPath,
method: 'POST',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => V4PropertiesCreateOnePagerReturnFromJSON(jsonValue));
}
/**
* Generates a Google Sheets one pager financing document with property data populated from template variables.
* Create one pager financing document for a property
*/
async v4PropertiesControllerCreateOnePagerV4(requestParameters, initOverrides) {
const response = await this.v4PropertiesControllerCreateOnePagerV4Raw(requestParameters, initOverrides);
return await response.value();
}
/**
* # POST /v4/properties ## Overview Creates a new property in the system by providing an address. This endpoint validates the address using Google Places API, checks for existing properties, and either returns the existing property or creates a comprehensive property record with initial configurations. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Body The request body must contain a JSON object with the property information. ### Content Type - **application/json** ### Required Fields | Field | Type | Required | Description | |-------|------|----------|-------------| | `addressOneLine` | string | Yes | The complete address of the property to create | ### Other Property\'s Fields - Additional fields from the `SoSPropertyEntity_Base` can be included but are not required for creation. ### Request Structure ```json { \"addressOneLine\": \"123 Main Street, Pittsburgh, PA 15213\" } ``` ## Address Processing The address goes through several validation and processing steps: 1. **Input Sanitization**: Address is trimmed and normalized 2. **Google Places Validation**: Address is validated using Google Places API 3. **Autocomplete Suggestion**: System uses the first autocomplete suggestion 4. **Address Normalization**: Address is formatted to Google\'s standard format 5. **Duplicate Check**: System checks if property already exists in the organization ## Address Requirements - **Complete Address**: Include street number, street name, city, state - **Valid Format**: Address must be recognizable by Google Places API - **Specific Location**: Avoid generic or ambiguous addresses - **US Addresses**: Currently optimized for US address formats ## Duplicate Prevention The system prevents duplicate properties by: - **Address Matching**: Comparing normalized addresses within the organization - **Google Places ID**: Using Google Places identifier for exact matching - **Organization Scope**: Duplicates are checked within the user\'s organization only - **Return Existing**: If a duplicate is found, returns the existing property with `existing: true` ## Property Initialization Upon successful creation, the property is initialized with: - **Basic Information**: Address, Google Places data, geographic coordinates - **Organization Assignment**: Property is assigned to the user\'s organization - **Default Status**: Property starts with \"New\" status - **Financial Defaults**: Initial financial calculations and estimates - **System Metadata**: Creation timestamps and audit information ## Use Cases This endpoint is ideal for: - **Property Import**: Adding new properties from external sources - **Manual Entry**: Creating properties through user interfaces - **Bulk Operations**: Programmatically adding multiple properties - **Lead Generation**: Creating properties from leads and prospects - **Portfolio Expansion**: Adding new investments to property portfolios ## Validation Process The system validates: - **Address Format**: Address must be properly formatted - **Google Places Response**: Address must be found by Google Places API - **Duplicate Check**: Property must not already exist in the organization - **Organization Access**: User must have permission to create properties - **Data Integrity**: All required fields must be properly initialized ## Performance Considerations - **External API Call**: Google Places API call may add latency - **Address Normalization**: Processing time depends on address complexity - **Duplicate Checking**: Performance scales with organization property count - **Database Transaction**: Property creation is atomic and transactional
* Create a new property
*/
async v4PropertiesControllerCreatePropertyV4Raw(requestParameters, initOverrides) {
if (requestParameters['v4PropertiesCreatePropertyBodyDto'] == null) {
throw new runtime.RequiredError('v4PropertiesCreatePropertyBodyDto', 'Required parameter "v4PropertiesCreatePropertyBodyDto" was null or undefined when calling v4PropertiesControllerCreatePropertyV4().');
}
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/properties`;
const response = await this.request({
path: urlPath,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: V4PropertiesCreatePropertyBodyDtoToJSON(requestParameters['v4PropertiesCreatePropertyBodyDto']),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => V4PropertiesCreatePropertyResponseDtoFromJSON(jsonValue));
}
/**
* # POST /v4/properties ## Overview Creates a new property in the system by providing an address. This endpoint validates the address using Google Places API, checks for existing properties, and either returns the existing property or creates a comprehensive property record with initial configurations. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Body The request body must contain a JSON object with the property information. ### Content Type - **application/json** ### Required Fields | Field | Type | Required | Description | |-------|------|----------|-------------| | `addressOneLine` | string | Yes | The complete address of the property to create | ### Other Property\'s Fields - Additional fields from the `SoSPropertyEntity_Base` can be included but are not required for creation. ### Request Structure ```json { \"addressOneLine\": \"123 Main Street, Pittsburgh, PA 15213\" } ``` ## Address Processing The address goes through several validation and processing steps: 1. **Input Sanitization**: Address is trimmed and normalized 2. **Google Places Validation**: Address is validated using Google Places API 3. **Autocomplete Suggestion**: System uses the first autocomplete suggestion 4. **Address Normalization**: Address is formatted to Google\'s standard format 5. **Duplicate Check**: System checks if property already exists in the organization ## Address Requirements - **Complete Address**: Include street number, street name, city, state - **Valid Format**: Address must be recognizable by Google Places API - **Specific Location**: Avoid generic or ambiguous addresses - **US Addresses**: Currently optimized for US address formats ## Duplicate Prevention The system prevents duplicate properties by: - **Address Matching**: Comparing normalized addresses within the organization - **Google Places ID**: Using Google Places identifier for exact matching - **Organization Scope**: Duplicates are checked within the user\'s organization only - **Return Existing**: If a duplicate is found, returns the existing property with `existing: true` ## Property Initialization Upon successful creation, the property is initialized with: - **Basic Information**: Address, Google Places data, geographic coordinates - **Organization Assignment**: Property is assigned to the user\'s organization - **Default Status**: Property starts with \"New\" status - **Financial Defaults**: Initial financial calculations and estimates - **System Metadata**: Creation timestamps and audit information ## Use Cases This endpoint is ideal for: - **Property Import**: Adding new properties from external sources - **Manual Entry**: Creating properties through user interfaces - **Bulk Operations**: Programmatically adding multiple properties - **Lead Generation**: Creating properties from leads and prospects - **Portfolio Expansion**: Adding new investments to property portfolios ## Validation Process The system validates: - **Address Format**: Address must be properly formatted - **Google Places Response**: Address must be found by Google Places API - **Duplicate Check**: Property must not already exist in the organization - **Organization Access**: User must have permission to create properties - **Data Integrity**: All required fields must be properly initialized ## Performance Considerations - **External API Call**: Google Places API call may add latency - **Address Normalization**: Processing time depends on address complexity - **Duplicate Checking**: Performance scales with organization property count - **Database Transaction**: Property creation is atomic and transactional
* Create a new property
*/
async v4PropertiesControllerCreatePropertyV4(requestParameters, initOverrides) {
const response = await this.v4PropertiesControllerCreatePropertyV4Raw(requestParameters, initOverrides);
return await response.value();
}
/**
* Delete a specific property by its ID. This endpoint allows you to delete a property that belongs to your organization. The property will be permanently removed from the system along with any associated data. **Path Parameters:** - `propertyId`: The unique identifier of the property to delete **Authorization:** - Requires valid API key - Requires organization ID header - Property must belong to the requesting organization **Response:** Returns confirmation of the deleted property ID. **Note:** This action is irreversible. Make sure you want to permanently delete this property before proceeding.
* Delete a specific property by propertyId
*/
async v4PropertiesControllerDeletePropertyV4Raw(requestParameters, initOverrides) {
if (requestParameters['propertyId'] == null) {
throw new runtime.RequiredError('propertyId', 'Required parameter "propertyId" was null or undefined when calling v4PropertiesControllerDeletePropertyV4().');
}
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/properties/{propertyId}`;
urlPath = urlPath.replace(`{${"propertyId"}}`, encodeURIComponent(String(requestParameters['propertyId'])));
const response = await this.request({
path: urlPath,
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => V4PropertiesDeletePropertyResponseDtoFromJSON(jsonValue));
}
/**
* Delete a specific property by its ID. This endpoint allows you to delete a property that belongs to your organization. The property will be permanently removed from the system along with any associated data. **Path Parameters:** - `propertyId`: The unique identifier of the property to delete **Authorization:** - Requires valid API key - Requires organization ID header - Property must belong to the requesting organization **Response:** Returns confirmation of the deleted property ID. **Note:** This action is irreversible. Make sure you want to permanently delete this property before proceeding.
* Delete a specific property by propertyId
*/
async v4PropertiesControllerDeletePropertyV4(requestParameters, initOverrides) {
const response = await this.v4PropertiesControllerDeletePropertyV4Raw(requestParameters, initOverrides);
return await response.value();
}
/**
* **Overview:** Retrieves address autocomplete suggestions from Google Places API to assist users during property creation. **Authentication:** - Requires valid API key via \'x-api-key\' header - Requires organization ID via \'organization-id\' header **Parameters:** - `input` (required): Text input for address search (e.g., \"123 Main St\") **Use Cases:** - Property creation form with address autocomplete - Address validation during data entry - Improving user experience with suggested addresses **Response:** Returns an array of address suggestions with formatted address strings.
* Get address autocomplete suggestions
*/
async v4PropertiesControllerGetAddressAutocompleteV4Raw(requestParameters, initOverrides) {
if (requestParameters['input'] == null) {
throw new runtime.RequiredError('input', 'Required parameter "input" was null or undefined when calling v4PropertiesControllerGetAddressAutocompleteV4().');
}
const queryParameters = {};
if (requestParameters['input'] != null) {
queryParameters['input'] = requestParameters['input'];
}
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/properties/address/autocomplete`;
const response = await this.request({
path: urlPath,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => V4PropertiesGetAddressAutocompleteResponseDtoFromJSON(jsonValue));
}
/**
* **Overview:** Retrieves address autocomplete suggestions from Google Places API to assist users during property creation. **Authentication:** - Requires valid API key via \'x-api-key\' header - Requires organization ID via \'organization-id\' header **Parameters:** - `input` (required): Text input for address search (e.g., \"123 Main St\") **Use Cases:** - Property creation form with address autocomplete - Address validation during data entry - Improving user experience with suggested addresses **Response:** Returns an array of address suggestions with formatted address strings.
* Get address autocomplete suggestions
*/
async v4PropertiesControllerGetAddressAutocompleteV4(requestParameters, initOverrides) {
const response = await this.v4PropertiesControllerGetAddressAutocompleteV4Raw(requestParameters, initOverrides);
return await response.value();
}
/**
* # GET /v4/properties/filteredBy/{column}/{value} ## Overview Retrieves properties filtered by a specific column and value combination. This endpoint allows you to filter properties based on any property field with customizable filter operations, optional view configurations, and pagination support. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `column` | string | Yes | The property column/field to filter by (e.g., \"status\", \"propertyType\", \"tractTier\") | | `value` | string | Yes | The value to filter the column by (e.g., \"Active\", \"Single Family\", \"1\") | ### Query Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `filterOperation` | string | No | Filter operation to apply (default: \"is\"). Options: is, isNot, contains, startsWith, endsWith, greaterThan, lessThan, etc. | | `viewId` | number | No | Optional view ID to apply additional filters, sorts, and column selections | | `columns` | string | No | Specific columns to return, formatted as \"column1&column2&column3\" | | `limit` | number | No | Maximum number of properties to return (default: 20, max: 100) | | `offset` | number | No | Number of properties to skip for pagination (default: 0) | | `countOnly` | boolean | No | Whether to return only the count of matching properties instead of the full objects | ## Filter Operations The `filterOperation` parameter supports different operations based on data type: ### String Operations - **is**: Exact match (default) - **isNot**: Not equal to - **contains**: Contains substring - **startsWith**: Starts with value - **endsWith**: Ends with value ### Number Operations - **is**: Exact match - **isNot**: Not equal to - **greaterThan**: Greater than value - **lessThan**: Less than value - **greaterThanOrEqual**: Greater than or equal to value - **lessThanOrEqual**: Less than or equal to value ### Boolean Operations - **is**: Exact match - **isNot**: Opposite value ### Array Operations - **contains**: Array contains value - **doesNotContain**: Array does not contain value ## Access Control - **Organization Scope**: Properties are automatically filtered by organization - **Property Ownership**: Only properties within the organization can be accessed - **Data Privacy**: Property data is isolated between organizations ## View Integration When a `viewId` is provided: - **Additional Filters**: View filters are combined with the column/value filter - **Sorts**: View sort configurations determine result ordering - **Columns**: View column selections override the columns parameter - **Validation**: View must exist and belong to the authenticated user ## Response Structure The response contains an array of property objects matching the filter criteria with pagination metadata. ## Use Cases This endpoint is ideal for: - **Property Search**: Filter properties by specific criteria (status, type, tier) - **Dynamic Filtering**: Build custom search interfaces with user-defined filters - **Data Analysis**: Query properties matching specific characteristics - **Report Generation**: Extract subsets of properties for reporting - **Integration**: Provide filtered property data to external systems ## Examples ### Filter by Status `GET /v4/properties/filteredBy/status/Active` ### Filter by Property Type with Contains Operation `GET /v4/properties/filteredBy/propertyType/Family?filterOperation=contains` ### Filter with View and Pagination `GET /v4/properties/filteredBy/tractTier/1?viewId=view123&limit=50&offset=0` ### Count Only Results `GET /v4/properties/filteredBy/status/New?countOnly=true` ## Performance Considerations - **Index Usage**: Filtering on indexed columns improves query performance - **Pagination**: Use appropriate limit values to balance performance and data needs - **View Optimization**: Well-designed views with targeted filters improve response times - **Column Selection**: Limit returned columns through views or columns parameter for better performance ## Integration Patterns **Basic Filtering:** - Simple column/value filtering with default \"is\" operation - Useful for dropdown-based filters and category selection **Advanced Filtering:** - Combine with filter operations for complex queries - Use with views for consistent, reusable filter combinations **Search Interfaces:** - Build dynamic search forms where users select columns and values - Support multiple filter operations for flexible searching
* Get properties filtered by a specific column and value
*/
async v4PropertiesControllerGetPropertiesFilteredByV4Raw(requestParameters, initOverrides) {
if (requestParameters['column'] == null) {
throw new runtime.RequiredError('column', 'Required parameter "column" was null or undefined when calling v4PropertiesControllerGetPropertiesFilteredByV4().');
}
if (requestParameters['value'] == null) {
throw new runtime.RequiredError('value', 'Required parameter "value" was null or undefined when calling v4PropertiesControllerGetPropertiesFilteredByV4().');
}
const queryParameters = {};
if (requestParameters['viewId'] != null) {
queryParameters['viewId'] = requestParameters['viewId'];
}
if (requestParameters['columns'] != null) {
queryParameters['columns'] = requestParameters['columns'];
}
if (requestParameters['limit'] != null) {
queryParameters['limit'] = requestParameters['limit'];
}
if (requestParameters['offset'] != null) {
queryParameters['offset'] = requestParameters['offset'];
}
if (requestParameters['countOnly'] != null) {
queryParameters['countOnly'] = requestParameters['countOnly'];
}
if (requestParameters['filterOperation'] != null) {
queryParameters['filterOperation'] = requestParameters['filterOperation'];
}
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/properties/filteredBy/{column}/{value}`;
urlPath = urlPath.replace(`{${"column"}}`, encodeURIComponent(String(requestParameters['column'])));
urlPath = urlPath.replace(`{${"value"}}`, encodeURIComponent(String(requestParameters['value'])));
const response = await this.request({
path: urlPath,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => V4PropertiesGetPropertiesFilteredByResponseDtoFromJSON(jsonValue));
}
/**
* # GET /v4/properties/filteredBy/{column}/{value} ## Overview Retrieves properties filtered by a specific column and value combination. This endpoint allows you to filter properties based on any property field with customizable filter operations, optional view configurations, and pagination support. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `column` | string | Yes | The property column/field to filter by (e.g., \"status\", \"propertyType\", \"tractTier\") | | `value` | string | Yes | The value to filter the column by (e.g., \"Active\", \"Single Family\", \"1\") | ### Query Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `filterOperation` | string | No | Filter operation to apply (default: \"is\"). Options: is, isNot, contains, startsWith, endsWith, greaterThan, lessThan, etc. | | `viewId` | number | No | Optional view ID to apply additional filters, sorts, and column selections | | `columns` | string | No | Specific columns to return, formatted as \"column1&column2&column3\" | | `limit` | number | No | Maximum number of properties to return (default: 20, max: 100) | | `offset` | number | No | Number of properties to skip for pagination (default: 0) | | `countOnly` | boolean | No | Whether to return only the count of matching properties instead of the full objects | ## Filter Operations The `filterOperation` parameter supports different operations based on data type: ### String Operations - **is**: Exact match (default) - **isNot**: Not equal to - **contains**: Contains substring - **startsWith**: Starts with value - **endsWith**: Ends with value ### Number Operations - **is**: Exact match - **isNot**: Not equal to - **greaterThan**: Greater than value - **lessThan**: Less than value - **greaterThanOrEqual**: Greater than or equal to value - **lessThanOrEqual**: Less than or equal to value ### Boolean Operations - **is**: Exact match - **isNot**: Opposite value ### Array Operations - **contains**: Array contains value - **doesNotContain**: Array does not contain value ## Access Control - **Organization Scope**: Properties are automatically filtered by organization - **Property Ownership**: Only properties within the organization can be accessed - **Data Privacy**: Property data is isolated between organizations ## View Integration When a `viewId` is provided: - **Additional Filters**: View filters are combined with the column/value filter - **Sorts**: View sort configurations determine result ordering - **Columns**: View column selections override the columns parameter - **Validation**: View must exist and belong to the authenticated user ## Response Structure The response contains an array of property objects matching the filter criteria with pagination metadata. ## Use Cases This endpoint is ideal for: - **Property Search**: Filter properties by specific criteria (status, type, tier) - **Dynamic Filtering**: Build custom search interfaces with user-defined filters - **Data Analysis**: Query properties matching specific characteristics - **Report Generation**: Extract subsets of properties for reporting - **Integration**: Provide filtered property data to external systems ## Examples ### Filter by Status `GET /v4/properties/filteredBy/status/Active` ### Filter by Property Type with Contains Operation `GET /v4/properties/filteredBy/propertyType/Family?filterOperation=contains` ### Filter with View and Pagination `GET /v4/properties/filteredBy/tractTier/1?viewId=view123&limit=50&offset=0` ### Count Only Results `GET /v4/properties/filteredBy/status/New?countOnly=true` ## Performance Considerations - **Index Usage**: Filtering on indexed columns improves query performance - **Pagination**: Use appropriate limit values to balance performance and data needs - **View Optimization**: Well-designed views with targeted filters improve response times - **Column Selection**: Limit returned columns through views or columns parameter for better performance ## Integration Patterns **Basic Filtering:** - Simple column/value filtering with default \"is\" operation - Useful for dropdown-based filters and category selection **Advanced Filtering:** - Combine with filter operations for complex queries - Use with views for consistent, reusable filter combinations **Search Interfaces:** - Build dynamic search forms where users select columns and values - Support multiple filter operations for flexible searching
* Get properties filtered by a specific column and value
*/
async v4PropertiesControllerGetPropertiesFilteredByV4(requestParameters, initOverrides) {
const response = await this.v4PropertiesControllerGetPropertiesFilteredByV4Raw(requestParameters, initOverrides);
return await response.value();
}
/**
* # GET /v4/properties/viewId/{viewId} ## Overview Retrieves properties filtered by a specific view configuration. This endpoint applies the filters, sorts, and column selections defined in the specified view to return a customized dataset of properties. ## 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 properties to return (default: 20, max: 100) | | `offset` | number | No | Number of properties to skip for pagination (default: 0) | ## View Application The specified view configuration is applied automatically: - **Filters**: All view filters are applied to narrow the property dataset - **Sorts**: View sort criteria determine the order of returned properties - **Columns**: View column selection determines which fields are returned - **Validation**: View must exist and belong to the authenticated user ## Access Control - **User Ownership**: Only views created by the authenticated user can be used - **Organization Scope**: Properties are automatically filtered by organization - **View Validation**: Invalid or non-existent views will return an error ## Response Structure The response contains properties matching the view criteria with pagination metadata. ## Use Cases This endpoint is ideal for: - **Saved Searches**: Quickly access frequently used property filters - **Custom Dashboards**: Display properties using predefined view configurations - **Report Generation**: Generate consistent reports using saved view criteria - **User Workflows**: Provide quick access to personalized property subsets - **Data Analysis**: Apply complex filter combinations saved in views ## Performance Benefits Using views provides several performance advantages: - **Pre-validated Filters**: View filters are validated once during creation - **Consistent Queries**: Same view produces optimized, consistent database queries - **Reduced Complexity**: Complex filter logic is encapsulated in the view - **Caching Opportunities**: Results can be cached based on view configuration ## Pagination Standard pagination is supported: - **Consistent Results**: Pagination maintains view filter consistency - **Stable Ordering**: View sort configuration ensures stable result ordering - **Performance**: Large filtered datasets benefit from pagination
* Get properties with a specific viewId
*/
async v4PropertiesControllerGetPropertiesInViewV4Raw(requestParameters, initOverrides) {
if (requestParameters['viewId'] == null) {
throw new runtime.RequiredError('viewId', 'Required parameter "viewId" was null or undefined when calling v4PropertiesControllerGetPropertiesInViewV4().');
}
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/properties/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) => V4PropertiesGetPropertiesInViewResponseDtoFromJSON(jsonValue));
}
/**
* # GET /v4/properties/viewId/{viewId} ## Overview Retrieves properties filtered by a specific view configuration. This endpoint applies the filters, sorts, and column selections defined in the specified view to return a customized dataset of properties. ## 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 properties to return (default: 20, max: 100) | | `offset` | number | No | Number of properties to skip for pagination (default: 0) | ## View Application The specified view configuration is applied automatically: - **Filters**: All view filters are applied to narrow the property dataset - **Sorts**: View sort criteria determine the order of returned properties - **Columns**: View column selection determines which fields are returned - **Validation**: View must exist and belong to the authenticated user ## Access Control - **User Ownership**: Only views created by the authenticated user can be used - **Organization Scope**: Properties are automatically filtered by organization - **View Validation**: Invalid or non-existent views will return an error ## Response Structure The response contains properties matching the view criteria with pagination metadata. ## Use Cases This endpoint is ideal for: - **Saved Searches**: Quickly access frequently used property filters - **Custom Dashboards**: Display properties using predefined view configurations - **Report Generation**: Generate consistent reports using saved view criteria - **User Workflows**: Provide quick access to personalized property subsets - **Data Analysis**: Apply complex filter combinations saved in views ## Performance Benefits Using views provides several performance advantages: - **Pre-validated Filters**: View filters are validated once during creation - **Consistent Queries**: Same view produces optimized, consistent database queries - **Reduced Complexity**: Complex filter logic is encapsulated in the view - **Caching Opportunities**: Results can be cached based on view configuration ## Pagination Standard pagination is supported: - **Consistent Results**: Pagination maintains view filter consistency - **Stable Ordering**: View sort configuration ensures stable result ordering - **Performance**: Large filtered datasets benefit from pagination
* Get properties with a specific viewId
*/
async v4PropertiesControllerGetPropertiesInViewV4(requestParameters, initOverrides) {
const response = await this.v4PropertiesControllerGetPropertiesInViewV4Raw(requestParameters, initOverrides);
return await response.value();
}
/**
* # GET /v4/properties ## Overview Retrieves a list of properties with optional filtering, sorting, and pagination capabilities. This endpoint allows you to query properties using view configurations or direct parameters to get customized property datasets. ## 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, sorts, and column selections | | `limit` | number | No | Maximum number of properties to return (default: 20, max: 100) | | `offset` | number | No | Number of properties to skip for pagination (default: 0) | ### View Integration When a `viewId` is provided: - **Filters**: View filters are automatically applied to the query - **Sorts**: View sort configurations determine result ordering - **Columns**: View column selections determine returned fields - **Validation**: View must exist and belong to the authenticated user ### Pagination The endpoint supports offset-based pagination: - **Default Limit**: 20 properties per request - **Maximum Limit**: 100 properties per request - **Offset Calculation**: Use `offset = page * limit` for page-based pagination ## Response Structure The response contains an array of property objects with pagination metadata. ## Use Cases This endpoint is ideal for: - Building property listing interfaces - Implementing property search and filtering - Creating property dashboards and analytics - Generating property reports and exports - Providing property data for mobile applications ## Performance Considerations - **Pagination**: