{"openapi":"3.1.0","info":{"title":"Smoky Pepper Core","description":"Source of truth for ingredients, recipes, menu items, prices, nutrition, and allergens.","version":"0.1.0"},"paths":{"/api/meta":{"get":{"tags":["meta"],"summary":"Meta","description":"Fixed vocabularies: units, ingredient kinds, nutrients, the EU 14 allergens, and menu languages.\n\n`lang` (th, ru, zh) translates the allergen labels for customers.","operationId":"meta_api_meta_get","parameters":[{"name":"lang","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lang"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audit":{"get":{"tags":["meta"],"summary":"Audit Log","description":"Recent changes, newest first. Each entry holds the full saved record.","operationId":"audit_log_api_audit_get","parameters":[{"name":"entity_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AuditEntry"},"title":"Response Audit Log Api Audit Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/suppliers":{"get":{"tags":["catalog"],"summary":"List Suppliers","operationId":"list_suppliers_api_suppliers_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SupplierOut"},"title":"Response List Suppliers Api Suppliers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["catalog"],"summary":"Create Supplier","operationId":"create_supplier_api_suppliers_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/suppliers/{supplier_id}":{"put":{"tags":["catalog"],"summary":"Update Supplier","operationId":"update_supplier_api_suppliers__supplier_id__put","parameters":[{"name":"supplier_id","in":"path","required":true,"schema":{"type":"string","title":"Supplier Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["catalog"],"summary":"Delete Supplier","operationId":"delete_supplier_api_suppliers__supplier_id__delete","parameters":[{"name":"supplier_id","in":"path","required":true,"schema":{"type":"string","title":"Supplier Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ingredients":{"get":{"tags":["catalog"],"summary":"List Ingredients","operationId":"list_ingredients_api_ingredients_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/IngredientSummary"},"title":"Response List Ingredients Api Ingredients Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["catalog"],"summary":"Create Ingredient","operationId":"create_ingredient_api_ingredients_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngredientIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngredientOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ingredients/{ingredient_id}":{"get":{"tags":["catalog"],"summary":"Get Ingredient","operationId":"get_ingredient_api_ingredients__ingredient_id__get","parameters":[{"name":"ingredient_id","in":"path","required":true,"schema":{"type":"string","title":"Ingredient Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngredientOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["catalog"],"summary":"Update Ingredient","operationId":"update_ingredient_api_ingredients__ingredient_id__put","parameters":[{"name":"ingredient_id","in":"path","required":true,"schema":{"type":"string","title":"Ingredient Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngredientUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngredientOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["catalog"],"summary":"Delete Ingredient","operationId":"delete_ingredient_api_ingredients__ingredient_id__delete","parameters":[{"name":"ingredient_id","in":"path","required":true,"schema":{"type":"string","title":"Ingredient Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ingredients/bulk-delete":{"post":{"tags":["catalog"],"summary":"Bulk Delete Ingredients","description":"Delete several unused ingredients. Ones still used by a recipe or menu item are skipped, not deleted.","operationId":"bulk_delete_ingredients_api_ingredients_bulk_delete_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/recipes":{"get":{"tags":["recipes"],"summary":"List Recipes","operationId":"list_recipes_api_recipes_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RecipeSummary"},"title":"Response List Recipes Api Recipes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["recipes"],"summary":"Create Recipe","operationId":"create_recipe_api_recipes_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipeIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/recipes/{recipe_id}":{"get":{"tags":["recipes"],"summary":"Get Recipe","operationId":"get_recipe_api_recipes__recipe_id__get","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"string","title":"Recipe Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["recipes"],"summary":"Update Recipe","operationId":"update_recipe_api_recipes__recipe_id__put","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"string","title":"Recipe Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipeUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["recipes"],"summary":"Delete Recipe","operationId":"delete_recipe_api_recipes__recipe_id__delete","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"string","title":"Recipe Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/org":{"get":{"tags":["menu"],"summary":"Get Org","operationId":"get_org_api_org_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/org/branches/{code}":{"put":{"tags":["menu"],"summary":"Update Branch","operationId":"update_branch_api_org_branches__code__put","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/org/channels/{code}":{"put":{"tags":["menu"],"summary":"Update Channel","operationId":"update_channel_api_org_channels__code__put","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/org/branch-channels":{"put":{"tags":["menu"],"summary":"Set Branch Channels","description":"Replace which channels each branch sells through.","operationId":"set_branch_channels_api_org_branch_channels_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BranchChannelEntry"},"title":"Entries"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/menu-items":{"get":{"tags":["menu"],"summary":"List Menu Items","operationId":"list_menu_items_api_menu_items_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MenuItemSummary"},"title":"Response List Menu Items Api Menu Items Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["menu"],"summary":"Create Menu Item","operationId":"create_menu_item_api_menu_items_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MenuItemIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MenuItemOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/menu-items/{item_id}":{"get":{"tags":["menu"],"summary":"Get Menu Item","operationId":"get_menu_item_api_menu_items__item_id__get","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MenuItemOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["menu"],"summary":"Update Menu Item","operationId":"update_menu_item_api_menu_items__item_id__put","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MenuItemUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MenuItemOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["menu"],"summary":"Delete Menu Item","operationId":"delete_menu_item_api_menu_items__item_id__delete","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/menu-items/{item_id}/approve":{"post":{"tags":["menu"],"summary":"Approve Menu Item","description":"Mark an item reviewed (approved for sale) without resending it. Undo by unticking\nReviewed on the item and saving it.","operationId":"approve_menu_item_api_menu_items__item_id__approve_post","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MenuItemApprove"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MenuItemSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/menu-items/{item_id}/duplicate":{"post":{"tags":["menu"],"summary":"Duplicate Menu Item","description":"Copy an item (new IDs everywhere) as a starting point for a variation.","operationId":"duplicate_menu_item_api_menu_items__item_id__duplicate_post","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MenuItemOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/menu":{"get":{"tags":["menu"],"summary":"Get Menu","description":"The menu one branch sells through one channel, with resolved prices.\n\nThis is the endpoint POS, web ordering, and delivery-app sync should read. Prices come\nfrom the price list in effect today, or from the list named by `price_list_id` (e.g. a\ndraft, to preview or print a menu before it's published). `lang` (th, ru, zh) translates\ncustomer-facing text, falling back to English per phrase; IDs and prices don't change.","operationId":"get_menu_api_menu_get","parameters":[{"name":"branch","in":"query","required":true,"schema":{"type":"string","title":"Branch"}},{"name":"channel","in":"query","required":true,"schema":{"type":"string","title":"Channel"}},{"name":"price_list_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price List Id"}},{"name":"lang","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lang"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolvedMenu"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/quote":{"post":{"tags":["menu"],"summary":"Post Quote","description":"Authoritative price (plus nutrition, allergens, and staff-only cost/margin) for configured items.\n\nStores nothing. Prices come from the price list in effect today (Bangkok), or a draft\nnamed by `price_list_id` for admin preview. Clients must charge `price_thb` only when\n`ready_for_checkout` is true, and should store each returned line (incl. `pricing`)\nas the immutable price snapshot of the order.","operationId":"post_quote_api_quote_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/calculate":{"post":{"tags":["menu"],"summary":"Calculate","description":"Totals for an amount of any ingredient or recipe.","operationId":"calculate_api_calculate_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalculateIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Totals"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/portions":{"get":{"tags":["pricing"],"summary":"List Portions","operationId":"list_portions_api_portions_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PortionOut"},"title":"Response List Portions Api Portions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["pricing"],"summary":"Create Portion","operationId":"create_portion_api_portions_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortionIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/portions/{portion_id}":{"get":{"tags":["pricing"],"summary":"Get Portion","operationId":"get_portion_api_portions__portion_id__get","parameters":[{"name":"portion_id","in":"path","required":true,"schema":{"type":"string","title":"Portion Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["pricing"],"summary":"Update Portion","operationId":"update_portion_api_portions__portion_id__put","parameters":[{"name":"portion_id","in":"path","required":true,"schema":{"type":"string","title":"Portion Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["pricing"],"summary":"Delete Portion","operationId":"delete_portion_api_portions__portion_id__delete","parameters":[{"name":"portion_id","in":"path","required":true,"schema":{"type":"string","title":"Portion Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/formats":{"get":{"tags":["pricing"],"summary":"List Formats","operationId":"list_formats_api_formats_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FormatOut"},"title":"Response List Formats Api Formats Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["pricing"],"summary":"Create Format","operationId":"create_format_api_formats_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormatIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormatOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/formats/{format_id}":{"get":{"tags":["pricing"],"summary":"Get Format","operationId":"get_format_api_formats__format_id__get","parameters":[{"name":"format_id","in":"path","required":true,"schema":{"type":"string","title":"Format Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormatOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["pricing"],"summary":"Update Format","operationId":"update_format_api_formats__format_id__put","parameters":[{"name":"format_id","in":"path","required":true,"schema":{"type":"string","title":"Format Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormatUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormatOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["pricing"],"summary":"Delete Format","operationId":"delete_format_api_formats__format_id__delete","parameters":[{"name":"format_id","in":"path","required":true,"schema":{"type":"string","title":"Format Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/pricing/check":{"get":{"tags":["pricing"],"summary":"Pricing Check","description":"Structural conflicts plus what generating a price list now would warn about. Errors first.","operationId":"pricing_check_api_pricing_check_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RuleFinding"},"title":"Response Pricing Check Api Pricing Check Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/pricing/policies":{"get":{"tags":["pricing"],"summary":"List Policies","operationId":"list_policies_api_pricing_policies_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PolicyOut"},"title":"Response List Policies Api Pricing Policies Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["pricing"],"summary":"Create Policy","description":"Policies are immutable: changing the curve, floor, rounding or uplifts creates a new version.","operationId":"create_policy_api_pricing_policies_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/price-lists":{"get":{"tags":["pricing"],"summary":"List Price Lists","operationId":"list_price_lists_api_price_lists_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PriceListSummary"},"title":"Response List Price Lists Api Price Lists Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["pricing"],"summary":"Create Price List","description":"New draft, generated from a policy and today's costs. Review it, then publish.","operationId":"create_price_list_api_price_lists_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceListIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/price-lists/active":{"get":{"tags":["pricing"],"summary":"Get Active Price List","operationId":"get_active_price_list_api_price_lists_active_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/price-lists/{list_id}":{"get":{"tags":["pricing"],"summary":"Get Price List","operationId":"get_price_list_api_price_lists__list_id__get","parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"integer","title":"List Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["pricing"],"summary":"Update Price List","description":"Rename a list or edit its notes. Works on published lists too: prices stay locked.","operationId":"update_price_list_api_price_lists__list_id__put","parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"integer","title":"List Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceListUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["pricing"],"summary":"Delete Price List","operationId":"delete_price_list_api_price_lists__list_id__delete","parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"integer","title":"List Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/price-lists/{list_id}/regenerate":{"post":{"tags":["pricing"],"summary":"Regenerate Price List","description":"Recalculate a draft from current costs, portions, formats and named items.","operationId":"regenerate_price_list_api_price_lists__list_id__regenerate_post","parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"integer","title":"List Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/price-lists/{list_id}/publish":{"post":{"tags":["pricing"],"summary":"Publish Price List","description":"Lock the whole list and make it live from `effective_from` (Bangkok date).","operationId":"publish_price_list_api_price_lists__list_id__publish_post","parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"integer","title":"List Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/pricing/overrides":{"get":{"tags":["pricing"],"summary":"List Overrides","operationId":"list_overrides_api_pricing_overrides_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OverrideOut"},"title":"Response List Overrides Api Pricing Overrides Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["pricing"],"summary":"Create Override","description":"A standing exact price. Takes effect in the next generated (and published) price list.","operationId":"create_override_api_pricing_overrides_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OverrideIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OverrideOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/pricing/overrides/{override_id}":{"put":{"tags":["pricing"],"summary":"Update Override","operationId":"update_override_api_pricing_overrides__override_id__put","parameters":[{"name":"override_id","in":"path","required":true,"schema":{"type":"integer","title":"Override Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OverrideIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OverrideOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["pricing"],"summary":"Delete Override","operationId":"delete_override_api_pricing_overrides__override_id__delete","parameters":[{"name":"override_id","in":"path","required":true,"schema":{"type":"integer","title":"Override Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/pricing/promotions":{"get":{"tags":["pricing"],"summary":"List Promotions","operationId":"list_promotions_api_pricing_promotions_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PromotionOut"},"title":"Response List Promotions Api Pricing Promotions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["pricing"],"summary":"Create Promotion","description":"Takes effect immediately for matching days (Asia/Bangkok).","operationId":"create_promotion_api_pricing_promotions_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromotionIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromotionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/pricing/promotions/{promotion_id}":{"put":{"tags":["pricing"],"summary":"Update Promotion","operationId":"update_promotion_api_pricing_promotions__promotion_id__put","parameters":[{"name":"promotion_id","in":"path","required":true,"schema":{"type":"string","title":"Promotion Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromotionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromotionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["pricing"],"summary":"Delete Promotion","operationId":"delete_promotion_api_pricing_promotions__promotion_id__delete","parameters":[{"name":"promotion_id","in":"path","required":true,"schema":{"type":"string","title":"Promotion Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/menu-items/{item_id}/adopt-build-pricing":{"post":{"tags":["pricing"],"summary":"Adopt Build Pricing","description":"Switch a legacy item to build pricing: an explicit administrator decision.\n\nSend the build definition (format + portion-based components/options) in `build`.\n`existing_prices` keeps the legacy default walk-in price as the named item's manual\nprice, or discards it. The item returns to draft until approved again, and the new\nprice only goes live through the next published price list.","operationId":"adopt_build_pricing_api_menu_items__item_id__adopt_build_pricing_post","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdoptBuildPricing"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MenuItemOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/translations":{"get":{"tags":["translations"],"summary":"List Languages","description":"Progress per language: how many menu phrases are reviewed, draft, or missing.","operationId":"list_languages_api_translations_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LanguageSummary"},"title":"Response List Languages Api Translations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/translations/{lang}":{"get":{"tags":["translations"],"summary":"Get Translations","description":"Every phrase the menu needs in one language (missing ones with `text` NULL), plus unused leftovers.","operationId":"get_translations_api_translations__lang__get","parameters":[{"name":"lang","in":"path","required":true,"schema":{"type":"string","title":"Lang"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranslationList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["translations"],"summary":"Save Translations","description":"Create, change or (with empty `text`) delete translations. Send `status: reviewed` once a person has checked one.","operationId":"save_translations_api_translations__lang__put","parameters":[{"name":"lang","in":"path","required":true,"schema":{"type":"string","title":"Lang"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TranslationIn"},"title":"Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranslationList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/login":{"post":{"tags":["auth"],"summary":"Login","description":"Sign in with username and password. Sets an HttpOnly session cookie.","operationId":"login_api_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","operationId":"logout_api_auth_logout_post","responses":{"204":{"description":"Successful Response"}}}},"/api/auth/me":{"get":{"tags":["auth"],"summary":"Me","description":"The signed-in user or API key. 401 when sign-in is required.","operationId":"me_api_auth_me_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/password":{"put":{"tags":["auth"],"summary":"Change Password","operationId":"change_password_api_auth_password_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordChange"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/users":{"get":{"tags":["auth"],"summary":"List Users","operationId":"list_users_api_users_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserOut"},"title":"Response List Users Api Users Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["auth"],"summary":"Create User","operationId":"create_user_api_users_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/users/{user_id}":{"put":{"tags":["auth"],"summary":"Update User","operationId":"update_user_api_users__user_id__put","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/api-keys":{"get":{"tags":["auth"],"summary":"List Api Keys","operationId":"list_api_keys_api_api_keys_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyOut"},"title":"Response List Api Keys Api Api Keys Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["auth"],"summary":"Create Api Key","description":"Create a key for a machine client. The key is returned once and never again.","operationId":"create_api_key_api_api_keys_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/api-keys/{key_id}":{"delete":{"tags":["auth"],"summary":"Revoke Api Key","description":"Revoke a key. Clients using it get 401 from then on.","operationId":"revoke_api_key_api_api_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","title":"Key Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health":{"get":{"tags":["meta"],"summary":"Health","operationId":"health_api_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/llms.txt":{"get":{"tags":["meta"],"summary":"Llms Txt","description":"Plain-text guide for LLM agents: what Core is, the rules for using its data, and every endpoint.","operationId":"llms_txt_api_llms_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"AdoptBuildPricing":{"properties":{"version":{"type":"integer","title":"Version"},"existing_prices":{"type":"string","enum":["keep_default_as_manual_price","discard"],"title":"Existing Prices","description":"Keep the legacy default (walk-in) price as the named item's manual price, or discard it"},"build":{"$ref":"#/components/schemas/MenuItemIn","description":"The build definition: format_id + portion-based components/options. Its `prices` and `manual_price_thb` are ignored; see existing_prices"}},"additionalProperties":false,"type":"object","required":["version","existing_prices","build"],"title":"AdoptBuildPricing","description":"Administrator decision when switching a legacy item to build pricing."},"AllergenEntry":{"properties":{"allergen":{"type":"string","title":"Allergen"},"level":{"type":"string","enum":["contains","may_contain"],"title":"Level","default":"contains"}},"additionalProperties":false,"type":"object","required":["allergen"],"title":"AllergenEntry"},"ApiKeyCreated":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"prefix":{"type":"string","title":"Prefix"},"scope":{"type":"string","enum":["read","write"],"title":"Scope"},"active":{"type":"boolean","title":"Active"},"created_by":{"type":"string","title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"key":{"type":"string","title":"Key","description":"Shown once. Store it in the client's environment; Core keeps only a hash."}},"additionalProperties":false,"type":"object","required":["id","name","prefix","scope","active","created_by","created_at","last_used_at","key"],"title":"ApiKeyCreated"},"ApiKeyIn":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"scope":{"type":"string","enum":["read","write"],"title":"Scope","default":"read"}},"additionalProperties":false,"type":"object","required":["name"],"title":"ApiKeyIn"},"ApiKeyOut":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"prefix":{"type":"string","title":"Prefix"},"scope":{"type":"string","enum":["read","write"],"title":"Scope"},"active":{"type":"boolean","title":"Active"},"created_by":{"type":"string","title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"}},"additionalProperties":false,"type":"object","required":["id","name","prefix","scope","active","created_by","created_at","last_used_at"],"title":"ApiKeyOut"},"AuditEntry":{"properties":{"id":{"type":"integer","title":"Id"},"at":{"type":"string","format":"date-time","title":"At"},"actor":{"type":"string","title":"Actor"},"entity_type":{"type":"string","title":"Entity Type"},"entity_id":{"type":"string","title":"Entity Id"},"action":{"type":"string","title":"Action"},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"}},"additionalProperties":false,"type":"object","required":["id","at","actor","entity_type","entity_id","action","data"],"title":"AuditEntry"},"AvailabilityIn":{"properties":{"branch_code":{"type":"string","title":"Branch Code"},"channel_code":{"type":"string","title":"Channel Code"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id","description":"Item ID in the Grab / LINE MAN merchant menu"}},"additionalProperties":false,"type":"object","required":["branch_code","channel_code"],"title":"AvailabilityIn"},"BlockedDelete":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"used_in":{"items":{"$ref":"#/components/schemas/UsageRef"},"type":"array","title":"Used In"}},"additionalProperties":false,"type":"object","required":["id","name","used_in"],"title":"BlockedDelete"},"BranchChannelEntry":{"properties":{"branch_code":{"type":"string","title":"Branch Code"},"channel_code":{"type":"string","title":"Channel Code"}},"additionalProperties":false,"type":"object","required":["branch_code","channel_code"],"title":"BranchChannelEntry"},"BranchOut":{"properties":{"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"sort_order":{"type":"integer","title":"Sort Order"},"active":{"type":"boolean","title":"Active"}},"additionalProperties":false,"type":"object","required":["code","name","sort_order","active"],"title":"BranchOut"},"BranchUpdate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"sort_order":{"type":"integer","title":"Sort Order","default":0},"active":{"type":"boolean","title":"Active","default":true}},"additionalProperties":false,"type":"object","required":["name"],"title":"BranchUpdate"},"BulkDeleteIn":{"properties":{"ids":{"items":{"type":"string"},"type":"array","maxItems":500,"minItems":1,"title":"Ids"}},"additionalProperties":false,"type":"object","required":["ids"],"title":"BulkDeleteIn"},"BulkDeleteOut":{"properties":{"deleted":{"items":{"type":"string"},"type":"array","title":"Deleted"},"blocked":{"items":{"$ref":"#/components/schemas/BlockedDelete"},"type":"array","title":"Blocked","description":"Still used by a recipe or menu item; deactivate instead"}},"additionalProperties":false,"type":"object","required":["deleted","blocked"],"title":"BulkDeleteOut"},"CalculateIn":{"properties":{"ingredient_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ingredient Id"},"recipe_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipe Id"},"quantity":{"type":"number","minimum":0.0,"title":"Quantity"},"unit":{"type":"string","enum":["g","ml","each"],"title":"Unit","default":"g"}},"additionalProperties":false,"type":"object","required":["quantity"],"title":"CalculateIn"},"ChannelOut":{"properties":{"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"commission_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Commission Pct"},"sort_order":{"type":"integer","title":"Sort Order"},"active":{"type":"boolean","title":"Active"}},"additionalProperties":false,"type":"object","required":["code","name","commission_pct","sort_order","active"],"title":"ChannelOut"},"ChannelUpdate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"commission_pct":{"anyOf":[{"type":"number","exclusiveMaximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Commission Pct"},"sort_order":{"type":"integer","title":"Sort Order","default":0},"active":{"type":"boolean","title":"Active","default":true}},"additionalProperties":false,"type":"object","required":["name"],"title":"ChannelUpdate"},"ChoiceGroupIn":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"min_choices":{"type":"integer","maximum":20.0,"minimum":0.0,"title":"Min Choices","default":0},"max_choices":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Max Choices","default":1},"options":{"items":{"$ref":"#/components/schemas/OptionIn"},"type":"array","title":"Options","default":[]}},"additionalProperties":false,"type":"object","required":["name"],"title":"ChoiceGroupIn"},"ChoiceGroupOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"min_choices":{"type":"integer","maximum":20.0,"minimum":0.0,"title":"Min Choices","default":0},"max_choices":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Max Choices","default":1},"options":{"items":{"$ref":"#/components/schemas/OptionOut"},"type":"array","title":"Options","default":[]}},"additionalProperties":false,"type":"object","required":["id","name"],"title":"ChoiceGroupOut"},"ComponentIn":{"properties":{"ingredient_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ingredient Id"},"recipe_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipe Id"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Existing component ID; keep it so saved orders stay valid"},"label":{"type":"string","maxLength":200,"minLength":1,"title":"Label"},"quantity":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Quantity"},"unit":{"type":"string","enum":["g","ml","each"],"title":"Unit","default":"g"},"removable":{"type":"boolean","title":"Removable","default":true},"portion_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Portion Id"},"portion_count":{"type":"number","maximum":20.0,"minimum":0.0,"title":"Portion Count","description":"Default number of portions in the preset","default":1},"min_count":{"type":"number","maximum":20.0,"minimum":0.0,"title":"Min Count","description":"0 = customer may remove it","default":0},"max_count":{"type":"number","maximum":20.0,"minimum":0.0,"title":"Max Count","default":1},"count_step":{"type":"number","maximum":20.0,"exclusiveMinimum":0.0,"title":"Count Step","description":"e.g. 0.5 allows half portions","default":1}},"additionalProperties":false,"type":"object","required":["label"],"title":"ComponentIn","description":"Legacy items: ingredient/recipe + quantity + removable.\nBuild items: portion_id × portion_count, adjustable from min_count to max_count in count_step."},"ComponentOut":{"properties":{"ingredient_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ingredient Id"},"recipe_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipe Id"},"id":{"type":"string","title":"Id"},"label":{"type":"string","maxLength":200,"minLength":1,"title":"Label"},"quantity":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Quantity"},"unit":{"type":"string","enum":["g","ml","each"],"title":"Unit","default":"g"},"removable":{"type":"boolean","title":"Removable","default":true},"portion_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Portion Id"},"portion_count":{"type":"number","maximum":20.0,"minimum":0.0,"title":"Portion Count","description":"Default number of portions in the preset","default":1},"min_count":{"type":"number","maximum":20.0,"minimum":0.0,"title":"Min Count","description":"0 = customer may remove it","default":0},"max_count":{"type":"number","maximum":20.0,"minimum":0.0,"title":"Max Count","default":1},"count_step":{"type":"number","maximum":20.0,"exclusiveMinimum":0.0,"title":"Count Step","description":"e.g. 0.5 allows half portions","default":1}},"additionalProperties":false,"type":"object","required":["id","label"],"title":"ComponentOut"},"EntryOut":{"properties":{"kind":{"type":"string","enum":["portion","format","menu_item"],"title":"Kind"},"target_id":{"type":"string","title":"Target Id"},"name":{"type":"string","title":"Name"},"branch_code":{"type":"string","title":"Branch Code"},"channel_code":{"type":"string","title":"Channel Code"},"price_thb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price Thb"},"active_price_thb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Active Price Thb","description":"Same entry in the active published list (for review)"},"change_thb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Change Thb"},"detail":{"additionalProperties":true,"type":"object","title":"Detail"}},"additionalProperties":false,"type":"object","required":["kind","target_id","name","branch_code","channel_code","price_thb","active_price_thb","change_thb","detail"],"title":"EntryOut"},"FormatDiscount":{"properties":{"thb":{"type":"integer","title":"Thb","description":"Subtracted from unit price × quantity"},"unit_bases_thb":{"items":{"type":"integer"},"type":"array","title":"Unit Bases Thb","description":"Base actually charged for each unit on this line"},"earlier_units":{"type":"integer","title":"Earlier Units","description":"Units of the same format on earlier lines of this order"},"promotion":{"anyOf":[{"$ref":"#/components/schemas/PromotionRef"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["thb","unit_bases_thb","earlier_units","promotion"],"title":"FormatDiscount","description":"Less format base for this line's units: multi-unit tiers or a running promotion."},"FormatIn":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"description":{"type":"string","title":"Description","default":""},"notes":{"type":"string","title":"Notes","default":""},"reviewed":{"type":"boolean","title":"Reviewed","description":"Fee approved","default":false},"active":{"type":"boolean","title":"Active","default":true},"inclusions":{"items":{"$ref":"#/components/schemas/InclusionIn"},"type":"array","title":"Inclusions","description":"Covered by the base: tortilla, foil, container…","default":[]},"base_value_thb":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Base Value Thb","description":"Walk-in base value; 0 = free; NULL = not set"},"additional_base_thb":{"anyOf":[{"items":{"type":"integer","maximum":100000.0,"minimum":0.0},"type":"array","maxItems":10},{"type":"null"}],"title":"Additional Base Thb","description":"Walk-in base for the 2nd, 3rd, … unit in one order; the last repeats. Tacos: [5, 0]"}},"additionalProperties":false,"type":"object","required":["name"],"title":"FormatIn","description":"Vessel / preparation (bowl, regular wrap, à la carte cup). Fee charged once per build."},"FormatOut":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"description":{"type":"string","title":"Description","default":""},"notes":{"type":"string","title":"Notes","default":""},"reviewed":{"type":"boolean","title":"Reviewed","description":"Fee approved","default":false},"active":{"type":"boolean","title":"Active","default":true},"inclusions":{"items":{"$ref":"#/components/schemas/InclusionOut"},"type":"array","title":"Inclusions","default":[]},"base_value_thb":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Base Value Thb","description":"Walk-in base value; 0 = free; NULL = not set"},"additional_base_thb":{"anyOf":[{"items":{"type":"integer","maximum":100000.0,"minimum":0.0},"type":"array","maxItems":10},{"type":"null"}],"title":"Additional Base Thb","description":"Walk-in base for the 2nd, 3rd, … unit in one order; the last repeats. Tacos: [5, 0]"},"id":{"type":"string","title":"Id"},"version":{"type":"integer","title":"Version"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"included":{"$ref":"#/components/schemas/Totals","description":"Nutrition and internal cost of the inclusions"},"published":{"additionalProperties":{"anyOf":[{"type":"integer"},{"type":"null"}]},"type":"object","title":"Published","description":"Channel -> base in the active price list","default":{}},"used_in":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Used In","default":[]}},"additionalProperties":false,"type":"object","required":["name","id","version","created_at","updated_at","included"],"title":"FormatOut"},"FormatUpdate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"description":{"type":"string","title":"Description","default":""},"notes":{"type":"string","title":"Notes","default":""},"reviewed":{"type":"boolean","title":"Reviewed","description":"Fee approved","default":false},"active":{"type":"boolean","title":"Active","default":true},"inclusions":{"items":{"$ref":"#/components/schemas/InclusionIn"},"type":"array","title":"Inclusions","description":"Covered by the base: tortilla, foil, container…","default":[]},"base_value_thb":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Base Value Thb","description":"Walk-in base value; 0 = free; NULL = not set"},"additional_base_thb":{"anyOf":[{"items":{"type":"integer","maximum":100000.0,"minimum":0.0},"type":"array","maxItems":10},{"type":"null"}],"title":"Additional Base Thb","description":"Walk-in base for the 2nd, 3rd, … unit in one order; the last repeats. Tacos: [5, 0]"},"version":{"type":"integer","title":"Version"}},"additionalProperties":false,"type":"object","required":["name","version"],"title":"FormatUpdate"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InclusionIn":{"properties":{"ingredient_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ingredient Id"},"recipe_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipe Id"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"label":{"type":"string","maxLength":200,"minLength":1,"title":"Label"},"quantity":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Quantity"},"unit":{"type":"string","enum":["g","ml","each"],"title":"Unit","default":"g"}},"additionalProperties":false,"type":"object","required":["label"],"title":"InclusionIn"},"InclusionOut":{"properties":{"ingredient_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ingredient Id"},"recipe_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipe Id"},"id":{"type":"string","title":"Id"},"label":{"type":"string","maxLength":200,"minLength":1,"title":"Label"},"quantity":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Quantity"},"unit":{"type":"string","enum":["g","ml","each"],"title":"Unit","default":"g"}},"additionalProperties":false,"type":"object","required":["id","label"],"title":"InclusionOut"},"IngredientIn":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"kind":{"type":"string","enum":["food","packaging","supply","labor"],"title":"Kind","default":"food"},"category":{"type":"string","title":"Category","default":""},"base_unit":{"type":"string","enum":["g","ml","each"],"title":"Base Unit","default":"g"},"grams_per_unit":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Grams Per Unit","description":"g per ml (density) or g per each (piece weight)"},"kcal":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Kcal"},"protein_g":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Protein G"},"carbohydrate_g":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Carbohydrate G"},"fat_g":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Fat G"},"fiber_g":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Fiber G"},"sugar_g":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Sugar G"},"nutrition_source":{"type":"string","title":"Nutrition Source","default":""},"nutrition_reviewed":{"type":"boolean","title":"Nutrition Reviewed","default":false},"allergens_reviewed":{"type":"boolean","title":"Allergens Reviewed","default":false},"allergens":{"items":{"$ref":"#/components/schemas/AllergenEntry"},"type":"array","title":"Allergens","default":[]},"purchase_options":{"items":{"$ref":"#/components/schemas/PurchaseOptionIn"},"type":"array","title":"Purchase Options","default":[]},"pricing_cost_thb":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Pricing Cost Thb","description":"Food only: cost per kg / L / piece that menu prices are calculated from instead of the purchase price"},"notes":{"type":"string","title":"Notes","default":""},"active":{"type":"boolean","title":"Active","default":true}},"additionalProperties":false,"type":"object","required":["name"],"title":"IngredientIn"},"IngredientOut":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"kind":{"type":"string","enum":["food","packaging","supply","labor"],"title":"Kind","default":"food"},"category":{"type":"string","title":"Category","default":""},"base_unit":{"type":"string","enum":["g","ml","each"],"title":"Base Unit","default":"g"},"grams_per_unit":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Grams Per Unit","description":"g per ml (density) or g per each (piece weight)"},"kcal":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Kcal"},"protein_g":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Protein G"},"carbohydrate_g":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Carbohydrate G"},"fat_g":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Fat G"},"fiber_g":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Fiber G"},"sugar_g":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Sugar G"},"nutrition_source":{"type":"string","title":"Nutrition Source","default":""},"nutrition_reviewed":{"type":"boolean","title":"Nutrition Reviewed","default":false},"allergens_reviewed":{"type":"boolean","title":"Allergens Reviewed","default":false},"allergens":{"items":{"$ref":"#/components/schemas/AllergenEntry"},"type":"array","title":"Allergens","default":[]},"purchase_options":{"items":{"$ref":"#/components/schemas/PurchaseOptionOut"},"type":"array","title":"Purchase Options","default":[]},"pricing_cost_thb":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Pricing Cost Thb","description":"Food only: cost per kg / L / piece that menu prices are calculated from instead of the purchase price"},"notes":{"type":"string","title":"Notes","default":""},"active":{"type":"boolean","title":"Active","default":true},"id":{"type":"string","title":"Id"},"version":{"type":"integer","title":"Version"},"unit_cost_thb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unit Cost Thb"},"legacy_inventory_item_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Legacy Inventory Item Id"},"source":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Source"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"used_in":{"items":{"$ref":"#/components/schemas/UsageRef"},"type":"array","title":"Used In","default":[]},"per_basis":{"anyOf":[{"$ref":"#/components/schemas/Totals"},{"type":"null"}],"description":"Totals for 100 g / 100 ml / 1 each"}},"additionalProperties":false,"type":"object","required":["name","id","version","unit_cost_thb","created_at","updated_at"],"title":"IngredientOut"},"IngredientSummary":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"kind":{"type":"string","title":"Kind"},"category":{"type":"string","title":"Category"},"base_unit":{"type":"string","title":"Base Unit"},"grams_per_unit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Grams Per Unit"},"unit_cost_thb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unit Cost Thb","description":"Baht per base unit from the default purchase option"},"nutrition_complete":{"type":"boolean","title":"Nutrition Complete"},"nutrition_reviewed":{"type":"boolean","title":"Nutrition Reviewed"},"allergens_reviewed":{"type":"boolean","title":"Allergens Reviewed"},"allergens":{"items":{"$ref":"#/components/schemas/AllergenEntry"},"type":"array","title":"Allergens"},"active":{"type":"boolean","title":"Active"},"version":{"type":"integer","title":"Version"}},"additionalProperties":false,"type":"object","required":["id","name","kind","category","base_unit","grams_per_unit","unit_cost_thb","nutrition_complete","nutrition_reviewed","allergens_reviewed","allergens","active","version"],"title":"IngredientSummary"},"IngredientUpdate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"kind":{"type":"string","enum":["food","packaging","supply","labor"],"title":"Kind","default":"food"},"category":{"type":"string","title":"Category","default":""},"base_unit":{"type":"string","enum":["g","ml","each"],"title":"Base Unit","default":"g"},"grams_per_unit":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Grams Per Unit","description":"g per ml (density) or g per each (piece weight)"},"kcal":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Kcal"},"protein_g":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Protein G"},"carbohydrate_g":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Carbohydrate G"},"fat_g":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Fat G"},"fiber_g":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Fiber G"},"sugar_g":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Sugar G"},"nutrition_source":{"type":"string","title":"Nutrition Source","default":""},"nutrition_reviewed":{"type":"boolean","title":"Nutrition Reviewed","default":false},"allergens_reviewed":{"type":"boolean","title":"Allergens Reviewed","default":false},"allergens":{"items":{"$ref":"#/components/schemas/AllergenEntry"},"type":"array","title":"Allergens","default":[]},"purchase_options":{"items":{"$ref":"#/components/schemas/PurchaseOptionIn"},"type":"array","title":"Purchase Options","default":[]},"pricing_cost_thb":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Pricing Cost Thb","description":"Food only: cost per kg / L / piece that menu prices are calculated from instead of the purchase price"},"notes":{"type":"string","title":"Notes","default":""},"active":{"type":"boolean","title":"Active","default":true},"version":{"type":"integer","title":"Version"}},"additionalProperties":false,"type":"object","required":["name","version"],"title":"IngredientUpdate"},"InternalOut":{"properties":{"food_cost_thb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Food Cost Thb"},"packaging_cost_thb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Packaging Cost Thb"},"commission_thb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Commission Thb"},"net_revenue_thb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Net Revenue Thb","description":"Price after channel commission"},"margin_thb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Margin Thb","description":"Net revenue minus food and packaging cost"},"food_cost_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Food Cost Pct"},"margin_at_component_price_thb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Margin At Component Price Thb"},"issues":{"items":{"type":"string"},"type":"array","title":"Issues","default":[]}},"type":"object","required":["food_cost_thb","packaging_cost_thb","commission_thb","net_revenue_thb","margin_thb","food_cost_pct"],"title":"InternalOut","description":"Staff-only economics. Not for customers; never used to set prices."},"LanguageSummary":{"properties":{"lang":{"type":"string","title":"Lang"},"language":{"type":"string","title":"Language"},"used":{"type":"integer","title":"Used","description":"English phrases the active menu needs"},"reviewed":{"type":"integer","title":"Reviewed"},"draft":{"type":"integer","title":"Draft"},"missing":{"type":"integer","title":"Missing"}},"additionalProperties":false,"type":"object","required":["lang","language","used","reviewed","draft","missing"],"title":"LanguageSummary"},"LoginIn":{"properties":{"username":{"type":"string","maxLength":60,"title":"Username"},"password":{"type":"string","maxLength":200,"title":"Password"}},"additionalProperties":false,"type":"object","required":["username","password"],"title":"LoginIn"},"MeOut":{"properties":{"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"role":{"type":"string","title":"Role","description":"owner | manager | read | write | local"},"auth_required":{"type":"boolean","title":"Auth Required"}},"additionalProperties":false,"type":"object","required":["name","display_name","role","auth_required"],"title":"MeOut"},"MenuItemApprove":{"properties":{"version":{"type":"integer","title":"Version"}},"additionalProperties":false,"type":"object","required":["version"],"title":"MenuItemApprove"},"MenuItemIn":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"category":{"type":"string","title":"Category","default":""},"menu_code":{"type":"string","maxLength":10,"pattern":"^[A-Z0-9-]*$","title":"Menu Code","description":"Menu number on the printed menu and tickets (B1, W6, BR-2); shared by every size and configuration of one special; empty = not numbered","default":""},"description":{"type":"string","title":"Description","default":""},"sort_order":{"type":"integer","title":"Sort Order","default":0},"notes":{"type":"string","title":"Notes","default":""},"reviewed":{"type":"boolean","title":"Reviewed","description":"Approved for sale (required for checkout readiness)","default":false},"active":{"type":"boolean","title":"Active","default":true},"pricing_mode":{"anyOf":[{"type":"string","enum":["legacy","build"]},{"type":"null"}],"title":"Pricing Mode","description":"Omit to keep the current mode (new items: build). Switch legacy items via /adopt-build-pricing"},"format_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format Id","description":"Build items: the vessel/preparation whose base is charged once"},"bundle_adjustment_thb":{"type":"integer","maximum":5000.0,"minimum":-5000.0,"title":"Bundle Adjustment Thb","description":"Build items: added to the build price of the unmodified item (usually ≤ 0). Walk-in baht; channel uplift applied","default":0},"manual_price_thb":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Manual Price Thb","description":"Build items: deliberate walk-in price for the unmodified item, replacing build + adjustment"},"available_from":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Available From","description":"Served from this time (Asia/Bangkok, inclusive). NULL = from opening"},"available_until":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Available Until","description":"Served until this time (Asia/Bangkok, exclusive: 17:00 = orders up to 16:59). NULL = until closing"},"components":{"items":{"$ref":"#/components/schemas/ComponentIn"},"type":"array","title":"Components","default":[]},"choice_groups":{"items":{"$ref":"#/components/schemas/ChoiceGroupIn"},"type":"array","title":"Choice Groups","default":[]},"availability":{"items":{"$ref":"#/components/schemas/AvailabilityIn"},"type":"array","title":"Availability","default":[]},"prices":{"items":{"$ref":"#/components/schemas/PriceIn"},"type":"array","title":"Prices","description":"Legacy items only: fixed selling price","default":[]}},"additionalProperties":false,"type":"object","required":["name"],"title":"MenuItemIn"},"MenuItemOut":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"category":{"type":"string","title":"Category","default":""},"menu_code":{"type":"string","maxLength":10,"pattern":"^[A-Z0-9-]*$","title":"Menu Code","description":"Menu number on the printed menu and tickets (B1, W6, BR-2); shared by every size and configuration of one special; empty = not numbered","default":""},"description":{"type":"string","title":"Description","default":""},"sort_order":{"type":"integer","title":"Sort Order","default":0},"notes":{"type":"string","title":"Notes","default":""},"reviewed":{"type":"boolean","title":"Reviewed","description":"Approved for sale (required for checkout readiness)","default":false},"active":{"type":"boolean","title":"Active","default":true},"pricing_mode":{"type":"string","enum":["legacy","build"],"title":"Pricing Mode"},"format_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format Id","description":"Build items: the vessel/preparation whose base is charged once"},"bundle_adjustment_thb":{"type":"integer","maximum":5000.0,"minimum":-5000.0,"title":"Bundle Adjustment Thb","description":"Build items: added to the build price of the unmodified item (usually ≤ 0). Walk-in baht; channel uplift applied","default":0},"manual_price_thb":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Manual Price Thb","description":"Build items: deliberate walk-in price for the unmodified item, replacing build + adjustment"},"available_from":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Available From","description":"Served from this time (Asia/Bangkok, inclusive). NULL = from opening"},"available_until":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Available Until","description":"Served until this time (Asia/Bangkok, exclusive: 17:00 = orders up to 16:59). NULL = until closing"},"components":{"items":{"$ref":"#/components/schemas/ComponentOut"},"type":"array","title":"Components","default":[]},"choice_groups":{"items":{"$ref":"#/components/schemas/ChoiceGroupOut"},"type":"array","title":"Choice Groups","default":[]},"availability":{"items":{"$ref":"#/components/schemas/AvailabilityIn"},"type":"array","title":"Availability","default":[]},"prices":{"items":{"$ref":"#/components/schemas/PriceIn"},"type":"array","title":"Prices","description":"Legacy items only: fixed selling price","default":[]},"id":{"type":"string","title":"Id"},"version":{"type":"integer","title":"Version"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"default_build":{"$ref":"#/components/schemas/Totals","description":"Base build with default choices (price-independent)"}},"additionalProperties":false,"type":"object","required":["name","pricing_mode","id","version","created_at","updated_at","default_build"],"title":"MenuItemOut"},"MenuItemSummary":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"category":{"type":"string","title":"Category"},"menu_code":{"type":"string","title":"Menu Code","default":""},"sort_order":{"type":"integer","title":"Sort Order"},"reviewed":{"type":"boolean","title":"Reviewed"},"active":{"type":"boolean","title":"Active"},"version":{"type":"integer","title":"Version"},"pricing_mode":{"type":"string","title":"Pricing Mode"},"availability":{"items":{"$ref":"#/components/schemas/AvailabilityIn"},"type":"array","title":"Availability"},"available_from":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Available From"},"available_until":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Available Until"},"default_build":{"$ref":"#/components/schemas/Totals"}},"additionalProperties":false,"type":"object","required":["id","name","category","sort_order","reviewed","active","version","pricing_mode","availability","default_build"],"title":"MenuItemSummary"},"MenuItemUpdate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"category":{"type":"string","title":"Category","default":""},"menu_code":{"type":"string","maxLength":10,"pattern":"^[A-Z0-9-]*$","title":"Menu Code","description":"Menu number on the printed menu and tickets (B1, W6, BR-2); shared by every size and configuration of one special; empty = not numbered","default":""},"description":{"type":"string","title":"Description","default":""},"sort_order":{"type":"integer","title":"Sort Order","default":0},"notes":{"type":"string","title":"Notes","default":""},"reviewed":{"type":"boolean","title":"Reviewed","description":"Approved for sale (required for checkout readiness)","default":false},"active":{"type":"boolean","title":"Active","default":true},"pricing_mode":{"anyOf":[{"type":"string","enum":["legacy","build"]},{"type":"null"}],"title":"Pricing Mode","description":"Omit to keep the current mode (new items: build). Switch legacy items via /adopt-build-pricing"},"format_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format Id","description":"Build items: the vessel/preparation whose base is charged once"},"bundle_adjustment_thb":{"type":"integer","maximum":5000.0,"minimum":-5000.0,"title":"Bundle Adjustment Thb","description":"Build items: added to the build price of the unmodified item (usually ≤ 0). Walk-in baht; channel uplift applied","default":0},"manual_price_thb":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Manual Price Thb","description":"Build items: deliberate walk-in price for the unmodified item, replacing build + adjustment"},"available_from":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Available From","description":"Served from this time (Asia/Bangkok, inclusive). NULL = from opening"},"available_until":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Available Until","description":"Served until this time (Asia/Bangkok, exclusive: 17:00 = orders up to 16:59). NULL = until closing"},"components":{"items":{"$ref":"#/components/schemas/ComponentIn"},"type":"array","title":"Components","default":[]},"choice_groups":{"items":{"$ref":"#/components/schemas/ChoiceGroupIn"},"type":"array","title":"Choice Groups","default":[]},"availability":{"items":{"$ref":"#/components/schemas/AvailabilityIn"},"type":"array","title":"Availability","default":[]},"prices":{"items":{"$ref":"#/components/schemas/PriceIn"},"type":"array","title":"Prices","description":"Legacy items only: fixed selling price","default":[]},"version":{"type":"integer","title":"Version"}},"additionalProperties":false,"type":"object","required":["name","version"],"title":"MenuItemUpdate"},"OptionIn":{"properties":{"ingredient_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ingredient Id"},"recipe_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipe Id"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"quantity":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Quantity"},"unit":{"type":"string","enum":["g","ml","each"],"title":"Unit","default":"g"},"is_default":{"type":"boolean","title":"Is Default","default":false},"max_quantity":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Max Quantity","default":1},"prices":{"items":{"$ref":"#/components/schemas/PriceIn"},"type":"array","title":"Prices","description":"Legacy items only: surcharge in baht; set 0 for no extra charge","default":[]},"portion_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Portion Id","description":"Build items: the portion this option adds per pick"},"portion_count":{"type":"number","maximum":20.0,"exclusiveMinimum":0.0,"title":"Portion Count","description":"Build items: portions per pick","default":1}},"additionalProperties":false,"type":"object","required":["name"],"title":"OptionIn"},"OptionOut":{"properties":{"ingredient_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ingredient Id"},"recipe_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipe Id"},"id":{"type":"string","title":"Id"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"quantity":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Quantity"},"unit":{"type":"string","enum":["g","ml","each"],"title":"Unit","default":"g"},"is_default":{"type":"boolean","title":"Is Default","default":false},"max_quantity":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Max Quantity","default":1},"prices":{"items":{"$ref":"#/components/schemas/PriceIn"},"type":"array","title":"Prices","description":"Legacy items only: surcharge in baht; set 0 for no extra charge","default":[]},"portion_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Portion Id","description":"Build items: the portion this option adds per pick"},"portion_count":{"type":"number","maximum":20.0,"exclusiveMinimum":0.0,"title":"Portion Count","description":"Build items: portions per pick","default":1}},"additionalProperties":false,"type":"object","required":["id","name"],"title":"OptionOut"},"OrgOut":{"properties":{"branches":{"items":{"$ref":"#/components/schemas/BranchOut"},"type":"array","title":"Branches"},"channels":{"items":{"$ref":"#/components/schemas/ChannelOut"},"type":"array","title":"Channels"},"branch_channels":{"items":{"$ref":"#/components/schemas/BranchChannelEntry"},"type":"array","title":"Branch Channels"}},"additionalProperties":false,"type":"object","required":["branches","channels","branch_channels"],"title":"OrgOut"},"OverrideIn":{"properties":{"kind":{"type":"string","enum":["portion","format","menu_item"],"title":"Kind"},"target_id":{"type":"string","title":"Target Id"},"branch_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Code"},"channel_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Code"},"price_thb":{"type":"integer","maximum":100000.0,"minimum":0.0,"title":"Price Thb"},"note":{"type":"string","title":"Note","default":""}},"additionalProperties":false,"type":"object","required":["kind","target_id","price_thb"],"title":"OverrideIn","description":"Exact price for one target, replacing the calculated one. NULL branch/channel = all."},"OverrideOut":{"properties":{"kind":{"type":"string","enum":["portion","format","menu_item"],"title":"Kind"},"target_id":{"type":"string","title":"Target Id"},"branch_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Code"},"channel_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Code"},"price_thb":{"type":"integer","maximum":100000.0,"minimum":0.0,"title":"Price Thb"},"note":{"type":"string","title":"Note","default":""},"id":{"type":"integer","title":"Id"},"target_name":{"type":"string","title":"Target Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"created_by":{"type":"string","title":"Created By"}},"additionalProperties":false,"type":"object","required":["kind","target_id","price_thb","id","target_name","created_at","created_by"],"title":"OverrideOut"},"PasswordChange":{"properties":{"current_password":{"type":"string","maxLength":200,"title":"Current Password"},"new_password":{"type":"string","maxLength":200,"minLength":10,"title":"New Password"}},"additionalProperties":false,"type":"object","required":["current_password","new_password"],"title":"PasswordChange"},"PolicyIn":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"anchors":{"items":{"items":{"type":"number"},"type":"array"},"type":"array","title":"Anchors","description":"[[cost, value], ...] increasing; ≥ 2 points"},"floor_thb":{"type":"integer","maximum":1000.0,"minimum":0.0,"title":"Floor Thb"},"round_to_thb":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Round To Thb"},"channel_uplift_pct":{"additionalProperties":{"type":"number"},"type":"object","title":"Channel Uplift Pct","description":"e.g. {\"grab\": 45, \"lineman\": 45}","default":{}},"branch_modifier_pct":{"additionalProperties":{"type":"number"},"type":"object","title":"Branch Modifier Pct","description":"Across-the-board % for premium branches, e.g. {\"SY\": 10}","default":{}},"basis_g":{"anyOf":[{"type":"integer","maximum":1000.0,"minimum":1.0},{"type":"null"}],"title":"Basis G","description":"100 = anchors are per 100 g and portions are valued by weight; NULL = per portion"},"size_anchors":{"anyOf":[{"items":{"items":{"type":"number"},"type":"array"},"type":"array"},{"type":"null"}],"title":"Size Anchors","description":"[[grams, factor], ...] portion-size multiplier for per-100 g policies, e.g. [[85, 1], [500, 0.9485]]"},"min_multiple":{"anyOf":[{"type":"number","maximum":20.0,"minimum":1.0},{"type":"null"}],"title":"Min Multiple","description":"No portion is valued below this multiple of its food cost (e.g. 1.3)"},"item_anchors":{"anyOf":[{"items":{"items":{"type":"number"},"type":"array"},"type":"array"},{"type":"null"}],"title":"Item Anchors","description":"[[food cost, value], ...] item curve for named items: format base + curve(food cost of its portions), capped at build-your-own, plus the bundle adjustment. NULL = build-your-own + adjustment"},"notes":{"type":"string","title":"Notes","default":""}},"additionalProperties":false,"type":"object","required":["name","anchors","floor_thb","round_to_thb"],"title":"PolicyIn"},"PolicyOut":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"anchors":{"items":{"items":{"type":"number"},"type":"array"},"type":"array","title":"Anchors","description":"[[cost, value], ...] increasing; ≥ 2 points"},"floor_thb":{"type":"integer","maximum":1000.0,"minimum":0.0,"title":"Floor Thb"},"round_to_thb":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Round To Thb"},"channel_uplift_pct":{"additionalProperties":{"type":"number"},"type":"object","title":"Channel Uplift Pct","description":"e.g. {\"grab\": 45, \"lineman\": 45}","default":{}},"branch_modifier_pct":{"additionalProperties":{"type":"number"},"type":"object","title":"Branch Modifier Pct","description":"Across-the-board % for premium branches, e.g. {\"SY\": 10}","default":{}},"basis_g":{"anyOf":[{"type":"integer","maximum":1000.0,"minimum":1.0},{"type":"null"}],"title":"Basis G","description":"100 = anchors are per 100 g and portions are valued by weight; NULL = per portion"},"size_anchors":{"anyOf":[{"items":{"items":{"type":"number"},"type":"array"},"type":"array"},{"type":"null"}],"title":"Size Anchors","description":"[[grams, factor], ...] portion-size multiplier for per-100 g policies, e.g. [[85, 1], [500, 0.9485]]"},"min_multiple":{"anyOf":[{"type":"number","maximum":20.0,"minimum":1.0},{"type":"null"}],"title":"Min Multiple","description":"No portion is valued below this multiple of its food cost (e.g. 1.3)"},"item_anchors":{"anyOf":[{"items":{"items":{"type":"number"},"type":"array"},"type":"array"},{"type":"null"}],"title":"Item Anchors","description":"[[food cost, value], ...] item curve for named items: format base + curve(food cost of its portions), capped at build-your-own, plus the bundle adjustment. NULL = build-your-own + adjustment"},"notes":{"type":"string","title":"Notes","default":""},"id":{"type":"integer","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"created_by":{"type":"string","title":"Created By"}},"additionalProperties":false,"type":"object","required":["name","anchors","floor_thb","round_to_thb","id","created_at","created_by"],"title":"PolicyOut"},"PortionIn":{"properties":{"ingredient_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ingredient Id"},"recipe_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipe Id"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name","description":"e.g. \"Chicken · 85 g\""},"quantity":{"type":"number","exclusiveMinimum":0.0,"title":"Quantity"},"unit":{"type":"string","enum":["g","ml","each"],"title":"Unit","default":"g"},"notes":{"type":"string","title":"Notes","default":""},"reviewed":{"type":"boolean","title":"Reviewed","description":"Definition checked","default":false},"active":{"type":"boolean","title":"Active","default":true},"pricing_mode":{"type":"string","enum":["automatic","fixed"],"title":"Pricing Mode","description":"automatic = policy curve on food cost","default":"automatic"},"fixed_value_thb":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Fixed Value Thb","description":"Walk-in value when fixed"},"minimum_value_thb":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Minimum Value Thb","description":"Overrides the policy floor"},"pricing_category":{"type":"string","title":"Pricing Category","default":""}},"additionalProperties":false,"type":"object","required":["name","quantity"],"title":"PortionIn","description":"One canonical sellable serving. Different quantities are different portions."},"PortionOut":{"properties":{"ingredient_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ingredient Id"},"recipe_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipe Id"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name","description":"e.g. \"Chicken · 85 g\""},"quantity":{"type":"number","exclusiveMinimum":0.0,"title":"Quantity"},"unit":{"type":"string","enum":["g","ml","each"],"title":"Unit","default":"g"},"notes":{"type":"string","title":"Notes","default":""},"reviewed":{"type":"boolean","title":"Reviewed","description":"Definition checked","default":false},"active":{"type":"boolean","title":"Active","default":true},"pricing_mode":{"type":"string","enum":["automatic","fixed"],"title":"Pricing Mode","description":"automatic = policy curve on food cost","default":"automatic"},"fixed_value_thb":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Fixed Value Thb","description":"Walk-in value when fixed"},"minimum_value_thb":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Minimum Value Thb","description":"Overrides the policy floor"},"pricing_category":{"type":"string","title":"Pricing Category","default":""},"id":{"type":"string","title":"Id"},"version":{"type":"integer","title":"Version"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"per_portion":{"$ref":"#/components/schemas/Totals","description":"Nutrition and internal food cost of one portion"},"suggested":{"anyOf":[{"$ref":"#/components/schemas/PortionValue"},{"type":"null"}],"description":"What the latest pricing policy would charge now"},"reference_100g":{"anyOf":[{"$ref":"#/components/schemas/PortionValue"},{"type":"null"}],"description":"This food as a 100 g portion under the latest policy (both curves, minimum multiple, floor); for comparison only"},"published":{"additionalProperties":{"anyOf":[{"type":"integer"},{"type":"null"}]},"type":"object","title":"Published","description":"Channel -> value in the active price list","default":{}},"used_in":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Used In","default":[]}},"additionalProperties":false,"type":"object","required":["name","quantity","id","version","created_at","updated_at","per_portion","suggested"],"title":"PortionOut"},"PortionUpdate":{"properties":{"ingredient_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ingredient Id"},"recipe_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipe Id"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name","description":"e.g. \"Chicken · 85 g\""},"quantity":{"type":"number","exclusiveMinimum":0.0,"title":"Quantity"},"unit":{"type":"string","enum":["g","ml","each"],"title":"Unit","default":"g"},"notes":{"type":"string","title":"Notes","default":""},"reviewed":{"type":"boolean","title":"Reviewed","description":"Definition checked","default":false},"active":{"type":"boolean","title":"Active","default":true},"pricing_mode":{"type":"string","enum":["automatic","fixed"],"title":"Pricing Mode","description":"automatic = policy curve on food cost","default":"automatic"},"fixed_value_thb":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Fixed Value Thb","description":"Walk-in value when fixed"},"minimum_value_thb":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Minimum Value Thb","description":"Overrides the policy floor"},"pricing_category":{"type":"string","title":"Pricing Category","default":""},"version":{"type":"integer","title":"Version"}},"additionalProperties":false,"type":"object","required":["name","quantity","version"],"title":"PortionUpdate"},"PortionValue":{"properties":{"mode":{"type":"string","title":"Mode"},"food_cost_thb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Food Cost Thb"},"curve_thb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Curve Thb","description":"Raw curve value before floor and rounding"},"floor_thb":{"type":"integer","title":"Floor Thb"},"value_thb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Value Thb","description":"Suggested walk-in value under the latest policy"},"issue":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Issue"},"grams":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Grams"},"basis_g":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Basis G","description":"100 = valued per 100 g (same markup for every size)"},"cost_per_basis_thb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Per Basis Thb"},"value_per_basis_thb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value Per Basis Thb","description":"Curve value per basis, before scaling to the portion"},"cost_multiple":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Multiple","description":"Food multiplier from the cost curve: value per basis ÷ (pricing) cost per basis"},"size_factor":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Size Factor","description":"Portion-size multiplier from the size curve"},"min_multiple_applied":{"type":"boolean","title":"Min Multiple Applied","description":"The policy's minimum multiple raised this value","default":false},"pricing_cost_thb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pricing Cost Thb","description":"The cost the curves ran on, when it differs from the food cost"}},"additionalProperties":false,"type":"object","required":["mode","food_cost_thb","curve_thb","floor_thb","value_thb","issue"],"title":"PortionValue"},"PriceIn":{"properties":{"channel_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Code"},"branch_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Code"},"price_thb":{"type":"integer","maximum":1000000.0,"minimum":0.0,"title":"Price Thb"}},"additionalProperties":false,"type":"object","required":["price_thb"],"title":"PriceIn","description":"Omit channel and branch for the default. Branch overrides need a channel."},"PriceListIn":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"policy_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Policy Id","description":"Defaults to the latest policy"},"notes":{"type":"string","title":"Notes","default":""}},"additionalProperties":false,"type":"object","required":["name"],"title":"PriceListIn"},"PriceListOut":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"status":{"type":"string","enum":["draft","published"],"title":"Status"},"effective_from":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Effective From"},"policy_id":{"type":"integer","title":"Policy Id"},"policy_name":{"type":"string","title":"Policy Name"},"notes":{"type":"string","title":"Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"generated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Generated At"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"published_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Published By"},"is_active":{"type":"boolean","title":"Is Active","description":"The published list quotes use today"},"entry_count":{"type":"integer","title":"Entry Count"},"entries":{"items":{"$ref":"#/components/schemas/EntryOut"},"type":"array","title":"Entries"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings","default":[]}},"additionalProperties":false,"type":"object","required":["id","name","status","effective_from","policy_id","policy_name","notes","created_at","generated_at","published_at","published_by","is_active","entry_count","entries"],"title":"PriceListOut"},"PriceListRef":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"status":{"type":"string","title":"Status"},"effective_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Effective From"},"policy_id":{"type":"integer","title":"Policy Id"}},"additionalProperties":false,"type":"object","required":["id","name","status","effective_from","policy_id"],"title":"PriceListRef"},"PriceListSummary":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"status":{"type":"string","enum":["draft","published"],"title":"Status"},"effective_from":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Effective From"},"policy_id":{"type":"integer","title":"Policy Id"},"policy_name":{"type":"string","title":"Policy Name"},"notes":{"type":"string","title":"Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"generated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Generated At"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"published_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Published By"},"is_active":{"type":"boolean","title":"Is Active","description":"The published list quotes use today"},"entry_count":{"type":"integer","title":"Entry Count"}},"additionalProperties":false,"type":"object","required":["id","name","status","effective_from","policy_id","policy_name","notes","created_at","generated_at","published_at","published_by","is_active","entry_count"],"title":"PriceListSummary"},"PriceListUpdate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"notes":{"type":"string","title":"Notes","default":""}},"additionalProperties":false,"type":"object","required":["name"],"title":"PriceListUpdate","description":"Name and notes only; allowed on published lists because they don't change any price."},"PricingFormat":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"version":{"type":"integer","title":"Version"},"fee_thb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fee Thb"}},"additionalProperties":false,"type":"object","required":["id","name","version","fee_thb"],"title":"PricingFormat"},"PricingLine":{"properties":{"kind":{"type":"string","enum":["component","option"],"title":"Kind"},"id":{"type":"string","title":"Id","description":"Component or option ID (stable)"},"group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group"},"name":{"type":"string","title":"Name"},"portion_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Portion Id"},"portion_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Portion Name"},"portions":{"type":"number","title":"Portions","description":"Total portions (option: portions per pick × picks)"},"picks":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Picks"},"unit_price_thb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Unit Price Thb","description":"Selling price of one portion (legacy: option surcharge)"},"amount_thb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount Thb"}},"additionalProperties":false,"type":"object","required":["kind","id","name","portion_id","portion_name","portions","unit_price_thb","amount_thb"],"title":"PricingLine","description":"One priced selection. amount = unit_price × portions (exact; may have .50)."},"PricingNamed":{"properties":{"eligible":{"type":"boolean","title":"Eligible","description":"Configuration equals the named item's defaults"},"applied":{"type":"boolean","title":"Applied","description":"The special price was charged: as is, or (changed) plus what was added"},"price_thb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price Thb"},"how":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"How","description":"build | bundle | manual"},"bundle_adjustment_thb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bundle Adjustment Thb","description":"Named price − build price, when applied"},"added_thb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Added Thb","description":"Changed special: value of what was added over the defaults (extra portions; a swap's difference; removals earn nothing)"},"guarded_price_thb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Guarded Price Thb","description":"Changed special: special price + added value. Charged unless building it yourself is cheaper"},"savings_thb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Savings Thb","description":"Build-your-own price − charged price"}},"additionalProperties":false,"type":"object","required":["eligible","applied","price_thb","how","bundle_adjustment_thb"],"title":"PricingNamed"},"PricingOut":{"properties":{"mode":{"type":"string","enum":["custom","named_item","changed_named_item","legacy_fixed"],"title":"Mode","description":"named_item = the special as is; changed_named_item = the special + added value (the special guard: changes never cost more than that); custom = build-your-own (cheaper, or no special)"},"price_list":{"anyOf":[{"$ref":"#/components/schemas/PriceListRef"},{"type":"null"}],"description":"The published price list the price came from"},"format":{"anyOf":[{"$ref":"#/components/schemas/PricingFormat"},{"type":"null"}]},"lines":{"items":{"$ref":"#/components/schemas/PricingLine"},"type":"array","title":"Lines"},"component_subtotal_thb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Component Subtotal Thb","description":"Format base + Σ lines, exact"},"rounding_thb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rounding Thb","description":"Half-up rounding to the price step"},"component_price_thb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Component Price Thb","description":"Build-your-own price of this configuration"},"named":{"$ref":"#/components/schemas/PricingNamed"},"unit_price_thb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Unit Price Thb","description":"Charged per unit. NULL = unknown; never sell"},"format_discount":{"anyOf":[{"$ref":"#/components/schemas/FormatDiscount"},{"type":"null"}]},"line_price_thb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Line Price Thb","description":"unit price × quantity − format discount"},"is_default_configuration":{"type":"boolean","title":"Is Default Configuration"},"configuration_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Configuration Key","description":"Stable fingerprint of the food configuration"},"ready_for_checkout":{"type":"boolean","title":"Ready For Checkout","description":"Price known and every price/item approved"},"blockers":{"items":{"type":"string"},"type":"array","title":"Blockers"},"versions":{"$ref":"#/components/schemas/PricingVersions"},"pricing_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pricing Version","description":"Fingerprint of every price input used; store with the order"}},"additionalProperties":false,"type":"object","required":["mode","price_list","format","lines","component_subtotal_thb","rounding_thb","component_price_thb","named","unit_price_thb","is_default_configuration","configuration_key","ready_for_checkout","blockers","versions","pricing_version"],"title":"PricingOut","description":"Customer-facing, authoritative selling price for ONE unit, and how it was reached."},"PricingVersions":{"properties":{"menu_item":{"type":"integer","title":"Menu Item"},"format":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Format"}},"additionalProperties":false,"type":"object","required":["menu_item","format"],"title":"PricingVersions"},"PromotionIn":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"format_id":{"type":"string","title":"Format Id"},"weekdays":{"items":{"type":"integer","maximum":7.0,"minimum":1.0},"type":"array","minItems":1,"title":"Weekdays","description":"ISO: 1 = Monday … 7 = Sunday"},"base_value_thb":{"type":"integer","maximum":100000.0,"minimum":0.0,"title":"Base Value Thb","description":"Walk-in base per unit; branch and channel modifiers apply","default":0},"branch_codes":{"items":{"type":"string"},"type":"array","title":"Branch Codes","description":"Empty = every branch","default":[]},"channel_codes":{"items":{"type":"string"},"type":"array","title":"Channel Codes","description":"Empty = every channel","default":[]},"starts_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Starts On"},"ends_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Ends On"},"active":{"type":"boolean","title":"Active","default":true},"notes":{"type":"string","title":"Notes","default":""}},"additionalProperties":false,"type":"object","required":["name","format_id","weekdays"],"title":"PromotionIn","description":"A recurring deal on a format. While it runs, each unit pays `base_value_thb` instead of\nthe format base and multi-unit tiers. Takes effect when saved (not part of a price list)."},"PromotionOut":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"format_id":{"type":"string","title":"Format Id"},"weekdays":{"items":{"type":"integer","maximum":7.0,"minimum":1.0},"type":"array","minItems":1,"title":"Weekdays","description":"ISO: 1 = Monday … 7 = Sunday"},"base_value_thb":{"type":"integer","maximum":100000.0,"minimum":0.0,"title":"Base Value Thb","description":"Walk-in base per unit; branch and channel modifiers apply","default":0},"branch_codes":{"items":{"type":"string"},"type":"array","title":"Branch Codes","description":"Empty = every branch","default":[]},"channel_codes":{"items":{"type":"string"},"type":"array","title":"Channel Codes","description":"Empty = every channel","default":[]},"starts_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Starts On"},"ends_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Ends On"},"active":{"type":"boolean","title":"Active","default":true},"notes":{"type":"string","title":"Notes","default":""},"id":{"type":"string","title":"Id"},"version":{"type":"integer","title":"Version"},"format_name":{"type":"string","title":"Format Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"additionalProperties":false,"type":"object","required":["name","format_id","weekdays","id","version","format_name","created_at","updated_at"],"title":"PromotionOut"},"PromotionRef":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"base_thb":{"type":"integer","title":"Base Thb","description":"Base charged per unit while it runs"}},"additionalProperties":false,"type":"object","required":["id","name","base_thb"],"title":"PromotionRef"},"PromotionUpdate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"format_id":{"type":"string","title":"Format Id"},"weekdays":{"items":{"type":"integer","maximum":7.0,"minimum":1.0},"type":"array","minItems":1,"title":"Weekdays","description":"ISO: 1 = Monday … 7 = Sunday"},"base_value_thb":{"type":"integer","maximum":100000.0,"minimum":0.0,"title":"Base Value Thb","description":"Walk-in base per unit; branch and channel modifiers apply","default":0},"branch_codes":{"items":{"type":"string"},"type":"array","title":"Branch Codes","description":"Empty = every branch","default":[]},"channel_codes":{"items":{"type":"string"},"type":"array","title":"Channel Codes","description":"Empty = every channel","default":[]},"starts_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Starts On"},"ends_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Ends On"},"active":{"type":"boolean","title":"Active","default":true},"notes":{"type":"string","title":"Notes","default":""},"version":{"type":"integer","title":"Version"}},"additionalProperties":false,"type":"object","required":["name","format_id","weekdays","version"],"title":"PromotionUpdate"},"PublishIn":{"properties":{"effective_from":{"type":"string","format":"date","title":"Effective From"}},"additionalProperties":false,"type":"object","required":["effective_from"],"title":"PublishIn"},"PurchaseOptionIn":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"supplier_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supplier Id"},"label":{"type":"string","maxLength":200,"minLength":1,"title":"Label"},"pack_quantity":{"type":"number","exclusiveMinimum":0.0,"title":"Pack Quantity","description":"Pack size in the ingredient's base unit"},"pack_price_thb":{"anyOf":[{"type":"integer","maximum":1000000.0,"minimum":0.0},{"type":"null"}],"title":"Pack Price Thb"},"product_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Url"},"is_default":{"type":"boolean","title":"Is Default","default":false},"active":{"type":"boolean","title":"Active","default":true}},"additionalProperties":false,"type":"object","required":["label","pack_quantity"],"title":"PurchaseOptionIn"},"PurchaseOptionOut":{"properties":{"id":{"type":"string","title":"Id"},"supplier_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supplier Id"},"label":{"type":"string","maxLength":200,"minLength":1,"title":"Label"},"pack_quantity":{"type":"number","exclusiveMinimum":0.0,"title":"Pack Quantity","description":"Pack size in the ingredient's base unit"},"pack_price_thb":{"anyOf":[{"type":"integer","maximum":1000000.0,"minimum":0.0},{"type":"null"}],"title":"Pack Price Thb"},"product_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Url"},"is_default":{"type":"boolean","title":"Is Default","default":false},"active":{"type":"boolean","title":"Active","default":true},"legacy_inventory_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Legacy Inventory Id"}},"additionalProperties":false,"type":"object","required":["id","label","pack_quantity"],"title":"PurchaseOptionOut"},"QuoteComponentOut":{"properties":{"nutrients":{"additionalProperties":{"anyOf":[{"type":"number"},{"type":"null"}]},"type":"object","title":"Nutrients"},"food_cost_thb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Food Cost Thb"},"packaging_cost_thb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Packaging Cost Thb"},"grams":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Grams"},"pricing_cost_thb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pricing Cost Thb","description":"Cost prices are calculated from (food cost unless a pricing cost is set)"},"allergens":{"additionalProperties":{"type":"string"},"type":"object","title":"Allergens"},"allergens_complete":{"type":"boolean","title":"Allergens Complete"},"nutrition_complete":{"type":"boolean","title":"Nutrition Complete"},"issues":{"items":{"type":"string"},"type":"array","title":"Issues"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"},"kind":{"type":"string","enum":["format","component","option"],"title":"Kind"},"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"quantity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Quantity"},"unit":{"type":"string","title":"Unit"}},"type":"object","required":["nutrients","food_cost_thb","packaging_cost_thb","grams","allergens","allergens_complete","nutrition_complete","issues","warnings","kind","id","label","quantity","unit"],"title":"QuoteComponentOut"},"QuoteIn":{"properties":{"branch_code":{"type":"string","title":"Branch Code"},"channel_code":{"type":"string","title":"Channel Code"},"lines":{"items":{"$ref":"#/components/schemas/QuoteLineIn"},"type":"array","maxItems":100,"minItems":1,"title":"Lines"},"price_list_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price List Id","description":"Preview a draft price list (admin). Omit for the active one"},"order_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Order Date","description":"Which day's promotions apply (admin preview). Omit for today in Bangkok"},"order_time":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Order Time","description":"Time of the order, Asia/Bangkok, for serving hours (admin preview). Omit for now in Bangkok"}},"additionalProperties":false,"type":"object","required":["branch_code","channel_code","lines"],"title":"QuoteIn"},"QuoteLineIn":{"properties":{"menu_item_id":{"type":"string","title":"Menu Item Id"},"quantity":{"type":"integer","maximum":99.0,"minimum":1.0,"title":"Quantity","description":"Identical items; never affects preset-override eligibility","default":1},"removed_component_ids":{"items":{"type":"string"},"type":"array","title":"Removed Component Ids","default":[]},"component_counts":{"additionalProperties":{"type":"number"},"type":"object","title":"Component Counts","description":"Build items: component ID -> portions (0 = removed). Omitted components keep their defaults","default":{}},"choices":{"items":{"$ref":"#/components/schemas/SelectionIn"},"type":"array","title":"Choices","description":"Groups left empty get their default options","default":[]}},"additionalProperties":false,"type":"object","required":["menu_item_id"],"title":"QuoteLineIn"},"QuoteLineOut":{"properties":{"menu_item_id":{"type":"string","title":"Menu Item Id"},"name":{"type":"string","title":"Name"},"menu_code":{"type":"string","title":"Menu Code","description":"Menu number to print on the ticket (B1, BR-2); empty = not numbered","default":""},"quantity":{"type":"integer","title":"Quantity"},"removed_component_ids":{"items":{"type":"string"},"type":"array","title":"Removed Component Ids"},"component_counts":{"additionalProperties":{"type":"number"},"type":"object","title":"Component Counts"},"choices":{"items":{"$ref":"#/components/schemas/SelectionIn"},"type":"array","title":"Choices"},"pricing":{"$ref":"#/components/schemas/PricingOut"},"unit_price_thb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Unit Price Thb"},"price_thb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price Thb"},"unit":{"$ref":"#/components/schemas/Totals","description":"Nutrition/allergens for one item as configured"},"totals":{"$ref":"#/components/schemas/Totals","description":"unit × quantity"},"components":{"items":{"$ref":"#/components/schemas/QuoteComponentOut"},"type":"array","title":"Components"},"internal":{"$ref":"#/components/schemas/InternalOut"}},"additionalProperties":false,"type":"object","required":["menu_item_id","name","quantity","removed_component_ids","component_counts","choices","pricing","unit_price_thb","price_thb","unit","totals","components","internal"],"title":"QuoteLineOut"},"QuoteOut":{"properties":{"branch":{"type":"string","title":"Branch"},"channel":{"type":"string","title":"Channel"},"lines":{"items":{"$ref":"#/components/schemas/QuoteLineOut"},"type":"array","title":"Lines"},"price_thb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price Thb"},"ready_for_checkout":{"type":"boolean","title":"Ready For Checkout","description":"Every line has an approved, known selling price"},"data_complete":{"type":"boolean","title":"Data Complete","description":"Nutrition, allergens and costs all known (independent of price)"},"totals":{"$ref":"#/components/schemas/Totals"},"internal":{"$ref":"#/components/schemas/InternalOut"}},"additionalProperties":false,"type":"object","required":["branch","channel","lines","price_thb","ready_for_checkout","data_complete","totals","internal"],"title":"QuoteOut"},"RecipeIn":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"category":{"type":"string","title":"Category","default":""},"yield_quantity":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Yield Quantity","description":"Measured finished output of one batch"},"yield_unit":{"type":"string","enum":["g","ml","each"],"title":"Yield Unit","default":"g"},"grams_per_unit":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Grams Per Unit"},"method":{"type":"string","title":"Method","default":""},"notes":{"type":"string","title":"Notes","default":""},"cost_override_thb":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Cost Override Thb","description":"Hand-set food cost per kg / L / piece of finished output; replaces the calculated cost (nutrition unaffected)"},"pricing_cost_thb":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Pricing Cost Thb","description":"Cost per kg / L / piece that menu prices are calculated from instead of the food cost (e.g. vendor-made, priced as if made in-house)"},"reviewed":{"type":"boolean","title":"Reviewed","default":false},"active":{"type":"boolean","title":"Active","default":true},"lines":{"items":{"$ref":"#/components/schemas/RecipeLineIn"},"type":"array","title":"Lines","default":[]}},"additionalProperties":false,"type":"object","required":["name"],"title":"RecipeIn"},"RecipeLineIn":{"properties":{"ingredient_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ingredient Id"},"recipe_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipe Id"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Existing line ID to keep it stable; omit for new lines"},"label":{"type":"string","title":"Label","default":""},"quantity":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Quantity"},"unit":{"type":"string","enum":["g","ml","each"],"title":"Unit","default":"g"},"note":{"type":"string","title":"Note","default":""},"discarded":{"type":"boolean","title":"Discarded","description":"Removed after cooking (e.g. rendered fat): nutrition is subtracted, cost is not","default":false}},"additionalProperties":false,"type":"object","title":"RecipeLineIn"},"RecipeLineOut":{"properties":{"ingredient_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ingredient Id"},"recipe_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipe Id"},"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label","default":""},"quantity":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Quantity"},"unit":{"type":"string","enum":["g","ml","each"],"title":"Unit","default":"g"},"note":{"type":"string","title":"Note","default":""},"discarded":{"type":"boolean","title":"Discarded","description":"Removed after cooking (e.g. rendered fat): nutrition is subtracted, cost is not","default":false},"totals":{"anyOf":[{"$ref":"#/components/schemas/Totals"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["id"],"title":"RecipeLineOut"},"RecipeOut":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"category":{"type":"string","title":"Category","default":""},"yield_quantity":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Yield Quantity","description":"Measured finished output of one batch"},"yield_unit":{"type":"string","enum":["g","ml","each"],"title":"Yield Unit","default":"g"},"grams_per_unit":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Grams Per Unit"},"method":{"type":"string","title":"Method","default":""},"notes":{"type":"string","title":"Notes","default":""},"cost_override_thb":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Cost Override Thb","description":"Hand-set food cost per kg / L / piece of finished output; replaces the calculated cost (nutrition unaffected)"},"pricing_cost_thb":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Pricing Cost Thb","description":"Cost per kg / L / piece that menu prices are calculated from instead of the food cost (e.g. vendor-made, priced as if made in-house)"},"reviewed":{"type":"boolean","title":"Reviewed","default":false},"active":{"type":"boolean","title":"Active","default":true},"lines":{"items":{"$ref":"#/components/schemas/RecipeLineOut"},"type":"array","title":"Lines","default":[]},"id":{"type":"string","title":"Id"},"version":{"type":"integer","title":"Version"},"legacy_inventory_item_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Legacy Inventory Item Id"},"source":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Source"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"input_total_g":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Input Total G","description":"Sum of line weights; NOT the finished yield"},"batch":{"$ref":"#/components/schemas/Totals","description":"Totals for one whole batch"},"per_basis":{"$ref":"#/components/schemas/Totals","description":"Totals for 100 g / 100 ml / 1 each of finished output"},"used_in":{"items":{"$ref":"#/components/schemas/UsageRef"},"type":"array","title":"Used In","default":[]}},"additionalProperties":false,"type":"object","required":["name","id","version","created_at","updated_at","input_total_g","batch","per_basis"],"title":"RecipeOut"},"RecipeSummary":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"category":{"type":"string","title":"Category"},"yield_quantity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Yield Quantity"},"yield_unit":{"type":"string","title":"Yield Unit"},"reviewed":{"type":"boolean","title":"Reviewed"},"active":{"type":"boolean","title":"Active"},"line_count":{"type":"integer","title":"Line Count"},"version":{"type":"integer","title":"Version"},"per_basis":{"$ref":"#/components/schemas/Totals"}},"additionalProperties":false,"type":"object","required":["id","name","category","yield_quantity","yield_unit","reviewed","active","line_count","version","per_basis"],"title":"RecipeSummary"},"RecipeUpdate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"category":{"type":"string","title":"Category","default":""},"yield_quantity":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Yield Quantity","description":"Measured finished output of one batch"},"yield_unit":{"type":"string","enum":["g","ml","each"],"title":"Yield Unit","default":"g"},"grams_per_unit":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Grams Per Unit"},"method":{"type":"string","title":"Method","default":""},"notes":{"type":"string","title":"Notes","default":""},"cost_override_thb":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Cost Override Thb","description":"Hand-set food cost per kg / L / piece of finished output; replaces the calculated cost (nutrition unaffected)"},"pricing_cost_thb":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Pricing Cost Thb","description":"Cost per kg / L / piece that menu prices are calculated from instead of the food cost (e.g. vendor-made, priced as if made in-house)"},"reviewed":{"type":"boolean","title":"Reviewed","default":false},"active":{"type":"boolean","title":"Active","default":true},"lines":{"items":{"$ref":"#/components/schemas/RecipeLineIn"},"type":"array","title":"Lines","default":[]},"version":{"type":"integer","title":"Version"}},"additionalProperties":false,"type":"object","required":["name","version"],"title":"RecipeUpdate"},"ResolvedBuildComponent":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"portion_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Portion Id"},"portion_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Portion Name"},"default_count":{"type":"number","title":"Default Count"},"min_count":{"type":"number","title":"Min Count"},"max_count":{"type":"number","title":"Max Count"},"count_step":{"type":"number","title":"Count Step"},"unit_price_thb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Unit Price Thb","description":"Published value of one portion"}},"additionalProperties":false,"type":"object","required":["id","label","portion_id","portion_name","default_count","min_count","max_count","count_step","unit_price_thb"],"title":"ResolvedBuildComponent"},"ResolvedComponent":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"}},"additionalProperties":false,"type":"object","required":["id","label"],"title":"ResolvedComponent"},"ResolvedGroup":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"min_choices":{"type":"integer","title":"Min Choices"},"max_choices":{"type":"integer","title":"Max Choices"},"options":{"items":{"$ref":"#/components/schemas/ResolvedOption"},"type":"array","title":"Options"}},"additionalProperties":false,"type":"object","required":["id","name","min_choices","max_choices","options"],"title":"ResolvedGroup"},"ResolvedItem":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"category":{"type":"string","title":"Category"},"menu_code":{"type":"string","title":"Menu Code","default":""},"description":{"type":"string","title":"Description"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"version":{"type":"integer","title":"Version"},"pricing_mode":{"type":"string","title":"Pricing Mode"},"base_price_thb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Base Price Thb","description":"Format base (build) or fixed price before options (legacy)"},"additional_base_thb":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Additional Base Thb","description":"Base for the 2nd, 3rd, … unit of this format in one order (last repeats)"},"promotion":{"anyOf":[{"$ref":"#/components/schemas/PromotionRef"},{"type":"null"}],"description":"Promotion running today on this item's format"},"available_from":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Available From","description":"Served from (Asia/Bangkok, inclusive); NULL = from opening"},"available_until":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Available Until","description":"Served until (Asia/Bangkok, exclusive); NULL = until closing"},"available_now":{"type":"boolean","title":"Available Now","description":"Within serving hours now. Outside them, quotes are not ready for checkout","default":true},"default_price_thb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Price Thb","description":"Price of the preset as configured by default"},"default_pricing":{"anyOf":[{"$ref":"#/components/schemas/PricingOut"},{"type":"null"}]},"default_build":{"$ref":"#/components/schemas/Totals"},"removable_components":{"items":{"$ref":"#/components/schemas/ResolvedComponent"},"type":"array","title":"Removable Components"},"components":{"items":{"$ref":"#/components/schemas/ResolvedBuildComponent"},"type":"array","title":"Components","description":"Build items: adjustable portions"},"choice_groups":{"items":{"$ref":"#/components/schemas/ResolvedGroup"},"type":"array","title":"Choice Groups"}},"additionalProperties":false,"type":"object","required":["id","name","category","description","external_id","version","pricing_mode","base_price_thb","default_price_thb","default_pricing","default_build","removable_components","components","choice_groups"],"title":"ResolvedItem"},"ResolvedMenu":{"properties":{"branch":{"type":"string","title":"Branch"},"channel":{"type":"string","title":"Channel"},"lang":{"type":"string","title":"Lang","description":"Language of customer-facing text","default":"en"},"items":{"items":{"$ref":"#/components/schemas/ResolvedItem"},"type":"array","title":"Items"}},"additionalProperties":false,"type":"object","required":["branch","channel","items"],"title":"ResolvedMenu"},"ResolvedOption":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"is_default":{"type":"boolean","title":"Is Default"},"max_quantity":{"type":"integer","title":"Max Quantity"},"portion_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Portion Id"},"price_thb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price Thb","description":"Per pick (build: portion price × portions per pick)"},"with_price_thb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"With Price Thb","description":"Final unit price of the item with this option picked in its group instead of the default(s), everything else as preset (the special guard applied), as POST /api/quote would charge. NULL when that alone isn't a valid order or the item can't be priced"}},"additionalProperties":false,"type":"object","required":["id","name","is_default","max_quantity","price_thb"],"title":"ResolvedOption"},"RuleFinding":{"properties":{"level":{"type":"string","enum":["error","warning","info"],"title":"Level"},"subject":{"type":"string","title":"Subject"},"message":{"type":"string","title":"Message"}},"additionalProperties":false,"type":"object","required":["level","subject","message"],"title":"RuleFinding"},"SelectionIn":{"properties":{"option_id":{"type":"string","title":"Option Id"},"quantity":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Quantity","default":1}},"additionalProperties":false,"type":"object","required":["option_id"],"title":"SelectionIn"},"SupplierIn":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"notes":{"type":"string","title":"Notes","default":""},"active":{"type":"boolean","title":"Active","default":true}},"additionalProperties":false,"type":"object","required":["name"],"title":"SupplierIn"},"SupplierOut":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"notes":{"type":"string","title":"Notes","default":""},"active":{"type":"boolean","title":"Active","default":true},"id":{"type":"string","title":"Id"},"version":{"type":"integer","title":"Version"}},"additionalProperties":false,"type":"object","required":["name","id","version"],"title":"SupplierOut"},"SupplierUpdate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"notes":{"type":"string","title":"Notes","default":""},"active":{"type":"boolean","title":"Active","default":true},"version":{"type":"integer","title":"Version"}},"additionalProperties":false,"type":"object","required":["name","version"],"title":"SupplierUpdate"},"Totals":{"properties":{"nutrients":{"additionalProperties":{"anyOf":[{"type":"number"},{"type":"null"}]},"type":"object","title":"Nutrients"},"food_cost_thb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Food Cost Thb"},"packaging_cost_thb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Packaging Cost Thb"},"grams":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Grams"},"pricing_cost_thb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pricing Cost Thb","description":"Cost prices are calculated from (food cost unless a pricing cost is set)"},"allergens":{"additionalProperties":{"type":"string"},"type":"object","title":"Allergens"},"allergens_complete":{"type":"boolean","title":"Allergens Complete"},"nutrition_complete":{"type":"boolean","title":"Nutrition Complete"},"issues":{"items":{"type":"string"},"type":"array","title":"Issues"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"}},"type":"object","required":["nutrients","food_cost_thb","packaging_cost_thb","grams","allergens","allergens_complete","nutrition_complete","issues","warnings"],"title":"Totals","description":"Calculated roll-up. NULL = unknown; see `issues` for why."},"TranslationIn":{"properties":{"source":{"type":"string","maxLength":2000,"minLength":1,"title":"Source"},"text":{"type":"string","maxLength":4000,"title":"Text","description":"Empty deletes the translation"},"status":{"type":"string","enum":["draft","reviewed"],"title":"Status","default":"draft"}},"additionalProperties":false,"type":"object","required":["source","text"],"title":"TranslationIn"},"TranslationList":{"properties":{"lang":{"type":"string","title":"Lang"},"language":{"type":"string","title":"Language"},"used":{"type":"integer","title":"Used","description":"English phrases the active menu needs"},"reviewed":{"type":"integer","title":"Reviewed"},"draft":{"type":"integer","title":"Draft"},"missing":{"type":"integer","title":"Missing"},"rows":{"items":{"$ref":"#/components/schemas/TranslationRow"},"type":"array","title":"Rows"}},"additionalProperties":false,"type":"object","required":["lang","language","used","reviewed","draft","missing","rows"],"title":"TranslationList"},"TranslationRow":{"properties":{"source":{"type":"string","title":"Source","description":"Exact English text (the glossary key)"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text","description":"Translation; NULL = missing, so customers see English"},"status":{"anyOf":[{"type":"string","enum":["draft","reviewed"]},{"type":"null"}],"title":"Status"},"used":{"type":"boolean","title":"Used","description":"False = the active menu no longer uses this phrase"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"additionalProperties":false,"type":"object","required":["source","text","status","used"],"title":"TranslationRow"},"UsageRef":{"properties":{"kind":{"type":"string","enum":["recipe","menu_item","portion","format"],"title":"Kind"},"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"}},"additionalProperties":false,"type":"object","required":["kind","id","name"],"title":"UsageRef","description":"A recipe or menu item that uses this record."},"UserIn":{"properties":{"username":{"type":"string","maxLength":60,"minLength":2,"pattern":"^[a-z0-9._-]+$","title":"Username"},"display_name":{"type":"string","maxLength":120,"minLength":1,"title":"Display Name"},"role":{"type":"string","enum":["owner","manager"],"title":"Role"},"password":{"type":"string","maxLength":200,"minLength":10,"title":"Password"}},"additionalProperties":false,"type":"object","required":["username","display_name","role","password"],"title":"UserIn"},"UserOut":{"properties":{"id":{"type":"integer","title":"Id"},"username":{"type":"string","title":"Username"},"display_name":{"type":"string","title":"Display Name"},"role":{"type":"string","enum":["owner","manager"],"title":"Role"},"active":{"type":"boolean","title":"Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_login_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Login At"}},"additionalProperties":false,"type":"object","required":["id","username","display_name","role","active","created_at","last_login_at"],"title":"UserOut"},"UserUpdate":{"properties":{"display_name":{"type":"string","maxLength":120,"minLength":1,"title":"Display Name"},"role":{"type":"string","enum":["owner","manager"],"title":"Role"},"active":{"type":"boolean","title":"Active"},"password":{"anyOf":[{"type":"string","maxLength":200,"minLength":10},{"type":"null"}],"title":"Password","description":"Set to reset the password; signs the user out everywhere"}},"additionalProperties":false,"type":"object","required":["display_name","role","active"],"title":"UserUpdate"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"tags":[{"name":"meta","description":"Vocabularies (units, nutrients, EU 14 allergens), the audit log, and this guide."},{"name":"catalog","description":"Ingredients (everything bought, with purchase options, nutrition and allergens), suppliers, branches and sales channels."},{"name":"recipes","description":"Batch recipes, nested to any depth. Totals are per measured yield: cost, nutrition and allergens roll up from ingredients."},{"name":"menu","description":"Menu items, the resolved menu for a branch and channel, and `POST /api/quote`: the authoritative price, nutrition and allergens for a configured order."},{"name":"pricing","description":"Portions, formats, pricing policies (cost curve, size curve, minimum multiple), dated price lists, overrides and promotions."},{"name":"translations","description":"Thai, Russian and Chinese text for customer-facing menu phrases. Read translated menus with `GET /api/menu?...&lang=th`."},{"name":"auth","description":"Signing in to the admin UI, users, and API keys for machine clients."}]}