{"openapi":"3.1.0","info":{"title":"Tably API","version":"1.0","description":"The restaurant's orders, menu, customers, team, stock and reports. Keys: Settings → Integrations. A write key changes only the areas chosen for it; externalId makes a retry safe."},"servers":[{"url":"https://tablypos.com/api/v1/open"}],"security":[{"key":[]}],"components":{"securitySchemes":{"key":{"type":"http","scheme":"bearer","description":"tbl_… from Settings → Integrations"}}},"paths":{"/restaurant":{"get":{"operationId":"get_restaurant","summary":"The restaurant","description":"Name, currency, time zone, address and phone, the order types, and what the key may do (read or write, and for a write key the areas it may change). A good first call to check a key.","tags":["Restaurant"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"5faf…","name":"Lotus Kitchen","currency":"USD","timezone":"America/New_York","address":"12 Riverside Street","phone":"+1 555 0100","access":"write","canChange":["orders","customers","menu"],"orderTypes":[{"id":"dine-in","name":"Dine in"},{"id":"takeaway","name":"Takeaway"}]}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/menu":{"get":{"operationId":"get_menu","summary":"The whole menu","description":"Categories, cooking stations and dishes with prices, availability (the stop list), cooking stations and modifier groups with their options — everything needed to show the menu on a website or take an order.","tags":["Menu"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"categories":[{"id":"home","name":"Main screen"}],"stations":["Kitchen","Bar"],"dishes":[{"id":"iced-latte","name":"Iced latte","category":"Drinks","price":2.5,"available":true,"description":"Double espresso, cold milk, ice","station":"Bar","modifierGroups":[{"id":"milk","name":"Milk","min":0,"max":1,"options":[{"id":"oat","name":"Oat milk","price":0.5}]}]}]}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/dishes/{id}":{"get":{"operationId":"get_dish","summary":"One dish","description":"A dish with its price, availability and modifier groups.","tags":["Menu"],"parameters":[{"name":"id","in":"path","required":true,"description":"The dish id (from /menu)","schema":{"type":"string"},"example":"pad-thai"}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"pad-thai","name":"Pad Thai","category":"Mains","price":6.5,"available":true,"description":"Rice noodles, chicken, egg, tamarind, peanuts","station":"Kitchen","modifierGroups":[]}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}},"patch":{"operationId":"update_dish","summary":"Change a dish","description":"Take a dish off the menu (available: false) or back, change its price, name, description, category, cooking station or recipe — send only what changes (a recipe sent replaces the whole recipe). The tablets get it within seconds. The answer has the recipe, its food cost and the margin. Webhook: menu.updated. Needs a write key allowed to change Menu.","tags":["Menu"],"parameters":[{"name":"id","in":"path","required":true,"description":"The dish id","schema":{"type":"string"},"example":"pad-thai"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"available":{"type":"boolean","description":"false: off the menu (stop list)"},"price":{"type":"number","description":"The new price"},"name":{"type":"string","description":"Up to 80 characters"},"description":{"type":"string","description":"Up to 300 characters"},"category":{"type":"string","description":"Another category: its id or name (from /menu)"},"station":{"type":"string","description":"A cooking station from /menu (empty: none)"},"recipe":{"type":"array","description":"What one portion takes from stock: [{ ingredient | preparation (its id or name from /inventory), quantity, unit? }] — the quantity in the item's unit (kg, l, pcs), or unit \"g\" / \"ml\" for kg and l items (150 g of chicken: { ingredient: \"Chicken\", quantity: 150, unit: \"g\" }). Sales take it from stock, and the margin comes from it"}},"required":[]},"example":{"recipe":[{"ingredient":"Rice noodles","quantity":120,"unit":"g"},{"ingredient":"Chicken","quantity":80,"unit":"g"},{"ingredient":"Egg","quantity":1}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"pad-thai","name":"Pad Thai","category":"Mains","price":6.5,"available":true,"description":"Rice noodles, chicken, egg, tamarind, peanuts","station":"Kitchen","recipe":[{"ingredient":"rice-noodles","name":"Rice noodles","quantity":0.12,"unit":"kg"},{"ingredient":"chicken","name":"Chicken","quantity":0.08,"unit":"kg"},{"ingredient":"egg","name":"Egg","quantity":1,"unit":"pcs"}],"foodCost":1.12,"margin":82.8}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}},"delete":{"operationId":"delete_dish","summary":"Delete a dish","description":"Removes a dish from the menu; past receipts keep it. Refused (409) while a promotion or another dish’s modifier uses it — change that first. Its barcodes go with it. Webhook: menu.updated. Needs a write key allowed to change Menu.","tags":["Menu"],"parameters":[{"name":"id","in":"path","required":true,"description":"The dish id","schema":{"type":"string"},"example":"9d2c…"}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"9d2c…","name":"Mango smoothie","deleted":true}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/dishes":{"post":{"operationId":"create_dish","summary":"Add a dish","description":"A new dish in a category, on the tablets within seconds, with its recipe (what a portion takes from stock) if you send it; a picture is added on the website, modifier groups with POST /dishes/{id}/modifier-groups. With externalId it is made once: sending it again gives back the same dish. Counts towards the plan’s dishes. Webhook: menu.updated. Needs a write key allowed to change Menu.","tags":["Menu"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Up to 80 characters"},"price":{"type":"number","description":"0 or more"},"category":{"type":"string","description":"Its id or name (from /menu)"},"description":{"type":"string","description":"Up to 300 characters"},"available":{"type":"boolean","description":"false: added on the stop list (default true)"},"station":{"type":"string","description":"A cooking station from /menu"},"externalId":{"type":"string","description":"Your id: the same one is never added twice"},"recipe":{"type":"array","description":"What one portion takes from stock: [{ ingredient | preparation (its id or name from /inventory), quantity, unit? }] — the quantity in the item's unit (kg, l, pcs), or unit \"g\" / \"ml\" for kg and l items (150 g of chicken: { ingredient: \"Chicken\", quantity: 150, unit: \"g\" }). Sales take it from stock, and the margin comes from it"}},"required":["name","price","category"]},"example":{"name":"Mango smoothie","price":3.5,"category":"Drinks","description":"Mango, yogurt, ice","recipe":[{"ingredient":"Mango","quantity":150,"unit":"g"},{"ingredient":"Yogurt","quantity":100,"unit":"ml"}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"9d2c…","name":"Mango smoothie","category":"Drinks","price":3.5,"available":true,"description":"Mango, yogurt, ice","station":"Bar","recipe":[{"ingredient":"mango","name":"Mango","quantity":0.15,"unit":"kg"},{"ingredient":"yogurt","name":"Yogurt","quantity":0.1,"unit":"l"}],"foodCost":0.62,"margin":82.3}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/dishes/{id}/modifier-groups":{"post":{"operationId":"create_modifier_group","summary":"Add a modifier group to a dish","description":"A group of options on a dish — Extras, Size, Spice: the waiter (and the QR menu) asks it when the dish is added. mode single = one of them, multiple = up to max; min 0 = optional, 1+ = must choose. Each option has a name and an extra price, and may take an ingredient from stock (ingredient: its id or name from /inventory, quantity in its unit). Or copy a group of another dish with copyFrom. Needs Dish modifiers in the plan. Webhook: menu.updated. Needs a write key allowed to change Menu.","tags":["Menu"],"parameters":[{"name":"id","in":"path","required":true,"description":"The dish id (from /menu)","schema":{"type":"string"},"example":"pad-thai"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The group, up to 60 characters (e.g. Extras)"},"mode":{"type":"string","description":"single (one of them, default) or multiple"},"min":{"type":"number","description":"At least so many (0: optional, default)"},"max":{"type":"number","description":"At most so many (multiple only)"},"options":{"type":"array","description":"[{name, price, ingredient?, quantity?}]"},"copyFrom":{"type":"string","description":"{dishId, groupId}: a copy of that dish’s group instead"}},"required":["name"]},"example":{"name":"Extras","mode":"multiple","min":0,"max":3,"options":[{"name":"Extra egg","price":0.5,"ingredient":"Eggs","quantity":1},{"name":"Extra cheese","price":0.75}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"dishId":"pad-thai","dish":"Pad Thai","modifierGroups":[{"id":"g1…","name":"Extras","mode":"multiple","min":0,"max":3,"options":[{"id":"o1…","name":"Extra egg","price":0.5,"product":{"kind":"ingredient","id":"eggs","quantity":1}},{"id":"o2…","name":"Extra cheese","price":0.75}]}]}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/dishes/{id}/modifier-groups/{group}":{"patch":{"operationId":"update_modifier_group","summary":"Change a modifier group","description":"Its name, mode, min, max, its place among the dish’s groups (position 0 = first), or qrHidden (left out of the QR menu). Send only what changes. Webhook: menu.updated. Needs a write key allowed to change Menu.","tags":["Menu"],"parameters":[{"name":"id","in":"path","required":true,"description":"The dish id","schema":{"type":"string"},"example":"pad-thai"},{"name":"group","in":"path","required":true,"description":"The group id (from /dishes/{id})","schema":{"type":"string"},"example":"g1…"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Up to 60 characters"},"mode":{"type":"string","description":"single or multiple"},"min":{"type":"number","description":"At least"},"max":{"type":"number","description":"At most"},"position":{"type":"number","description":"0 = the first group"},"qrHidden":{"type":"boolean","description":"true: not on the QR menu"}},"required":[]},"example":{"min":1}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"dishId":"pad-thai","dish":"Pad Thai","modifierGroups":[]}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}},"delete":{"operationId":"delete_modifier_group","summary":"Delete a modifier group","description":"Removes the group and its options from the dish (past receipts keep what was chosen). Webhook: menu.updated. Needs a write key allowed to change Menu.","tags":["Menu"],"parameters":[{"name":"id","in":"path","required":true,"description":"The dish id","schema":{"type":"string"},"example":"pad-thai"},{"name":"group","in":"path","required":true,"description":"The group id","schema":{"type":"string"},"example":"g1…"}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"dishId":"pad-thai","dish":"Pad Thai","modifierGroups":[]}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/dishes/{id}/modifier-groups/{group}/options":{"post":{"operationId":"add_modifier_option","summary":"Add an option to a modifier group","description":"A new choice in the group: a name, an extra price (0 for none), and optionally the ingredient it takes from stock (id or name from /inventory) with the quantity in its unit. Webhook: menu.updated. Needs a write key allowed to change Menu.","tags":["Menu"],"parameters":[{"name":"id","in":"path","required":true,"description":"The dish id","schema":{"type":"string"},"example":"pad-thai"},{"name":"group","in":"path","required":true,"description":"The group id","schema":{"type":"string"},"example":"g1…"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Up to 60 characters"},"price":{"type":"number","description":"The extra price (default 0)"},"ingredient":{"type":"string","description":"An ingredient taken from stock: its id or name"},"quantity":{"type":"number","description":"How much of it, in its unit (default 1)"}},"required":["name"]},"example":{"name":"Extra shrimp","price":1.5,"ingredient":"Shrimp","quantity":0.05}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"dishId":"pad-thai","dish":"Pad Thai","modifierGroups":[]}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/dishes/{id}/modifier-groups/{group}/options/{option}":{"patch":{"operationId":"update_modifier_option","summary":"Change a modifier option","description":"Its name, extra price, ingredient and quantity (ingredient \"\" = none), place in the group (position 0 = first) or qrHidden. Send only what changes. Webhook: menu.updated. Needs a write key allowed to change Menu.","tags":["Menu"],"parameters":[{"name":"id","in":"path","required":true,"description":"The dish id","schema":{"type":"string"},"example":"pad-thai"},{"name":"group","in":"path","required":true,"description":"The group id","schema":{"type":"string"},"example":"g1…"},{"name":"option","in":"path","required":true,"description":"The option id","schema":{"type":"string"},"example":"o1…"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Up to 60 characters"},"price":{"type":"number","description":"The extra price"},"ingredient":{"type":"string","description":"Its id or name; \"\" for none"},"quantity":{"type":"number","description":"In the ingredient’s unit"},"position":{"type":"number","description":"0 = first"},"qrHidden":{"type":"boolean","description":"true: not on the QR menu"}},"required":[]},"example":{"price":1}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"dishId":"pad-thai","dish":"Pad Thai","modifierGroups":[]}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}},"delete":{"operationId":"delete_modifier_option","summary":"Delete a modifier option","description":"Removes one choice from the group. Webhook: menu.updated. Needs a write key allowed to change Menu.","tags":["Menu"],"parameters":[{"name":"id","in":"path","required":true,"description":"The dish id","schema":{"type":"string"},"example":"pad-thai"},{"name":"group","in":"path","required":true,"description":"The group id","schema":{"type":"string"},"example":"g1…"},{"name":"option","in":"path","required":true,"description":"The option id","schema":{"type":"string"},"example":"o1…"}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"dishId":"pad-thai","dish":"Pad Thai","modifierGroups":[]}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/categories":{"post":{"operationId":"create_category","summary":"Add a category","description":"A new menu category, at the top or inside another (parentId; up to 3 levels). The same name in the same place is not added twice. Needs a write key allowed to change Menu.","tags":["Menu"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Up to 40 characters"},"parentId":{"type":"string","description":"Inside this category (id from /menu)"}},"required":["name"]},"example":{"name":"Smoothies","parentId":"drinks"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"4b7a…","name":"Smoothies","parentId":"drinks"}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/categories/{id}":{"patch":{"operationId":"update_category","summary":"Rename or move a category","description":"A new name (its dishes follow) and/or another place: parentId of a category, or null for the top. Never inside itself; up to 3 levels. Needs a write key allowed to change Menu.","tags":["Menu"],"parameters":[{"name":"id","in":"path","required":true,"description":"The category id","schema":{"type":"string"},"example":"4b7a…"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Up to 40 characters"},"parentId":{"type":"string","description":"Inside this category, or null: at the top"}},"required":[]},"example":{"name":"Fresh smoothies"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"4b7a…","name":"Fresh smoothies","parentId":"drinks"}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}},"delete":{"operationId":"delete_category","summary":"Delete a category","description":"Only an empty one: refused (409) while it has dishes or subcategories, or a promotion uses it. The main screen cannot be deleted. Needs a write key allowed to change Menu.","tags":["Menu"],"parameters":[{"name":"id","in":"path","required":true,"description":"The category id","schema":{"type":"string"},"example":"4b7a…"}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"4b7a…","name":"Fresh smoothies","deleted":true}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/promotions":{"get":{"operationId":"list_promotions","summary":"Promotions","description":"Every promotion: what it gives (reward), on what (target), when (schedule, dates), its promo code, and whether it is on. Needs Promotions in the plan.","tags":["Menu"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"promotions":[{"id":"happy-hour","name":"Happy hour","description":"20% off drinks","kind":"happy_hour","active":true,"reward":{"type":"percent","value":20},"target":{"scope":"categories","ids":["drinks"]},"schedule":[{"days":[1,2,3,4,5],"from":"17:00","to":"19:00"}]}]}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/promotions/{id}":{"patch":{"operationId":"update_promotion","summary":"Switch a promotion on or off","description":"A promotion on (active: true) or paused; the tablets follow at once. Needs a write key allowed to change Menu.","tags":["Menu"],"parameters":[{"name":"id","in":"path","required":true,"description":"The promotion id (from /promotions)","schema":{"type":"string"},"example":"happy-hour"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"boolean","description":"true: on, false: paused"}},"required":["active"]},"example":{"active":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"happy-hour","name":"Happy hour","active":false}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/orders":{"get":{"operationId":"list_orders","summary":"Orders by day","description":"Orders of those days (restaurant time, up to 31 days), newest first — a paid order on the day it was paid, the others on the day they were opened: every dish, payments, discounts, the waiter.","tags":["Orders"],"parameters":[{"name":"from","in":"query","required":false,"description":"First day, YYYY-MM-DD (default: today)","schema":{"type":"string"},"example":"2026-10-01"},{"name":"to","in":"query","required":false,"description":"Last day, YYYY-MM-DD (default: from)","schema":{"type":"string"},"example":"2026-10-07"},{"name":"status","in":"query","required":false,"description":"open, paid or canceled","schema":{"type":"string","enum":["open","paid","canceled"]}},{"name":"limit","in":"query","required":false,"description":"Up to 1000 (default 500)","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"from":"2026-10-01","to":"2026-10-07","orders":[{"id":"API-MFX2K91","number":12,"status":"paid","service":"table","table":"4","guests":2,"waiter":"Dara","openedAt":"2026-10-07T12:00","closedAt":"2026-10-07T12:41","items":[{"id":"b3dc…","dishId":"pad-thai","name":"Pad Thai","quantity":2,"price":6.5,"guest":0,"note":"no peanuts","sentAt":"2026-10-07T12:01","readyQuantity":0,"removed":false},{"id":"7a01…","dishId":"iced-latte","name":"Iced latte · Oat milk","quantity":1,"price":3,"guest":0,"sentAt":"2026-10-07T12:01","readyQuantity":1,"removed":false}],"subtotal":16,"discount":0,"deliveryFee":0,"payments":[{"method":"Cash","amount":16,"tip":1}],"paid":16}]}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}},"post":{"operationId":"create_order","summary":"Create an order","description":"An order from outside — your website, an app, a delivery service. Prices come from the menu; modifiers by group and option id. The dishes go to the kitchen display and the waiters' tablets at once (send: false keeps them unsent). Webhooks: order.opened, order.items_added, order.sent. Needs a write key allowed to change Orders.","tags":["Orders"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"service":{"type":"string","description":"Where it is served"},"table":{"type":"string","description":"The table number (service: table)"},"guestNumber":{"type":"integer","description":"The guest number (service: guest_number)"},"guests":{"type":"integer","description":"How many people"},"type":{"type":"string","description":"The order type, by id or name (GET /restaurant): takeaway, delivery… — marked on the tablets, the kitchen display and the tickets"},"customerId":{"type":"string","description":"A customer (their discount applies at payment)"},"items":{"type":"array","description":"[{ dishId, quantity, note?, modifiers?: [{ groupId, optionId }] }]"},"send":{"type":"boolean","description":"Send to the kitchen now (default true)"}},"required":["service","items"]},"example":{"service":"counter","type":"takeaway","items":[{"dishId":"pad-thai","quantity":2,"note":"no peanuts"},{"dishId":"iced-latte","modifiers":[{"groupId":"milk","optionId":"oat"}]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"API-MFX2K91","number":12,"status":"open","service":"table","table":"4","guests":2,"waiter":"Dara","openedAt":"2026-10-07T12:00","closedAt":null,"items":[{"id":"b3dc…","dishId":"pad-thai","name":"Pad Thai","quantity":2,"price":6.5,"guest":0,"note":"no peanuts","sentAt":"2026-10-07T12:01","readyQuantity":0,"removed":false},{"id":"7a01…","dishId":"iced-latte","name":"Iced latte · Oat milk","quantity":1,"price":3,"guest":0,"sentAt":"2026-10-07T12:01","readyQuantity":1,"removed":false}],"subtotal":16,"discount":0,"deliveryFee":0,"payments":[],"paid":0}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/orders/open":{"get":{"operationId":"list_open_orders","summary":"Orders open now","description":"What is on the tables right now, oldest first — for a live board or a delivery screen.","tags":["Orders"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"orders":[{"id":"API-MFX2K91","number":12,"status":"open","service":"table","table":"4","guests":2,"waiter":"Dara","openedAt":"2026-10-07T12:00","closedAt":null,"items":[{"id":"b3dc…","dishId":"pad-thai","name":"Pad Thai","quantity":2,"price":6.5,"guest":0,"note":"no peanuts","sentAt":"2026-10-07T12:01","readyQuantity":0,"removed":false},{"id":"7a01…","dishId":"iced-latte","name":"Iced latte · Oat milk","quantity":1,"price":3,"guest":0,"sentAt":"2026-10-07T12:01","readyQuantity":1,"removed":false}],"subtotal":16,"discount":0,"deliveryFee":0,"payments":[],"paid":0}]}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/orders/{id}":{"get":{"operationId":"get_order","summary":"One order","description":"An order with its dishes (and how many portions the kitchen marked ready), payments and totals.","tags":["Orders"],"parameters":[{"name":"id","in":"path","required":true,"description":"The order id","schema":{"type":"string"},"example":"API-MFX2K91"}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"API-MFX2K91","number":12,"status":"paid","service":"table","table":"4","guests":2,"waiter":"Dara","openedAt":"2026-10-07T12:00","closedAt":"2026-10-07T12:41","items":[{"id":"b3dc…","dishId":"pad-thai","name":"Pad Thai","quantity":2,"price":6.5,"guest":0,"note":"no peanuts","sentAt":"2026-10-07T12:01","readyQuantity":0,"removed":false},{"id":"7a01…","dishId":"iced-latte","name":"Iced latte · Oat milk","quantity":1,"price":3,"guest":0,"sentAt":"2026-10-07T12:01","readyQuantity":1,"removed":false}],"subtotal":16,"discount":0,"deliveryFee":0,"payments":[{"method":"Cash","amount":16,"tip":1}],"paid":16}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/orders/{id}/items":{"post":{"operationId":"add_order_items","summary":"Add dishes","description":"More dishes for an open order; they go to the kitchen (send: false keeps them). Webhooks: order.items_added, order.sent. Needs a write key allowed to change Orders.","tags":["Orders"],"parameters":[{"name":"id","in":"path","required":true,"description":"The order id","schema":{"type":"string"},"example":"API-MFX2K91"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","description":"As in create_order"},"send":{"type":"boolean","description":"Default true"}},"required":["items"]},"example":{"items":[{"dishId":"mango-rice","quantity":1}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"API-MFX2K91","number":12,"status":"open","service":"table","table":"4","guests":2,"waiter":"Dara","openedAt":"2026-10-07T12:00","closedAt":null,"items":[{"id":"b3dc…","dishId":"pad-thai","name":"Pad Thai","quantity":2,"price":6.5,"guest":0,"note":"no peanuts","sentAt":"2026-10-07T12:01","readyQuantity":0,"removed":false},{"id":"7a01…","dishId":"iced-latte","name":"Iced latte · Oat milk","quantity":1,"price":3,"guest":0,"sentAt":"2026-10-07T12:01","readyQuantity":1,"removed":false}],"subtotal":16,"discount":0,"deliveryFee":0,"payments":[],"paid":0}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/orders/{id}/payments":{"post":{"operationId":"add_payment","summary":"Record a payment","description":"A payment taken outside Tably (online, a delivery app). Once the order is paid in full it closes: the receipt is in Tably, stock goes down. Webhooks: payment.added, order.paid. Needs a write key allowed to change Orders.","tags":["Orders"],"parameters":[{"name":"id","in":"path","required":true,"description":"The order id","schema":{"type":"string"},"example":"API-MFX2K91"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"number","description":"How much was paid"},"method":{"type":"string","description":"Payment method name (default \"Online\")"},"tip":{"type":"number","description":"Tip on top"}},"required":["amount"]},"example":{"method":"Online","amount":16}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"API-MFX2K91","number":12,"status":"paid","service":"table","table":"4","guests":2,"waiter":"Dara","openedAt":"2026-10-07T12:00","closedAt":"2026-10-07T12:41","items":[{"id":"b3dc…","dishId":"pad-thai","name":"Pad Thai","quantity":2,"price":6.5,"guest":0,"note":"no peanuts","sentAt":"2026-10-07T12:01","readyQuantity":0,"removed":false},{"id":"7a01…","dishId":"iced-latte","name":"Iced latte · Oat milk","quantity":1,"price":3,"guest":0,"sentAt":"2026-10-07T12:01","readyQuantity":1,"removed":false}],"subtotal":16,"discount":0,"deliveryFee":0,"payments":[{"method":"Cash","amount":16,"tip":1}],"paid":16}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/orders/{id}/close":{"post":{"operationId":"close_order","summary":"Pay and close an order","description":"Pays what is left of an open order with one payment method (default Online) and closes it — for your website or a delivery app. Webhooks: payment.added, order.paid. Needs a write key allowed to change Orders.","tags":["Orders"],"parameters":[{"name":"id","in":"path","required":true,"description":"The order id","schema":{"type":"string"},"example":"API-…"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"method":{"type":"string","description":"A payment method of the restaurant (default Online)"},"tip":{"type":"number","description":"A tip on top"}},"required":[]},"example":{"method":"Online"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"API-…","status":"paid","subtotal":13,"payments":[{"method":"Online","amount":13,"tip":0}]}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/orders/{id}/print":{"post":{"operationId":"print_order","summary":"Print the bill","description":"The bill of an open order, or the receipt of a paid one, on the restaurant’s receipt printer. A device with the Tably app in the restaurant prints it within seconds. Needs a write key allowed to change Orders.","tags":["Orders"],"parameters":[{"name":"id","in":"path","required":true,"description":"The order id","schema":{"type":"string"},"example":"API-…"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","description":"Default: bill while open, receipt when paid"},"printerId":{"type":"string","description":"A receipt printer (default: the first one)"}},"required":[]},"example":{"kind":"bill"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"queued":true,"jobId":"api-…","kind":"bill","printer":"Front counter"}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/orders/{id}/cancel":{"post":{"operationId":"cancel_order","summary":"Cancel an order","description":"Cancel an order with nothing paid. Webhook: order.canceled. Needs a write key allowed to change Orders.","tags":["Orders"],"parameters":[{"name":"id","in":"path","required":true,"description":"The order id","schema":{"type":"string"},"example":"API-MFX2K91"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","description":"Why (shown in Tably)"}},"required":[]},"example":{"reason":"Guest canceled online"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"API-MFX2K91","number":12,"status":"canceled","service":"table","table":"4","guests":2,"waiter":"Dara","openedAt":"2026-10-07T12:00","closedAt":null,"items":[{"id":"b3dc…","dishId":"pad-thai","name":"Pad Thai","quantity":2,"price":6.5,"guest":0,"note":"no peanuts","sentAt":"2026-10-07T12:01","readyQuantity":0,"removed":false},{"id":"7a01…","dishId":"iced-latte","name":"Iced latte · Oat milk","quantity":1,"price":3,"guest":0,"sentAt":"2026-10-07T12:01","readyQuantity":1,"removed":false}],"subtotal":16,"discount":0,"deliveryFee":0,"payments":[],"paid":0}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/customers":{"get":{"operationId":"list_customers","summary":"Customers","description":"Regular guests and business clients with their terms.","tags":["Customers"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"customers":[{"id":"176c…","kind":"person","name":"Mia Tran","phone":"+1 555 0100","email":"","discountPercent":10,"active":true,"createdAt":"2026-10-01T09:12:00Z"}]}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}},"post":{"operationId":"create_customer","summary":"Add a customer","description":"A new customer — from a loyalty app or a booking form. Webhook: customer.created. Needs a write key allowed to change Customers.","tags":["Customers"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Name"},"phone":{"type":"string","description":"Phone"},"email":{"type":"string","description":"Email"},"address":{"type":"string","description":"Address"},"notes":{"type":"string","description":"Notes"},"discountPercent":{"type":"number","description":"0–100, off every order"},"kind":{"type":"string","description":"Default person"}},"required":["name"]},"example":{"name":"Mia Tran","phone":"+1 555 0100","discountPercent":10}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"176c…","kind":"person","name":"Mia Tran","phone":"+1 555 0100","discountPercent":10,"active":true}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/customers/{id}":{"get":{"operationId":"get_customer","summary":"One customer","description":"A customer by id.","tags":["Customers"],"parameters":[{"name":"id","in":"path","required":true,"description":"The customer id","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"176c…","kind":"person","name":"Mia Tran","phone":"+1 555 0100","discountPercent":10,"active":true}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}},"patch":{"operationId":"update_customer","summary":"Change a customer","description":"Change any of the fields above, or active: false. Webhook: customer.updated. Needs a write key allowed to change Customers.","tags":["Customers"],"parameters":[{"name":"id","in":"path","required":true,"description":"The customer id","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[]},"example":{"discountPercent":15}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"176c…","name":"Mia Tran","discountPercent":15,"active":true}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/employees/on-shift":{"get":{"operationId":"on_shift","summary":"Who is at work now","description":"Who is working / on shift right now: the people clocked in and not out yet, with since when and the hours so far — by the Time clock add-on. timeClock: false (and nobody) while the add-on is off.","tags":["Team & floor"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"timeClock":true,"employees":[{"id":"dara","name":"Dara","role":"Waiter","since":"2026-10-11T08:58:12Z","hours":4.25}]}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/schedule":{"get":{"operationId":"schedule_day","summary":"Who works on a day","description":"By the schedule (Employees → Schedule): who should work that day and why (the usual week, a rotation, a day changed). With the Time clock add-on also who came and when, late by how many minutes against the shift, who left, and who is missing: status came, late, absent, not_in_yet, day_off or came_on_a_day_off.","tags":["Team & floor"],"parameters":[{"name":"date","in":"query","required":false,"description":"YYYY-MM-DD (default: today)","schema":{"type":"string"},"example":"2026-10-01"}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"date":"2026-10-01","timeClock":true,"working":3,"employees":[{"id":"dara","name":"Dara","role":"Waiter","works":true,"why":"usual working day","came":"2026-10-01T08:12:40","atWork":true,"shift":"08:00","lateMinutes":12,"status":"late"},{"id":"vanna","name":"Vanna","role":"Waiter","works":true,"why":"rotation 2 on, 2 off","atWork":false,"status":"not_in_yet"}]}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/schedule/days":{"get":{"operationId":"schedule_days","summary":"Who works and who is off, day by day","description":"The schedule for several days (up to 31, from a date): for each day who should work and who has a day off and why (the usual week, a rotation, a day changed). For “who works this week”, “when is Dara off”, “who is off on Sunday”.","tags":["Team & floor"],"parameters":[{"name":"from","in":"query","required":false,"description":"YYYY-MM-DD (default: today)","schema":{"type":"string"},"example":"2026-10-05"},{"name":"days","in":"query","required":false,"description":"How many days, 1–31 (default 7)","schema":{"type":"integer"},"example":"7"}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"from":"2026-10-05","days":[{"date":"2026-10-05","weekday":"Monday","working":[{"id":"dara","name":"Dara","role":"Waiter"}],"off":[{"id":"vanna","name":"Vanna","why":"rotation day off"}]}]}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/timeclock":{"get":{"operationId":"time_clock","summary":"Hours worked","description":"Time clock marks for a period of days (up to 31): who came and left when and the hours, with each person’s days and hours in total. For pay, late comings or who worked when. timeClock: false while the add-on is off.","tags":["Team & floor"],"parameters":[{"name":"from","in":"query","required":false,"description":"YYYY-MM-DD (default: the day of to)","schema":{"type":"string"},"example":"2026-10-07"},{"name":"to","in":"query","required":false,"description":"YYYY-MM-DD (default: today)","schema":{"type":"string"},"example":"2026-10-01"}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"timeClock":true,"from":"2026-10-07","to":"2026-10-01","people":[{"employeeId":"dara","name":"Dara","days":5,"hours":41.5}],"marks":[{"employeeId":"dara","name":"Dara","in":"2026-10-07T08:58:12","out":"2026-10-07T17:04:40","atWork":false,"hours":8.1}]}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/kitchen":{"get":{"operationId":"kitchen_now","summary":"The kitchen now","description":"Dishes sent to the kitchen and still cooking — where, which station, how many minutes they wait (longest first) — and dishes ready on orders still open (ready how long ago).","tags":["Orders"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"at":"2026-10-01T13:20:00","cookingCount":2,"longestWaitMinutes":18,"cooking":[{"orderId":"…","place":"Table 4","dish":"Fish amok","station":"Kitchen","quantity":2,"sentAt":"2026-10-01T13:02","waitingMinutes":18}],"readyOnOpenOrders":[{"orderId":"…","place":"#12","dish":"Iced latte","station":"Bar","quantity":1,"readyAt":"2026-10-01T13:15","readyMinutesAgo":5}]}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/employees":{"get":{"operationId":"list_employees","summary":"The team","description":"Names, roles, who is active (never PINs or pay) and each one’s schedule: the usual days off of the week (or a rotation: so many days on, so many off, from a date) and the single days changed from today on. active means employed, not at work now: who is at work now is GET /employees/on-shift; who works on a day is GET /schedule or /schedule/days.","tags":["Team & floor"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"employees":[{"id":"dara","name":"Dara","role":"Waiter","active":true,"schedule":{"usualDaysOff":["Sunday"],"extraWorkingDays":[],"changedDaysOff":["2026-10-08"]}},{"id":"vanna","name":"Vanna","role":"Cook","active":true,"schedule":{"rotation":{"daysOn":2,"daysOff":2,"from":"2026-10-01"},"extraWorkingDays":[],"changedDaysOff":[]}}]}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/floors":{"get":{"operationId":"list_floors","summary":"Floors and tables","description":"Every floor with its tables, seats and whether the table is busy right now.","tags":["Team & floor"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"floors":[{"id":"main","name":"Main floor","tables":[{"number":"4","seats":6,"busy":true}]}]}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/inventory":{"get":{"operationId":"get_inventory","summary":"Stock","description":"Every ingredient with its stock, minimum, cost and category (when it has one); low: true when below the minimum. Webhook: stock.low.","tags":["Stock"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"ingredients":[{"id":"chicken","name":"Chicken","unit":"kg","stock":1.4,"minimum":2,"low":true,"cost":4.8,"category":"Meat"}]}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/ingredients":{"post":{"operationId":"create_ingredient","summary":"Add an ingredient","description":"A new ingredient with no stock — stock comes with received supplies. One with the same name is given back as it is, so a retry never makes two. Webhook: ingredient.created. Needs a write key allowed to change Stock & supplies.","tags":["Stock"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Up to 80 characters"},"unit":{"type":"string","description":"Cannot be changed later"},"minimum":{"type":"number","description":"Below it, the ingredient is low (stock.low)"},"category":{"type":"string","description":"Groups the stock list (e.g. Sauces), up to 40 characters"}},"required":["name","unit"]},"example":{"name":"Tamarind paste","unit":"kg","minimum":1,"category":"Sauces"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"9c1e…","name":"Tamarind paste","unit":"kg","stock":0,"minimum":1}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/ingredients/{id}":{"patch":{"operationId":"update_ingredient","summary":"Change an ingredient","description":"A new name, minimum (the low-stock line) or category — send only what changes. The unit and stock do not change here: stock moves with supplies and sales. Needs a write key allowed to change Stock & supplies.","tags":["Stock"],"parameters":[{"name":"id","in":"path","required":true,"description":"The ingredient id (from /inventory)","schema":{"type":"string"},"example":"9c1e…"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Up to 80 characters"},"minimum":{"type":"number","description":"Low-stock line, in its unit"},"category":{"type":"string","description":"Up to 40 characters (empty: none)"}},"required":[]},"example":{"minimum":2}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"9c1e…","name":"Tamarind paste","unit":"kg","stock":3.5,"minimum":2}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/ingredients/{id}/moves":{"get":{"operationId":"ingredient_moves","summary":"An ingredient’s history","description":"What happened to one ingredient in a period (up to 31 days): deliveries in (supplier, price, storage), what sales took day by day (by today’s recipes), moves between storages; with its stock now. Needs Inventory in the plan.","tags":["Stock"],"parameters":[{"name":"id","in":"path","required":true,"description":"The ingredient id (from /inventory)","schema":{"type":"string"},"example":"9c1e…"},{"name":"from","in":"query","required":false,"description":"YYYY-MM-DD","schema":{"type":"string"},"example":"2026-10-01"},{"name":"to","in":"query","required":false,"description":"YYYY-MM-DD (default: today)","schema":{"type":"string"},"example":"2026-10-07"}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"9c1e…","name":"Rice noodles","unit":"kg","stockNow":6.4,"averageCost":1.8,"from":"2026-10-01","to":"2026-10-07","delivered":10,"usedBySales":7.2,"moves":[{"date":"2026-10-02","type":"delivery","quantity":10,"price":1.8,"supplier":"Lucky Market","storage":"Main"},{"date":"2026-10-02","type":"sales","quantity":-1.2,"receipts":12},{"date":"2026-10-03","type":"move","quantity":2,"from":"Main","to":"Bar"}]}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/suppliers":{"get":{"operationId":"list_suppliers","summary":"Suppliers","description":"Every supplier with their contacts.","tags":["Stock"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"suppliers":[{"id":"4b7a…","name":"Green Valley Farm","phone":"+1 555 0142","email":"orders@greenvalley.example","address":"","notes":"","active":true}]}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}},"post":{"operationId":"create_supplier","summary":"Add a supplier","description":"A new supplier. One with the same name is given back as it is. Webhook: supplier.created. Needs a write key allowed to change Stock & supplies.","tags":["Stock"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Up to 80 characters"},"phone":{"type":"string","description":"Phone"},"email":{"type":"string","description":"Email"},"address":{"type":"string","description":"Address"},"notes":{"type":"string","description":"Notes"}},"required":["name"]},"example":{"name":"Green Valley Farm","phone":"+1 555 0142"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"4b7a…","name":"Green Valley Farm","phone":"+1 555 0142","email":"","address":"","notes":"","active":true}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/supplies":{"get":{"operationId":"list_supplies","summary":"Supplies","description":"Deliveries by date, newest first: what came, at what price, the total, what is paid and what is still owed.","tags":["Stock"],"parameters":[{"name":"from","in":"query","required":false,"description":"YYYY-MM-DD (default: today)","schema":{"type":"string"},"example":"2026-10-01"},{"name":"to","in":"query","required":false,"description":"YYYY-MM-DD (up to 366 days)","schema":{"type":"string"},"example":"2026-10-07"}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"from":"2026-10-01","to":"2026-10-07","supplies":[{"id":"e2f0…","date":"2026-10-07T09:30","supplier":"Green Valley Farm","storage":"Main storage","status":"draft","items":[{"ingredientId":"chicken","quantity":5,"price":4.8}],"deliveryFee":0,"commission":0,"total":24,"paid":24,"unpaid":0,"accountId":"cash","comment":"via API · Purchasing","externalId":"INV-2041"}]}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}},"post":{"operationId":"create_supply","summary":"Add a supply","description":"A delivery from a supplier — from a purchasing app or the supplier's invoice. By default a draft: someone checks it on the website and receives it. status: \"received\" adds the stock at once; a received supply can then only be corrected on the website, never removed. Webhooks: supply.created (and supply.received). Needs a write key allowed to change Stock & supplies.","tags":["Stock"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"supplierId":{"type":"string","description":"The supplier's id or name (GET /suppliers)"},"items":{"type":"array","description":"[{ ingredientId, quantity, price }] — the price of one unit (kg, l or piece); 1–200"},"status":{"type":"string","description":"Default draft"},"date":{"type":"string","description":"YYYY-MM-DD or YYYY-MM-DDTHH:MM, up to a year back (default: now)"},"storage":{"type":"string","description":"Where it goes (default: the first storage)"},"deliveryFee":{"type":"number","description":"Added to what is owed"},"commission":{"type":"number","description":"Added to what is owed"},"paid":{"type":"number","description":"Paid already (at most the total); needs accountId"},"accountId":{"type":"string","description":"Paid from this account (GET /finance)"},"comment":{"type":"string","description":"Up to 300 characters"},"externalId":{"type":"string","description":"Your id for it: sending it again gives back the same supply"}},"required":["supplierId","items"]},"example":{"supplierId":"Green Valley Farm","items":[{"ingredientId":"chicken","quantity":5,"price":4.8}],"paid":24,"accountId":"cash","externalId":"INV-2041"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"e2f0…","date":"2026-10-07T09:30","supplier":"Green Valley Farm","storage":"Main storage","status":"draft","items":[{"ingredientId":"chicken","quantity":5,"price":4.8}],"deliveryFee":0,"commission":0,"total":24,"paid":24,"unpaid":0,"accountId":"cash","comment":"via API · Purchasing","externalId":"INV-2041"}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/supplies/{id}/receive":{"post":{"operationId":"receive_supply","summary":"Receive a supply","description":"A draft supply received: its stock is added. Already received: given back as it is. Webhook: supply.received. Needs a write key allowed to change Stock & supplies.","tags":["Stock"],"parameters":[{"name":"id","in":"path","required":true,"description":"The supply id","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"e2f0…","date":"2026-10-07T09:30","supplier":"Green Valley Farm","storage":"Main storage","status":"received","items":[{"ingredientId":"chicken","quantity":5,"price":4.8}],"deliveryFee":0,"commission":0,"total":24,"paid":24,"unpaid":0,"accountId":"cash","comment":"via API · Purchasing","externalId":"INV-2041"}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/write-offs":{"get":{"operationId":"list_write_offs","summary":"Write-offs","description":"Stock written off between two days, newest first: from which storage, why, what and how much, and what it cost (at the average cost then).","tags":["Stock"],"parameters":[{"name":"from","in":"query","required":false,"description":"YYYY-MM-DD (default: 7 days ago)","schema":{"type":"string"}},{"name":"to","in":"query","required":false,"description":"YYYY-MM-DD (default: today)","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"from":"2026-10-01","to":"2026-10-07","writeOffs":[{"id":"7b1c…","date":"2026-10-07T22:10","storage":"Main storage","reason":"Spoiled","comment":"Fridge failed overnight","value":14.6,"items":[{"ingredientId":"chicken","quantity":1.2},{"dishId":"pad-thai","quantity":2}]}]}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}},"post":{"operationId":"write_off_stock","summary":"Write off stock","description":"Stock that left without being sold — spoiled, expired, broken, a staff meal. Products, preparations or dishes (a dish takes what its recipe uses) leave the storage; never below zero. Kept, never changed or removed. Webhook: stock.written_off. Needs a write key allowed to change Stock & supplies.","tags":["Stock"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","description":"[{ ingredientId | preparationId | dishId, quantity }] — a product in its unit, a preparation in its unit, a dish in portions; 1–200"},"reason":{"type":"string","description":"Why: Spoiled, Expired, Damaged, Staff meal, Tasting, Lost or your own words (default: Other)"},"storage":{"type":"string","description":"Which storage it leaves (default: the first)"},"date":{"type":"string","description":"YYYY-MM-DD or YYYY-MM-DDTHH:MM, up to a year back (default: now)"},"comment":{"type":"string","description":"Up to 300 characters"},"externalId":{"type":"string","description":"Your id for it: sending it again gives back the same write-off"}},"required":["items"]},"example":{"reason":"Spoiled","items":[{"ingredientId":"chicken","quantity":1.2},{"dishId":"pad-thai","quantity":2}],"comment":"Fridge failed overnight"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"7b1c…","date":"2026-10-07T22:10","storage":"Main storage","reason":"Spoiled","comment":"Fridge failed overnight","value":14.6,"items":[{"ingredientId":"chicken","quantity":1.2},{"dishId":"pad-thai","quantity":2}]}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/finance":{"get":{"operationId":"get_finance","summary":"Accounts and categories","description":"The money accounts (cash drawer, bank, safe…) with today's balance, and the income and expense categories — the ids and names a transaction needs.","tags":["Money"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"accounts":[{"id":"cash","name":"Cash drawer","balance":412.5,"archived":false},{"id":"bank","name":"Bank account","balance":8240,"archived":false}],"categories":[{"id":"utilities","name":"Utilities","type":"expense"},{"id":"electricity","name":"Electricity","type":"expense","parentId":"utilities"},{"id":"salaries","name":"Salaries","type":"expense","parentId":"staff","needsEmployee":true}]}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/transactions":{"get":{"operationId":"list_transactions","summary":"Transactions","description":"Income, expenses and transfers by date, newest first (as in Finance → Transactions).","tags":["Money"],"parameters":[{"name":"from","in":"query","required":false,"description":"YYYY-MM-DD (default: today)","schema":{"type":"string"},"example":"2026-10-01"},{"name":"to","in":"query","required":false,"description":"YYYY-MM-DD (up to 366 days)","schema":{"type":"string"},"example":"2026-10-07"}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"from":"2026-10-01","to":"2026-10-07","transactions":[{"id":"tx-51d2…","date":"2026-10-07T10:15","type":"expense","category":"Electricity","amount":86.4,"accountId":"bank","comment":"September bill · via API · Accounting","externalId":"bank-7781"}]}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}},"post":{"operationId":"create_transaction","summary":"Add a transaction","description":"Income, an expense or a transfer between accounts — from your accounting or bank. The category is one of the restaurant's (GET /finance); salaries and advances need the employee. It cannot be removed later, only seen in Finance → Transactions with the key's name. Webhook: transaction.created. Needs a write key allowed to change Money.","tags":["Money"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"What it is"},"amount":{"type":"number","description":"More than 0, 2 decimals at most"},"accountId":{"type":"string","description":"The account (GET /finance); for a transfer, where the money comes from"},"toAccountId":{"type":"string","description":"Transfer: where the money goes"},"category":{"type":"string","description":"Income or expense: the category's name or id"},"employeeId":{"type":"string","description":"For staff categories (salaries, advances)"},"date":{"type":"string","description":"YYYY-MM-DD or YYYY-MM-DDTHH:MM, up to a year back (default: now)"},"comment":{"type":"string","description":"Up to 200 characters"},"externalId":{"type":"string","description":"Your id for it: sending it again gives back the same transaction"}},"required":["type","amount","accountId"]},"example":{"type":"expense","amount":86.4,"accountId":"bank","category":"Electricity","comment":"September bill","externalId":"bank-7781"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"id":"tx-51d2…","date":"2026-10-07T10:15","type":"expense","category":"Electricity","amount":86.4,"accountId":"bank","comment":"September bill · via API · Accounting","externalId":"bank-7781"}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/cash-drawer":{"get":{"operationId":"cash_drawer","summary":"Cash in the drawer now","description":"What should be in the drawer now, as on the Dashboard: the cash account in the books (closed shifts, cash expenses and transfers) plus the paid receipts whose shift is not closed yet. One entry per account that takes cash; expected is all of them.","tags":["Money"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"at":"2026-10-11T14:20:05","expected":512.4,"drawers":[{"accountId":"cash","account":"Cash","methods":["Cash"],"expected":512.4,"inBooks":300,"notInShift":212.4,"receiptsNotInShift":9}]}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/reports/dishes":{"get":{"operationId":"dish_margins","summary":"Margin by dish","description":"Each dish sold in a period (up to 31 days): how many, sales at its price (before order discounts), food cost by today’s recipes and the ingredients’ average cost, the margin and margin %. Most profitable first — what is best to sell.","tags":["Reports"],"parameters":[{"name":"from","in":"query","required":false,"description":"YYYY-MM-DD","schema":{"type":"string"},"example":"2026-10-01"},{"name":"to","in":"query","required":false,"description":"YYYY-MM-DD (default: today)","schema":{"type":"string"},"example":"2026-10-07"}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"from":"2026-10-01","to":"2026-10-07","sales":2821,"foodCost":812.4,"margin":2008.6,"dishes":[{"dishId":"pad-thai","name":"Pad Thai","quantity":64,"sales":416,"foodCost":118.2,"margin":297.8,"marginPercent":71.6}]}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/shifts":{"get":{"operationId":"list_shifts","summary":"Closed shifts","description":"Cash shifts closed on the tablets: who, when, the cash counted and expected (not who is at work now: GET /employees/on-shift).","tags":["Reports"],"parameters":[{"name":"from","in":"query","required":false,"description":"YYYY-MM-DD","schema":{"type":"string"}},{"name":"to","in":"query","required":false,"description":"YYYY-MM-DD","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"shifts":[{"id":"…","employeeName":"Dara","closedAt":"2026-10-07T23:02","counted":[{"method":"Cash","amount":412}],"expected":[{"method":"Cash","amount":412}]}]}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}},"/reports/sales":{"get":{"operationId":"sales_report","summary":"Sales report","description":"A period in numbers (paid orders): sales, receipts, the average bill, and sales by day, by hour, by dish, by waiter and by payment method.","tags":["Reports"],"parameters":[{"name":"from","in":"query","required":false,"description":"YYYY-MM-DD","schema":{"type":"string"},"example":"2026-10-01"},{"name":"to","in":"query","required":false,"description":"YYYY-MM-DD (up to 31 days)","schema":{"type":"string"},"example":"2026-10-07"}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"from":"2026-10-01","to":"2026-10-07","sales":2821,"receipts":147,"averageBill":19.19,"byDay":[{"date":"2026-10-01","sales":388}],"byHour":[{"hour":"12","sales":610}],"dishes":[{"name":"Iced latte","quantity":96,"sales":240}],"waiters":[{"name":"Dara","receipts":76,"sales":1490}],"paymentMethods":[{"method":"Cash","amount":1702}]}}}},"400":{"description":"A wrong request: {\"error\": \"…\"}"},"401":{"description":"No key, or a deleted one"},"403":{"description":"A read-only key writing, a key not allowed this area, or the plan has no API (or no Finance / Stock)"},"404":{"description":"Not found"},"409":{"description":"Not possible now (a dish off the menu, an order already closed)"},"429":{"description":"More than 120 requests a minute"}}}}}}