Skip to main content

Overview

Asset types define the structure and custom fields for inventory items. Each asset type belongs to a container and includes field definitions that specify what data can be captured for items of that type. Asset types support image uploads, serialization settings, and collection-specific field mappings.

Create Asset Type

Create a new asset type within a container with custom field definitions.
integer
required
ID of the parent container
string
required
Asset type name (e.g., “Electronics”, “Books”, “Collectibles”)
boolean
default:"true"
Whether items of this type are serialized:
  • true - Each item is unique with quantity=1 (default)
  • false - Items can have variable quantities
string
required
JSON-encoded array of custom field definition objectsExample:
file
Optional image file for the asset type icon/thumbnail
object

Get Asset Type

Retrieve a single asset type by ID.
integer
required
ID of the asset type to retrieve

Update Asset Type

Update an existing asset type’s name, field definitions, or image.
integer
required
ID of the asset type to update
string
required
Updated asset type name
string
required
JSON-encoded array of updated field definitions
file
New image file to upload (replaces existing)
boolean
default:"false"
Set to true to remove the current image without uploading a new one

Update Collection Fields

Update the field mappings used for collection tracking. Collections use specific fields to track how many items are possessed vs. desired.
integer
required
ID of the asset type
string
Field ID that tracks “possessed” quantity (set to null to clear)
string
Field ID that tracks “desired” quantity (set to null to clear)

Delete Asset Type

Permanently delete an asset type. This operation:
  1. First deletes all inventory items of this type (DELETE /asset-types/{assetTypeId}/assets)
  2. Then deletes the asset type itself
This is a destructive operation that cannot be undone. All items associated with this asset type will be permanently deleted.
integer
required
ID of the asset type to delete

Error Responses

Common errors:
  • 404 Not Found - Asset type doesn’t exist or was already deleted
  • 401 Unauthorized - Invalid or expired authentication token

Field Definition Types

When creating or updating asset types, the following field types are available:

Text Fields

Single-line text input.

Textarea Fields

Multi-line text input.

Number Fields

Numeric input (integer or decimal).

Date Fields

Date picker input.

Boolean Fields

Checkbox (true/false).

Select Fields (Single Choice)

Dropdown with predefined options.

Multi-Select Fields

Multiple choice selection.

Dynamic Select (DataList)

Dropdown populated from a DataList (see Containers).

Best Practices

Field ID Naming

Use consistent, descriptive IDs:
  • Use lowercase with underscores: serial_number, purchase_date
  • Avoid special characters except underscores
  • Keep IDs stable - changing them breaks existing item data

Serialization Strategy

Use isSerialized: true for:
  • Unique items (electronics, collectibles, art)
  • Items with serial numbers or unique identifiers
  • Items where each instance is distinct
Use isSerialized: false for:
  • Bulk consumables (screws, cables, office supplies)
  • Fungible items where individual instances don’t matter
  • Items tracked by total quantity rather than individual units

Collection Fields

For collection management:
  1. Create number fields for possession and desire tracking
  2. Use the Update Collection Fields endpoint to map them
  3. The frontend can then show “5/10” style progress indicators

Error Handling

All endpoints return standard HTTP status codes:
  • 200 OK - Request successful
  • 201 Created - Asset type created successfully
  • 204 No Content - Deletion successful
  • 400 Bad Request - Invalid field definitions or malformed JSON
  • 401 Unauthorized - Authentication required
  • 404 Not Found - Asset type not found
  • 500 Internal Server Error - Server error
Error responses include a message: