Skip to content

Batch

User Guide

For bulk UI operations, see Bulk Operations.

Execute up to 50 bin operations atomically in a single request.


POST /api/batch

Executes multiple bin operations in one transaction. Uses a partial-success model: individual operation failures are reported in the errors array while the remaining successful operations are committed. Ideal for AI agents, MCP integrations, and bulk workflows.

Rate limits: 60/hour for JWT auth; 600/hour for API keys.

Request body

FieldTypeRequiredDescription
locationIdUUIDYesLocation to execute operations in
operationsarrayYes1–50 operation objects

Operation object fields

FieldTypeApplicable toDescription
typestringAllOperation type (see below)
bin_idUUIDAll except create_binTarget bin ID
bin_namestringAll except create_binBin name (for logging)
namestringcreate_bin, update_binBin name
itemsstring[]add_items, remove_items, create_binItem names
tagsstring[]add_tags, remove_tags, create_bin, update_binTag names
notesstringset_notes, create_bin, update_binNotes text
mode"set", "append", "clear"set_notesNotes update mode
area_idUUID or nullset_areaArea UUID; null to unassign
area_namestringset_area, create_bin, update_binArea name; auto-creates if needed
iconstringset_icon, create_bin, update_binIcon identifier
colorstringset_color, create_bin, update_binColor value
old_itemstringmodify_itemCurrent item name to rename
new_itemstringmodify_itemNew item name
old_tagstringmodify_tagCurrent tag name to rename
new_tagstringmodify_tagNew tag name
visibility"location" or "private"update_binBin visibility

Supported operation types: create_bin, update_bin, delete_bin, restore_bin, add_items, remove_items, modify_item, add_tags, remove_tags, modify_tag, set_area, set_notes, set_icon, set_color.

Example request

json
{
  "locationId": "550e8400-e29b-41d4-a716-446655440000",
  "operations": [
    {
      "type": "add_tags",
      "bin_id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
      "bin_name": "Tools",
      "tags": ["fragile"]
    },
    {
      "type": "set_area",
      "bin_id": "6ba7b811-9dad-11d1-80b4-00c04fd430c8",
      "bin_name": "Supplies",
      "area_name": "Garage"
    },
    {
      "type": "create_bin",
      "name": "New Bin",
      "items": ["item1"],
      "tags": ["new"]
    }
  ]
}

Response (200)

json
{
  "results": [
    {
      "type": "add_tags",
      "success": true,
      "details": "Added tags [fragile] to Tools",
      "bin_id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
      "bin_name": "Tools"
    },
    {
      "type": "set_area",
      "success": true,
      "details": "Set area of Supplies to \"Garage\"",
      "bin_id": "6ba7b811-9dad-11d1-80b4-00c04fd430c8",
      "bin_name": "Supplies"
    },
    {
      "type": "create_bin",
      "success": true,
      "details": "Created bin \"New Bin\"",
      "bin_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "bin_name": "New Bin"
    }
  ],
  "errors": []
}

Released under the GPL-3.0 License.