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_iduuid | The inventory's id, from List inventories. |
Query
sincestring | Only entries at or after this time. |
item_idstring | Only this item's entries. |
limitinteger | How many per page, 1 to 200. 50 if left out. |
cursorstring | The 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.
| Field | What it holds |
|---|---|
iduuid | The entry's id. |
inventory_iduuid | The inventory. |
item_iduuid or null | The item it's about. |
typestring | What happened, such as create, edit, move, delete, check_out, check_in, or a stock type such as sold or restocked. New types may appear. |
attime | When it happened. |
bystring or null | Who did it, with the key's name for a change made through the API. |
location_iduuid or null | The location involved, if any. |
quantity_changeinteger or null | How much the quantity changed, negative when it went down. |
quantity_afterinteger or null | The quantity afterwards. |
status_beforestring or null | The status before. |
status_afterstring or null | The status after. |
lent_tostring or null | Who it was lent to. Only a loan has this. |
notesstring or null | Notes on the entry. |
reasonstring or null | The reason given for a stock change. |