Inventory API
Items (tools, machines, consumables), customisable location tree per site, stock movements and project costs, maintenance plans and tasks, issues, item timeline, labels (SVG + QR) and CSV import/export. Every endpoint requires an authenticated principal.
ARNs: atl:inventory:<site>:item/<id>, …:location/<id>, …:maintenance/<id>, …:issue/<id>,
…:stock/<item id> (stock adjustments), …:label/<item id> (print jobs). Checks pass the site
(atl:settings:<site>:site/<site>) and, for project-owned resources, the project
(atl:projects:<site>:project/<id>) as parents. The permission of each operation is given as
x-permission; "scope" means the list is filtered by the authz Lookup of that permission
(403 when nothing is granted).
Lists use cursor pagination (limit, cursor → next_cursor). Search (q) matches the
prefixes of normalised tokens (lowercase, accents folded) of names, codes, brands, models, serials
and tags. Soft-deleted items are hidden unless include_deleted=true
(inventory.item.read_all) and are purged after the purge delay (INVENTORY_PURGE_DELAY, default 24 h).
CSV formats (UTF-8, optional BOM, , or ; separator detected on the header line, header names
as below, any column order, unknown columns rejected): lists use | as separator
(tags, required_training_type_ids), custom fields are key=value|key=value, decimals accept a
comma (12,5), dates are YYYY-MM-DD, location is a location ID or a name path from the site root
(Salle A/Armoire 1). Imports are all-or-nothing: every row is validated (fields, location,
permission) and nothing is written when an error is reported (422 with every line error);
dry_run=true (query or form field) only validates. Max 5000 rows, 5 MiB. Exports stream the rows
matching the list filters (same scope rules), with a BOM and spreadsheet formulas neutralised by a
leading '; they are audited.
Issue photos are files service uploads whose owner is the issue ARN atl:inventory:<site>:issue/<id>
(purpose issue): report the issue first, upload the photos, then PATCH /v1/inventory/issues/{id} with
photos. The files service delegates their authorization to POST /internal/v1/attachments/authorize.
Events: inventory.item.v1, inventory.stock.v1 (moved, low), inventory.location.v1 (created,
updated, moved, deleted; subject = location ID), inventory.maintenance.v1, inventory.issue.v1,
inventory.label.v1 (print_requested). A location move publishes one moved event per node of the
moved subtree; a rename also publishes updated (changed: [ancestors]) for every descendant.
Authentication
- API Key: session
- HTTP: Bearer Auth
Security Scheme Type: | apiKey |
|---|---|
Cookie parameter name: | atl_session |
Security Scheme Type: | http |
|---|---|
HTTP Authorization Scheme: | bearer |