Open Items
Open Items
The data model we created for Open Inventory has the following tables
categories - simple logical ways of grouping items together, for instance grains or cereal
items - basic information about what something is in abstract general sense oat-flakes and how to measure it
inventory - a specific existence of an item at a phsical place or supplier which includes price
details - a type of detail that is shared between multiple items such organic or allergen
inventoryDetails - a relational value that declares information about a detail of an item such as organic: yes
suppliers - physical places that one can pickup or purchase items at
One guiding principle of EOTL data formats is making values of APIs and data somewhat self-explainatory such as making the id of an item oat-flakes instead of a number
Item Inventory Response
The following example is of the Open Inventory API for an item and it inventory
[
{
"item": {
"id":"oat-flakes",
"measurement":"grams",
"units":100
},
"inventoryItems": [
{
"units":100,
"price":0.25,
"currency":"EUR",
"supplier":"ber-sk-1",
"img": "/oat-flakes.jpg",
"details": [
{
"certification": "eu-bio"
},{
"organic": "yes"
},{
"allergen": "gluten"
}
]
}
]
}
]