UNPKG

@simplyhomes/sos-sdk

Version:

TypeScript SDK for Simply Homes SoS API v4

209 lines 57 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 { V4ZipcodesCreateZipcodeBodyDto, V4ZipcodesCreateZipcodeResponseDto, V4ZipcodesDeleteZipcodeResponseDto, V4ZipcodesGetZipcodeColumnsResponseDto, V4ZipcodesGetZipcodeResponseDto, V4ZipcodesGetZipcodesInViewResponseDto, V4ZipcodesGetZipcodesResponseDto, V4ZipcodesUpdateZipcodeBodyDto, V4ZipcodesUpdateZipcodeResponseDto } from '../models/index'; export interface V4ZipcodesControllerCreateZipcodeV4Request { v4ZipcodesCreateZipcodeBodyDto: V4ZipcodesCreateZipcodeBodyDto; } export interface V4ZipcodesControllerDeleteZipcodeV4Request { zipcodeId: string; } export interface V4ZipcodesControllerGetZipcodeColumnsV4Request { zipcodeId: string; columns: string; } export interface V4ZipcodesControllerGetZipcodeV4Request { zipcodeId: string; viewId?: number; } export interface V4ZipcodesControllerGetZipcodesInViewV4Request { viewId: number; limit?: number; offset?: number; countOnly?: boolean; } export interface V4ZipcodesControllerGetZipcodesV4Request { viewId?: number; limit?: number; offset?: number; countOnly?: boolean; } export interface V4ZipcodesControllerUpdateZipcodeV4Request { zipcodeId: string; v4ZipcodesUpdateZipcodeBodyDto: V4ZipcodesUpdateZipcodeBodyDto; } /** * ZipcodesAPIV4Api - interface * * @export * @interface ZipcodesAPIV4ApiInterface */ export interface ZipcodesAPIV4ApiInterface { /** * # POST /v4/zipcodes ## Overview Create a new zipcode entry in the system. This endpoint allows you to add new zipcodes with their associated properties. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header ## Request Body The request body must contain a JSON object with the zipcode data. ### Content Type - **application/json** ### Request Structure ```json { \"zipcode\": \"12345\", \"blacklisted\": false } ``` ### Required Fields | Field | Type | Description | |-------|------|-------------| | `zipcode` | string | The unique zipcode identifier (e.g., \"12345\") | ### Optional Fields | Field | Type | Description | |-------|------|-------------| | `blacklisted` | boolean | Whether the zipcode should be blacklisted (defaults to false) | ### Read-Only Fields The following fields cannot be set during creation: - **area**: Geographic area data (set by system processes) - **center**: Geographic center point (set by system processes) ## Validation Rules - **zipcode**: Must be a valid string format - **blacklisted**: Must be a boolean value if provided - **Uniqueness**: Zipcode identifier must be unique in the system ## Use Cases This endpoint is commonly used for: - **Initial data import**: Adding zipcodes from external sources - **System expansion**: Adding new geographic coverage areas - **Data correction**: Re-creating accidentally deleted zipcodes - **Batch operations**: Part of bulk zipcode management processes ## Business Rules - New zipcodes are created with minimal data - Geographic data (area, center) is typically populated by background processes - Blacklist status can be set immediately during creation - Zipcodes are global entities not tied to specific organizations * @summary Create a new zipcode * @param {V4ZipcodesCreateZipcodeBodyDto} v4ZipcodesCreateZipcodeBodyDto * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ZipcodesAPIV4ApiInterface */ v4ZipcodesControllerCreateZipcodeV4Raw(requestParameters: V4ZipcodesControllerCreateZipcodeV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4ZipcodesCreateZipcodeResponseDto>>; /** * # POST /v4/zipcodes ## Overview Create a new zipcode entry in the system. This endpoint allows you to add new zipcodes with their associated properties. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header ## Request Body The request body must contain a JSON object with the zipcode data. ### Content Type - **application/json** ### Request Structure ```json { \"zipcode\": \"12345\", \"blacklisted\": false } ``` ### Required Fields | Field | Type | Description | |-------|------|-------------| | `zipcode` | string | The unique zipcode identifier (e.g., \"12345\") | ### Optional Fields | Field | Type | Description | |-------|------|-------------| | `blacklisted` | boolean | Whether the zipcode should be blacklisted (defaults to false) | ### Read-Only Fields The following fields cannot be set during creation: - **area**: Geographic area data (set by system processes) - **center**: Geographic center point (set by system processes) ## Validation Rules - **zipcode**: Must be a valid string format - **blacklisted**: Must be a boolean value if provided - **Uniqueness**: Zipcode identifier must be unique in the system ## Use Cases This endpoint is commonly used for: - **Initial data import**: Adding zipcodes from external sources - **System expansion**: Adding new geographic coverage areas - **Data correction**: Re-creating accidentally deleted zipcodes - **Batch operations**: Part of bulk zipcode management processes ## Business Rules - New zipcodes are created with minimal data - Geographic data (area, center) is typically populated by background processes - Blacklist status can be set immediately during creation - Zipcodes are global entities not tied to specific organizations * Create a new zipcode */ v4ZipcodesControllerCreateZipcodeV4(requestParameters: V4ZipcodesControllerCreateZipcodeV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4ZipcodesCreateZipcodeResponseDto>; /** * # DELETE /v4/zipcodes/{zipcodeId} ## Overview Delete a specific zipcode from the system. This operation permanently removes the zipcode entry. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header ## Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `zipcodeId` | string | Yes | The unique identifier of the zipcode to delete | ## Operation Details ### Permanent Deletion - The zipcode is permanently removed from the system - This operation cannot be undone - All associated geographic data is also removed ### Impact Assessment Before deletion, consider: - **Property references**: Properties may reference this zipcode - **Business rules**: Deletion may affect validation logic - **Data integrity**: Related records may be impacted ## Use Cases This endpoint should be used cautiously for: - **Data cleanup**: Removing invalid or duplicate zipcodes - **System maintenance**: Cleaning up test or obsolete data - **Data migration**: Part of data restructuring processes - **Error correction**: Removing incorrectly created zipcodes ## Business Rules - Zipcodes are global entities not tied to organizations - Consider setting `blacklisted = true` instead of deletion for business scenarios - Deletion is immediate and permanent - No cascade deletion is performed on related entities ## Warning **Permanent Action**: This operation permanently removes the zipcode from the system. Consider using the UPDATE endpoint to set `blacklisted = true` instead of deletion for business scenarios where the zipcode should be disabled but preserved. * @summary Delete a specific zipcode by zipcodeId * @param {string} zipcodeId The unique identifier of the zipcode * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ZipcodesAPIV4ApiInterface */ v4ZipcodesControllerDeleteZipcodeV4Raw(requestParameters: V4ZipcodesControllerDeleteZipcodeV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4ZipcodesDeleteZipcodeResponseDto>>; /** * # DELETE /v4/zipcodes/{zipcodeId} ## Overview Delete a specific zipcode from the system. This operation permanently removes the zipcode entry. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header ## Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `zipcodeId` | string | Yes | The unique identifier of the zipcode to delete | ## Operation Details ### Permanent Deletion - The zipcode is permanently removed from the system - This operation cannot be undone - All associated geographic data is also removed ### Impact Assessment Before deletion, consider: - **Property references**: Properties may reference this zipcode - **Business rules**: Deletion may affect validation logic - **Data integrity**: Related records may be impacted ## Use Cases This endpoint should be used cautiously for: - **Data cleanup**: Removing invalid or duplicate zipcodes - **System maintenance**: Cleaning up test or obsolete data - **Data migration**: Part of data restructuring processes - **Error correction**: Removing incorrectly created zipcodes ## Business Rules - Zipcodes are global entities not tied to organizations - Consider setting `blacklisted = true` instead of deletion for business scenarios - Deletion is immediate and permanent - No cascade deletion is performed on related entities ## Warning **Permanent Action**: This operation permanently removes the zipcode from the system. Consider using the UPDATE endpoint to set `blacklisted = true` instead of deletion for business scenarios where the zipcode should be disabled but preserved. * Delete a specific zipcode by zipcodeId */ v4ZipcodesControllerDeleteZipcodeV4(requestParameters: V4ZipcodesControllerDeleteZipcodeV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4ZipcodesDeleteZipcodeResponseDto>; /** * # GET /v4/zipcodes/{zipcodeId}/{columns} ## Overview Retrieve specific columns of a zipcode by its ID. This endpoint allows you to fetch only the fields you need, improving performance and reducing bandwidth usage. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header ## Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `zipcodeId` | string | Yes | The unique identifier of the zipcode to retrieve | | `columns` | string | Yes | Comma-separated list of column names to retrieve | ## Available Columns | Column | Type | Description | |--------|------|-------------| | `zipcode` | string | The zipcode identifier (always included) | | `blacklisted` | boolean | Whether the zipcode is blacklisted | | `area` | geometry | Geographic area data (MultiPolygon) | | `center` | geometry | Geographic center point (Point) | ## Examples ### Get only blacklisted status ``` GET /v4/zipcodes/12345/blacklisted ``` ### Get multiple columns ``` GET /v4/zipcodes/12345/zipcode,blacklisted,center ``` ## Response Structure The response contains only the requested columns along with metadata. ### Root Object - **objects**: Array containing the single zipcode entity with requested columns - **count**: Always 1 for successful single zipcode retrieval ## Use Cases This endpoint is commonly used for: - **Performance optimization**: Fetch only needed fields - **Bandwidth optimization**: Reduce response size - **Specific data queries**: Get targeted information - **Mobile applications**: Minimize data transfer * @summary Get specific columns of a zipcode by zipcodeId * @param {string} zipcodeId The unique identifier of the zipcode * @param {string} columns Comma-separated list of column names * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ZipcodesAPIV4ApiInterface */ v4ZipcodesControllerGetZipcodeColumnsV4Raw(requestParameters: V4ZipcodesControllerGetZipcodeColumnsV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4ZipcodesGetZipcodeColumnsResponseDto>>; /** * # GET /v4/zipcodes/{zipcodeId}/{columns} ## Overview Retrieve specific columns of a zipcode by its ID. This endpoint allows you to fetch only the fields you need, improving performance and reducing bandwidth usage. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header ## Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `zipcodeId` | string | Yes | The unique identifier of the zipcode to retrieve | | `columns` | string | Yes | Comma-separated list of column names to retrieve | ## Available Columns | Column | Type | Description | |--------|------|-------------| | `zipcode` | string | The zipcode identifier (always included) | | `blacklisted` | boolean | Whether the zipcode is blacklisted | | `area` | geometry | Geographic area data (MultiPolygon) | | `center` | geometry | Geographic center point (Point) | ## Examples ### Get only blacklisted status ``` GET /v4/zipcodes/12345/blacklisted ``` ### Get multiple columns ``` GET /v4/zipcodes/12345/zipcode,blacklisted,center ``` ## Response Structure The response contains only the requested columns along with metadata. ### Root Object - **objects**: Array containing the single zipcode entity with requested columns - **count**: Always 1 for successful single zipcode retrieval ## Use Cases This endpoint is commonly used for: - **Performance optimization**: Fetch only needed fields - **Bandwidth optimization**: Reduce response size - **Specific data queries**: Get targeted information - **Mobile applications**: Minimize data transfer * Get specific columns of a zipcode by zipcodeId */ v4ZipcodesControllerGetZipcodeColumnsV4(requestParameters: V4ZipcodesControllerGetZipcodeColumnsV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4ZipcodesGetZipcodeColumnsResponseDto>; /** * # GET /v4/zipcodes/{zipcodeId} ## Overview Retrieve detailed information for a specific zipcode by its ID. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header ## Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `zipcodeId` | string | Yes | The unique identifier of the zipcode to retrieve | ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `viewId` | number | No | - | Apply a specific view for filtering or column selection | ## Response Structure The response contains the zipcode entity along with metadata. ### Root Object - **objects**: Array containing the single zipcode entity - **count**: Always 1 for successful single zipcode retrieval ### Zipcode Entity - **zipcode**: The zipcode identifier (e.g., \"12345\") - **blacklisted**: Boolean indicating if the zipcode is blacklisted - **area**: Geographic area data (MultiPolygon geometry, usually null) - **center**: Geographic center point (Point geometry, usually null) ## Use Cases This endpoint is commonly used for: - **Zipcode details**: Get complete information about a specific zipcode - **Blacklist status**: Check if a specific zipcode is blacklisted - **Property validation**: Verify zipcode exists before property operations - **Geographic data**: Access zipcode boundary and center point data * @summary Get a specific zipcode by zipcodeId * @param {string} zipcodeId The unique identifier of the zipcode * @param {number} [viewId] View ID for filtering * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ZipcodesAPIV4ApiInterface */ v4ZipcodesControllerGetZipcodeV4Raw(requestParameters: V4ZipcodesControllerGetZipcodeV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4ZipcodesGetZipcodeResponseDto>>; /** * # GET /v4/zipcodes/{zipcodeId} ## Overview Retrieve detailed information for a specific zipcode by its ID. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header ## Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `zipcodeId` | string | Yes | The unique identifier of the zipcode to retrieve | ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `viewId` | number | No | - | Apply a specific view for filtering or column selection | ## Response Structure The response contains the zipcode entity along with metadata. ### Root Object - **objects**: Array containing the single zipcode entity - **count**: Always 1 for successful single zipcode retrieval ### Zipcode Entity - **zipcode**: The zipcode identifier (e.g., \"12345\") - **blacklisted**: Boolean indicating if the zipcode is blacklisted - **area**: Geographic area data (MultiPolygon geometry, usually null) - **center**: Geographic center point (Point geometry, usually null) ## Use Cases This endpoint is commonly used for: - **Zipcode details**: Get complete information about a specific zipcode - **Blacklist status**: Check if a specific zipcode is blacklisted - **Property validation**: Verify zipcode exists before property operations - **Geographic data**: Access zipcode boundary and center point data * Get a specific zipcode by zipcodeId */ v4ZipcodesControllerGetZipcodeV4(requestParameters: V4ZipcodesControllerGetZipcodeV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4ZipcodesGetZipcodeResponseDto>; /** * # GET /v4/zipcodes/viewId/{viewId} ## Overview Retrieve zipcodes filtered by a specific view. Views provide predefined filtering, sorting, and column selection for zipcode data. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header ## Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `viewId` | number | Yes | The unique identifier of the view to apply | ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `limit` | number | No | 50 | Maximum number of zipcodes to return | | `offset` | number | No | 0 | Number of zipcodes to skip for pagination | | `countOnly` | boolean | No | false | Return only the count instead of zipcode objects | ## Views Views can define: - **Filters**: Conditions to filter zipcodes (e.g., blacklisted = true) - **Sorting**: Order of results (e.g., zipcode ascending) - **Columns**: Which fields to include in response - **Aggregations**: Summary statistics and calculations ## Response Structure The response contains an array of zipcode objects filtered by the view. ### Root Object - **objects**: Array of zipcode entities matching the view criteria - **count**: Total number of zipcodes matching the view (not just current page) ### Zipcode Entity - **zipcode**: The zipcode identifier (e.g., \"12345\") - **blacklisted**: Boolean indicating if the zipcode is blacklisted - **area**: Geographic area data (MultiPolygon geometry, usually null) - **center**: Geographic center point (Point geometry, usually null) ## Use Cases This endpoint is commonly used for: - **Filtered lists**: Get zipcodes matching specific criteria - **Dashboard queries**: Pre-configured data views for dashboards - **Report generation**: Consistent data filtering for reports - **Saved searches**: Reusable query configurations - **Analytics**: Pre-defined data slices for analysis ## Examples ### Get blacklisted zipcodes Using a view that filters for `blacklisted = true` ### Get zipcodes by region Using a view that filters by geographic boundaries ### Get zipcodes with custom sorting Using a view that applies specific ordering * @summary Get zipcodes with a specific viewId * @param {number} viewId The unique identifier of the view * @param {number} [limit] Number of results to return * @param {number} [offset] Number of results to skip * @param {boolean} [countOnly] Return only the count of results * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ZipcodesAPIV4ApiInterface */ v4ZipcodesControllerGetZipcodesInViewV4Raw(requestParameters: V4ZipcodesControllerGetZipcodesInViewV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4ZipcodesGetZipcodesInViewResponseDto>>; /** * # GET /v4/zipcodes/viewId/{viewId} ## Overview Retrieve zipcodes filtered by a specific view. Views provide predefined filtering, sorting, and column selection for zipcode data. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header ## Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `viewId` | number | Yes | The unique identifier of the view to apply | ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `limit` | number | No | 50 | Maximum number of zipcodes to return | | `offset` | number | No | 0 | Number of zipcodes to skip for pagination | | `countOnly` | boolean | No | false | Return only the count instead of zipcode objects | ## Views Views can define: - **Filters**: Conditions to filter zipcodes (e.g., blacklisted = true) - **Sorting**: Order of results (e.g., zipcode ascending) - **Columns**: Which fields to include in response - **Aggregations**: Summary statistics and calculations ## Response Structure The response contains an array of zipcode objects filtered by the view. ### Root Object - **objects**: Array of zipcode entities matching the view criteria - **count**: Total number of zipcodes matching the view (not just current page) ### Zipcode Entity - **zipcode**: The zipcode identifier (e.g., \"12345\") - **blacklisted**: Boolean indicating if the zipcode is blacklisted - **area**: Geographic area data (MultiPolygon geometry, usually null) - **center**: Geographic center point (Point geometry, usually null) ## Use Cases This endpoint is commonly used for: - **Filtered lists**: Get zipcodes matching specific criteria - **Dashboard queries**: Pre-configured data views for dashboards - **Report generation**: Consistent data filtering for reports - **Saved searches**: Reusable query configurations - **Analytics**: Pre-defined data slices for analysis ## Examples ### Get blacklisted zipcodes Using a view that filters for `blacklisted = true` ### Get zipcodes by region Using a view that filters by geographic boundaries ### Get zipcodes with custom sorting Using a view that applies specific ordering * Get zipcodes with a specific viewId */ v4ZipcodesControllerGetZipcodesInViewV4(requestParameters: V4ZipcodesControllerGetZipcodesInViewV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4ZipcodesGetZipcodesInViewResponseDto>; /** * # GET /v4/zipcodes ## Overview Retrieve a list of zipcodes with optional view filtering and pagination. Zipcodes are global entities not restricted by organization. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `viewId` | number | No | - | Filter zipcodes using a specific view | | `limit` | number | No | 50 | Maximum number of zipcodes to return | | `offset` | number | No | 0 | Number of zipcodes to skip for pagination | | `countOnly` | boolean | No | false | Return only the count instead of zipcode objects | ## Response Structure The response contains an array of zipcode objects along with pagination metadata. ### Root Object - **objects**: Array of zipcode entities - **count**: Total number of zipcodes matching the query ### Zipcode Entity - **zipcode**: The zipcode identifier (e.g., \"12345\") - **blacklisted**: Boolean indicating if the zipcode is blacklisted - **area**: Geographic area data (MultiPolygon geometry, usually null) - **center**: Geographic center point (Point geometry, usually null) ## Use Cases This endpoint is commonly used for: - **List all zipcodes**: Get complete zipcode inventory - **Paginated retrieval**: Load zipcodes in chunks for performance - **View-based filtering**: Apply custom filters using views - **Count queries**: Get total zipcode count for statistics - **Blacklist management**: Identify blacklisted zipcodes * @summary Get zipcodes with optional viewId * @param {number} [viewId] View ID for filtering * @param {number} [limit] Number of results to return * @param {number} [offset] Number of results to skip * @param {boolean} [countOnly] Return only the count of results * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ZipcodesAPIV4ApiInterface */ v4ZipcodesControllerGetZipcodesV4Raw(requestParameters: V4ZipcodesControllerGetZipcodesV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4ZipcodesGetZipcodesResponseDto>>; /** * # GET /v4/zipcodes ## Overview Retrieve a list of zipcodes with optional view filtering and pagination. Zipcodes are global entities not restricted by organization. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `viewId` | number | No | - | Filter zipcodes using a specific view | | `limit` | number | No | 50 | Maximum number of zipcodes to return | | `offset` | number | No | 0 | Number of zipcodes to skip for pagination | | `countOnly` | boolean | No | false | Return only the count instead of zipcode objects | ## Response Structure The response contains an array of zipcode objects along with pagination metadata. ### Root Object - **objects**: Array of zipcode entities - **count**: Total number of zipcodes matching the query ### Zipcode Entity - **zipcode**: The zipcode identifier (e.g., \"12345\") - **blacklisted**: Boolean indicating if the zipcode is blacklisted - **area**: Geographic area data (MultiPolygon geometry, usually null) - **center**: Geographic center point (Point geometry, usually null) ## Use Cases This endpoint is commonly used for: - **List all zipcodes**: Get complete zipcode inventory - **Paginated retrieval**: Load zipcodes in chunks for performance - **View-based filtering**: Apply custom filters using views - **Count queries**: Get total zipcode count for statistics - **Blacklist management**: Identify blacklisted zipcodes * Get zipcodes with optional viewId */ v4ZipcodesControllerGetZipcodesV4(requestParameters: V4ZipcodesControllerGetZipcodesV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4ZipcodesGetZipcodesResponseDto>; /** * # PATCH /v4/zipcodes/{zipcodeId} ## Overview Update a specific zipcode by its ID. Commonly used to update the blacklisted status of zipcodes. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `zipcodeId` | string | Yes | The unique identifier of the zipcode to update | ## Request Body The request body must contain a JSON object with the zipcode fields to be updated. ### Content Type - **application/json** ### Request Structure The request body should contain the zipcode data to update: ```json { \"zipcode\": { \"blacklisted\": true } } ``` ### Updatable Fields - **blacklisted**: Boolean indicating if the zipcode is blacklisted ## Use Cases This endpoint is commonly used for: - **Blacklisting zipcodes**: Mark zipcodes as blacklisted to prevent property purchases in those areas - **Un-blacklisting zipcodes**: Remove blacklist status from previously blacklisted zipcodes * @summary Update a specific zipcode by zipcodeId * @param {string} zipcodeId The unique identifier of the zipcode * @param {V4ZipcodesUpdateZipcodeBodyDto} v4ZipcodesUpdateZipcodeBodyDto * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ZipcodesAPIV4ApiInterface */ v4ZipcodesControllerUpdateZipcodeV4Raw(requestParameters: V4ZipcodesControllerUpdateZipcodeV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4ZipcodesUpdateZipcodeResponseDto>>; /** * # PATCH /v4/zipcodes/{zipcodeId} ## Overview Update a specific zipcode by its ID. Commonly used to update the blacklisted status of zipcodes. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `zipcodeId` | string | Yes | The unique identifier of the zipcode to update | ## Request Body The request body must contain a JSON object with the zipcode fields to be updated. ### Content Type - **application/json** ### Request Structure The request body should contain the zipcode data to update: ```json { \"zipcode\": { \"blacklisted\": true } } ``` ### Updatable Fields - **blacklisted**: Boolean indicating if the zipcode is blacklisted ## Use Cases This endpoint is commonly used for: - **Blacklisting zipcodes**: Mark zipcodes as blacklisted to prevent property purchases in those areas - **Un-blacklisting zipcodes**: Remove blacklist status from previously blacklisted zipcodes * Update a specific zipcode by zipcodeId */ v4ZipcodesControllerUpdateZipcodeV4(requestParameters: V4ZipcodesControllerUpdateZipcodeV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4ZipcodesUpdateZipcodeResponseDto>; } /** * */ export declare class ZipcodesAPIV4Api extends runtime.BaseAPI implements ZipcodesAPIV4ApiInterface { /** * # POST /v4/zipcodes ## Overview Create a new zipcode entry in the system. This endpoint allows you to add new zipcodes with their associated properties. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header ## Request Body The request body must contain a JSON object with the zipcode data. ### Content Type - **application/json** ### Request Structure ```json { \"zipcode\": \"12345\", \"blacklisted\": false } ``` ### Required Fields | Field | Type | Description | |-------|------|-------------| | `zipcode` | string | The unique zipcode identifier (e.g., \"12345\") | ### Optional Fields | Field | Type | Description | |-------|------|-------------| | `blacklisted` | boolean | Whether the zipcode should be blacklisted (defaults to false) | ### Read-Only Fields The following fields cannot be set during creation: - **area**: Geographic area data (set by system processes) - **center**: Geographic center point (set by system processes) ## Validation Rules - **zipcode**: Must be a valid string format - **blacklisted**: Must be a boolean value if provided - **Uniqueness**: Zipcode identifier must be unique in the system ## Use Cases This endpoint is commonly used for: - **Initial data import**: Adding zipcodes from external sources - **System expansion**: Adding new geographic coverage areas - **Data correction**: Re-creating accidentally deleted zipcodes - **Batch operations**: Part of bulk zipcode management processes ## Business Rules - New zipcodes are created with minimal data - Geographic data (area, center) is typically populated by background processes - Blacklist status can be set immediately during creation - Zipcodes are global entities not tied to specific organizations * Create a new zipcode */ v4ZipcodesControllerCreateZipcodeV4Raw(requestParameters: V4ZipcodesControllerCreateZipcodeV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4ZipcodesCreateZipcodeResponseDto>>; /** * # POST /v4/zipcodes ## Overview Create a new zipcode entry in the system. This endpoint allows you to add new zipcodes with their associated properties. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header ## Request Body The request body must contain a JSON object with the zipcode data. ### Content Type - **application/json** ### Request Structure ```json { \"zipcode\": \"12345\", \"blacklisted\": false } ``` ### Required Fields | Field | Type | Description | |-------|------|-------------| | `zipcode` | string | The unique zipcode identifier (e.g., \"12345\") | ### Optional Fields | Field | Type | Description | |-------|------|-------------| | `blacklisted` | boolean | Whether the zipcode should be blacklisted (defaults to false) | ### Read-Only Fields The following fields cannot be set during creation: - **area**: Geographic area data (set by system processes) - **center**: Geographic center point (set by system processes) ## Validation Rules - **zipcode**: Must be a valid string format - **blacklisted**: Must be a boolean value if provided - **Uniqueness**: Zipcode identifier must be unique in the system ## Use Cases This endpoint is commonly used for: - **Initial data import**: Adding zipcodes from external sources - **System expansion**: Adding new geographic coverage areas - **Data correction**: Re-creating accidentally deleted zipcodes - **Batch operations**: Part of bulk zipcode management processes ## Business Rules - New zipcodes are created with minimal data - Geographic data (area, center) is typically populated by background processes - Blacklist status can be set immediately during creation - Zipcodes are global entities not tied to specific organizations * Create a new zipcode */ v4ZipcodesControllerCreateZipcodeV4(requestParameters: V4ZipcodesControllerCreateZipcodeV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4ZipcodesCreateZipcodeResponseDto>; /** * # DELETE /v4/zipcodes/{zipcodeId} ## Overview Delete a specific zipcode from the system. This operation permanently removes the zipcode entry. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header ## Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `zipcodeId` | string | Yes | The unique identifier of the zipcode to delete | ## Operation Details ### Permanent Deletion - The zipcode is permanently removed from the system - This operation cannot be undone - All associated geographic data is also removed ### Impact Assessment Before deletion, consider: - **Property references**: Properties may reference this zipcode - **Business rules**: Deletion may affect validation logic - **Data integrity**: Related records may be impacted ## Use Cases This endpoint should be used cautiously for: - **Data cleanup**: Removing invalid or duplicate zipcodes - **System maintenance**: Cleaning up test or obsolete data - **Data migration**: Part of data restructuring processes - **Error correction**: Removing incorrectly created zipcodes ## Business Rules - Zipcodes are global entities not tied to organizations - Consider setting `blacklisted = true` instead of deletion for business scenarios - Deletion is immediate and permanent - No cascade deletion is performed on related entities ## Warning **Permanent Action**: This operation permanently removes the zipcode from the system. Consider using the UPDATE endpoint to set `blacklisted = true` instead of deletion for business scenarios where the zipcode should be disabled but preserved. * Delete a specific zipcode by zipcodeId */ v4ZipcodesControllerDeleteZipcodeV4Raw(requestParameters: V4ZipcodesControllerDeleteZipcodeV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4ZipcodesDeleteZipcodeResponseDto>>; /** * # DELETE /v4/zipcodes/{zipcodeId} ## Overview Delete a specific zipcode from the system. This operation permanently removes the zipcode entry. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header ## Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `zipcodeId` | string | Yes | The unique identifier of the zipcode to delete | ## Operation Details ### Permanent Deletion - The zipcode is permanently removed from the system - This operation cannot be undone - All associated geographic data is also removed ### Impact Assessment Before deletion, consider: - **Property references**: Properties may reference this zipcode - **Business rules**: Deletion may affect validation logic - **Data integrity**: Related records may be impacted ## Use Cases This endpoint should be used cautiously for: - **Data cleanup**: Removing invalid or duplicate zipcodes - **System maintenance**: Cleaning up test or obsolete data - **Data migration**: Part of data restructuring processes - **Error correction**: Removing incorrectly created zipcodes ## Business Rules - Zipcodes are global entities not tied to organizations - Consider setting `blacklisted = true` instead of deletion for business scenarios - Deletion is immediate and permanent - No cascade deletion is performed on related entities ## Warning **Permanent Action**: This operation permanently removes the zipcode from the system. Consider using the UPDATE endpoint to set `blacklisted = true` instead of deletion for business scenarios where the zipcode should be disabled but preserved. * Delete a specific zipcode by zipcodeId */ v4ZipcodesControllerDeleteZipcodeV4(requestParameters: V4ZipcodesControllerDeleteZipcodeV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4ZipcodesDeleteZipcodeResponseDto>; /** * # GET /v4/zipcodes/{zipcodeId}/{columns} ## Overview Retrieve specific columns of a zipcode by its ID. This endpoint allows you to fetch only the fields you need, improving performance and reducing bandwidth usage. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header ## Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `zipcodeId` | string | Yes | The unique identifier of the zipcode to retrieve | | `columns` | string | Yes | Comma-separated list of column names to retrieve | ## Available Columns | Column | Type | Description | |--------|------|-------------| | `zipcode` | string | The zipcode identifier (always included) | | `blacklisted` | boolean | Whether the zipcode is blacklisted | | `area` | geometry | Geographic area data (MultiPolygon) | | `center` | geometry | Geographic center point (Point) | ## Examples ### Get only blacklisted status ``` GET /v4/zipcodes/12345/blacklisted ``` ### Get multiple columns ``` GET /v4/zipcodes/12345/zipcode,blacklisted,center ``` ## Response Structure The response contains only the requested columns along with metadata. ### Root Object - **objects**: Array containing the single zipcode entity with requested columns - **count**: Always 1 for successful single zipcode retrieval ## Use Cases This endpoint is commonly used for: - **Performance optimization**: Fetch only needed fields - **Bandwidth optimization**: Reduce response size - **Specific data queries**: Get targeted information - **Mobile applications**: Minimize data transfer * Get specific columns of a zipcode by zipcodeId */ v4ZipcodesControllerGetZipcodeColumnsV4Raw(requestParameters: V4ZipcodesControllerGetZipcodeColumnsV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4ZipcodesGetZipcodeColumnsResponseDto>>; /** * # GET /v4/zipcodes/{zipcodeId}/{columns} ## Overview Retrieve specific columns of a zipcode by its ID. This endpoint allows you to fetch only the fields you need, improving performance and reducing bandwidth usage. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header ## Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `zipcodeId` | string | Yes | The unique identifier of the zipcode to retrieve | | `columns` | string | Yes | Comma-separated list of column names to retrieve | ## Available Columns | Column | Type | Description | |--------|------|-------------| | `zipcode` | string | The zipcode identifier (always included) | | `blacklisted` | boolean | Whether the zipcode is blacklisted | | `area` | geometry | Geographic area data (MultiPolygon) | | `center` | geometry | Geographic center point (Point) | ## Examples ### Get only blacklisted status ``` GET /v4/zipcodes/12345/blacklisted ``` ### Get multiple columns ``` GET /v4/zipcodes/12345/zipcode,blacklisted,center ``` ## Response Structure The response contains only the requested columns along with metadata. ### Root Object - **objects**: Array containing the single zipcode entity with requested columns - **count**: Always 1 for successful single zipcode retrieval ## Use Cases This endpoint is commonly used for: - **Performance optimization**: Fetch only needed fields - **Bandwidth optimization**: Reduce response size - **Specific data queries**: Get targeted information - **Mobile applications**: Minimize data transfer * Get specific columns of a zipcode by zipcodeId */ v4ZipcodesControllerGetZipcodeColumnsV4(requestParameters: V4ZipcodesControllerGetZipcodeColumnsV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4ZipcodesGetZipcodeColumnsResponseDto>; /** * # GET /v4/zipcodes/{zipcodeId} ## Overview Retrieve detailed information for a specific zipcode by its ID. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header ## Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `zipcodeId` | string | Yes | The unique identifier of the zipcode to retrieve | ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `viewId` | number | No | - | Apply a specific view for filtering or column selection | ## Response Structure The response contains the zipcode entity along with metadata. ### Root Object - **objects**: Array containing the single zipcode entity - **count**: Always 1 for successful single zipcode retrieval ### Zipcode Entity - **zipcode**: The zipcode identifier (e.g., \"12345\") - **blacklisted**: Boolean indicating if the zipcode is blacklisted - **area**: Geographic area data (MultiPolygon geometry, usually null) - **center**: Geographic center point (Point geometry, usually null) ## Use Cases This endpoint is commonly used for: - **Zipcode details**: Get complete information about a specific zipcode - **Blacklist status**: Check if a specific zipcode is blacklisted - **Property validation**: Verify zipcode exists before property operations - **Geographic data**: Access zipcode boundary and center point data * Get a specific zipcode by zipcodeId */ v4ZipcodesControllerGetZipcodeV4Raw(requestParameters: V4ZipcodesControllerGetZipcodeV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4ZipcodesGetZipcodeResponseDto>>; /** * # GET /v4/zipcodes/{zipcodeId} ## Overview Retrieve detailed information for a specific zipcode by its ID. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header ## Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `zipcodeId` | string | Yes | The unique identifier of the zipcode to retrieve | ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `viewId` | number | No | - | Apply a specific view for filtering or column selection | ## Response Structure The response contains the zipcode entity along with metadata. ### Root Object - **objects**: Array containing the single zipcode entity - **count**: Always 1 for successful single zipcode retrieval ### Zipcode Entity - **zipcode**: The zipcode identifier (e.g., \"12345\") - **blacklisted**: Boolean indicating if the zipcode is blacklisted - **area**: Geographic area data (MultiPolygon geometry, usually null) - **center**: Geographic center point (Point geometry, usually null) ## Use Cases This endpoint is commonly used for: - **Zipcode details**: Get complete information about a specific zipcode - **Blacklist status**: Check if a specific zipcode is blacklisted - **Property validation**: Verify zipcode exists before property operations - **Geographic data**: Access zipcode boundary and center point data * Get a specific zipcode by zipcodeId */ v4ZipcodesControllerGetZipcodeV4(requestParameters: V4ZipcodesControllerGetZipcodeV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4ZipcodesGetZipcodeResponseDto>; /** * # GET /v4/zipcodes/viewId/{viewId} ## Overview Retrieve zipcodes filtered by a specific view. Views provide predefined filtering, sorting, and column selection for zipcode data. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header ## Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `viewId` | number | Yes | The unique identifier of the view to apply | ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `limit` | number | No | 50 | Maximum number of zipcodes to return | | `offset` | number | No | 0 | Number of zipcodes to skip for pagination | | `countOnly` | boolean | No | false | Return only the count instead of zipcode objects | ## Views Views can define: - **Filters**: Conditions to filter zipcodes (e.g., blacklisted = true) - **Sorting**: Order of results (e.g., zipcode ascending) - **Columns**: Which fields to include in response - **Aggregations**: Summary statistics and calculations ## Response Structure The response contains an array of zipcode objects filtered by the view. ### Root Object - **objects**: Array of zipcode entities matching the view criteria - **count**: Total number of zipcodes matching the view (not just current page) ### Zipcode Entity - **zipcode**: The zipcode identifier (e.g., \"12345\") - **blacklisted**: Boolean indicating if the zipcode is blacklisted - **area**: Geographic area data (MultiPolygon geometry, usually null) - **center**: Geographic center point (Point geometry, usually null) ## Use Cases This endpoint is commonly used for: - **Filtered lists**: Get zipcodes matching specific criteria - **Dashboard queries**: Pre-configured data views for dashboards - **Report generation**: Consistent data filtering for reports - **Saved searches**: Reusable query configurations - **Analytics**: Pre-defined data slices for analysis ## Examples ### Get blacklisted zipcodes Using a view that filters for `blacklisted = true` ### Get zipcodes by region Using a view that filters by geographic boundaries ### Get zipcodes with custom sorting Using a view that applies specific ordering * Get zipcodes with a specific viewId */ v4ZipcodesControllerGetZipcodesInViewV4Raw(requestParameters: V4ZipcodesControllerGetZipcodesInViewV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4ZipcodesGetZipcodesInViewResponseDto>>; /** * # GET /v4/zipcodes/viewId/{viewId} ## Overview Retrieve zipcodes filtered by a specific view. Views provide predefined filtering, sorting, and column selection for zipcode data. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header ## Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `viewId` | number | Yes | The unique identifier of the view to apply | ## Query Parameters | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `limit` | number | No | 50 | Maximum number of zipcodes to return | | `offset` | number | No | 0 | Number of zipcodes to skip for pagination | | `countOnly` | boolean | No | false | Return only the count instead of zipcode objects | ## Views Views can define: - **Filters**: Conditions to filter zipcodes (e.g., blacklisted = true) - **Sorting**: Order of results (e.g., zipcode ascending) - **Columns**: Which fields to include in response - **Aggregations**: Summary statistics and calculations ## Response Structure The response contains an array of zipcode objects filtered by the view. ### Root Object - **objects**: Array of zipcode entities matching the view criteria - **count**: Total number of zipcodes matching the view (not just current page) ### Zipcode Entity - **zipcode**: The zipcode identifier (e.g., \"12345\") - **blacklisted**: Boolean indicating if the zipcode is blacklisted - **area**: Geographic area data (MultiPolygon geometry, usually null) - **center**: Geographic center point (Point geometry, usually null) ## Use Cases This endpoint is commonly used for: - **Filtered lists**: Get zipcodes matching specific criteria - **Dashboard queries**: Pre-configured data views for dashboards - **Report generation**: Consistent data filtering for rep