History

What happened to an inventory's items, oldest first, from adding and moving to stock changes and loans.

List history

GET /inventories/{inventory_id}/history

What happened to the inventory's items, oldest first. Each entry has a type such as create, edit, move, delete, check_out or check_in, or a stock type. Moving a single item is recorded as a check_out from the old place and a check_in to the new one. A loan is told apart by lent_to, which only a loan has. New types may appear, so keep entries you don't recognise. Entries in the same second can be in either order.

Path

inventory_iduuidThe inventory's id, from List inventories.

Query

sincestringOnly entries at or after this time.
item_idstringOnly this item's entries.
limitintegerHow many per page, 1 to 200. 50 if left out.
cursorstringThe next_cursor from the page before, exactly as it came.

Reply

200, with a list of history entries in data, and a next_cursor.

Request
curl https://api.additem.to/api/v1/inventories/0193a4f2-7a00-7c11-8e3d-2b1f0a9c8d70/history \
  -H "Authorization: Bearer $ADDITEM_KEY"
const res = await fetch("https://api.additem.to/api/v1/inventories/0193a4f2-7a00-7c11-8e3d-2b1f0a9c8d70/history", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.ADDITEM_KEY}`,
  },
});
const { data } = await res.json();
import os, requests

res = requests.get(
    "https://api.additem.to/api/v1/inventories/0193a4f2-7a00-7c11-8e3d-2b1f0a9c8d70/history",
    headers={"Authorization": f"Bearer {os.environ['ADDITEM_KEY']}"},
)
data = res.json()["data"]
Reply 200
{
  "data": [
    {
      "id": "0193a4f2-9000-7a00-8000-000000000042",
      "inventory_id": "0193a4f2-7a00-7c11-8e3d-2b1f0a9c8d70",
      "item_id": "0193a4f2-8c1e-7d55-9b2a-4f6e1c2d3a10",
      "type": "check_out",
      "at": "2026-12-01T14:00:00.000Z",
      "by": "Sam (via API key \"Shop\")",
      "location_id": null,
      "quantity_change": null,
      "quantity_after": null,
      "status_before": null,
      "status_after": null,
      "lent_to": "Alex",
      "notes": "Lent to Alex",
      "reason": null
    }
  ],
  "next_cursor": null
}

The history entry

Every reply with a history entry in it has these fields, in this order. Version 1 may add fields at the end, and never renames or removes one.

FieldWhat it holds
iduuidThe entry's id.
inventory_iduuidThe inventory.
item_iduuid or nullThe item it's about.
typestringWhat happened, such as create, edit, move, delete, check_out, check_in, or a stock type such as sold or restocked. New types may appear.
attimeWhen it happened.
bystring or nullWho did it, with the key's name for a change made through the API.
location_iduuid or nullThe location involved, if any.
quantity_changeinteger or nullHow much the quantity changed, negative when it went down.
quantity_afterinteger or nullThe quantity afterwards.
status_beforestring or nullThe status before.
status_afterstring or nullThe status after.
lent_tostring or nullWho it was lent to. Only a loan has this.
notesstring or nullNotes on the entry.
reasonstring or nullThe reason given for a stock change.