Inventory contains every kind of object that Obypay can automatically handle. The more data you give, the most precise the integration will be.
Mutiple menus
MAY BE pushed.
Menus
MUST HAVE a structure of 3 levels of depth
Some data MAY BE overriden within the menu
(such as prices)
Prices value
MUST BE given in minor units (~cents).
vat_rate
MUST BE written as a percent. (e.g. 0.1 for 10%)
Items MUST BE ordered in the way you want them to appear : top being first element, bottom being last
Just call inventory endpoint every time you need the inventory to be updated. If the data sent has not changed since last update, update request will be rejected.
When an inventory update is pushed, a few minutes may be necessary before new data are synchronized and live.
config
: Object defining data attributesmodifiers
: Set of modifier
which add flavours, behaviors, options to a product
containers
: Set of container
which define variations of a product
pagers
: Set of pager
which add a physical or logical device to a product
tagsets
: Set of tags
which can be added to a product
products
: Set of product
productsets
: Set of productset
menus
: Set of menu
which is a structure defining how products
, productsets
and containers
are listed and organizedIn the following specific definitions, most complex structure will always be presented. Optionnal data will be flagged
config
Object defining data attributes
{
"lang": "fr" // define in which language entity labels are set
}
modifiers
Set of modifier
which add flavours, behaviors, options to a product
[
{
"id": "mod2", // your modifier set id
"label": "Suppléments", // modifier set label
"min": 0, // minimum amount that can be added.
"max": 2, // maximum amount that can be added
"mutiple": true, // whether mutiple items can be selected
"items": [
{
"id": "mod2item1", // your modifier id
"label": "Légumes", // modifier label
"max": 1, // maximum amount that can be added
"prices": [ // OPTIONNAL|DEFAULT:prices.*.value=0 : set prices by order types
{
"type": "onsite", // price for onsite orders
"value": 100
},
{
"type": "takeaway", // price for takeaway orders
"value": 150
},
{
"type": "delivery", // price for orders in delivery
"value": 150
}
]
}
]
}
]
containers
Set of container
which define variations of a product
[
{
"id": "con1", // your container id
"label": "IPA", // container label
"items": [ // List of product ids part of this container
"pro1", "pro2"
]
}
]
pagers
Set of pager
which add a physical or logical device to a product
[
{
"id": "pag1", // your pager id
"label": "Avertisseur", // pager label
"color": "#ff0000", // OPTIONNAL|DEFAULT:#ef9349 : pager color
"type": "device" // device : physical device which vibrates/flashes when sollicited
},
{
"id": "pag2",
"label": "Bon de retrait",
"color": "#00ff00", // OPTIONNAL|DEFAULT:#ef9349 : pager color
"type": "paper" // paper : print a product receipt
},
{
"id": "pag3",
"label": "Avertisseur",
"color": "#0000ff", // OPTIONNAL|DEFAULT:#ef9349 : pager color
"type": "all" // all : act as physical device but will print a summary paper for consumer
}
]
tagsets
Set of tags
which can be added to an product
[
{
"id": "tag1", // your tagset id
"label": "Allergènes", // tagset label
"items": [
{
"id": "tag1item1", // your tag id
"label": "Gluten", // tag label
"picture": "https://s3-eu-west-1.amazonaws.com/prod.img.nadvice-app/tags/pictos/A1.png" // OPTIONNEL : tag picture url
},
{
"id": "tag1item2",
"label": "Oeufs",
"picture": "https://s3-eu-west-1.amazonaws.com/prod.img.nadvice-app/tags/pictos/A3.png"
}
]
}
]
products
Set of product
[
{
"description": "Bière Blonde type India Pale Ale - 25cl - 6,2% Alc. Vol. - Contient du <strong>malt d'orge</strong>", // OPTIONNAL: product description (can contain HTML), 500 characters max
"id": "pro1", // your product id
"label": "IPA 25cl", // product label
"prices": [ // prices by order types (onsite,takeaway,delivery)
{
"type": "onsite",
"value": 250,
"vat_rate": 0.10
},
{
"type": "takeaway",
"value": 300,
"vat_rate": 0.20
},
{
"type": "delivery",
"value": 300,
"vat_rate": 0.20
}
],
"size": { // OPTIONNAL : size infos
"unit": "cl", // OPTIONNAL|DEFAULT:unit : unit values : unit|cl|dl|l|g|kg
"value": 25 // OPTIONNAL|DEFAULT:1 : value is the numeric amount of specified unit
},
"types": [ // list of order types to enable for this product : onsite,takeaway,delivery
"onsite",
"takeaway",
"delivery"
],
"level": 0, // level defines the level for serving (-1 is now, then 1 by 1 : 0, 1, 2, 3 ...)
"picture": "https://....", // OPTIONNAL|DEFAULT:null : URL of product picture
"modifiers": [ // OPTIONNAL|DEFAULT:null : List of associated modifiers
"mod1", "mod2"
],
"pager_id": "pag1", // OPTIONNAL|DEFAULT:null : Associated pager id
"tagsets": [ // OPTIONNAL|DEFAULT:null : Associated tagsets and tags
{
"id": "tag1", // tagset id
"items": [ // tagset items to associate
"tag1item1"
]
}
],
"weekly_schedule": [ // OPTIONNAL|DEFAULT:null : weekly schedule (if empty/null, product available if restaurant is opened)
{
"day": 4, // day of week (0 = sunday, 6 = saturday)
"openings": [ // list of opened periods
{
"from": "10:00",
"to": "15:00"
},
{
"from": "17:00",
"to": "22:00"
}
]
},
{
"day": 5,
"openings": [
{
"from": "10:00",
"to": "15:00"
},
{
"from": "17:00",
"to": "23:00"
}
]
}
]
}
]
productsets
Set of productset
[
{
"id": "prs1", // your productset id
"label": "Menu du jour", // productset label
"prices": [ // prices by order types (onsite,takeaway,delivery)
{
"type": "onsite",
"value": 1250,
"vat_rate": 0.10
},
{
"type": "takeaway",
"value": 1300,
"vat_rate": 0.20
},
{
"type": "delivery",
"value": 1300,
"vat_rate": 0.20
}
],
"types": [ // list of order types to enable for this product : onsite,takeaway,delivery
"onsite",
"takeaway",
"delivery"
],
"level": 0, // level defines the level for serving (-1 is now, then 1 by 1 : 0, 1, 2, 3 ...)
"picture": "https://....", // OPTIONNAL|DEFAULT:null : URL of productset picture
"weekly_schedule": [ // OPTIONNAL|DEFAULT:null : weekly schedule (if empty/null, productset available if restaurant is opened)
{
"day": 4,
"openings": [
{
"from": "10:00",
"to": "15:00"
},
{
"from": "17:00",
"to": "22:00"
}
]
},
{
"day": 5,
"openings": [
{
"from": "10:00",
"to": "15:00"
},
{
"from": "17:00",
"to": "23:00"
}
]
}
],
"steps": [ // steps of productset
{
"id": "prs1ste1", // your productset step id
"label": "Boisson", // productset label
"min": 1, // minimum amount of selected items
"max": 2, // maximum amount of selected items
"free": 0, // amount of free items among selected items
"items": [ // list of products inside the productset step
{
"id": "pro1", // product id
"extra_price": 100 // extra price when this product is selected
},
{
"id": "pro2",
"extra_price": 200
}
]
},
{
"id": "prs1ste2",
"label": "Plat",
"min": 1,
"max": 1,
"free": 0,
"items": [
{
"id": "pro3",
"extra_price": 0
}
]
}
]
}
]
menus
Set of menu
[
{
"id": "men1", // your menu id
"label": "Obypay", // menu label
"families": [ // families
{
"id": "men1fam1", // family id
"label": "Salé", // family label
"families": [ // depth level 1
{
"id": "men1fam1dep1a", // id of depth level 1
"label": "Plats", // labels of depth level 1
"families": [ // depth level 2
{
"id": "men1fam1dep2a", // id of depth level 2
"label": "Plats", // labels of depth level 2
"items": [ // list of items associated
{
"id": "pro3", // item id
"type": "products", // type is products|productsets|containers
"prices": [ // OPTIONNAL|DEFAULT:product prices : you can override item price by specifying prices in menu/item association
{
"type": "onsite",
"value": 500,
"vat_rate": 0.10
},
{
"type": "takeaway",
"value": 600,
"vat_rate": 0.20
},
{
"type": "delivery",
"value": 700,
"vat_rate": 0.20
}
]
},
{
"id": "prs1",
"type": "productsets"
}
]
}
]
}
]
},
{
"id": "men1fam2",
"label": "Boissons",
"families": [
{
"id": "men1fam2dep1b",
"label": "Bières",
"families": [
{
"id": "men1fam2dep2b",
"label": "Blondes",
"items": [
{
"id": "con1",
"type": "containers"
}
]
}
]
}
]
}
]
}
]
The data MUST BE sent as follows :
{
config: {},
modifiers : [],
containers : [],
pagers : [],
tagsets : [],
products : [],
productsets : [],
menus : []
}
{
"config": {
"lang": "fr"
},
"modifiers": [
{
"id": "mod1",
"label": "Cuisson",
"min": 1,
"max": 1,
"multiple": false,
"items": [
{
"id": "mod1item1",
"label": "bleu",
"max": 1
},
{
"id": "mod1item2",
"label": "saignant",
"max": 1
},
{
"id": "mod1item3",
"label": "à point",
"max": 1
},
{
"id": "mod1item4",
"label": "bien cuit",
"max": 1
}
]
},
{
"id": "mod2",
"label": "Suppléments",
"min": 0,
"max": 2,
"multiple": true,
"items": [
{
"id": "mod2item1",
"label": "Légumes",
"max": 1,
"prices": [
{
"type": "onsite",
"value": 100
},
{
"type": "takeaway",
"value": 150
},
{
"type": "delivery",
"value": 150
}
]
},
{
"id": "mod2item2",
"label": "Frites",
"max": 1,
"prices": [
{
"type": "onsite",
"value": 150
},
{
"type": "takeaway",
"value": 250
},
{
"type": "delivery",
"value": 250
}
]
}
]
}
],
"containers": [
{
"id": "con1",
"label": "IPA",
"items": [
"pro1",
"pro2"
]
}
],
"pagers": [
{
"id": "pag1",
"label": "Avertisseur",
"color": "#ff0000",
"type": "device"
},
{
"id": "pag2",
"label": "Bon de retrait",
"color": "#00ff00",
"type": "paper"
},
{
"id": "pag3",
"label": "Avertisseur",
"color": "#0000ff",
"type": "all"
}
],
"tagsets": [
{
"id": "tag1",
"label": "Allergènes",
"items": [
{
"id": "tag1item1",
"label": "Gluten",
"picture": "https://s3-eu-west-1.amazonaws.com/prod.img.nadvice-app/tags/pictos/A1.png"
},
{
"id": "tag1item2",
"label": "Oeufs",
"picture": "https://s3-eu-west-1.amazonaws.com/prod.img.nadvice-app/tags/pictos/A3.png"
}
]
}
],
"products": [
{
"description": "Bière Blonde type India Pale Ale - 25cl - 6,2% Alc. Vol. - Contient du <strong>malt d'orge</strong>",
"id": "pro1",
"label": "IPA 25cl",
"prices": [
{
"type": "onsite",
"value": 250,
"vat_rate": 0.10
},
{
"type": "takeaway",
"value": 300,
"vat_rate": 0.20
},
{
"type": "delivery",
"value": 300,
"vat_rate": 0.20
}
],
"size": {
"unit": "cl",
"value": "25"
},
"types": [
"onsite",
"takeaway",
"delivery"
],
"level": 0,
"picture": "https://zefzefezf.ezf",
"weekly_schedule": [
{
"day": 4,
"openings": [
{
"from": "10:00",
"to": "15:00"
},
{
"from": "17:00",
"to": "22:00"
}
]
},
{
"day": 5,
"openings": [
{
"from": "10:00",
"to": "15:00"
},
{
"from": "17:00",
"to": "23:00"
}
]
}
]
},
{
"id": "pro2",
"label": "IPA 33cl",
"prices": [
{
"type": "onsite",
"value": 350,
"vat_rate": 0.10
},
{
"type": "takeaway",
"value": 400,
"vat_rate": 0.20
},
{
"type": "delivery",
"value": 400,
"vat_rate": 0.20
}
],
"size": {
"unit": "cl",
"value": "33"
},
"types": [
"onsite",
"takeaway",
"delivery"
],
"level": 0,
"picture": "https://fbdfbdfb.dfb",
"weekly_schedule": [
{
"day": 4,
"openings": [
{
"from": "10:00",
"to": "15:00"
},
{
"from": "17:00",
"to": "22:00"
}
]
},
{
"day": 5,
"openings": [
{
"from": "10:00",
"to": "15:00"
},
{
"from": "17:00",
"to": "23:00"
}
]
}
]
},
{
"id": "pro3",
"label": "Steak Frites",
"prices": [
{
"type": "onsite",
"value": 950,
"vat_rate": 0.10
},
{
"type": "takeaway",
"value": 1200,
"vat_rate": 0.20
},
{
"type": "delivery",
"value": 1200,
"vat_rate": 0.20
}
],
"size": {
"unit": "unit",
"value": "1"
},
"types": [
"onsite",
"takeaway",
"delivery"
],
"level": 1,
"picture": "https://trhtrhR.rthrt",
"modifiers": [
"mod1",
"mod2"
],
"pager_id": "pag1",
"tagsets": [
{
"id": "tag1",
"items": [
"tag1item1"
]
}
],
"weekly_schedule": [
{
"day": 4,
"openings": [
{
"from": "10:00",
"to": "15:00"
},
{
"from": "17:00",
"to": "22:00"
}
]
},
{
"day": 5,
"openings": [
{
"from": "10:00",
"to": "15:00"
},
{
"from": "17:00",
"to": "23:00"
}
]
}
]
}
],
"productsets": [
{
"id": "prs1",
"label": "Menu du jour",
"prices": [
{
"type": "onsite",
"value": 1250,
"vat_rate": 0.10
},
{
"type": "takeaway",
"value": 1300,
"vat_rate": 0.20
},
{
"type": "delivery",
"value": 1300,
"vat_rate": 0.20
}
],
"types": [
"onsite",
"takeaway",
"delivery"
],
"level": 0,
"picture": "https://uyiyuiiyui.yui",
"weekly_schedule": [
{
"day": 4,
"openings": [
{
"from": "10:00",
"to": "15:00"
},
{
"from": "17:00",
"to": "22:00"
}
]
},
{
"day": 5,
"openings": [
{
"from": "10:00",
"to": "15:00"
},
{
"from": "17:00",
"to": "23:00"
}
]
}
],
"steps": [
{
"id": "prs1ste1",
"label": "Boisson",
"min": 1,
"max": 2,
"free": 0,
"items": [
{
"id": "pro1",
"extra_price": 100
},
{
"id": "pro2",
"extra_price": 200
}
]
},
{
"id": "prs1ste2",
"label": "Plat",
"min": 1,
"max": 1,
"free": 0,
"items": [
{
"id": "pro3",
"extra_price": 0
}
]
}
]
}
],
"menus": [
{
"id": "men1",
"label": "Obypay",
"families": [
{
"id": "men1fam1",
"label": "Salé",
"families": [
{
"id": "men1fam1dep1a",
"label": "Plats",
"families": [
{
"id": "men1fam1dep2a",
"label": "Chauds",
"items": [
{
"id": "pro3",
"type": "products",
"prices": [
{
"type": "onsite",
"value": 500,
"vat_rate": 0.10
},
{
"type": "takeaway",
"value": 600,
"vat_rate": 0.20
},
{
"type": "delivery",
"value": 700,
"vat_rate": 0.20
}
]
},
{
"id": "prs1",
"type": "productsets"
}
]
}
]
}
]
},
{
"id": "men1fam2",
"label": "Boissons",
"families": [
{
"id": "men1fam2dep1b",
"label": "Bières",
"families": [
{
"id": "men1fam2dep2b",
"label": "Blondes",
"items": [
{
"id": "con1",
"type": "containers"
}
]
}
]
}
]
}
]
}
]
}