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 a single request. Operations run sequentially and are best-effort: individual failures are reported in the errors array while the rest commit. The endpoint is not transactional, so there's no global rollback if a later operation fails.

Use it for AI agents, MCP integrations, and bulk UI flows where you want one network round-trip and per-op result reporting.

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

Request body

FieldTypeRequiredDescription
locationIdUUIDYesLocation to execute operations in
operationsarrayYes1–50 operation objects (cap is the global BULK_MAX_SELECTION, default 50, configurable up to 1000)

Operation object fields

FieldTypeApplicable toDescription
typestringAllOperation type (see below)
bin_idUUIDAll except create_bin, rename_area, delete_area, set_tag_colorTarget bin ID
bin_namestringAll except create_binBin name (for logging)
namestringcreate_bin, update_binBin name
items(string | object)[]add_items, remove_items, create_binItem names or { name, quantity? } objects. Quantity is supported for add_items and create_bin.
itemstringset_item_quantityItem name to update.
quantityinteger or nullset_item_quantityNew quantity. null clears tracking; 0 or negative removes the item.
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_bin, rename_area, delete_areaArea name; auto-creates if needed (for set_area/create_bin/update_bin)
iconstringset_icon, create_bin, update_binIcon identifier
colorstringset_color, create_bin, update_binColor value
card_stylestringcreate_bin, update_binJSON-encoded card style configuration.
custom_fieldsobjectcreate_bin, update_binMap of custom field ID → string value.
old_itemstringmodify_itemCurrent item name to rename
new_itemstringmodify_itemNew item name
old_tagstringmodify_tagCurrent tag name to rename
new_tagstringmodify_tag, set_tag_colorNew tag name (or tag whose color is being set)
tagstringset_tag_colorThe tag whose color is being set.
tag_colorstringset_tag_colorThe color preset key to assign.
parent_tagstring | nullset_tag_colorOptional parent tag for nested categories.
item_idsUUID[]reorder_itemsItem UUIDs in the desired order.
return_bin_idUUIDreturn_itemOptional override — return the item to a different bin than the origin.
visibility"location" or "private"update_bin, create_binBin visibility

Supported operation types

  • Bin lifecycle: create_bin, update_bin, delete_bin, restore_bin, duplicate_bin
  • Items: add_items, remove_items, modify_item, set_item_quantity, reorder_items
  • Tags: add_tags, remove_tags, modify_tag, set_tag_color
  • Properties: set_area, set_notes, set_icon, set_color
  • Pinning: pin_bin, unpin_bin
  • Areas: rename_area, delete_area
  • Checkouts: checkout_item, return_item

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": [{ "name": "AA Battery", "quantity": 24 }, "Flashlight"],
      "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": []
}