Topolo Docs Topolo Platform
Open workspace

Inventory

Worked requests, captured responses, verification and recovery for all twenty published Inventory actions.

Inventory action reference

Discover the exact action and granted target, validate input and inspect the plan before execution. Stock includes pending and rejected movements; review status does not reverse quantity. CSV upserts can reactivate archived items. Organization privacy spans all local workspaces and both databases.

  • Get Inventory workspace widget: Read the granted workspace summary with active SKU count, location count, all-time movement count and seven UTC-day movement/net quantity series. Widget totals differ from the dashboard movement count capped at 100.
  • Get Inventory identity context: Return the verified Auth user and optional organization projection. This does not list, create or select Inventory workspaces; canonical workspace identity and discovery remain platform-owned.
  • Get Inventory dashboard: Read active items, locations, low-stock items and recent ledger entries in the granted workspace. movementCount is the length of the latest 100 movement rows, and recentMovements contains at most ten.
  • List Inventory items: List all workspace items, including archived records, newest update first. Every quantityOnHand sums all signed ledger deltas across locations and review states; there is no pagination.
  • Get Inventory item: Read one item in the granted workspace with descriptive fields, archive status and quantityOnHand computed from all its movements. Archived items remain readable; missing or foreign items return not_found.
  • Create Inventory item: Create an active item with zero stock in the granted workspace. Omitted SKU derives from the name, unit defaults to unit and threshold defaults to zero; an existing workspace/SKU uniqueness conflict is not an upsert.
  • Update Inventory item: Update an existing item and return its aggregate stock. Descriptive fields omitted from input are preserved, but omitting status sets active and therefore reactivates an archived item.
  • Archive Inventory item: Set an existing item to archived and return only an ok acknowledgement. The item and ledger remain readable, disappear from active dashboard counts, and refuse subsequent movement creation.
  • List Inventory locations: Read all locations in the granted workspace, default first and then name ascending. There is no pagination, location deletion or default-changing action on this published surface.
  • Get Inventory location: Read one granted-workspace location by its returned identifier, with normalized code, default flag and timestamps. This response contains no per-location stock totals.
  • Create Inventory location: Create a location with an ASCII slug code in the granted workspace. The first location is default; later ones are not. Duplicate workspace/code values fail uniqueness rather than upsert.
  • List Inventory stock movements: Read up to 100 newest ledger entries in the granted workspace, enriched with item/location labels. Every review state is included and there is no cursor or full-ledger export on this action.
  • Record Inventory stock movement: Append one nonzero signed quantity delta against an active item and existing location in the same workspace. Movement type labels do not set the sign, pair a transfer or defer stock while review is pending.
  • Review Inventory stock movement: Resolve a pending movement review as approved or rejected. This changes review metadata only: rejecting does not delete the ledger entry, reverse stock or undo notifications already emitted.
  • List Inventory CSV import jobs: Read up to 100 newest CSV import jobs in the granted workspace with terminal status, row count, failure reason and timestamps. It returns job metadata rather than CSV data or imported item mappings.
  • Import Inventory items from CSV: Create a CSV import job and upsert items by workspace/SKU. Successful import preserves existing item IDs and reactivates matching archived rows; parsing or batch failure returns HTTP 422 with a retained failed job.
  • Set Inventory movement review threshold: Set a positive absolute-delta review threshold or null to disable it for future movement creation. This initializes workspace settings; it does not change past reviews or defer stock contributions.
  • Archive empty Inventory workspace: Require the exact granted workspace and existing local mirror, refuse all local content including archived items, failed imports and settings, then request canonical Auth archival and remove the mirror. HTTP 204 has no body.
  • Export Inventory organization data: Export all six local Inventory stores across every workspace of the authenticated organization, with raw SQL column names. A workspace header does not narrow the scope and free-text/customer fields are not redacted.
  • Erase Inventory organization data: With exact ERASE confirmation, refuse pending movement reviews or processing imports, then delete all six local Inventory stores across the organization and verify zero residual rows. Auth identity and other-owner data remain.

Evidence

Captured exported Worker responses use both real local SQLite D1 databases with all six committed migrations, synthetic Auth/workspace grants and simulated Notify/Nexus/archive transport. They prove local handler shapes and scoped behavior, not live authorization, notification delivery, metering acceptance or environment deployment. Large 100-row list/capped-dashboard captures are retained in local evidence; committed tests verify those limits while worked guides use smaller complete responses.