# Asset Management

Manage company-owned hardware inventory scoped to a workspace. Includes asset CRUD with property and custom-field support, asset type definitions (system + workspace-custom), and custom field definitions (text, number, date, checkbox, dropdown).

## List Assets

 - [GET /assets](https://api-docs.webwork-tracker.com/api/asset-management/getassets.md): Retrieve a paginated list of assets in the specified workspace. Each asset is returned with its denormalized relationships: assigned user (with email and full name), creator, asset type, and any custom field values keyed by slug. Access: Requires Plus plan or higher and Owner or Executive Manager role on the workspace.

## Create Asset

 - [POST /assets](https://api-docs.webwork-tracker.com/api/asset-management/createasset.md): Create a new asset in the workspace. Required fields are workspace_id, category, and name. Optional fields include type_id (encrypted asset type), brand, model, notes, free-form properties (validated against the category's known property keys), and custom_fields (object keyed by custom field slug). Access: Plus plan + Owner/Executive Manager.

## Retrieve Asset

 - [GET /assets/{asset_id}](https://api-docs.webwork-tracker.com/api/asset-management/getasset.md): Retrieve a single asset by its encrypted ID. Returns the asset with denormalized relationships: assigned user (with email and full name), creator, asset type, and custom field values keyed by slug. Access: Requires Plus plan or higher and Owner or Executive Manager role on the workspace.

## Update Asset

 - [PUT /assets/{asset_id}](https://api-docs.webwork-tracker.com/api/asset-management/updateasset.md): Update an existing asset. Editable fields include name, brand, model, notes, type_id, free-form properties, and custom_fields (keyed by slug). The category field is immutable once set and any value sent for it is ignored. Access: Plus plan + Owner/Executive Manager.

## Delete Asset

 - [DELETE /assets/{asset_id}](https://api-docs.webwork-tracker.com/api/asset-management/deleteasset.md): Soft-delete an asset. The asset is marked deleted but preserved for audit and can be brought back via POST /assets/{asset_id}/restore. Any current assignment is cleared. Access: Plus plan + Owner/Executive Manager.

## Restore Asset

 - [POST /assets/{asset_id}/restore](https://api-docs.webwork-tracker.com/api/asset-management/restoreasset.md): Restore a previously soft-deleted asset, making it active again. Returns 422 if the asset is not currently deleted. Access: Plus plan + Owner/Executive Manager.

## Assign Asset

 - [POST /assets/{asset_id}/assign](https://api-docs.webwork-tracker.com/api/asset-management/assignasset.md): Assign an asset to a workspace user. The target user must belong to the same workspace. Re-assigning replaces the previous assignee. Access: Plus plan + Owner/Executive Manager.

## Unassign Asset

 - [POST /assets/{asset_id}/unassign](https://api-docs.webwork-tracker.com/api/asset-management/unassignasset.md): Clear the current assignee of an asset. Idempotent: succeeds even if the asset is already unassigned. Access: Plus plan + Owner/Executive Manager.

## List Asset Types

 - [GET /asset-types](https://api-docs.webwork-tracker.com/api/asset-management/getassettypes.md): List all asset types available to the workspace. The result combines built-in system types (e.g. Laptop, Phone, Router) with workspace-defined custom types. Use the category filter to narrow by hardware family. Access: Plus plan + Owner/Executive Manager.

## Create Asset Type

 - [POST /asset-types](https://api-docs.webwork-tracker.com/api/asset-management/createassettype.md): Create a new workspace-custom asset type within the given category. The type will have is_system: false and is editable/deletable by the workspace. The name must be unique within the workspace+category combination. Access: Plus plan + Owner/Executive Manager.

## Retrieve Asset Type

 - [GET /asset-types/{type_id}](https://api-docs.webwork-tracker.com/api/asset-management/getassettype.md): Retrieve a single asset type by its encrypted ID. Both system and workspace-custom types are accessible. Access: Plus plan + Owner/Executive Manager.

## Update Asset Type

 - [PUT /asset-types/{type_id}](https://api-docs.webwork-tracker.com/api/asset-management/updateassettype.md): Rename a workspace-custom asset type. Returns 403 if the target type is a system type (system types are read-only). The new name must be unique within the same workspace+category. Access: Plus plan + Owner/Executive Manager.

## Delete Asset Type

 - [DELETE /asset-types/{type_id}](https://api-docs.webwork-tracker.com/api/asset-management/deleteassettype.md): Delete a workspace-custom asset type. Returns 403 for system types. Returns 409 if any asset currently references this type, with in_use_count indicating how many; reassign or delete those assets first. Access: Plus plan + Owner/Executive Manager.

## List Custom Fields

 - [GET /asset-custom-fields](https://api-docs.webwork-tracker.com/api/asset-management/getassetcustomfields.md): List all custom field definitions for the workspace. Custom fields let you attach typed metadata (text, number, date, checkbox, dropdown) to assets. Use the optional category filter to retrieve only fields scoped to a specific hardware category; fields with category: null apply to all categories. Access: Plus plan + Owner/Executive Manager.

## Create Custom Field

 - [POST /asset-custom-fields](https://api-docs.webwork-tracker.com/api/asset-management/createassetcustomfield.md): Define a new custom field for assets. The slug is auto-derived from name (lowercase, dash-separated) if omitted, and is the key used when sending values via custom_fields on the assets endpoints. The type is immutable after creation. For type: dropdown, options is required and must be a non-empty array of strings. Access: Plus plan + Owner/Executive Manager.

## Retrieve Custom Field

 - [GET /asset-custom-fields/{field_id}](https://api-docs.webwork-tracker.com/api/asset-management/getassetcustomfield.md): Retrieve a single custom field definition by its encrypted ID. Access: Plus plan + Owner/Executive Manager.

## Update Custom Field

 - [PUT /asset-custom-fields/{field_id}](https://api-docs.webwork-tracker.com/api/asset-management/updateassetcustomfield.md): Update a custom field definition. The type is immutable: any attempt to change it returns 422. For dropdown fields you may add/edit/remove options. Access: Plus plan + Owner/Executive Manager.

## Delete Custom Field

 - [DELETE /asset-custom-fields/{field_id}](https://api-docs.webwork-tracker.com/api/asset-management/deleteassetcustomfield.md): Delete a custom field definition. All values stored under this field on every asset are also deleted (cascade). This is irreversible. Access: Plus plan + Owner/Executive Manager.

