Inventory
What's in the house and where it's kept, the products and categories behind it, and what to use soon.
Commands
- PostDelete a product category
inventory.category.removeDeletes the category. - PostRename a product category or change its place in the order
inventory.category.updateSets only the fields given. before_category_id puts it just before that category (null for last), which is the order lists that go by category use. - PostMake several inventory changes at once
inventory.change.applyApplies up to 200 item changes in order, in one step, and records them as one command. - PostAdd something we have
inventory.item.addRecords a new item: a product in a place, with how much we have, its size, brand, dates and a note. - PostUse some of an item, or add some
inventory.item.adjustChanges the amount by a delta (negative when some was used), or sets a level ("about half", "low"). - PostSay an item is still there as recorded
inventory.item.confirmMarks the item as seen now, or at at, without changing anything else. - PostMove an item to another place
inventory.item.moveRecords that the item is now in another location. - PostRemove an item that is gone
inventory.item.removeDeletes the item: it was used up, thrown out, or was not there. - PostSet how much of an item we have
inventory.item.set_amountWe counted: replaces the item's amount outright. - PostGive an item its picture
inventory.item.set_photoSets the item's picture to an uploaded image, or to just a crop of it (the part of a shelf photo that shows this item). - PostChange an item's brand, size, dates, note, who it's for or the recipe it's from
inventory.item.updateSets only the fields given; null clears a field. - PostSay a whole place is up to date
inventory.location.confirmRecords that everything recorded in this location, and in the locations inside it, is right as of now or at ("the fridge is up to date"). - PostAdd a place things are kept
inventory.location.createAdds a location, last among its siblings. - PostDelete an empty place
inventory.location.removeDeletes a location with no items and no locations inside it. - PostRename, move, reorder or change a place
inventory.location.updateSets only the fields given. parent_location_id moves it inside another location (null for the top level); before_location_id places it among its siblings (null for last). - PostAdd a product, or use the one with that name
inventory.product.createFinds the product with this name, ignoring case, or adds it. - PostCombine two products that are the same thing
inventory.product.mergeReplaces product_id with into_product_id everywhere (inventory items, recipe ingredients, the shopping list, store aisles) and deletes product_id. into_product_id keeps its name; its empty category, shopping note, usual location and icon are filled from the merged product, and it's a staple if either was. - PostMake a new icon for a product
inventory.product.redo_iconAsks for a new generated icon for the product, replacing the one it has when it's ready. - PostGive a product its icon
inventory.product.set_iconSets the picture shown for the product's items when they have no photo of their own, usually a generated icon. - PostRename a product, recategorize it, or change how it's kept
inventory.product.updateSets only the fields given; send a nullable field as null to clear it.
Queries
- GetThe product categories in use
inventory.category.listEvery product category in list order, with how many products are in each. - GetWhat to use soon
inventory.item.expiringItems to use by within the next few days, including ones already past, soonest first. - GetWhat changed an item
inventory.item.historyWhat changed an item and who or what changed it, newest first, from the household's audit trail: added, moved, amount changed, seen, picture or date changed, removed. - GetWhat we have, and where
inventory.item.listItems we have, by product name, each with its product, place, amount, dates, when it was last seen and a picture. - GetThe places things are kept, as a tree
inventory.location.listEvery location in page order, each after its parent, with its environment, how many items are in it (and in the locations inside it), and when it was last checked as a whole. - GetDo we have these products?
inventory.product.haveFor each product: the items recorded with amounts, places and when each was last seen, and whether it's a staple and whether the household tracks it. - GetFind a product by name, to reuse it
inventory.product.searchProducts whose name contains the text, ignoring case and a plural "s": exact matches first, then names starting with it, then the rest, each with its category, staple flag and how many items we have.