Skip to main content

Overview

Containers are the top-level organizational structure for inventory items. Each container can hold multiple asset types and custom data lists. Containers support collection mode for tracking possessions vs. desires, and include locations for physical organization.

Create Container

POST /containers
Content-Type: application/json
Create a new container to organize inventory items.
name
string
required
Container name (e.g., “Office Inventory”, “Comic Book Collection”)
description
string
Detailed description of the container’s purpose
isCollection
boolean
default:"false"
Whether this container is a collection (tracks possessions vs. desires)
{
  "name": "Home Electronics",
  "description": "Personal electronics and devices",
  "isCollection": false
}
{
  "data": {
    "id": 42,
    "name": "Home Electronics",
    "description": "Personal electronics and devices",
    "status": "active",
    "isCollection": false,
    "dataLists": [],
    "assetTypes": [],
    "locations": [],
    "createdAt": "2026-03-07T10:00:00Z",
    "updatedAt": "2026-03-07T10:00:00Z"
  }
}
data
object

List Containers

GET /containers?include=datalists,assettypes
Retrieve all containers with optional eager loading of related data.
include
string
Comma-separated list of relations to include:
  • datalists - Include data lists
  • assettypes - Include asset types
Example: include=datalists,assettypes
{
  "data": [
    {
      "id": 42,
      "name": "Home Electronics",
      "description": "Personal electronics and devices",
      "status": "active",
      "isCollection": false,
      "dataLists": [
        {
          "id": 10,
          "name": "Brands",
          "description": "Electronics brands",
          "items": ["Apple", "Samsung", "Sony", "LG"]
        }
      ],
      "assetTypes": [
        {
          "id": 15,
          "name": "Laptops",
          "isSerialized": true,
          "fieldDefinitions": [
            {
              "id": "brand",
              "label": "Brand",
              "type": "select",
              "dataListId": 10
            }
          ]
        }
      ],
      "locations": [
        {
          "id": 3,
          "name": "Office Desk",
          "description": "Main workspace"
        },
        {
          "id": 4,
          "name": "Storage Closet",
          "description": "Electronics storage"
        }
      ],
      "createdAt": "2026-01-15T08:00:00Z",
      "updatedAt": "2026-03-07T10:00:00Z"
    }
  ]
}

Update Container

PATCH /containers/{containerId}
Content-Type: application/json
Update a container’s name or description.
containerId
integer
required
ID of the container to update
name
string
required
Updated container name
{
  "name": "Home & Office Electronics"
}
{
  "data": {
    "id": 42,
    "name": "Home & Office Electronics",
    "description": "Personal electronics and devices",
    "status": "active",
    "updatedAt": "2026-03-07T11:30:00Z"
  }
}

Delete Container

DELETE /containers/{containerId}
Permanently delete a container and all associated data (asset types, items, data lists, locations).
This is a destructive operation that cannot be undone. All items, asset types, and data lists in this container will be permanently deleted.
containerId
integer
required
ID of the container to delete
200 OK

Data Lists

Data lists are custom dropdown options that can be shared across multiple fields within a container.

Create Data List

POST /containers/{containerId}/datalists
Content-Type: application/json
Create a custom data list for use in asset type field definitions.
containerId
integer
required
ID of the parent container
name
string
required
Data list name
description
string
required
Description of the data list’s purpose
items
array
required
Array of string values for the dropdown options
{
  "name": "Electronics Brands",
  "description": "Common electronics manufacturers",
  "items": [
    "Apple",
    "Samsung",
    "Sony",
    "LG",
    "Microsoft",
    "Dell",
    "HP"
  ]
}
{
  "data": {
    "id": 25,
    "name": "Electronics Brands",
    "description": "Common electronics manufacturers",
    "items": [
      "Apple",
      "Samsung",
      "Sony",
      "LG",
      "Microsoft",
      "Dell",
      "HP"
    ]
  }
}

Get Data List

GET /datalists/{dataListId}
Retrieve a single data list by ID.
dataListId
integer
required
ID of the data list
{
  "data": {
    "id": 25,
    "name": "Electronics Brands",
    "description": "Common electronics manufacturers",
    "items": ["Apple", "Samsung", "Sony"]
  }
}

List Data Lists

GET /containers/{containerId}/datalists
Retrieve all data lists for a container.
containerId
integer
required
ID of the container
{
  "data": [
    {
      "id": 25,
      "name": "Electronics Brands",
      "description": "Common electronics manufacturers",
      "items": ["Apple", "Samsung", "Sony"]
    },
    {
      "id": 26,
      "name": "Conditions",
      "description": "Item condition grades",
      "items": ["New", "Like New", "Good", "Fair", "Poor"]
    }
  ]
}

Update Data List

PUT /datalists/{dataListId}
Content-Type: application/json
Update a data list’s name, description, or items.
dataListId
integer
required
ID of the data list to update
name
string
required
Updated name
description
string
required
Updated description
items
array
required
Updated array of items
{
  "name": "Top Electronics Brands",
  "description": "Most popular electronics manufacturers",
  "items": [
    "Apple",
    "Samsung",
    "Sony",
    "LG",
    "Microsoft",
    "Dell",
    "HP",
    "Lenovo",
    "ASUS"
  ]
}
{
  "data": {
    "id": 25,
    "name": "Top Electronics Brands",
    "description": "Most popular electronics manufacturers",
    "items": [
      "Apple",
      "Samsung",
      "Sony",
      "LG",
      "Microsoft",
      "Dell",
      "HP",
      "Lenovo",
      "ASUS"
    ]
  }
}

Delete Data List

DELETE /datalists/{dataListId}
Delete a data list. Fields using this data list will fall back to static options or become empty.
dataListId
integer
required
ID of the data list to delete
200 OK

GET /search/assets?q={query}
Search for items across all containers by name, description, or custom field values.
q
string
required
Search query string
{
  "data": [
    {
      "id": 123,
      "name": "MacBook Pro 16\"",
      "containerId": 42,
      "assetTypeId": 15,
      "customFieldValues": {
        "brand": "Apple",
        "model": "M2 Max"
      }
    },
    {
      "id": 124,
      "name": "Apple Magic Mouse",
      "containerId": 42,
      "assetTypeId": 16,
      "customFieldValues": {
        "brand": "Apple",
        "color": "White"
      }
    }
  ]
}

Collections vs. Inventory

Containers can operate in two modes based on the isCollection flag:

Inventory Mode (isCollection: false)

Use for: Business inventory, warehouse stock, office supplies Features:
  • Quantity tracking with min/max thresholds
  • Location management
  • Stock alerts
  • Market value tracking
  • Barcode scanning
Example:
{
  "name": "Warehouse A",
  "isCollection": false,
  "assetTypes": [
    {
      "name": "Office Chairs",
      "isSerialized": false,
      "fieldDefinitions": [
        {"id": "model", "label": "Model", "type": "text"},
        {"id": "color", "label": "Color", "type": "select"}
      ]
    }
  ]
}

Collection Mode (isCollection: true)

Use for: Personal collections, wishlists, hobby tracking Features:
  • Possession tracking (owned vs. wanted)
  • Completion percentages
  • Variant tracking (different editions, colors, etc.)
  • Collection statistics
Example:
{
  "name": "Comic Book Collection",
  "isCollection": true,
  "assetTypes": [
    {
      "name": "Marvel Comics",
      "isSerialized": true,
      "possessionFieldId": "owned",
      "desiredFieldId": "wanted",
      "fieldDefinitions": [
        {"id": "owned", "label": "Owned", "type": "number"},
        {"id": "wanted", "label": "Want to Own", "type": "number"},
        {"id": "issue", "label": "Issue Number", "type": "text"}
      ]
    }
  ]
}

Using Data Lists with Asset Types

Data lists enable centralized management of dropdown options:
  1. Create a data list in your container
  2. Reference it in asset type field definitions using dataListId
  3. Update the list once to affect all fields using it
Example workflow:
// Step 1: Create data list
POST /containers/5/datalists
{
  "name": "Video Game Platforms",
  "description": "Gaming platforms",
  "items": ["PlayStation 5", "Xbox Series X", "Nintendo Switch", "PC"]
}
// Returns: { "data": { "id": 30, ... } }

// Step 2: Use in asset type
POST /containers/5/asset-types
{
  "name": "Video Games",
  "fieldDefinitions": [
    {
      "id": "platform",
      "label": "Platform",
      "type": "select",
      "dataListId": 30  // Reference the data list
    }
  ]
}

// Step 3: Update list (all items automatically get new options)
PUT /datalists/30
{
  "name": "Video Game Platforms",
  "description": "Gaming platforms",
  "items": ["PlayStation 5", "Xbox Series X", "Nintendo Switch", "PC", "Steam Deck"]
}

Error Handling

All endpoints return standard HTTP status codes:
  • 200 OK - Request successful
  • 201 Created - Resource created successfully
  • 204 No Content - Deletion successful (some endpoints)
  • 400 Bad Request - Invalid parameters
  • 401 Unauthorized - Authentication required
  • 404 Not Found - Resource not found
  • 500 Internal Server Error - Server error
Error responses include contextual messages:
{
  "message": "Error en crear contenedor: Validation failed"
}
Common error contexts:
  • "No autorizado: Sesión expirada o token inválido." - Re-authentication needed
  • "Recurso no encontrado (...)" - Invalid ID or deleted resource
  • "Error de conexión o de servidor: ..." - Network or backend issue

Build docs developers (and LLMs) love