Register a bag
register_bagRegister another bag of a coffee that is already in list_beans: the same roaster's product, bought again. It keeps the coffee's recipes, notes and history; only the purchase facts (roast date, weight, price, state) are new. Does not change the active coffee. Returns a bag_id: bag numbers are their own series, separate from bean numbers. For a coffee that is not in list_beans yet, call register_coffee instead.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ean | No | ||
| cost | No | ||
| state | No | Defaults to sealed; the first log_shot against it opens it | |
| bean_id | Yes | This account's own coffee number, from list_beans. Never guess one. | |
| qr_code | No | ||
| storage | No | ||
| buy_date | No | Calendar day in YYYY-MM-DD format: a day, not a timestamp | |
| currency | No | ||
| bag_notes | No | Notes about THIS bag (a batch note, where it was bought). The coffee's own description lives on the coffee, in notes. | |
| product_id | No | Set by the apps. Leave out. | |
| roast_date | Yes | Calendar day in YYYY-MM-DD format: a day, not a timestamp | |
| opened_date | No | Calendar day in YYYY-MM-DD format: a day, not a timestamp | |
| bag_weight_g | No | Bag weight in grams | |
| best_by_date | No | Calendar day in YYYY-MM-DD format: a day, not a timestamp | |
| lot_revision_id | No | Set by the apps. Leave out. | |
| catalog_coffee_id | No | Set by the apps. Leave out. |
Output Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bag_id | Yes | ||
| status | Yes | ||
| bean_id | Yes | ||
| message | Yes |