# Portfolio

## Get portfolio details

 - [GET /api/v1/portfolio](https://zonedevelopersdocumentationv1.redocly.app/apis/portfolio/paths/~1api~1v1~1portfolio/get.md): Returns the portfolio hierarchy for the current account and user.
            
Behavior:
- Validates account and user context
- Retrieves accessible portfolio locations
- Returns structured location response data
- Logs the action as a map view

## Get portfolio locations

 - [GET /api/v1/portfolio/locations](https://zonedevelopersdocumentationv1.redocly.app/apis/portfolio/paths/~1api~1v1~1portfolio~1locations/get.md): Returns all accessible locations within the current account context.
            
Behavior:
- Validates account and user context
- Retrieves location records associated with the portfolio
- Returns structured location response data
- Logs the action as a location view

## List buildings by location

 - [GET /api/v1/portfolio/locations/{locationidentifier}/buildings](https://zonedevelopersdocumentationv1.redocly.app/apis/portfolio/paths/~1api~1v1~1portfolio~1locations~1%7Blocationidentifier%7D~1buildings/get.md): Returns the list of buildings associated with the specified location within the current account context.
            
Behavior:
- Validates the location belongs to the account
- Retrieves buildings linked to the given location identifier
- Returns structured building response data
- Logs the action as a building's view

## List levels by building

 - [GET /api/v1/portfolio/locations/{locationidentifier}/buildings/{buildingidentifier}/levels](https://zonedevelopersdocumentationv1.redocly.app/apis/portfolio/paths/~1api~1v1~1portfolio~1locations~1%7Blocationidentifier%7D~1buildings~1%7Bbuildingidentifier%7D~1levels/get.md): Returns the list of levels associated with the specified building within the current account context.
            
Behavior:
- Validates the building belongs to the account
- Retrieves levels linked to the given building identifier
- Returns structured building level response data
- Logs the action as building levels view

## Add level to building

 - [POST /api/v1/portfolio/locations/{locationidentifier}/buildings/{buildingidentifier}/levels/add](https://zonedevelopersdocumentationv1.redocly.app/apis/portfolio/paths/~1api~1v1~1portfolio~1locations~1%7Blocationidentifier%7D~1buildings~1%7Bbuildingidentifier%7D~1levels~1add/post.md): Creates a new level under the specified building and location within the current account context.
            
Behavior:
- Validates manage privilege for portfolio/buildings
- Verifies location and building belong to the account
- Creates a new building level using request data
- Returns the created level details
- Logs the action as level added

## Add building to location

 - [POST /api/v1/portfolio/locations/{locationidentifier}/buildings/add](https://zonedevelopersdocumentationv1.redocly.app/apis/portfolio/paths/~1api~1v1~1portfolio~1locations~1%7Blocationidentifier%7D~1buildings~1add/post.md): Creates a new building under the specified location within the current account context.
            
Behavior:
- Validates manage privilege for portfolio/buildings
- Verifies the location belongs to the account
- Creates a new building using request data
- Returns the created building details
- Logs the action as building added

## List building plans

 - [GET /api/v1/portfolio/locations/{locationidentifier}/buildings/{buildingidentifier}/plans](https://zonedevelopersdocumentationv1.redocly.app/apis/portfolio/paths/~1api~1v1~1portfolio~1locations~1%7Blocationidentifier%7D~1buildings~1%7Bbuildingidentifier%7D~1plans/get.md): Returns the list of CAD plans associated with the specified building and location within the current account context.
            
Behavior:
- Validates building and location belong to the account
- Retrieves CAD plan records for the given identifiers
- Returns structured building plan response data
- Logs the action as building plans view

## List level plans

 - [GET /api/v1/portfolio/locations/{locationidentifier}/buildings/{buildingidentifier}/levels/{levelidentifier}/plans](https://zonedevelopersdocumentationv1.redocly.app/apis/portfolio/paths/~1api~1v1~1portfolio~1locations~1%7Blocationidentifier%7D~1buildings~1%7Bbuildingidentifier%7D~1levels~1%7Blevelidentifier%7D~1plans/get.md): Returns the list of CAD plans associated with the specified level within the current account context.
            
Behavior:
- Validates the level belongs to the account
- Retrieves CAD plan records for the given level identifier
- Returns structured level plan response data
- Logs the action as a level plan's view

## List location plans

 - [GET /api/v1/portfolio/locations/{locationidentifier}/plans](https://zonedevelopersdocumentationv1.redocly.app/apis/portfolio/paths/~1api~1v1~1portfolio~1locations~1%7Blocationidentifier%7D~1plans/get.md): Returns the list of CAD plans associated with the specified location within the current account context.
            
Behavior:
- Validates manage or view privilege for portfolio
- Verifies the location belongs to the account
- Retrieves CAD plan records for the given location identifier
- Returns structured location plan response data
- Logs the action as site plans view

## Get location details

 - [GET /api/v1/portfolio/locations/{locationidentifier}](https://zonedevelopersdocumentationv1.redocly.app/apis/portfolio/paths/~1api~1v1~1portfolio~1locations~1%7Blocationidentifier%7D/get.md): Returns detailed information for the specified location within the current account context.
            
Behavior:
- Validates the location belongs to the account
- Retrieves detailed location information
- Returns structured location details response data
- Logs the action as a location details view

## Update location

 - [POST /api/v1/portfolio/locations/{locationIdentifier}](https://zonedevelopersdocumentationv1.redocly.app/apis/portfolio/paths/~1api~1v1~1portfolio~1locations~1%7Blocationidentifier%7D/post.md): Updates the specified location within the current account context.
            
Behavior:
- Validates manage privilege for portfolio
- Verifies the location belongs to the account
- Updates location details using request data
- Returns the updated location details
- Logs the action as the site updated

## Get building details

 - [GET /api/v1/portfolio/locations/{locationidentifier}/buildings/{buildingidentifier}](https://zonedevelopersdocumentationv1.redocly.app/apis/portfolio/paths/~1api~1v1~1portfolio~1locations~1%7Blocationidentifier%7D~1buildings~1%7Bbuildingidentifier%7D/get.md): Returns detailed information for the specified building within the given location and current account context.
            
Behavior:
- Validates that the building and location belong to the account
- Retrieves detailed building information
- Returns structured building details response data
- Logs the action as building details view

## Get level details

 - [GET /api/v1/portfolio/locations/{locationidentifier}/buildings/{buildingidentifier}/levels/{levelidentifier}](https://zonedevelopersdocumentationv1.redocly.app/apis/portfolio/paths/~1api~1v1~1portfolio~1locations~1%7Blocationidentifier%7D~1buildings~1%7Bbuildingidentifier%7D~1levels~1%7Blevelidentifier%7D/get.md): Returns detailed information for the specified level within the given building, location, and current account context.
            
Behavior:
- Validates the level, building, and location belong to the account
- Retrieves detailed level information
- Returns structured level details response data
- Logs the action as level details view

## Update building details

 - [POST /api/v1/portfolio/locations/{locationidentifier}/buildings/{buildingIdentifier}](https://zonedevelopersdocumentationv1.redocly.app/apis/portfolio/paths/~1api~1v1~1portfolio~1locations~1%7Blocationidentifier%7D~1buildings~1%7Bbuildingidentifier%7D/post.md): Updates the specified building within the given location and current account context.
            
Behavior:
- Validates manage privilege for portfolio/buildings
- Verifies the building and location belong to the account
- Updates building details using request data
- Returns the updated building details
- Logs the action as building updated

## Update level details

 - [POST /api/v1/portfolio/locations/{locationIdentifier}/buildings/{buildingIdentifier}/levels/{levelIdentifier}](https://zonedevelopersdocumentationv1.redocly.app/apis/portfolio/paths/~1api~1v1~1portfolio~1locations~1%7Blocationidentifier%7D~1buildings~1%7Bbuildingidentifier%7D~1levels~1%7Blevelidentifier%7D/post.md): Updates the specified level within the given building, location, and current account context.
            
Behavior:
- Validates manage privilege for portfolio/buildings
- Verifies the level, building, and location belong to the account
- Updates level details using request data
- Returns the updated level details
- Logs the action as level updated

## List spaces by level

 - [GET /api/v1/portfolio/locations/{locationidentifier}/buildings/{buildingidentifier}/levels/{levelidentifier}/spaces](https://zonedevelopersdocumentationv1.redocly.app/apis/portfolio/paths/~1api~1v1~1portfolio~1locations~1%7Blocationidentifier%7D~1buildings~1%7Bbuildingidentifier%7D~1levels~1%7Blevelidentifier%7D~1spaces/get.md): Returns the list of spaces associated with the specified level within the current account context.
            
Behavior:
- Validates the level belongs to the account
- Retrieves space details for the given level identifier
- Returns structured space list response data
- Logs the action as space details view

## Get space details

 - [GET /api/v1/portfolio/locations/{locationidentifier}/buildings/{buildingidentifier}/levels/{levelidentifier}/spaces/{spaceIdentifier}](https://zonedevelopersdocumentationv1.redocly.app/apis/portfolio/paths/~1api~1v1~1portfolio~1locations~1%7Blocationidentifier%7D~1buildings~1%7Bbuildingidentifier%7D~1levels~1%7Blevelidentifier%7D~1spaces~1%7Bspaceidentifier%7D/get.md): Returns detailed information for the specified space within the current account context.
            
Behavior:
- Validates the space belongs to the account
- Retrieves detailed space information by identifier
- Returns structured space detail response data
- Logs the action as space viewed

## List employees by level

 - [GET /api/v1/portfolio/locations/{locationIdentifier}/buildings/{buildingIdentifier}/levels/{levelIdentifier}/employees](https://zonedevelopersdocumentationv1.redocly.app/apis/portfolio/paths/~1api~1v1~1portfolio~1locations~1%7Blocationidentifier%7D~1buildings~1%7Bbuildingidentifier%7D~1levels~1%7Blevelidentifier%7D~1employees/get.md): Returns employees associated with the specified location, building, and level within the current account context.
            
Behavior:
- Supports optional detailed view when details=yes
- Supports keyword-based filtering
- Validates hierarchy belongs to the account
- Returns structured employee details list
- Logs the action as employees viewed

## List other employees by level

 - [POST /api/v1/portfolio/locations/{locationIdentifier}/buildings/{buildingIdentifier}/levels/{levelIdentifier}/employees/others](https://zonedevelopersdocumentationv1.redocly.app/apis/portfolio/paths/~1api~1v1~1portfolio~1locations~1%7Blocationidentifier%7D~1buildings~1%7Bbuildingidentifier%7D~1levels~1%7Blevelidentifier%7D~1employees~1others/post.md): Returns additional employees for the specified location, building, and level within the current account context.
            
Behavior:
- Supports pagination using start query parameter
- Accepts filter criteria in request body
- Validates hierarchy belongs to the account
- Returns structured employee response data
- Logs the action as other employees viewed

## Remove location

 - [POST /api/v1/portfolio/locations/{locationIdentifier}/remove](https://zonedevelopersdocumentationv1.redocly.app/apis/portfolio/paths/~1api~1v1~1portfolio~1locations~1%7Blocationidentifier%7D~1remove/post.md): Deletes the specified location within the current account context.
            
Behavior:
- Requires portfolio management privileges
- Validates the location belongs to the account
- Removes the location and related associations
- Returns the deletion response model
- Logs the action as site deleted

## Remove building

 - [POST /api/v1/portfolio/locations/{locationIdentifier}/buildings/{buildingIdentifier}/remove](https://zonedevelopersdocumentationv1.redocly.app/apis/portfolio/paths/~1api~1v1~1portfolio~1locations~1%7Blocationidentifier%7D~1buildings~1%7Bbuildingidentifier%7D~1remove/post.md): Deletes the specified building within the current account context.
            
Behavior:
- Requires portfolio management privileges
- Validates the building belongs to the account
- Removes the building and related data
- Returns the deletion response model
- Logs the action as building deleted

## Remove level

 - [POST /api/v1/portfolio/locations/{locationIdentifier}/buildings/{buildingIdentifier}/levels/{levelIdentifier}/remove](https://zonedevelopersdocumentationv1.redocly.app/apis/portfolio/paths/~1api~1v1~1portfolio~1locations~1%7Blocationidentifier%7D~1buildings~1%7Bbuildingidentifier%7D~1levels~1%7Blevelidentifier%7D~1remove/post.md): Deletes the specified level within the current account context.
            
Behavior:
- Requires portfolio management privileges
- Validates the level belongs to the account
- Removes the level and related associations
- Returns the deletion response model
- Logs the action as level deleted

## Get location geometry

 - [GET /api/v1/portfolio/locations/{locationIdentifier}/location](https://zonedevelopersdocumentationv1.redocly.app/apis/portfolio/paths/~1api~1v1~1portfolio~1locations~1%7Blocationidentifier%7D~1location/get.md): Returns the geometry details of the specified location within the current account context.
            
Behavior:
- Validates the location belongs to the account
- Retrieves geometry and spatial data for the location
- Returns structured location geometry response data
- Logs the action as a location geometry view

## Update location geometry

 - [POST /api/v1/portfolio/locations/{locationIdentifier}/location](https://zonedevelopersdocumentationv1.redocly.app/apis/portfolio/paths/~1api~1v1~1portfolio~1locations~1%7Blocationidentifier%7D~1location/post.md): Updates the geometry data of the specified location within the current account context.
            
Behavior:
- Validates the location belongs to the account
- Updates spatial/geometry data using the provided feature collection
- Persists updated geometry information
- Returns the updated location geometry response
- Logs the action as location geometry updated

## Get all employees

 - [POST /api/v1/portfolio/employees](https://zonedevelopersdocumentationv1.redocly.app/apis/portfolio/paths/~1api~1v1~1portfolio~1employees/post.md): Returns a filtered and paginated list of employees within the current account context.
            
Behavior:
- Supports pagination using the start query parameter
- Applies filtering criteria from the request body
- Retrieves employees accessible to the current user
- Returns structured employee response data
- Logs the action as employee list view

## List rooms by level

 - [GET /api/v1/portfolio/locations/{locationIdentifier}/buildings/{buildingIdentifier}/levels/{levelIdentifier}/rooms](https://zonedevelopersdocumentationv1.redocly.app/apis/portfolio/paths/~1api~1v1~1portfolio~1locations~1%7Blocationidentifier%7D~1buildings~1%7Bbuildingidentifier%7D~1levels~1%7Blevelidentifier%7D~1rooms/get.md): Returns the list of rooms associated with the specified level within the current account context.
            
Behavior:
- Validates the level belongs to the account
- Retrieves room details for the given level identifier
- Returns structured room response data
- Logs the action as rooms viewed

## List workspaces by room

 - [GET /api/v1/portfolio/locations/{locationIdentifier}/buildings/{buildingIdentifier}/levels/{levelIdentifier}/rooms/{roomIdentifier}/workspaces](https://zonedevelopersdocumentationv1.redocly.app/apis/portfolio/paths/~1api~1v1~1portfolio~1locations~1%7Blocationidentifier%7D~1buildings~1%7Bbuildingidentifier%7D~1levels~1%7Blevelidentifier%7D~1rooms~1%7Broomidentifier%7D~1workspaces/get.md): Returns the list of workspaces associated with the specified room within the current account context.
            
Behavior:
- Validates the room belongs to the account
- Retrieves workspace details for the given room identifier
- Returns structured workspace response data
- Logs the action as workspaces viewed

## Activate location

 - [POST /api/v1/portfolio/locations/{locationIdentifier}/activate](https://zonedevelopersdocumentationv1.redocly.app/apis/portfolio/paths/~1api~1v1~1portfolio~1locations~1%7Blocationidentifier%7D~1activate/post.md): Activates the specified location within the current account context, optionally including its buildings and levels.
            
Behavior:
- Requires portfolio management privileges
- Validates the location belongs to the account
- Activates the location and optionally related buildings and floors
- Returns updated location details
- Logs the action as location activated

## Inactivate location

 - [POST /api/v1/portfolio/locations/{locationIdentifier}/inactivate](https://zonedevelopersdocumentationv1.redocly.app/apis/portfolio/paths/~1api~1v1~1portfolio~1locations~1%7Blocationidentifier%7D~1inactivate/post.md): Deactivates the specified location within the current account context.
            
Behavior:
- Requires portfolio management privileges
- Validates the location belongs to the account
- Performs in-use validation before inactivation
- Deactivates the location upon confirmation
- Returns in-use check response details
- Logs the action as location deactivated

## List location

 - [POST /api/v1/portfolio/locations/list](https://zonedevelopersdocumentationv1.redocly.app/apis/portfolio/paths/~1api~1v1~1portfolio~1locations~1list/post.md): Returns a filtered and paginated list of locations within the current account context.
            
Behavior:
- Requires portfolio or space view/manage privileges
- Applies filtering criteria from the request body
- Supports pagination using the start query parameter
- Retrieves locations accessible to the current user
- Returns structured location list response data
- Logs the action as site list view

## List buildings

 - [POST /api/v1/portfolio/locations/buildings/list](https://zonedevelopersdocumentationv1.redocly.app/apis/portfolio/paths/~1api~1v1~1portfolio~1locations~1buildings~1list/post.md): Returns a filtered and paginated list of buildings within the current account context.
            
Behavior:
- Applies filtering criteria from the request body
- Supports pagination using the start query parameter
- Retrieves buildings accessible to the current user
- Returns structured building list response data
- Logs the action as building grid view

## List levels

 - [POST /api/v1/portfolio/locations/buildings/levels/list](https://zonedevelopersdocumentationv1.redocly.app/apis/portfolio/paths/~1api~1v1~1portfolio~1locations~1buildings~1levels~1list/post.md): Returns a filtered and paginated list of levels within the current account context.
            
Behavior:
- Applies filtering criteria from the request body
- Supports pagination using the start query parameter
- Retrieves levels accessible to the current user
- Returns structured level list response data
- Logs the action as a level list view

## List rooms and workspaces by level

 - [GET /api/v1/portfolio/locations/{locationIdentifier}/buildings/{buildingIdentifier}/levels/{levelIdentifier}/rooms/workspaces](https://zonedevelopersdocumentationv1.redocly.app/apis/portfolio/paths/~1api~1v1~1portfolio~1locations~1%7Blocationidentifier%7D~1buildings~1%7Bbuildingidentifier%7D~1levels~1%7Blevelidentifier%7D~1rooms~1workspaces/get.md): Returns rooms and their associated workspaces for the specified level within the current account context.
            
Behavior:
- Validates the level belongs to the account
- Retrieves rooms along with related workspace details
- Returns structured room and workspace response data
- Logs the action as spaces viewed

## List reserved workspaces by room

 - [GET /api/v1/portfolio/locations/{locationIdentifier}/buildings/{buildingIdentifier}/levels/{levelIdentifier}/rooms/{roomIdentifier}/workspaces/reserved](https://zonedevelopersdocumentationv1.redocly.app/apis/portfolio/paths/~1api~1v1~1portfolio~1locations~1%7Blocationidentifier%7D~1buildings~1%7Bbuildingidentifier%7D~1levels~1%7Blevelidentifier%7D~1rooms~1%7Broomidentifier%7D~1workspaces~1reserved/get.md): Returns the list of reserved workspaces associated with the specified room.
            
Behavior:
- Validates the room identifier
- Retrieves reserved workspace records for the room
- Returns structured workspace response data
- Logs the action as workspaces viewed

## Get all portfolio details

 - [GET /api/v1/portfolio/all](https://zonedevelopersdocumentationv1.redocly.app/apis/portfolio/paths/~1api~1v1~1portfolio~1all/get.md): Returns the complete portfolio hierarchy for the current account and user.
            
Behavior:
- Validates account and user context
- Retrieves all accessible portfolio locations
- Returns structured portfolio response data
- Logs the action as portfolio details view

