{"openapi":"3.1.0","info":{"title":"Inventory","version":"0.1.0"},"paths":{"/suppliers":{"get":{"summary":"Suppliers List","description":"Supplier list with optional name search.","operationId":"suppliers_list_suppliers_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"cleanup","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Cleanup"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Supplier Create","operationId":"supplier_create_suppliers_post","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_supplier_create_suppliers_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/suppliers/new":{"get":{"summary":"Supplier New","operationId":"supplier_new_suppliers_new_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/suppliers/{supplier_id}/edit":{"get":{"summary":"Supplier Edit","operationId":"supplier_edit_suppliers__supplier_id__edit_get","parameters":[{"name":"supplier_id","in":"path","required":true,"schema":{"type":"integer","title":"Supplier Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/suppliers/bulk-delete":{"post":{"summary":"Suppliers Bulk Delete","description":"Bulk hard-delete selected suppliers (superadmin cleanup). Master data,\nso there's nothing to reverse -- but a supplier with linked ingredients is\nskipped and kept (same guard as the per-row delete), and any FK violation\nfrom other tables (POs, canvasses) is caught and the supplier kept. Each\nsupplier runs in its own transaction so one failure won't abort the batch.","operationId":"suppliers_bulk_delete_suppliers_bulk_delete_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/suppliers/bulk-upload":{"post":{"summary":"Supplier Bulk Upload","description":"Bulk upload with match + update + review (Aug 14, 2026).\n\nStrategy:\n  1. Parse file → normalized rows.\n  2. For each row: match by name (case-insensitive, trimmed) against\n     existing suppliers.\n  3. Matched → UPDATE with any fields the file provided that are\n     currently blank on the existing supplier (fill-blanks-only —\n     never overwrite existing data). Explicitly includes TIN,\n     business_style, bank_* — the fields Joy re-uploads for.\n  4. Unmatched → park in supplier_bulk_staging keyed by a random\n     session token; redirect to the review page where Joy picks\n     which unmatched rows to create.\n  5. If no unmatched rows, skip the review page and go straight\n     back to /suppliers with a success message.","operationId":"supplier_bulk_upload_suppliers_bulk_upload_post","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_supplier_bulk_upload_suppliers_bulk_upload_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"Supplier Bulk Upload Form","operationId":"supplier_bulk_upload_form_suppliers_bulk_upload_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/suppliers/bulk-upload/review":{"get":{"summary":"Supplier Bulk Upload Review","description":"Review page after a bulk upload — shows what got matched/updated\nand lets Joy pick which unmatched rows to actually create.","operationId":"supplier_bulk_upload_review_suppliers_bulk_upload_review_get","parameters":[{"name":"session","in":"query","required":false,"schema":{"type":"string","default":"","title":"Session"}},{"name":"matched","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Matched"}},{"name":"no_change","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"No Change"}},{"name":"no_name","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"No Name"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/suppliers/bulk-upload/confirm":{"post":{"summary":"Supplier Bulk Upload Confirm","description":"Create the unmatched suppliers Joy ticked on the review page.","operationId":"supplier_bulk_upload_confirm_suppliers_bulk_upload_confirm_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/suppliers/{supplier_id}":{"post":{"summary":"Supplier Update","operationId":"supplier_update_suppliers__supplier_id__post","parameters":[{"name":"supplier_id","in":"path","required":true,"schema":{"type":"integer","title":"Supplier Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_supplier_update_suppliers__supplier_id__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/suppliers/{supplier_id}/delete":{"post":{"summary":"Supplier Delete","description":"Delete a supplier. Only allowed when the supplier has zero linked\ningredients -- prevents orphaning the catalog. The ingredient count\nis re-checked at delete time, not just at page load, so a stale\nconfirmation dialog can't slip through if an ingredient was attached\nin the meantime.","operationId":"supplier_delete_suppliers__supplier_id__delete_post","parameters":[{"name":"supplier_id","in":"path","required":true,"schema":{"type":"integer","title":"Supplier Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/suppliers/{supplier_id}/audit":{"get":{"summary":"Supplier Audit History","description":"Field-level change history for one supplier. Admin-only per the\nsupplier-master confidentiality policy — everyone else with supplier\nview access sees name/contact info but not the full edit trail.","operationId":"supplier_audit_history_suppliers__supplier_id__audit_get","parameters":[{"name":"supplier_id","in":"path","required":true,"schema":{"type":"integer","title":"Supplier Id"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"}},{"name":"changed_by_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Changed By User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/suppliers/template.csv":{"get":{"summary":"Supplier Template Download","description":"Download a sample CSV with the expected headers + two example\nrows, so users have something concrete to start from.","operationId":"supplier_template_download_suppliers_template_csv_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/suppliers/ledgers":{"get":{"summary":"Supplier Ledgers Picker","description":"Supplier picker sorted by recent purchase activity. Nav landing\nfor \"Supplier ledgers\". Search box narrows by supplier name. Each row\nshows PO count + total spend + last-purchase date and links to the\nledger. Suppliers with zero purchases are still listed at the bottom\n-- easier than making Joy hunt for \"why isn't X here?\".","operationId":"supplier_ledgers_picker_suppliers_ledgers_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/suppliers/{supplier_id}/ledger":{"get":{"summary":"Supplier Ledger","description":"Supplier ledger + stock card. Header shows date-range/branch\nfilter + summary KPIs; body has two tabs (Purchases = PO ledger;\nStock card = per-ingredient receipt history). All figures come from\nexisting purchase_orders / po_lines / transactions tables — no\nschema changes.\n\nPayment tracking lives outside Resto360 per Joy's spec, so the\nheader is labelled \"Purchases summary\" (not \"outstanding\") to\navoid implying we know what's been paid.","operationId":"supplier_ledger_suppliers__supplier_id__ledger_get","parameters":[{"name":"supplier_id","in":"path","required":true,"schema":{"type":"integer","title":"Supplier Id"}},{"name":"range","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Range"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"tab","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tab"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"ing","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ing"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/suppliers/{supplier_id}/ledger.csv":{"get":{"summary":"Supplier Ledger Csv","description":"Download the current ledger tab as CSV. `tab` param selects\nPurchases (default) or Stock card. Filters mirror the on-screen\nledger 1:1 so what the operator sees is what downloads. Users\nwithout see_po_amounts get the file with peso columns zeroed\n(rather than a 403) so they can still audit qty and dates.","operationId":"supplier_ledger_csv_suppliers__supplier_id__ledger_csv_get","parameters":[{"name":"supplier_id","in":"path","required":true,"schema":{"type":"integer","title":"Supplier Id"}},{"name":"tab","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tab"}},{"name":"range","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Range"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"ing","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ing"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/suppliers/{supplier_id}/ledger.xlsx":{"get":{"summary":"Supplier Ledger Xlsx","description":"Download the current ledger tab as XLSX. Uses openpyxl (already\na project dep). Same filter mirror + amount-lock as the CSV route.","operationId":"supplier_ledger_xlsx_suppliers__supplier_id__ledger_xlsx_get","parameters":[{"name":"supplier_id","in":"path","required":true,"schema":{"type":"integer","title":"Supplier Id"}},{"name":"tab","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tab"}},{"name":"range","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Range"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"ing","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ing"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users":{"get":{"summary":"Users List","operationId":"users_list_users_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"User Create","operationId":"user_create_users_post","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_user_create_users_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/new":{"get":{"summary":"User New","operationId":"user_new_users_new_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{user_id}/edit":{"get":{"summary":"User Edit","operationId":"user_edit_users__user_id__edit_get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{user_id}":{"post":{"summary":"User Update","operationId":"user_update_users__user_id__post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_user_update_users__user_id__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{user_id}/toggle":{"post":{"summary":"User Toggle","operationId":"user_toggle_users__user_id__toggle_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{user_id}/cost-visibility":{"get":{"summary":"Cost Visibility Page","description":"Focused single-purpose page: flip see_recipe_cost AND access_recipes\nfor one user. Only meaningful for the three restricted roles — other\nroles get a note explaining why the toggles don't apply to them.","operationId":"cost_visibility_page_users__user_id__cost_visibility_get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Cost Visibility Save","description":"Save both toggles. `decision` = cost visibility (show/hide/default),\n`access_decision` = module access (allow/deny/default). Each maps to\nan INSERT/UPDATE (explicit override) or DELETE (revert to role\ndefault) on the corresponding user_permissions row. Both apply in\nthe same request; either can be independently left at 'default'.","operationId":"cost_visibility_save_users__user_id__cost_visibility_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_cost_visibility_save_users__user_id__cost_visibility_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/roles":{"get":{"summary":"Admin Roles","operationId":"admin_roles_admin_roles_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/{user_id}/permissions":{"get":{"summary":"User Permissions Page","operationId":"user_permissions_page_admin_users__user_id__permissions_get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/{user_id}/permissions/save":{"post":{"summary":"User Permissions Save","operationId":"user_permissions_save_admin_users__user_id__permissions_save_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/{user_id}/permissions/reset":{"post":{"summary":"User Permissions Reset","operationId":"user_permissions_reset_admin_users__user_id__permissions_reset_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/{user_id}/assign-branches":{"get":{"summary":"Assign Branches Page","operationId":"assign_branches_page_admin_users__user_id__assign_branches_get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Assign Branches Save","operationId":"assign_branches_save_admin_users__user_id__assign_branches_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/{user_id}/edit":{"get":{"summary":"Edit User Page","operationId":"edit_user_page_admin_users__user_id__edit_get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Edit User Save","operationId":"edit_user_save_admin_users__user_id__edit_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/new":{"get":{"summary":"New User Page","operationId":"new_user_page_admin_users_new_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"New User Create","operationId":"new_user_create_admin_users_new_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/reports/monthly":{"get":{"summary":"Report Monthly","operationId":"report_monthly_reports_monthly_get","parameters":[{"name":"preset","in":"query","required":false,"schema":{"type":"string","default":"","title":"Preset"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","default":"","title":"From"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","default":"","title":"To"}},{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reports/monthly/export":{"get":{"summary":"Report Monthly Export","operationId":"report_monthly_export_reports_monthly_export_get","parameters":[{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"csv","title":"Fmt"}},{"name":"preset","in":"query","required":false,"schema":{"type":"string","default":"","title":"Preset"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","default":"","title":"From"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","default":"","title":"To"}},{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reports/category":{"get":{"summary":"Report Category","operationId":"report_category_reports_category_get","parameters":[{"name":"preset","in":"query","required":false,"schema":{"type":"string","default":"","title":"Preset"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","default":"","title":"From"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","default":"","title":"To"}},{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reports/category/export":{"get":{"summary":"Report Category Export","operationId":"report_category_export_reports_category_export_get","parameters":[{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"csv","title":"Fmt"}},{"name":"preset","in":"query","required":false,"schema":{"type":"string","default":"","title":"Preset"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","default":"","title":"From"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","default":"","title":"To"}},{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reports/prices":{"get":{"summary":"Report Prices","operationId":"report_prices_reports_prices_get","parameters":[{"name":"preset","in":"query","required":false,"schema":{"type":"string","default":"","title":"Preset"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","default":"","title":"From"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","default":"","title":"To"}},{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"category_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Category Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reports/prices/export":{"get":{"summary":"Report Prices Export","operationId":"report_prices_export_reports_prices_export_get","parameters":[{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"csv","title":"Fmt"}},{"name":"preset","in":"query","required":false,"schema":{"type":"string","default":"","title":"Preset"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","default":"","title":"From"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","default":"","title":"To"}},{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"category_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Category Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reports":{"get":{"summary":"Reports Index","operationId":"reports_index_reports_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api/ingredient-units/{iid}":{"get":{"summary":"Api Ingredient Units","description":"Units & sizes for one item (Daily entries' unit picker).","operationId":"api_ingredient_units_api_ingredient_units__iid__get","parameters":[{"name":"iid","in":"path","required":true,"schema":{"type":"integer","title":"Iid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stocktake":{"get":{"summary":"Stocktake List","operationId":"stocktake_list_stocktake_get","parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string","default":"","title":"From"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","default":"","title":"To"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stocktake/start":{"post":{"summary":"Stocktake Start","operationId":"stocktake_start_stocktake_start_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_stocktake_start_stocktake_start_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stocktake/nonfood":{"get":{"summary":"Stocktake Nonfood Form","operationId":"stocktake_nonfood_form_stocktake_nonfood_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stocktake/nonfood/start":{"post":{"summary":"Stocktake Nonfood Start","operationId":"stocktake_nonfood_start_stocktake_nonfood_start_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_stocktake_nonfood_start_stocktake_nonfood_start_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stocktake/{session_id}/sheet":{"get":{"summary":"Stocktake Count Sheet","description":"Printable count sheet (PDF) or spreadsheet for counting on paper /\noffline: every item in the session with its count unit and an empty\nCount column -- expected quantities are never printed (blind count).\nCounts already saved are filled in, so a half-done count can be\nprinted for the second shift.","operationId":"stocktake_count_sheet_stocktake__session_id__sheet_get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}},{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"pdf","title":"Fmt"}},{"name":"category","in":"query","required":false,"schema":{"type":"string","default":"","title":"Category"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stocktake/{session_id}":{"get":{"summary":"Stocktake Session","operationId":"stocktake_session_stocktake__session_id__get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}},{"name":"category","in":"query","required":false,"schema":{"type":"string","default":"","title":"Category"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stocktake/{session_id}/count":{"post":{"summary":"Stocktake Save Counts","operationId":"stocktake_save_counts_stocktake__session_id__count_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stocktake/{session_id}/complete":{"post":{"summary":"Stocktake Complete","operationId":"stocktake_complete_stocktake__session_id__complete_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_stocktake_complete_stocktake__session_id__complete_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stocktake/{session_id}/cancel":{"post":{"summary":"Stocktake Cancel","description":"Abandon an in-progress count. Only in_progress sessions can be\ncancelled - completed ones must stand as their final record. Cancelled\nsessions are kept in the list (with the items counted up to that point\npreserved for audit) but locked from further edits and excluded from\nadjustment posting.","operationId":"stocktake_cancel_stocktake__session_id__cancel_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stocktake/{session_id}/archive":{"post":{"summary":"Stocktake Archive","operationId":"stocktake_archive_stocktake__session_id__archive_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stocktake/{session_id}/restore":{"post":{"summary":"Stocktake Restore","operationId":"stocktake_restore_stocktake__session_id__restore_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stocktake/{session_id}/delete":{"post":{"summary":"Stocktake Delete","operationId":"stocktake_delete_stocktake__session_id__delete_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stocktake/{session_id}/variance":{"get":{"summary":"Stocktake Variance","operationId":"stocktake_variance_stocktake__session_id__variance_get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}},{"name":"show","in":"query","required":false,"schema":{"type":"string","default":"diff","title":"Show"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stocktake/{session_id}/variance/export":{"get":{"summary":"Stocktake Variance Export","operationId":"stocktake_variance_export_stocktake__session_id__variance_export_get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}},{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"csv","title":"Fmt"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stocktake/{session_id}/adjust/{count_id}":{"post":{"summary":"Stocktake Adjust One","operationId":"stocktake_adjust_one_stocktake__session_id__adjust__count_id__post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}},{"name":"count_id","in":"path","required":true,"schema":{"type":"integer","title":"Count Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_stocktake_adjust_one_stocktake__session_id__adjust__count_id__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stocktake/{session_id}/writeoff/{count_id}":{"post":{"summary":"Stocktake Writeoff","description":"Write a short-counted item off as waste: add it to a DRAFT Waste &\ndisposal slip for this session (a manager signs it there). Gated by the\ndisposal_writeoff permission (Admin + Superadmin by default).","operationId":"stocktake_writeoff_stocktake__session_id__writeoff__count_id__post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}},{"name":"count_id","in":"path","required":true,"schema":{"type":"integer","title":"Count Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_stocktake_writeoff_stocktake__session_id__writeoff__count_id__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stocktake/{session_id}/adjust-all":{"post":{"summary":"Stocktake Adjust All","operationId":"stocktake_adjust_all_stocktake__session_id__adjust_all_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_stocktake_adjust_all_stocktake__session_id__adjust_all_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sales-variance":{"get":{"summary":"Sv List","operationId":"sv_list_sales_variance_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sales-variance/template.xlsx":{"get":{"summary":"Sv Template","operationId":"sv_template_sales_variance_template_xlsx_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/sales-variance/upload":{"post":{"summary":"Sv Upload","operationId":"sv_upload_sales_variance_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_sv_upload_sales_variance_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sales-variance/{upload_id}/match":{"get":{"summary":"Sv Match","operationId":"sv_match_sales_variance__upload_id__match_get","parameters":[{"name":"upload_id","in":"path","required":true,"schema":{"type":"integer","title":"Upload Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"show","in":"query","required":false,"schema":{"type":"string","default":"todo","title":"Show"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Sv Match Save","operationId":"sv_match_save_sales_variance__upload_id__match_post","parameters":[{"name":"upload_id","in":"path","required":true,"schema":{"type":"integer","title":"Upload Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sales-variance/{upload_id}":{"get":{"summary":"Sv Report","operationId":"sv_report_sales_variance__upload_id__get","parameters":[{"name":"upload_id","in":"path","required":true,"schema":{"type":"integer","title":"Upload Id"}},{"name":"show","in":"query","required":false,"schema":{"type":"string","default":"counted","title":"Show"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sales-variance/{upload_id}/export":{"get":{"summary":"Sv Export","description":"Excel (2 sheets), PDF or CSV of the Sales vs usage report. `show`\nfollows the page tab (counted / uncounted / all) for the PDF; Excel and\nCSV always carry every row so nothing is lost when filtering later.","operationId":"sv_export_sales_variance__upload_id__export_get","parameters":[{"name":"upload_id","in":"path","required":true,"schema":{"type":"integer","title":"Upload Id"}},{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"xlsx","title":"Fmt"}},{"name":"show","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Show"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sales-variance/{upload_id}/delete":{"post":{"summary":"Sv Delete","operationId":"sv_delete_sales_variance__upload_id__delete_post","parameters":[{"name":"upload_id","in":"path","required":true,"schema":{"type":"integer","title":"Upload Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sales-variance/recipe/{recipe_id}/pos-names.json":{"get":{"summary":"Sv Recipe Names Get","operationId":"sv_recipe_names_get_sales_variance_recipe__recipe_id__pos_names_json_get","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"integer","title":"Recipe Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sales-variance/recipe/{recipe_id}/pos-names":{"post":{"summary":"Sv Recipe Names Save","operationId":"sv_recipe_names_save_sales_variance_recipe__recipe_id__pos_names_post","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"integer","title":"Recipe Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sales-variance/pos-names":{"get":{"summary":"Sv Pos Names Page","operationId":"sv_pos_names_page_sales_variance_pos_names_get","parameters":[{"name":"brand_id","in":"query","required":false,"schema":{"type":"string","default":"","title":"Brand Id"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"missing","in":"query","required":false,"schema":{"type":"string","default":"","title":"Missing"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Sv Pos Names Save","operationId":"sv_pos_names_save_sales_variance_pos_names_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/sales-variance/pos-names/export.xlsx":{"get":{"summary":"Sv Pos Names Export","operationId":"sv_pos_names_export_sales_variance_pos_names_export_xlsx_get","parameters":[{"name":"brand_id","in":"query","required":false,"schema":{"type":"string","default":"","title":"Brand Id"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"missing","in":"query","required":false,"schema":{"type":"string","default":"","title":"Missing"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sales-variance/pos-names/import":{"post":{"summary":"Sv Pos Names Import","operationId":"sv_pos_names_import_sales_variance_pos_names_import_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_sv_pos_names_import_sales_variance_pos_names_import_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/cost-alerts/count":{"get":{"summary":"Recipe Cost Alerts Count","description":"Powers the nav badge. Silent zero for anyone without access or not\nlogged in -- this is a polled background call, not a page view, so it\nnever redirects or errors, just returns {\"total\": 0}.","operationId":"recipe_cost_alerts_count_recipes_cost_alerts_count_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/recipes/cost-alerts":{"get":{"summary":"Recipe Cost Alerts","operationId":"recipe_cost_alerts_recipes_cost_alerts_get","parameters":[{"name":"brand_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand Id"}},{"name":"direction","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"}},{"name":"days","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Days"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/cost-alerts/settings":{"post":{"summary":"Recipe Cost Alerts Settings Save","operationId":"recipe_cost_alerts_settings_save_recipes_cost_alerts_settings_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/recipes/cost-alerts/email":{"post":{"summary":"Recipe Cost Alerts Email","description":"On-demand 'Email this' for the current filtered Cost Alerts view.\nSame SMTP setup as the Reservations Dashboard's Email Summary button --\nreuses email_utils so there's nothing new to configure.","operationId":"recipe_cost_alerts_email_recipes_cost_alerts_email_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/recipes/usage-report":{"get":{"summary":"Recipe Usage Report","operationId":"recipe_usage_report_recipes_usage_report_get","parameters":[{"name":"business_unit_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Unit Id"}},{"name":"brand_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand Id"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"recipe_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipe Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/usage-report/export.csv":{"get":{"summary":"Recipe Usage Report Csv","operationId":"recipe_usage_report_csv_recipes_usage_report_export_csv_get","parameters":[{"name":"business_unit_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Unit Id"}},{"name":"brand_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand Id"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"recipe_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipe Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/usage-report/export.xlsx":{"get":{"summary":"Recipe Usage Report Xlsx","operationId":"recipe_usage_report_xlsx_recipes_usage_report_export_xlsx_get","parameters":[{"name":"business_unit_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Unit Id"}},{"name":"brand_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand Id"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"recipe_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipe Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/ingredient-usage":{"get":{"summary":"Ingredient Usage Search","operationId":"ingredient_usage_search_recipes_ingredient_usage_get","parameters":[{"name":"ingredient_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ingredient Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/ingredient-usage/export.csv":{"get":{"summary":"Ingredient Usage Csv","operationId":"ingredient_usage_csv_recipes_ingredient_usage_export_csv_get","parameters":[{"name":"ingredient_id","in":"query","required":true,"schema":{"type":"integer","title":"Ingredient Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/ingredient-usage/export.xlsx":{"get":{"summary":"Ingredient Usage Xlsx","operationId":"ingredient_usage_xlsx_recipes_ingredient_usage_export_xlsx_get","parameters":[{"name":"ingredient_id","in":"query","required":true,"schema":{"type":"integer","title":"Ingredient Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/ingredient-usage/print":{"get":{"summary":"Ingredient Usage Print","operationId":"ingredient_usage_print_recipes_ingredient_usage_print_get","parameters":[{"name":"ingredient_id","in":"query","required":true,"schema":{"type":"integer","title":"Ingredient Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/ingredient-usage/email":{"post":{"summary":"Ingredient Usage Email","operationId":"ingredient_usage_email_recipes_ingredient_usage_email_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/recipes/import":{"get":{"summary":"Recipe Import Form","description":"Upload page for the bulk recipe importer.\n\nNOTE: literal '/recipes/import' is declared BEFORE the parameterized\n'/recipes/{recipe_id:int}' route so it can't be swallowed by it.","operationId":"recipe_import_form_recipes_import_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/import/preview":{"post":{"summary":"Recipe Import Preview","description":"Parse the workbook and show exactly what WOULD be imported. Nothing\nis written here. The file is echoed back into the confirm form as\nbase64 so the confirm step re-parses the very same bytes rather than\ntrusting a client-side summary.","operationId":"recipe_import_preview_recipes_import_preview_post","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/recipes/import/confirm":{"post":{"summary":"Recipe Import Confirm","description":"Write the importable tabs. Re-parses the uploaded bytes so what gets\nwritten is derived from the file, never from client-supplied numbers.\n\nPer spec: clean tabs import, bad tabs are reported and skipped. Fuzzy\nmatches DO import, but each such line records what the sheet said vs\nwhat it matched in recipe_lines.note -- so a wrong guess stays findable\nin the Data Audit long after this screen is gone. Unmatched lines are\nskipped entirely rather than written unlinked (an unlinked line silently\ncontributes zero cost to every market list built on it).","operationId":"recipe_import_confirm_recipes_import_confirm_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/recipes/import/batch/{batch_id}":{"get":{"summary":"Recipe Import Batch","description":"Nov 11, 2026 (Joy): one import on its own -- the recipes it created\nand the ingredients / preps still missing -- so new drafts don't get\nlost in the full list. ?fmt=xlsx downloads the missing list.","operationId":"recipe_import_batch_recipes_import_batch__batch_id__get","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"integer","title":"Batch Id"}},{"name":"fmt","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fmt"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/import/remembered":{"get":{"summary":"Recipe Import Remembered","description":"Nov 10, 2026 (Joy): the sheet names Resto360 has learned to swap\nfor an ingredient / prep on import. Remove one to stop the swap.","operationId":"recipe_import_remembered_recipes_import_remembered_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/import/remembered/{alias_id}/delete":{"post":{"summary":"Recipe Import Remembered Delete","operationId":"recipe_import_remembered_delete_recipes_import_remembered__alias_id__delete_post","parameters":[{"name":"alias_id","in":"path","required":true,"schema":{"type":"integer","title":"Alias Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/import/clear-fuzzy-note/{line_id}":{"post":{"summary":"Recipe Clear Fuzzy Note","description":"Mark one fuzzy-matched imported line as verified, removing it from\nthe Data Audit list. Clears only import_flag -- the user's own `note`\non that line is never touched.","operationId":"recipe_clear_fuzzy_note_recipes_import_clear_fuzzy_note__line_id__post","parameters":[{"name":"line_id","in":"path","required":true,"schema":{"type":"integer","title":"Line Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/data-audit":{"get":{"summary":"Recipe Data Audit","description":"Silent-distortion checks. Everything here fails to error, so nothing\nelse in the app would surface it on its own; each check leaves a recipe\nsaved but under- or mis-costed. Grouped as:\n\nData corruption (fix asap):\n  1. A recipe line with a quantity but no ingredient actually linked\n     (contributes 0 cost while still consuming a real quantity --\n     this is exactly what understates a market list total).\n  2. An ingredient with a real cost but no unit set -- the cost basis\n     can't be trusted without knowing what it's costed per.\n  3. An effective yield over 500% -- almost always a typo (someone\n     typed 5000 for 50).\n\nPost-refactor blank cells (worth a review pass):\n  4. Zombie lines: neither qty nor qty_portions filled.\n  5. Recipes with no portions_per_batch (fall back to 1 batch = 1\n     serving, usually not what's meant).\n  6. Prep line with cost/portion available but qty_portions blank\n     (line silently costed by grams instead of portions).\n  7. Line with qty_portions filled but ingredient has no cost/portion\n     (silent gram-mode fallback).\n  8. Recipe with no menu format set (blank on print).\n  9. Recipe portion with no selling_price (food-cost% blank).\n\nAdvisory (worth a look, not necessarily wrong):\n 10. Unusual yields (100-500%) -- water-absorbing preps live here.\n\nFuzzy import guesses:\n 11. Lines the bulk importer matched via a near-match name;\n     confirmable per-line.","operationId":"recipe_data_audit_recipes_data_audit_get","parameters":[{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/duplicates":{"get":{"summary":"Recipes Duplicates Audit","description":"One-off cleanup helper: lists every group of currently-ACTIVE\nrecipes that share a name (normalized), so existing conflicts -- like\nones created by the restore-without-a-name-check bug fixed alongside\nthis route -- can be found and resolved by hand.","operationId":"recipes_duplicates_audit_recipes_duplicates_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/recipes":{"get":{"summary":"Recipes List","operationId":"recipes_list_recipes_get","parameters":[{"name":"brand_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand Id"}},{"name":"recipe_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipe Type"}},{"name":"classification_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Classification Id"}},{"name":"format_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format Id"}},{"name":"dish_type_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dish Type Id"}},{"name":"prep_category_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prep Category Id"}},{"name":"protein_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Protein Id"}},{"name":"review","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review"}},{"name":"item_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Item Type"}},{"name":"business_unit_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Unit Id"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"cleanup","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Cleanup"}},{"name":"arch","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Arch"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","default":"name","title":"Sort"}},{"name":"group","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Group"}},{"name":"fmt","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fmt"}},{"name":"import_batch","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Import Batch"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/new":{"post":{"summary":"Recipes New","operationId":"recipes_new_recipes_new_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_recipes_new_recipes_new_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/{recipe_id}/duplicate":{"post":{"summary":"Recipe Duplicate","description":"Copy a recipe/prep (lines, portions, steps, packaging, brand/branch\ntags) under a new name. The duplicate always starts as its own fresh\nDraft, with no link to the original's ingredient row -- a duplicated\nprep gets its own ingredient the first time it's saved, so editing one\ncan never bleed into the other.","operationId":"recipe_duplicate_recipes__recipe_id__duplicate_post","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"integer","title":"Recipe Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/{recipe_id}/cost-drivers":{"get":{"summary":"Recipe Cost Drivers","operationId":"recipe_cost_drivers_recipes__recipe_id__cost_drivers_get","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"integer","title":"Recipe Id"}},{"name":"days","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/{recipe_id}":{"get":{"summary":"Recipe Editor","operationId":"recipe_editor_recipes__recipe_id__get","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"integer","title":"Recipe Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Recipe Save","operationId":"recipe_save_recipes__recipe_id__post","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"integer","title":"Recipe Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/{recipe_id}/audit":{"get":{"summary":"Recipe Audit History","description":"Field-level change history for one recipe. Admin-only per the\n'recipes are highly confidential' policy — regular users can view\na recipe's approval status via the editor, but not the full edit trail.","operationId":"recipe_audit_history_recipes__recipe_id__audit_get","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"integer","title":"Recipe Id"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"}},{"name":"changed_by_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Changed By User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/{recipe_id}/submit-for-approval":{"post":{"summary":"Recipe Submit For Approval","operationId":"recipe_submit_for_approval_recipes__recipe_id__submit_for_approval_post","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"integer","title":"Recipe Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/{recipe_id}/approve":{"post":{"summary":"Recipe Approve","operationId":"recipe_approve_recipes__recipe_id__approve_post","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"integer","title":"Recipe Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/{recipe_id}/reject":{"post":{"summary":"Recipe Reject","operationId":"recipe_reject_recipes__recipe_id__reject_post","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"integer","title":"Recipe Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/{recipe_id}/revert-to-revised":{"post":{"summary":"Recipe Revert To Revised","description":"Superadmin/Admin flips an approved recipe back to 'revised' status\nso its creator (or any authorized editor) can make changes. New status\nis intentionally 'revised' rather than 'draft' so the recipe list can\nshow a visible badge distinguishing \"never approved\" (draft) from\n\"was approved, being edited\" (revised). A revised recipe must be\nre-submitted for approval before it becomes 'approved' again.","operationId":"recipe_revert_to_revised_recipes__recipe_id__revert_to_revised_post","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"integer","title":"Recipe Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/{recipe_id}/print":{"get":{"summary":"Recipe Print","operationId":"recipe_print_recipes__recipe_id__print_get","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"integer","title":"Recipe Id"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/{recipe_id}/email":{"post":{"summary":"Recipe Email","description":"On-demand 'Email' for a single recipe's kitchen copy -- same content\nas Print (ingredients, yields, procedure, sub-recipes), no costing.\nSame SMTP setup as the Reservations Dashboard / Cost Alerts email\nbuttons, so nothing new to configure.","operationId":"recipe_email_recipes__recipe_id__email_post","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"integer","title":"Recipe Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/{recipe_id}/kitchen.csv":{"get":{"summary":"Recipe Kitchen Csv","operationId":"recipe_kitchen_csv_recipes__recipe_id__kitchen_csv_get","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"integer","title":"Recipe Id"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/{recipe_id}/kitchen.xlsx":{"get":{"summary":"Recipe Kitchen Xlsx","operationId":"recipe_kitchen_xlsx_recipes__recipe_id__kitchen_xlsx_get","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"integer","title":"Recipe Id"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/{recipe_id}/export.csv":{"get":{"summary":"Recipe Export Csv","operationId":"recipe_export_csv_recipes__recipe_id__export_csv_get","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"integer","title":"Recipe Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/{recipe_id}/export.xlsx":{"get":{"summary":"Recipe Export Xlsx","operationId":"recipe_export_xlsx_recipes__recipe_id__export_xlsx_get","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"integer","title":"Recipe Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/{recipe_id}/delete":{"post":{"summary":"Recipe Delete","operationId":"recipe_delete_recipes__recipe_id__delete_post","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"integer","title":"Recipe Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/bulk-delete":{"post":{"summary":"Recipes Bulk Delete","operationId":"recipes_bulk_delete_recipes_bulk_delete_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/recipes/bulk-restore":{"post":{"summary":"Recipes Bulk Restore","operationId":"recipes_bulk_restore_recipes_bulk_restore_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/recipes/bulk-purge":{"post":{"summary":"Recipes Bulk Purge","description":"Permanently delete recipes. Safety-gated: superadmin only, and only\nrows that are ALREADY archived can be purged -- archive first, then\ndelete, never a direct hop from active to gone.","operationId":"recipes_bulk_purge_recipes_bulk_purge_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/recipes/classifications/add":{"post":{"summary":"Classification Add","operationId":"classification_add_recipes_classifications_add_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_classification_add_recipes_classifications_add_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/formats/add":{"post":{"summary":"Format Add","operationId":"format_add_recipes_formats_add_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_format_add_recipes_formats_add_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/formats/rename":{"post":{"summary":"Format Rename","operationId":"format_rename_recipes_formats_rename_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_format_rename_recipes_formats_rename_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/formats/remove":{"post":{"summary":"Format Remove","operationId":"format_remove_recipes_formats_remove_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_format_remove_recipes_formats_remove_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/prep-groups/add":{"post":{"summary":"Prep Group Add","description":"Add a new prep group. Stored in the shared categories table with\nparent='Prep' so it composes with the existing category infrastructure\n(matches how the seeded 15 groups are stored).","operationId":"prep_group_add_recipes_prep_groups_add_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_prep_group_add_recipes_prep_groups_add_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/prep-groups/rename":{"post":{"summary":"Prep Group Rename","description":"Rename an existing prep group. Updates both the subcategory (what\nusers see) and the composite name so the two stay consistent.","operationId":"prep_group_rename_recipes_prep_groups_rename_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_prep_group_rename_recipes_prep_groups_rename_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/prep-groups/remove":{"post":{"summary":"Prep Group Remove","description":"Remove a prep group. Any recipe currently tagged with this group\ngets its prep_category_id nulled out (falls back to the '— pick a\ngroup —' state) so the delete never cascades to recipe data.","operationId":"prep_group_remove_recipes_prep_groups_remove_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_prep_group_remove_recipes_prep_groups_remove_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/dishtypes/add":{"post":{"summary":"Dishtype Add","operationId":"dishtype_add_recipes_dishtypes_add_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_dishtype_add_recipes_dishtypes_add_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/dishtypes/rename":{"post":{"summary":"Dishtype Rename","operationId":"dishtype_rename_recipes_dishtypes_rename_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_dishtype_rename_recipes_dishtypes_rename_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/dishtypes/remove":{"post":{"summary":"Dishtype Remove","operationId":"dishtype_remove_recipes_dishtypes_remove_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_dishtype_remove_recipes_dishtypes_remove_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/proteins/add":{"post":{"summary":"Protein Add","operationId":"protein_add_recipes_proteins_add_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_protein_add_recipes_proteins_add_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/proteins/rename":{"post":{"summary":"Protein Rename","operationId":"protein_rename_recipes_proteins_rename_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_protein_rename_recipes_proteins_rename_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/proteins/remove":{"post":{"summary":"Protein Remove","operationId":"protein_remove_recipes_proteins_remove_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_protein_remove_recipes_proteins_remove_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/departments/add":{"post":{"summary":"Department Add","operationId":"department_add_recipes_departments_add_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_department_add_recipes_departments_add_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/departments/rename":{"post":{"summary":"Department Rename","operationId":"department_rename_recipes_departments_rename_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_department_rename_recipes_departments_rename_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/departments/remove":{"post":{"summary":"Department Remove","operationId":"department_remove_recipes_departments_remove_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_department_remove_recipes_departments_remove_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/{recipe_id}/launch":{"post":{"summary":"Recipe Launch","operationId":"recipe_launch_recipes__recipe_id__launch_post","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"integer","title":"Recipe Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/{recipe_id}/launch/{launch_id}/delete":{"post":{"summary":"Recipe Launch Delete","description":"Remove a single launch history row. For mis-typed entries -- date,\nprice, wrong branch, wrong event kind. Guarded to the recipe's own\nlaunches so an id from another recipe can't be reached by URL guessing.","operationId":"recipe_launch_delete_recipes__recipe_id__launch__launch_id__delete_post","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"integer","title":"Recipe Id"}},{"name":"launch_id","in":"path","required":true,"schema":{"type":"integer","title":"Launch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/bulk-launch":{"get":{"summary":"Recipe Bulk Launch Form","description":"Picker page: choose several recipes at once and record a launch /\nreprice / pull event for all of them in a single submit. Each recipe's\nprice prefilled from its primary portion (recipe_portions channel = 1),\nbut overridable per row so a special event can price differently.\n\nNon-dishes (preps, cocktails-with-no-portion) are excluded because the\nlaunch model tracks menu-facing dishes, not internal preps.","operationId":"recipe_bulk_launch_form_recipes_bulk_launch_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Recipe Bulk Launch Record","description":"Record a launch / reprice / pull event for every ticked recipe on\nthe picker page. Each row's own selling_price is snapshotted (so a\nper-recipe price override entered on the form is honoured), and each\nrecipe's own VAT / buffer / cost is used to compute the FC snapshot,\nmatching the single-recipe launch endpoint. Aggregation errors don't\nabort the whole batch -- one bad row leaves the others recorded.","operationId":"recipe_bulk_launch_record_recipes_bulk_launch_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/recipes/menu":{"get":{"summary":"Branch Menu","operationId":"branch_menu_recipes_menu_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/menu/export":{"get":{"summary":"Branch Menu Export","operationId":"branch_menu_export_recipes_menu_export_get","parameters":[{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"xlsx","title":"Fmt"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/menu-launches":{"get":{"summary":"Launches List","operationId":"launches_list_menu_launches_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/menu-launches/new":{"post":{"summary":"Launch New","operationId":"launch_new_menu_launches_new_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/menu-launches/{launch_id}":{"get":{"summary":"Launch Detail","operationId":"launch_detail_menu_launches__launch_id__get","parameters":[{"name":"launch_id","in":"path","required":true,"schema":{"type":"integer","title":"Launch Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/menu-launches/{launch_id}/settings":{"post":{"summary":"Launch Settings","operationId":"launch_settings_menu_launches__launch_id__settings_post","parameters":[{"name":"launch_id","in":"path","required":true,"schema":{"type":"integer","title":"Launch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/menu-launches/{launch_id}/items/add":{"post":{"summary":"Launch Items Add","operationId":"launch_items_add_menu_launches__launch_id__items_add_post","parameters":[{"name":"launch_id","in":"path","required":true,"schema":{"type":"integer","title":"Launch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/menu-launches/{launch_id}/items/quick":{"post":{"summary":"Launch Items Quick","description":"copy = copy a branch's current menu in; pull_rest = everything on\nthe launch branches' menus that isn't in this launch comes off.","operationId":"launch_items_quick_menu_launches__launch_id__items_quick_post","parameters":[{"name":"launch_id","in":"path","required":true,"schema":{"type":"integer","title":"Launch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/menu-launches/{launch_id}/items/save":{"post":{"summary":"Launch Items Save","description":"Prices: one per dish, optional override per branch; remove ticked.","operationId":"launch_items_save_menu_launches__launch_id__items_save_post","parameters":[{"name":"launch_id","in":"path","required":true,"schema":{"type":"integer","title":"Launch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/menu-launches/{launch_id}/go-live":{"post":{"summary":"Launch Go Live","operationId":"launch_go_live_menu_launches__launch_id__go_live_post","parameters":[{"name":"launch_id","in":"path","required":true,"schema":{"type":"integer","title":"Launch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/menu-launches/{launch_id}/undo":{"post":{"summary":"Launch Undo","description":"Remove every menu event this launch wrote and set it back to planned.","operationId":"launch_undo_menu_launches__launch_id__undo_post","parameters":[{"name":"launch_id","in":"path","required":true,"schema":{"type":"integer","title":"Launch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/menu-launches/{launch_id}/cancel":{"post":{"summary":"Launch Cancel","operationId":"launch_cancel_menu_launches__launch_id__cancel_post","parameters":[{"name":"launch_id","in":"path","required":true,"schema":{"type":"integer","title":"Launch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/menu-launches/{launch_id}/export":{"get":{"summary":"Launch Export","description":"Whole launch, or one branch's menu sheet when branch_id is given.","operationId":"launch_export_menu_launches__launch_id__export_get","parameters":[{"name":"launch_id","in":"path","required":true,"schema":{"type":"integer","title":"Launch Id"}},{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"xlsx","title":"Fmt"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/menu-launches/{launch_id}/preps":{"get":{"summary":"Launch Preps","operationId":"launch_preps_menu_launches__launch_id__preps_get","parameters":[{"name":"launch_id","in":"path","required":true,"schema":{"type":"integer","title":"Launch Id"}},{"name":"fmt","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fmt"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/menu/preps":{"get":{"summary":"Menu Preps","description":"Preps needed for the dishes on / assigned to the ticked branches.","operationId":"menu_preps_recipes_menu_preps_get","parameters":[{"name":"fmt","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fmt"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/menu/kitchen-pack":{"get":{"summary":"Menu Kitchen Pack","description":"Every dish on / assigned to the ticked branches as kitchen copies,\ngrouped by dish type; tick boxes pick which types print.","operationId":"menu_kitchen_pack_recipes_menu_kitchen_pack_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/recipes/menu/kitchen-pack.xlsx":{"get":{"summary":"Menu Kitchen Pack Xlsx","description":"Same recipes as an Excel workbook: one sheet per dish type, each\nrecipe as a block (qty / unit / yield, no costs). ?types=Appetizer,Mains\nlimits the sheets.","operationId":"menu_kitchen_pack_xlsx_recipes_menu_kitchen_pack_xlsx_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/menu-launches/{launch_id}/kitchen-pack":{"get":{"summary":"Launch Kitchen Pack","description":"Every new dish's kitchen copy for one branch, ready to print / save\nas PDF in one go (with its preps, each printed once).","operationId":"launch_kitchen_pack_menu_launches__launch_id__kitchen_pack_get","parameters":[{"name":"launch_id","in":"path","required":true,"schema":{"type":"integer","title":"Launch Id"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/menu/kitchen-pack.pdf":{"get":{"summary":"Menu Kitchen Pack Pdf","operationId":"menu_kitchen_pack_pdf_recipes_menu_kitchen_pack_pdf_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/menu-launches/{launch_id}/kitchen-pack.pdf":{"get":{"summary":"Launch Kitchen Pack Pdf","operationId":"launch_kitchen_pack_pdf_menu_launches__launch_id__kitchen_pack_pdf_get","parameters":[{"name":"launch_id","in":"path","required":true,"schema":{"type":"integer","title":"Launch Id"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/{recipe_id}/kitchen.pdf":{"get":{"summary":"Recipe Kitchen Pdf","description":"One recipe's kitchen copy as a clean PDF (same rules as Print).","operationId":"recipe_kitchen_pdf_recipes__recipe_id__kitchen_pdf_get","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"integer","title":"Recipe Id"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/{recipe_id}/scale":{"get":{"summary":"Recipe Scale Page","operationId":"recipe_scale_page_recipes__recipe_id__scale_get","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"integer","title":"Recipe Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/{recipe_id}/scaled.pdf":{"get":{"summary":"Recipe Scaled Pdf","operationId":"recipe_scaled_pdf_recipes__recipe_id__scaled_pdf_get","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"integer","title":"Recipe Id"}},{"name":"by","in":"query","required":false,"schema":{"type":"string","default":"multiplier","title":"By"}},{"name":"value","in":"query","required":false,"schema":{"type":"string","default":"1","title":"Value"}},{"name":"cost","in":"query","required":false,"schema":{"type":"string","default":"0","title":"Cost"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/{recipe_id}/scaled.xlsx":{"get":{"summary":"Recipe Scaled Xlsx","operationId":"recipe_scaled_xlsx_recipes__recipe_id__scaled_xlsx_get","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"integer","title":"Recipe Id"}},{"name":"by","in":"query","required":false,"schema":{"type":"string","default":"multiplier","title":"By"}},{"name":"value","in":"query","required":false,"schema":{"type":"string","default":"1","title":"Value"}},{"name":"cost","in":"query","required":false,"schema":{"type":"string","default":"0","title":"Cost"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/menus":{"get":{"summary":"Menus List","operationId":"menus_list_menus_get","parameters":[{"name":"brand_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand Id"}},{"name":"menu_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Menu Type"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"cleanup","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Cleanup"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/menus/bulk-archive":{"post":{"summary":"Menus Bulk Archive","operationId":"menus_bulk_archive_menus_bulk_archive_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/menus/bulk-restore":{"post":{"summary":"Menus Bulk Restore","operationId":"menus_bulk_restore_menus_bulk_restore_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/menus/bulk-purge":{"post":{"summary":"Menus Bulk Purge","description":"Permanently delete menus. Archive-first only: a menu must already\nbe status='archived' before it can be purged, same safety rule as\nRecipe Costing's cleanup mode -- no direct hop from active to gone.","operationId":"menus_bulk_purge_menus_bulk_purge_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/menus/new":{"post":{"summary":"Menu Create","operationId":"menu_create_menus_new_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/menus/{menu_id}":{"get":{"summary":"Menu Editor","operationId":"menu_editor_menus__menu_id__get","parameters":[{"name":"menu_id","in":"path","required":true,"schema":{"type":"integer","title":"Menu Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Menu Save","operationId":"menu_save_menus__menu_id__post","parameters":[{"name":"menu_id","in":"path","required":true,"schema":{"type":"integer","title":"Menu Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/menus/{menu_id}/archive":{"post":{"summary":"Menu Archive","operationId":"menu_archive_menus__menu_id__archive_post","parameters":[{"name":"menu_id","in":"path","required":true,"schema":{"type":"integer","title":"Menu Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/menus/{menu_id}/duplicate":{"post":{"summary":"Menu Duplicate","operationId":"menu_duplicate_menus__menu_id__duplicate_post","parameters":[{"name":"menu_id","in":"path","required":true,"schema":{"type":"integer","title":"Menu Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/menus/{menu_id}/sections/add":{"post":{"summary":"Menu Section Add","operationId":"menu_section_add_menus__menu_id__sections_add_post","parameters":[{"name":"menu_id","in":"path","required":true,"schema":{"type":"integer","title":"Menu Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/menus/{menu_id}/sections/auto-suggest":{"post":{"summary":"Menu Section Auto Suggest","description":"One click: create a section for every distinct Dish Type used by\nthis menu's menu-ready, brand-scoped recipes, skipping any section\nname that already exists on this menu.","operationId":"menu_section_auto_suggest_menus__menu_id__sections_auto_suggest_post","parameters":[{"name":"menu_id","in":"path","required":true,"schema":{"type":"integer","title":"Menu Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/menus/{menu_id}/sections/{section_id}/rename":{"post":{"summary":"Menu Section Rename","operationId":"menu_section_rename_menus__menu_id__sections__section_id__rename_post","parameters":[{"name":"menu_id","in":"path","required":true,"schema":{"type":"integer","title":"Menu Id"}},{"name":"section_id","in":"path","required":true,"schema":{"type":"integer","title":"Section Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/menus/{menu_id}/sections/{section_id}/remove":{"post":{"summary":"Menu Section Remove","operationId":"menu_section_remove_menus__menu_id__sections__section_id__remove_post","parameters":[{"name":"menu_id","in":"path","required":true,"schema":{"type":"integer","title":"Menu Id"}},{"name":"section_id","in":"path","required":true,"schema":{"type":"integer","title":"Section Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/menus/{menu_id}/sections/{section_id}/move":{"post":{"summary":"Menu Section Move","description":"Simple up/down reorder -- swaps sort_order with the neighboring\nsection. Avoids drag-and-drop JS that can't be tested against a live\nserver from here.","operationId":"menu_section_move_menus__menu_id__sections__section_id__move_post","parameters":[{"name":"menu_id","in":"path","required":true,"schema":{"type":"integer","title":"Menu Id"}},{"name":"section_id","in":"path","required":true,"schema":{"type":"integer","title":"Section Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/menus/{menu_id}/items/add":{"post":{"summary":"Menu Item Add","operationId":"menu_item_add_menus__menu_id__items_add_post","parameters":[{"name":"menu_id","in":"path","required":true,"schema":{"type":"integer","title":"Menu Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/menus/{menu_id}/items/{item_id}/update":{"post":{"summary":"Menu Item Update","operationId":"menu_item_update_menus__menu_id__items__item_id__update_post","parameters":[{"name":"menu_id","in":"path","required":true,"schema":{"type":"integer","title":"Menu Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/menus/{menu_id}/items/{item_id}/remove":{"post":{"summary":"Menu Item Remove","operationId":"menu_item_remove_menus__menu_id__items__item_id__remove_post","parameters":[{"name":"menu_id","in":"path","required":true,"schema":{"type":"integer","title":"Menu Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/menus/{menu_id}/items/{item_id}/move":{"post":{"summary":"Menu Item Move","operationId":"menu_item_move_menus__menu_id__items__item_id__move_post","parameters":[{"name":"menu_id","in":"path","required":true,"schema":{"type":"integer","title":"Menu Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market-lists":{"get":{"summary":"Market Lists List","operationId":"market_lists_list_market_lists_get","parameters":[{"name":"brand_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"cleanup","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Cleanup"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market-lists/bulk-archive":{"post":{"summary":"Market Lists Bulk Archive","operationId":"market_lists_bulk_archive_market_lists_bulk_archive_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/market-lists/bulk-restore":{"post":{"summary":"Market Lists Bulk Restore","operationId":"market_lists_bulk_restore_market_lists_bulk_restore_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/market-lists/bulk-purge":{"post":{"summary":"Market Lists Bulk Purge","description":"Permanently delete market lists. Archive-first only, same safety\nrule as everywhere else in Resto360's cleanup mode.","operationId":"market_lists_bulk_purge_market_lists_bulk_purge_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/market-lists/new":{"post":{"summary":"Market List Create","operationId":"market_list_create_market_lists_new_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/market-lists/{market_list_id}":{"get":{"summary":"Market List Editor","operationId":"market_list_editor_market_lists__market_list_id__get","parameters":[{"name":"market_list_id","in":"path","required":true,"schema":{"type":"integer","title":"Market List Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Market List Save","operationId":"market_list_save_market_lists__market_list_id__post","parameters":[{"name":"market_list_id","in":"path","required":true,"schema":{"type":"integer","title":"Market List Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market-lists/{market_list_id}/dishes/add":{"post":{"summary":"Market List Dish Add","operationId":"market_list_dish_add_market_lists__market_list_id__dishes_add_post","parameters":[{"name":"market_list_id","in":"path","required":true,"schema":{"type":"integer","title":"Market List Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market-lists/{market_list_id}/dishes/{dish_id}/update":{"post":{"summary":"Market List Dish Update","operationId":"market_list_dish_update_market_lists__market_list_id__dishes__dish_id__update_post","parameters":[{"name":"market_list_id","in":"path","required":true,"schema":{"type":"integer","title":"Market List Id"}},{"name":"dish_id","in":"path","required":true,"schema":{"type":"integer","title":"Dish Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market-lists/{market_list_id}/dishes/{dish_id}/remove":{"post":{"summary":"Market List Dish Remove","operationId":"market_list_dish_remove_market_lists__market_list_id__dishes__dish_id__remove_post","parameters":[{"name":"market_list_id","in":"path","required":true,"schema":{"type":"integer","title":"Market List Id"}},{"name":"dish_id","in":"path","required":true,"schema":{"type":"integer","title":"Dish Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market-lists/{market_list_id}/override":{"post":{"summary":"Market List Set Override","description":"Manually set (or clear) how much to actually purchase for one\ningredient on this market list, overriding the calculated AP quantity.\nLeaving the field blank clears the override and reverts to calculated.","operationId":"market_list_set_override_market_lists__market_list_id__override_post","parameters":[{"name":"market_list_id","in":"path","required":true,"schema":{"type":"integer","title":"Market List Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market-lists/{market_list_id}/stock":{"post":{"summary":"Market List Set Stock","description":"Record how much of an ingredient is already on hand for this\nmarket list -- the suggested 'To purchase' figure becomes Calculated\nminus On hand (never below zero), though it's still fully overridable\non top of that via the separate override field. Leaving this blank\nclears it and goes back to assuming zero on hand.","operationId":"market_list_set_stock_market_lists__market_list_id__stock_post","parameters":[{"name":"market_list_id","in":"path","required":true,"schema":{"type":"integer","title":"Market List Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market-lists/{market_list_id}/import-menu":{"post":{"summary":"Market List Import Menu","description":"Bulk-add every dish from a chosen menu, each at the market list's\ncurrent covers figure. Skips dishes already on the list.","operationId":"market_list_import_menu_market_lists__market_list_id__import_menu_post","parameters":[{"name":"market_list_id","in":"path","required":true,"schema":{"type":"integer","title":"Market List Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market-lists/{market_list_id}/archive":{"post":{"summary":"Market List Archive","operationId":"market_list_archive_market_lists__market_list_id__archive_post","parameters":[{"name":"market_list_id","in":"path","required":true,"schema":{"type":"integer","title":"Market List Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market-lists/{market_list_id}/export.csv":{"get":{"summary":"Market List Export Csv","operationId":"market_list_export_csv_market_lists__market_list_id__export_csv_get","parameters":[{"name":"market_list_id","in":"path","required":true,"schema":{"type":"integer","title":"Market List Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market-lists/{market_list_id}/export.xlsx":{"get":{"summary":"Market List Export Xlsx","operationId":"market_list_export_xlsx_market_lists__market_list_id__export_xlsx_get","parameters":[{"name":"market_list_id","in":"path","required":true,"schema":{"type":"integer","title":"Market List Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/launches":{"get":{"summary":"Launches List","operationId":"launches_list_launches_get","parameters":[{"name":"brand_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/launches/new":{"post":{"summary":"Launch Plan Create","operationId":"launch_plan_create_launches_new_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/launches/{plan_id}/update":{"post":{"summary":"Launch Plan Update","operationId":"launch_plan_update_launches__plan_id__update_post","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"integer","title":"Plan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/launches/{plan_id}/mark-launched":{"post":{"summary":"Launch Plan Mark Launched","description":"Flips the plan to launched AND writes a real row into recipe_launches\n(recipes) or beverage_launches (wine/spirits) -- the same history table\neach module's own Launch action uses -- so this shows up in that\nitem's actual launch history, not just here.","operationId":"launch_plan_mark_launched_launches__plan_id__mark_launched_post","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"integer","title":"Plan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/launches/{plan_id}/delay":{"post":{"summary":"Launch Plan Delay","operationId":"launch_plan_delay_launches__plan_id__delay_post","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"integer","title":"Plan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/launches/{plan_id}/cancel":{"post":{"summary":"Launch Plan Cancel","operationId":"launch_plan_cancel_launches__plan_id__cancel_post","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"integer","title":"Plan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/market-lists/{market_list_id}/create-requisition":{"get":{"summary":"Market List Create Requisition Get","description":"Nov 7, 2026 (Joy): opening this address directly (refresh, back button,\na pasted link, or the page reloading while the server restarted) used to\nshow a bare \"Method Not Allowed\". Creating a requisition only happens from\nthe button, so just go back to the market list and say so.","operationId":"market_list_create_requisition_get_market_lists__market_list_id__create_requisition_get","parameters":[{"name":"market_list_id","in":"path","required":true,"schema":{"type":"integer","title":"Market List Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Market List Create Requisition","description":"One requisition per market list, not one per source. Raw-ingredient\nlines go in as source_type='pending' (same 'Purchasing decides'\ndefault as any hand-made requisition -- this doesn't skip your normal\npurchasing review). Commissary-request lines go in as source_type=\n'transfer' with transfer_from_branch_id already filled in, since the\nproduction route already tells us the answer -- that's the actual\nvalue of this button over creating the requisition by hand.\n\nLead-time check: for each commissary line, if the prep's own\nproduction_lead_days means it should already have started (or starts\ntoday/tomorrow) to meet the market list's event date, that's surfaced\nas a warning on the redirect -- the requisition still gets created\neither way; this never silently blocks you, it just makes sure you\nknow.","operationId":"market_list_create_requisition_market_lists__market_list_id__create_requisition_post","parameters":[{"name":"market_list_id","in":"path","required":true,"schema":{"type":"integer","title":"Market List Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/production-routes":{"get":{"summary":"Production Routes List","operationId":"production_routes_list_production_routes_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/production-routes/add":{"post":{"summary":"Production Route Add","operationId":"production_route_add_production_routes_add_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/production-routes/{route_id}/remove":{"post":{"summary":"Production Route Remove","operationId":"production_route_remove_production_routes__route_id__remove_post","parameters":[{"name":"route_id","in":"path","required":true,"schema":{"type":"integer","title":"Route Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/production-planning":{"get":{"summary":"Production Planning Redirect","description":"Nov 7, 2026 (Joy): Production is now its own module (production.py);\nthe menu's Production Planning link lands there. Branch requests are\nshown on that page too; the old view stays at /production-planning/requests.","operationId":"production_planning_redirect_production_planning_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/production-planning/requests":{"get":{"summary":"Production Planning View","operationId":"production_planning_view_production_planning_requests_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/production":{"get":{"summary":"Production List","operationId":"production_list_production_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/production/new":{"post":{"summary":"Production New","operationId":"production_new_production_new_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/production/{order_id}":{"get":{"summary":"Production View","operationId":"production_view_production__order_id__get","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"integer","title":"Order Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/production/{order_id}/save":{"post":{"summary":"Production Save Header","operationId":"production_save_header_production__order_id__save_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"integer","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/production/{order_id}/lines/add":{"post":{"summary":"Production Line Add","operationId":"production_line_add_production__order_id__lines_add_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"integer","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/production/{order_id}/lines/{line_id}/update":{"post":{"summary":"Production Line Update","operationId":"production_line_update_production__order_id__lines__line_id__update_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"integer","title":"Order Id"}},{"name":"line_id","in":"path","required":true,"schema":{"type":"integer","title":"Line Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/production/{order_id}/lines/{line_id}/remove":{"post":{"summary":"Production Line Remove","operationId":"production_line_remove_production__order_id__lines__line_id__remove_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"integer","title":"Order Id"}},{"name":"line_id","in":"path","required":true,"schema":{"type":"integer","title":"Line Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/production/{order_id}/import-market-list":{"post":{"summary":"Production Import Ml","operationId":"production_import_ml_production__order_id__import_market_list_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"integer","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/production/{order_id}/import-requests":{"post":{"summary":"Production Import Requests","operationId":"production_import_requests_production__order_id__import_requests_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"integer","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/production/{order_id}/requisition":{"post":{"summary":"Production Shortfall Requisition","description":"Shortfall at the producing branch -> one draft requisition (editable\nlike any requisition; Purchasing decides the source).","operationId":"production_shortfall_requisition_production__order_id__requisition_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"integer","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/production/{order_id}/post":{"post":{"summary":"Production Post","operationId":"production_post_production__order_id__post_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"integer","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/production/{order_id}/void":{"post":{"summary":"Production Void","description":"Super Admin / Admin: take a posted production back off the stock\n(deletes exactly the movements it made) so it can be corrected.","operationId":"production_void_production__order_id__void_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"integer","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/production/{order_id}/cancel":{"post":{"summary":"Production Cancel","operationId":"production_cancel_production__order_id__cancel_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"integer","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/beverages/dashboard":{"get":{"summary":"Beverages Dashboard","description":"Cost-alert dashboard for wine/beer/spirits. Scans every active item,\nruns the three-condition alert engine (_beverage_alerts) against its\nlive cost, and surfaces a KPI strip plus a \"needs attention\" list.\nCocktails aren't included -- they're recipes and already covered by\nRecipe Costing's own performance/alert surface.\n\nNOTE: this literal route is declared BEFORE the parameterized\n/beverages/{item_id:int} route. The :int converter already stops\n'dashboard' from matching that path, but literal-before-parameterized\nis the house rule regardless.\n\nAdmin-only: this is a management view showing every drink's health,\nnot something to expose to floor staff.","operationId":"beverages_dashboard_beverages_dashboard_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/beverages":{"get":{"summary":"Beverages List","operationId":"beverages_list_beverages_get","parameters":[{"name":"bev_type","in":"query","required":false,"schema":{"type":"string","default":"wine","title":"Bev Type"}},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"cleanup","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cleanup"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"launch","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Launch"}},{"name":"consigned","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Consigned"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"warn","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Warn"}},{"name":"warn_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Warn Name"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/beverages/name-check":{"get":{"summary":"Beverage Name Check","description":"JSON conflict scan for a proposed beverage name. Aug 24, 2026.\n\nSame three-tier logic as beverage_create (same-tab / cross-tab /\ningredient master), but returns structured data instead of\nredirecting. Intended for a live typeahead-style warning on the\ncreate form; can also be called from external tooling.\n\nResponse:\n  {\n    \"same_tab\":   { \"id\", \"product_name\", \"bev_type\" } | null,\n    \"cross_tab\":  [ { \"id\", \"product_name\", \"bev_type\" }, ... ],\n    \"ingredient\": [ { \"id\", \"name\", \"item_type\" }, ... ],\n    \"message\":    \"human-readable summary, empty when clean\"\n  }","operationId":"beverage_name_check_beverages_name_check_get","parameters":[{"name":"name","in":"query","required":false,"schema":{"type":"string","default":"","title":"Name"}},{"name":"bev_type","in":"query","required":false,"schema":{"type":"string","default":"wine","title":"Bev Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/beverages/new":{"post":{"summary":"Beverage Create","description":"Create a new beverage row.\n\nAug 24, 2026 -- three-tier duplicate check:\n\n  1. SAME-TAB fuzzy match  -> HARD BLOCK. Silently allowing two rows\n     with the same normalized name in one catalog breaks every\n     downstream name-based lookup. No override.\n\n  2. CROSS-TAB fuzzy match -> WARN. Same name exists in another\n     tab (Wine \"Chardonnay\" vs a rare Spirit \"Chardonnay\"). Operator\n     retries with confirm=1 to proceed.\n\n  3. INGREDIENTS-MASTER match -> WARN. Same name is already an\n     ingredient (non-beverage row). Also overridable with confirm=1.\n\nWarnings redirect back to the list page with the typed name\npreserved (name= query) plus a warn= describing the overlap so the\ntemplate can show a banner with a 'Create anyway' button that POSTs\nwith confirm=1. See the beverage_list.html changes for the UI.","operationId":"beverage_create_beverages_new_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/beverages/{item_id}":{"get":{"summary":"Beverage Editor","operationId":"beverage_editor_beverages__item_id__get","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Beverage Save","operationId":"beverage_save_beverages__item_id__post","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/beverages/bulk-launch":{"post":{"summary":"Beverages Bulk Launch","description":"Record a launch/re-price/pull for MANY drinks at once, from the\nbeverage list page. Writes one beverage_launches row per\n(drink x branch), snapshotting cost and COGS% exactly the way the\nsingle-item /beverages/{id}/launch route does -- same _compute(),\nsame price_point lookup -- so the rows this produces are\nindistinguishable from ones recorded one at a time, and show up in\neach drink's own \"Drink launches & history\" section immediately.\n\nPrice point: a default applies to all selected drinks, but each row\ncan override it via pp_{id} form fields.\n\nSelling price is deliberately NOT bulk-settable -- each drink uses its\nown saved price for the chosen price point. One typed number would be\nwrong for nearly every row (a glass pour and a bottle can't share a\nprice).\n\nWhen a drink doesn't OFFER the chosen price point (offer_glass=0 etc),\nwe still record the row, with selling_price and cogs_pct left null,\nbut cost_snapshot set to that pour's real computed cost. That keeps the\nhistory honest and, importantly, keeps the dashboard's price-jump\ncheck working -- it reads the latest cost_snapshot as its baseline, so\na null there would silently disable the alert for that drink.\n\nNOTE: this literal route must be registered BEFORE\n/beverages/{item_id:int}/... parameterized routes.\n\nAdmin-only: bulk launch is a management action, mirroring the recipes\npattern where launch recording is restricted to admin roles.","operationId":"beverages_bulk_launch_beverages_bulk_launch_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/beverages/{item_id}/launch":{"post":{"summary":"Beverage Launch","description":"Direct launch/reprice/pull action, same pattern as Recipe Costing's\nown Launch button -- logs a real event with a cost/price snapshot,\nbuilding this item's own per-branch history. Separate from the\nLaunch PLANS feature in Menu Planning (which schedules a launch\nahead of time); this one just records that something happened, now,\nat a given branch and price point.\n\nAdmin-only, matching the bulk equivalent above and the recipes pattern.","operationId":"beverage_launch_beverages__item_id__launch_post","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/beverages/{item_id}/launch/{launch_id}/delete":{"post":{"summary":"Beverage Launch Delete","description":"Removes a single launch-history row -- for correcting a mis-typed\nentry. No downstream effect elsewhere; this table is a record, not a\ntransaction, so deleting it is safe and doesn't need to be an\narchive-first flow like beverage items themselves.\n\nAdmin-only, matching the launch recorder.","operationId":"beverage_launch_delete_beverages__item_id__launch__launch_id__delete_post","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}},{"name":"launch_id","in":"path","required":true,"schema":{"type":"integer","title":"Launch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/beverages/{item_id}/launches/export.csv":{"get":{"summary":"Beverage Launches Export Csv","operationId":"beverage_launches_export_csv_beverages__item_id__launches_export_csv_get","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/beverages/{item_id}/launches/export.xlsx":{"get":{"summary":"Beverage Launches Export Xlsx","operationId":"beverage_launches_export_xlsx_beverages__item_id__launches_export_xlsx_get","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/beverages/{item_id}/bar.csv":{"get":{"summary":"Beverage Bar Csv","description":"Staff-facing export -- product, pours, sizes. No cost or price\ndata, same intent as Recipe Costing's 'Kitchen' export (safe to hand\nto bar staff without exposing margins).\n\nNOT gated by see_recipe_cost -- that's the whole point of the bar copy.","operationId":"beverage_bar_csv_beverages__item_id__bar_csv_get","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/beverages/{item_id}/bar.xlsx":{"get":{"summary":"Beverage Bar Xlsx","description":"No-cost bar copy, matching bar.csv above -- also NOT gated by\nsee_recipe_cost.","operationId":"beverage_bar_xlsx_beverages__item_id__bar_xlsx_get","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/beverages/{item_id}/export.csv":{"get":{"summary":"Beverage Item Export Csv","description":"Full costing export for THIS ONE item -- basic info plus the\ncomplete cost breakdown per offered price point, matching Recipe\nCosting's own per-recipe cost export.\n\nCost-gated: non-cost users get bar.csv/bar.xlsx instead.","operationId":"beverage_item_export_csv_beverages__item_id__export_csv_get","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/beverages/{item_id}/export.xlsx":{"get":{"summary":"Beverage Item Export Xlsx","description":"Cost-gated -- see beverage_item_export_csv for rationale.","operationId":"beverage_item_export_xlsx_beverages__item_id__export_xlsx_get","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/beverages/{item_id}/print":{"get":{"summary":"Beverage Print","description":"Bar copy print view -- no costing, safe to hand to staff.","operationId":"beverage_print_beverages__item_id__print_get","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/beverages/{item_id}/email":{"post":{"summary":"Beverage Email","description":"Same SMTP setup as Recipe Costing's kitchen-copy email -- sends\nthe bar copy (no costing), nothing new to configure.","operationId":"beverage_email_beverages__item_id__email_post","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/beverages/data-audit":{"get":{"summary":"Beverages Data Audit","description":"Same idea as Recipe Costing's Data audit -- things that silently\ndistort costing without ever throwing an error: missing bottle cost\nor volume, nothing offered at all, not yet synced to Ingredients,\nor a price actually below cost (guaranteed loss on every sale).\n\nAdmin-only -- this is a management view, mirroring the recipes pattern.","operationId":"beverages_data_audit_beverages_data_audit_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/beverages/menu":{"get":{"summary":"Beverage Branch Menu","description":"What's actually live at a given branch -- driven by launch history\nthe same way Recipe Costing's Per-branch menu is: the latest launch\nevent per (item, price point) at that branch, unless it was 'pulled'.\nReflects what's really been launched there, not just what's tagged.\n\nAug 24, 2026: 'all' and 'nonalc' bev_types accepted. In 'all' mode\nthe template groups items by bev_type. Exports (xlsx / pdf / email)\nbelow all read from _load_branch_menu() so they never diverge.\n\nAdmin-only, matching the recipes pattern.","operationId":"beverage_branch_menu_beverages_menu_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"bev_type","in":"query","required":false,"schema":{"type":"string","default":"wine","title":"Bev Type"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/beverages/menu.xlsx":{"get":{"summary":"Beverage Branch Menu Xlsx","description":"Excel export of the per-branch menu.\n\nOne sheet per bev_type when bev_type='all' -- catering managers\nscanning what to stock get natural physical tabs to flip between.\nSingle sheet otherwise. Column set matches the on-screen table\nplus 'Type' when 'all' (mixed) so a downstream sort still works.","operationId":"beverage_branch_menu_xlsx_beverages_menu_xlsx_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"bev_type","in":"query","required":false,"schema":{"type":"string","default":"wine","title":"Bev Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/beverages/menu.pdf":{"get":{"summary":"Beverage Branch Menu Pdf","description":"Print-friendly HTML of the per-branch menu. The rendered page\nauto-triggers window.print() -- the user picks 'Save as PDF' from\nthe browser dialog. Same pattern transfer_slip.html uses; no\nserver-side PDF library needed and works across every OS.","operationId":"beverage_branch_menu_pdf_beverages_menu_pdf_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"bev_type","in":"query","required":false,"schema":{"type":"string","default":"wine","title":"Bev Type"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/beverages/menu/email":{"post":{"summary":"Beverage Branch Menu Email","description":"Email the per-branch menu as HTML + plain-text fallback. Reuses\nthe SMTP pattern already established at the item-level email route\n(search for smtplib in this file). Requires branch_id + to_email;\ncc_email is optional.","operationId":"beverage_branch_menu_email_beverages_menu_email_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/beverages/{item_id}/duplicate":{"post":{"summary":"Beverage Duplicate","operationId":"beverage_duplicate_beverages__item_id__duplicate_post","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/beverages/{item_id}/archive":{"post":{"summary":"Beverage Archive","operationId":"beverage_archive_beverages__item_id__archive_post","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/beverages/bulk-archive":{"post":{"summary":"Beverages Bulk Archive","operationId":"beverages_bulk_archive_beverages_bulk_archive_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/beverages/bulk-restore":{"post":{"summary":"Beverages Bulk Restore","operationId":"beverages_bulk_restore_beverages_bulk_restore_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/beverages/bulk-purge":{"post":{"summary":"Beverages Bulk Purge","description":"Permanently delete. Archive-first only, same safety rule used\neverywhere else in Resto360's cleanup mode. Leaves the linked\nIngredients row alone (it should already be archived, and other\nhistory -- requisitions, price history -- may still reference it).","operationId":"beverages_bulk_purge_beverages_bulk_purge_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/beverages/categories/add":{"post":{"summary":"Beverage Category Add","operationId":"beverage_category_add_beverages_categories_add_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/beverages/export.csv":{"get":{"summary":"Beverages Export Csv","description":"Whole-category costing export. Cost-gated: non-cost users still have\nthe bar copies for individual items.","operationId":"beverages_export_csv_beverages_export_csv_get","parameters":[{"name":"bev_type","in":"query","required":false,"schema":{"type":"string","default":"wine","title":"Bev Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/beverages/export.xlsx":{"get":{"summary":"Beverages Export Xlsx","description":"Cost-gated -- see beverages_export_csv for rationale.","operationId":"beverages_export_xlsx_beverages_export_xlsx_get","parameters":[{"name":"bev_type","in":"query","required":false,"schema":{"type":"string","default":"wine","title":"Bev Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/beverages/duplicates":{"get":{"summary":"Beverage Duplicates","operationId":"beverage_duplicates_beverages_duplicates_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/beverages/duplicates/merge":{"post":{"summary":"Beverage Duplicates Merge","operationId":"beverage_duplicates_merge_beverages_duplicates_merge_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/beverages/duplicates/dismiss":{"post":{"summary":"Beverage Duplicates Dismiss","operationId":"beverage_duplicates_dismiss_beverages_duplicates_dismiss_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/stock":{"get":{"summary":"Stock List","operationId":"stock_list_stock_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"brand_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand Id"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"as_of","in":"query","required":false,"schema":{"type":"string","default":"","title":"As Of"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stock/export":{"get":{"summary":"Stock Export","description":"Download stock-on-hand as CSV or Excel. Honours the same filters\nas the on-screen list, so the file reflects exactly what the user\nsees when they hit the button.","operationId":"stock_export_stock_export_get","parameters":[{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"csv","title":"Fmt"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"brand_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand Id"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"as_of","in":"query","required":false,"schema":{"type":"string","default":"","title":"As Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stock/position":{"get":{"summary":"Stock Position","description":"Inventory Position report — 4-level drill-down with brand layer.\n\nDrill order: All BUs (summary) → BU (brand cards) → Brand (branch cards)\n              → Branch (ingredient detail).\nIf a BU has only ONE brand, Brand layer is auto-skipped and the user\ngoes straight to Branch cards (unless show_brands=1 is passed).","operationId":"stock_position_stock_position_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"brand_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand Id"}},{"name":"bu_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bu Id"}},{"name":"show_brands","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Show Brands"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"show","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Show"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stock/position/export":{"get":{"summary":"Stock Position Export","description":"Export current Position view for one branch.","operationId":"stock_position_export_stock_position_export_get","parameters":[{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"csv","title":"Fmt"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"show","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Show"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stock/{ingredient_id}/export":{"get":{"summary":"Stock Detail Export","description":"Download the stock item page: on hand by branch + transactions\n(same date filter as the page).","operationId":"stock_detail_export_stock__ingredient_id__export_get","parameters":[{"name":"ingredient_id","in":"path","required":true,"schema":{"type":"integer","title":"Ingredient Id"}},{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"csv","title":"Fmt"}},{"name":"from_date","in":"query","required":false,"schema":{"type":"string","default":"","title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"type":"string","default":"","title":"To Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stock/{ingredient_id}":{"get":{"summary":"Stock Detail","operationId":"stock_detail_stock__ingredient_id__get","parameters":[{"name":"ingredient_id","in":"path","required":true,"schema":{"type":"integer","title":"Ingredient Id"}},{"name":"from_date","in":"query","required":false,"schema":{"type":"string","default":"","title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"type":"string","default":"","title":"To Date"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/inventory/consignment/export":{"get":{"summary":"Consignment Export","operationId":"consignment_export_inventory_consignment_export_get","parameters":[{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"csv","title":"Fmt"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"as_of","in":"query","required":false,"schema":{"type":"string","default":"","title":"As Of"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/inventory/consignment":{"get":{"summary":"Consignment Report","description":"List every consigned ingredient with on-hand qty + supplier +\nvalue-at-risk, per branch, so Joy can see how much unsold\nconsignment stock is sitting on the shelves and decide what to\nreturn. Branch filter mirrors /stock; as-of date lets you check\nhistorical positions (e.g. \"what did we owe on consignment at\nend of last month\").","operationId":"consignment_report_inventory_consignment_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"as_of","in":"query","required":false,"schema":{"type":"string","default":"","title":"As Of"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/inventory/consignment/return":{"post":{"summary":"Consignment Log Return","description":"Log a RETURNED_TO_SUPPLIER transaction. Called from the Log\nReturn modal on the consignment report. Snapshots is_consigned=1\non the txn row explicitly (bypasses the usual ingredient lookup)\nsince by definition we only get here for consigned items.\n\nAdmin-only: mirrors the /entries ADJUSTMENT gate since a supplier\nreturn is a financial event (reduces our consignment liability\nand the supplier's expected payment).","operationId":"consignment_log_return_inventory_consignment_return_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/activity-log":{"get":{"summary":"Activity Log View","operationId":"activity_log_view_activity_log_get","parameters":[{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reports/end-inventory-variance":{"get":{"summary":"Report End Inventory Variance","operationId":"report_end_inventory_variance_reports_end_inventory_variance_get","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"this_month","title":"Period"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"}},{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"show","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Show"}},{"name":"min_amount","in":"query","required":false,"schema":{"type":"number","default":5000.0,"title":"Min Amount"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reports/end-inventory-variance/export":{"get":{"summary":"Report End Inventory Variance Export","operationId":"report_end_inventory_variance_export_reports_end_inventory_variance_export_get","parameters":[{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"csv","title":"Fmt"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"this_month","title":"Period"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"}},{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"show","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Show"}},{"name":"min_amount","in":"query","required":false,"schema":{"type":"number","default":5000.0,"title":"Min Amount"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/inventory":{"get":{"summary":"Inventory Dashboard","description":"Per-ingredient inventory view (quantity-focused, with on-hand cost).\n\nThree modes:\n  * mode=balance (default) -- book balance computed from transactions.\n    Uses any END_INVENTORY count as an anchor; movements since the\n    count are added on top. Auto-populates even when nothing has been\n    counted. This is the \"what do I have right now\" view.\n  * mode=period -- pairs counted within the selected period, plus\n    their period activity (received / used / etc.). Anchors on\n    physical counts, so it's the variance-friendly view.\n  * mode=current -- the latest END_INVENTORY snapshot per pair across\n    all time. Pure physical-count view, no movements.","operationId":"inventory_dashboard_inventory_get","parameters":[{"name":"mode","in":"query","required":false,"schema":{"type":"string","default":"balance","title":"Mode"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"this_month","title":"Period"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"}},{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/inventory/export":{"get":{"summary":"Inventory Dashboard Export","operationId":"inventory_dashboard_export_inventory_export_get","parameters":[{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"csv","title":"Fmt"}},{"name":"mode","in":"query","required":false,"schema":{"type":"string","default":"balance","title":"Mode"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"this_month","title":"Period"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"}},{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reports/inventory-movements":{"get":{"summary":"Report Inventory Movements","description":"Per-ingredient movement breakdown for the period.\n\nSame source data as the variance report, but the columns emphasise\nthe flow (Beginning -> +Received -> +Transfer in -> -Used -> ...\n= On-hand) rather than the variance. Useful for explaining\n\"what happened to this ingredient this month\" without the noise\nof the variance focus.","operationId":"report_inventory_movements_reports_inventory_movements_get","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"this_month","title":"Period"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"}},{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reports/inventory-movements/export":{"get":{"summary":"Report Inventory Movements Export","operationId":"report_inventory_movements_export_reports_inventory_movements_export_get","parameters":[{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"csv","title":"Fmt"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"this_month","title":"Period"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"}},{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/requisitions":{"get":{"summary":"Req List","operationId":"req_list_requisitions_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Status"}},{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"bu_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Bu Id"}},{"name":"brand_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Brand Id"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"this_month","title":"Period"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/requisitions/new":{"get":{"summary":"Req New","operationId":"req_new_requisitions_new_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Req Create","operationId":"req_create_requisitions_new_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/requisitions/bulk-archive":{"post":{"summary":"Req Bulk Archive","description":"Bulk archive/restore selected requisitions (superadmin cleanup).","operationId":"req_bulk_archive_requisitions_bulk_archive_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/requisitions/bulk-delete":{"post":{"summary":"Req Bulk Delete","description":"Bulk hard-delete selected requisitions (superadmin). Each runs in its own\ntransaction reusing the per-row delete logic, so one failure won't abort the\nbatch, and every posted inventory entry is reversed (transactions by ref).","operationId":"req_bulk_delete_requisitions_bulk_delete_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/requisitions/reconcile-scan":{"get":{"summary":"Req Reconcile Scan","description":"Preview page for the bulk-reconcile action -- shows every fulfilled\nline whose stored transaction qty × unit_cost_master doesn't match the\ncorrect primary-unit calculation, before any changes are applied.\n\nSafety-first: no writes, just a report. Purchasing/Admin can then hit\nthe Apply button on this page to run the actual sweep.","operationId":"req_reconcile_scan_requisitions_reconcile_scan_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/requisitions/reconcile-all":{"post":{"summary":"Req Reconcile All","description":"Apply the reconciliation to every fulfilled line whose stored\ntransaction doesn't match unit-aware primary-unit pricing. Runs the\nsame three-step update as the per-line reconcile (transaction, PO\nline, PO header) for each candidate, in a single DB session.\n\nIdempotent: rows already at the correct values are skipped, so a\nre-run is a no-op. Logs one audit entry per line changed.","operationId":"req_reconcile_all_requisitions_reconcile_all_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/requisitions/{req_id}/lines/{line_id}/reconcile":{"post":{"summary":"Req Reconcile Line","description":"One-click amount fix for a fulfilled line that was saved before the\nunit-aware pricing patch. Recomputes what the receipt SHOULD have been\n(using _unit_master_price with the picked unit + portion pricing) and\napplies the same three-step correction as the manual \"Correct amount\"\nflow -- transaction row, PO line, PO header.\n\nSafe-by-default:\n  * Only fulfilled lines qualify (draft / partial / cancelled all bounce).\n  * No-op when the stored amount already matches the computed value\n    within a cent (so re-clicking won't stack corrections).\n  * Only Purchasing / Admin can trigger it (same gate as adjust).\n  * Reads the picked unit + portion pricing from the DB; never trusts\n    form input for anything but the CSRF context.\n\nDistinct from adjust: adjust takes user-entered figures. Reconcile\ncomputes them and requires no input. Use adjust when the supplier\ninvoice differs from the auto-computed price; use reconcile when the\nstored value is wrong because of the pre-patch pricing bug.","operationId":"req_reconcile_line_requisitions__req_id__lines__line_id__reconcile_post","parameters":[{"name":"req_id","in":"path","required":true,"schema":{"type":"integer","title":"Req Id"}},{"name":"line_id","in":"path","required":true,"schema":{"type":"integer","title":"Line Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/requisitions/{req_id}":{"get":{"summary":"Req Detail","operationId":"req_detail_requisitions__req_id__get","parameters":[{"name":"req_id","in":"path","required":true,"schema":{"type":"integer","title":"Req Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Req Update","description":"Save edits to a draft requisition.\n\nLine strategy: DELETE all existing lines then INSERT the new set.\nSimpler than diffing, safe because drafts haven't been processed\nyet so nothing downstream references specific line ids.\n\nAlso handles the 'Submit for processing' button on the edit form\n(form action=submit) so the user can save-and-submit in one click\nwithout a second round-trip to /submit.","operationId":"req_update_requisitions__req_id__post","parameters":[{"name":"req_id","in":"path","required":true,"schema":{"type":"integer","title":"Req Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/requisitions/{req_id}/submit":{"post":{"summary":"Req Submit","operationId":"req_submit_requisitions__req_id__submit_post","parameters":[{"name":"req_id","in":"path","required":true,"schema":{"type":"integer","title":"Req Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/requisitions/{req_id}/edit":{"get":{"summary":"Req Edit","description":"Render the requisition form in edit mode, pre-populated.","operationId":"req_edit_requisitions__req_id__edit_get","parameters":[{"name":"req_id","in":"path","required":true,"schema":{"type":"integer","title":"Req Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/requisitions/{req_id}/clone":{"post":{"summary":"Req Clone","description":"Duplicate an existing REQ into a new draft, drop user into edit.","operationId":"req_clone_requisitions__req_id__clone_post","parameters":[{"name":"req_id","in":"path","required":true,"schema":{"type":"integer","title":"Req Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/requisitions/{req_id}/process":{"post":{"summary":"Req Process","description":"Purchaser assigns source_type per line and sets to approved.","operationId":"req_process_requisitions__req_id__process_post","parameters":[{"name":"req_id","in":"path","required":true,"schema":{"type":"integer","title":"Req Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/requisitions/{req_id}/admin-approve":{"post":{"summary":"Req Admin Approve","operationId":"req_admin_approve_requisitions__req_id__admin_approve_post","parameters":[{"name":"req_id","in":"path","required":true,"schema":{"type":"integer","title":"Req Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/requisitions/{req_id}/dispatch":{"post":{"summary":"Req Dispatch","description":"Oct 26, 2026 -- the sending branch (Central Kitchen / transfer source)\nrecords what actually LEFT, per line: form dispatch_qty_<line_id>.\nNo stock moves here -- the source is deducted by the SENT qty when the\nstore receives (so nothing is counted twice), and sent vs received is\nthe transfer variance.","operationId":"req_dispatch_requisitions__req_id__dispatch_post","parameters":[{"name":"req_id","in":"path","required":true,"schema":{"type":"integer","title":"Req Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/requisitions/{req_id}/lines/{line_id}/fulfill":{"post":{"summary":"Req Fulfill Line","description":"Record a receipt against a line.\n\nSupports PARTIAL deliveries: each receipt is ADDED to whatever was\nreceived before (cumulative), so a 1,000 g line can arrive in two\ndrops. The line stays 'partial' until the cumulative received meets\nor exceeds the ordered quantity, then flips to 'fulfilled'. The\nvariance is measured against the ORDERED quantity (the commitment the\nbranch is checking against) and surfaced in the confirmation message.","operationId":"req_fulfill_line_requisitions__req_id__lines__line_id__fulfill_post","parameters":[{"name":"req_id","in":"path","required":true,"schema":{"type":"integer","title":"Req Id"}},{"name":"line_id","in":"path","required":true,"schema":{"type":"integer","title":"Line Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/requisitions/{req_id}/lines/{line_id}/adjust":{"post":{"summary":"Req Adjust Amount","description":"Correct a received line's quantity and/or peso amount AFTER it was\nreceived.\n\nThis is the Accounting-style fix for when the wrong number went in at\nreceive time. It is strictly limited to Purchasing + Admin by ROLE\nMEMBERSHIP — not the process_delivery permission — so no branch role can\nreach it even though branch roles can receive goods.\n\nAmount-driven: the corrected amount is the value of record, and the unit\ncost is back-computed from it (amount ÷ qty). The fix is propagated to\nall three places the original receipt touched — the requisition line, the\nposted inventory entry, and the PO line/total — and written to the audit\ntrail. Every step is defensive: a failure in one place is logged and\nskipped rather than 500-ing the page.","operationId":"req_adjust_amount_requisitions__req_id__lines__line_id__adjust_post","parameters":[{"name":"req_id","in":"path","required":true,"schema":{"type":"integer","title":"Req Id"}},{"name":"line_id","in":"path","required":true,"schema":{"type":"integer","title":"Line Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/requisitions/{req_id}/cancel":{"post":{"summary":"Req Cancel","operationId":"req_cancel_requisitions__req_id__cancel_post","parameters":[{"name":"req_id","in":"path","required":true,"schema":{"type":"integer","title":"Req Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/requisitions/{req_id}/archive":{"post":{"summary":"Req Archive","operationId":"req_archive_requisitions__req_id__archive_post","parameters":[{"name":"req_id","in":"path","required":true,"schema":{"type":"integer","title":"Req Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/requisitions/{req_id}/restore":{"post":{"summary":"Req Restore","operationId":"req_restore_requisitions__req_id__restore_post","parameters":[{"name":"req_id","in":"path","required":true,"schema":{"type":"integer","title":"Req Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/requisitions/{req_id}/delete":{"post":{"summary":"Req Delete","operationId":"req_delete_requisitions__req_id__delete_post","parameters":[{"name":"req_id","in":"path","required":true,"schema":{"type":"integer","title":"Req Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/requisitions/{req_id}/pdf":{"get":{"summary":"Req Pdf","description":"Requisition PDF export.\n\nDefault (`/requisitions/{id}/pdf`) is the DR format — no prices, no\ntotals, no cost column. This is the document that travels with the\ngoods to the branch; branches shouldn't see internal pricing on\ndelivery receipts because the goods came from commissary stock, not\na supplier purchase.\n\nCosted variant (`/requisitions/{id}/pdf?costed=1`) shows prices and\nthe estimated total for internal cost analysis. Permission-gated\nby see_po_amounts and marked with an amber \"INTERNAL — CONTAINS\nPRICING\" banner at the top so accidental circulation is obvious.","operationId":"req_pdf_requisitions__req_id__pdf_get","parameters":[{"name":"req_id","in":"path","required":true,"schema":{"type":"integer","title":"Req Id"}},{"name":"costed","in":"query","required":false,"schema":{"type":"string","default":"","title":"Costed"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/requisitions/{req_id}/xlsx":{"get":{"summary":"Req Xlsx","description":"Requisition Excel export. Same DR-by-default / costed=1 opt-in\nbehavior as the PDF export — see req_pdf docstring for rationale.","operationId":"req_xlsx_requisitions__req_id__xlsx_get","parameters":[{"name":"req_id","in":"path","required":true,"schema":{"type":"integer","title":"Req Id"}},{"name":"costed","in":"query","required":false,"schema":{"type":"string","default":"","title":"Costed"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/purchasing/canvass":{"get":{"summary":"Canvass List","operationId":"canvass_list_purchasing_canvass_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Status"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Canvass Create","operationId":"canvass_create_purchasing_canvass_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/purchasing/canvass/new":{"get":{"summary":"Canvass New","operationId":"canvass_new_purchasing_canvass_new_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/purchasing/canvass/{canvass_id}":{"get":{"summary":"Canvass Detail","operationId":"canvass_detail_purchasing_canvass__canvass_id__get","parameters":[{"name":"canvass_id","in":"path","required":true,"schema":{"type":"integer","title":"Canvass Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/purchasing/canvass/{canvass_id}/award":{"post":{"summary":"Canvass Award","description":"Save the awarded supplier + price for each line.","operationId":"canvass_award_purchasing_canvass__canvass_id__award_post","parameters":[{"name":"canvass_id","in":"path","required":true,"schema":{"type":"integer","title":"Canvass Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/purchasing/canvass/{canvass_id}/generate-po":{"post":{"summary":"Canvass Generate Po","description":"Generate one PO per awarded supplier from this canvass.","operationId":"canvass_generate_po_purchasing_canvass__canvass_id__generate_po_post","parameters":[{"name":"canvass_id","in":"path","required":true,"schema":{"type":"integer","title":"Canvass Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/purchasing/canvass/{canvass_id}/cancel":{"post":{"summary":"Canvass Cancel","operationId":"canvass_cancel_purchasing_canvass__canvass_id__cancel_post","parameters":[{"name":"canvass_id","in":"path","required":true,"schema":{"type":"integer","title":"Canvass Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/purchasing/orders":{"get":{"summary":"Po List","operationId":"po_list_purchasing_orders_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Status"}},{"name":"supplier_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Supplier Id"}},{"name":"bu_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Bu Id"}},{"name":"brand_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Brand Id"}},{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"all_time","title":"Period"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"item","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Item"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Po Create","operationId":"po_create_purchasing_orders_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/purchasing/orders/pending-count":{"get":{"summary":"Po Pending Count","description":"Nov 30, 2026 (Joy): feeds the top-bar PO bell so approvers can see at a\nglance how many POs are waiting -- \"specially for the PO\". Returns:\n  count      = draft POs awaiting approval (matches /purchasing/orders?status=draft)\n  accounting = received POs not yet transmitted to Accounting (hand-off queue)\nScope mirrors the PO list default (all visible POs, non-archived), so the\nnumber always matches what the bell click opens. Defined BEFORE the\n/purchasing/orders/{po_id} route so the literal path wins.","operationId":"po_pending_count_purchasing_orders_pending_count_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/purchasing/orders/export":{"get":{"summary":"Po Export","description":"Download the PO list (respecting all active filters) as CSV or Excel.","operationId":"po_export_purchasing_orders_export_get","parameters":[{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"csv","title":"Fmt"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Status"}},{"name":"supplier_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Supplier Id"}},{"name":"bu_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Bu Id"}},{"name":"brand_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Brand Id"}},{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"all_time","title":"Period"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"item","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Item"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/purchasing/orders/new":{"get":{"summary":"Po New","description":"Create a standalone PO (without a canvass).","operationId":"po_new_purchasing_orders_new_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/purchasing/orders/{po_id}/edit":{"get":{"summary":"Po Edit Form","description":"Render po_form.html pre-populated from an existing PO for editing.","operationId":"po_edit_form_purchasing_orders__po_id__edit_get","parameters":[{"name":"po_id","in":"path","required":true,"schema":{"type":"integer","title":"Po Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Po Edit Save","description":"Save edits to an existing PO. Full replace on lines (delete +\nreinsert) since add/remove is allowed. Header fields updated in\nplace. Total recomputed from the new lines.","operationId":"po_edit_save_purchasing_orders__po_id__edit_post","parameters":[{"name":"po_id","in":"path","required":true,"schema":{"type":"integer","title":"Po Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/purchasing/orders/bulk-archive":{"post":{"summary":"Po Bulk Archive","description":"Bulk archive/restore selected purchase orders (superadmin cleanup).","operationId":"po_bulk_archive_purchasing_orders_bulk_archive_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/purchasing/orders/bulk-delete":{"post":{"summary":"Po Bulk Delete","description":"Bulk hard-delete selected purchase orders (superadmin). Each runs in its\nown transaction reusing the per-row delete logic, so one failure won't abort\nthe batch, and every RECEIVED stock entry is reversed (transactions by PO#).","operationId":"po_bulk_delete_purchasing_orders_bulk_delete_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/purchasing/orders/{po_id}":{"get":{"summary":"Po Detail","operationId":"po_detail_purchasing_orders__po_id__get","parameters":[{"name":"po_id","in":"path","required":true,"schema":{"type":"integer","title":"Po Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/purchasing/orders/{po_id}/approve":{"post":{"summary":"Po Approve","operationId":"po_approve_purchasing_orders__po_id__approve_post","parameters":[{"name":"po_id","in":"path","required":true,"schema":{"type":"integer","title":"Po Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/purchasing/orders/{po_id}/review":{"post":{"summary":"Po Review","description":"Mid-workflow review by a Head Purchaser (or Brand/Area Manager, or any\nuser with access_po_review). Records the reviewer + timestamp on the PO\nwithout changing status — the GM's Approve action stays available with\nor without a review (per Joy's spec: no restriction for GM). First review\nwins; a re-review attempt is rejected to prevent silent overwrite of the\naudit trail. Auto-review at creation time (see _maybe_auto_review) also\ncounts as first review, so a creator with access_po_review sees the PO\nalready marked reviewed when they land on the detail page.","operationId":"po_review_purchasing_orders__po_id__review_post","parameters":[{"name":"po_id","in":"path","required":true,"schema":{"type":"integer","title":"Po Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/purchasing/orders/{po_id}/comments":{"post":{"summary":"Po Comments Save","description":"Save operator comments on a PO. Distinct from the auto-populated\n`notes` field (which typically holds \"From REQ-XXX\"). Comments render\non the PDF below Notes so both are visible to the supplier. Empty\nsubmission stores NULL so the PDF's Comments section disappears when\nthe operator clears the box.","operationId":"po_comments_save_purchasing_orders__po_id__comments_post","parameters":[{"name":"po_id","in":"path","required":true,"schema":{"type":"integer","title":"Po Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/purchasing/orders/{po_id}/charges":{"post":{"summary":"Po Charges Save","description":"Save the VAT rate, shipping/handling, and other charges on a PO.\nThese flow into the PDF pricing summary block (SUBTOTAL / VAT / S&H /\nOTHER / TOTAL). Grand total is computed at render time so this route\nonly stores the raw values, not the derived total.\n\nAll values clamped to >= 0 so a negative can't accidentally reduce the\ngrand total. VAT rate is treated as a percentage (12 = 12%); values\nabove 100 are rejected as a data-entry safety catch.","operationId":"po_charges_save_purchasing_orders__po_id__charges_post","parameters":[{"name":"po_id","in":"path","required":true,"schema":{"type":"integer","title":"Po Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/purchasing/orders/{po_id}/receive":{"post":{"summary":"Po Receive","description":"Mark PO as received and optionally create RECEIVED entries in transactions.","operationId":"po_receive_purchasing_orders__po_id__receive_post","parameters":[{"name":"po_id","in":"path","required":true,"schema":{"type":"integer","title":"Po Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/purchasing/receiving-check":{"get":{"summary":"Receiving Check Page","operationId":"receiving_check_page_purchasing_receiving_check_get","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"last_90","title":"Period"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/purchasing/suppliers/names.json":{"get":{"summary":"Supplier Names Json","description":"Oct 30, 2026: supplier names for the type-to-search Supplier boxes.","operationId":"supplier_names_json_purchasing_suppliers_names_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/purchasing/orders/{po_id}/correct-received":{"get":{"summary":"Po Correct Received Get","description":"Oct 30, 2026: opening this address directly (page refreshed, Back\nbutton, or a reload after saving) used to show \"Method Not Allowed\".\nSend the person back to the PO instead.","operationId":"po_correct_received_get_purchasing_orders__po_id__correct_received_get","parameters":[{"name":"po_id","in":"path","required":true,"schema":{"type":"integer","title":"Po Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Po Correct Received","description":"Post-receipt correction of actual received quantities. Used when\nthe invoice arrives after delivery and shows a different qty than\nwhat was entered at receipt (or when the receiver mis-typed at\nreceive time). Updates po_lines.qty_received/amount_received AND\nrewrites the RECEIVED inventory transactions so on-hand stock\nreflects the correction — no manual daily-entry editing.\n\nSame permission gate as receive (PURCHASING_ROLES). Only allowed on\nreceived/paid POs. The old transactions row for each affected line\nis DELETEd and re-INSERTed with the corrected qty (converted to\nthe ingredient master unit).","operationId":"po_correct_received_purchasing_orders__po_id__correct_received_post","parameters":[{"name":"po_id","in":"path","required":true,"schema":{"type":"integer","title":"Po Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/purchasing/orders/{po_id}/confirm-prices":{"post":{"summary":"Po Confirm Prices","description":"Oct 29, 2026: the supplier invoice arrived and its prices match the\nPO -- confirm without retyping (otherwise use Correct received).","operationId":"po_confirm_prices_purchasing_orders__po_id__confirm_prices_post","parameters":[{"name":"po_id","in":"path","required":true,"schema":{"type":"integer","title":"Po Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/purchasing/orders/{po_id}/unconfirm-prices":{"post":{"summary":"Po Unconfirm Prices","description":"Oct 29, 2026: undo \"prices confirmed\" -- the PO goes back to the\n\"Prices not confirmed against the invoice\" list. Prices typed with\nCorrect received stay as they are (correct them again if needed).\nNot once the PO is on a Process for Payment / paid.","operationId":"po_unconfirm_prices_purchasing_orders__po_id__unconfirm_prices_post","parameters":[{"name":"po_id","in":"path","required":true,"schema":{"type":"integer","title":"Po Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/purchasing/orders/{po_id}/send-to-accounting":{"post":{"summary":"Po Send To Accounting","description":"Forward a received PO's invoice to Accounting for payment processing.\nMoves payment_status: unpaid -> for_processing.","operationId":"po_send_to_accounting_purchasing_orders__po_id__send_to_accounting_post","parameters":[{"name":"po_id","in":"path","required":true,"schema":{"type":"integer","title":"Po Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/purchasing/orders/{po_id}/mark-paid":{"post":{"summary":"Po Mark Paid","description":"Record that payment was released to the supplier.\nMoves payment_status: for_processing -> paid, capturing the payment date\nand an OR / reference number.","operationId":"po_mark_paid_purchasing_orders__po_id__mark_paid_post","parameters":[{"name":"po_id","in":"path","required":true,"schema":{"type":"integer","title":"Po Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/purchasing/orders/{po_id}/cancel":{"post":{"summary":"Po Cancel","operationId":"po_cancel_purchasing_orders__po_id__cancel_post","parameters":[{"name":"po_id","in":"path","required":true,"schema":{"type":"integer","title":"Po Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/purchasing/orders/{po_id}/archive":{"post":{"summary":"Po Archive","operationId":"po_archive_purchasing_orders__po_id__archive_post","parameters":[{"name":"po_id","in":"path","required":true,"schema":{"type":"integer","title":"Po Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/purchasing/orders/{po_id}/restore":{"post":{"summary":"Po Restore","operationId":"po_restore_purchasing_orders__po_id__restore_post","parameters":[{"name":"po_id","in":"path","required":true,"schema":{"type":"integer","title":"Po Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/purchasing/orders/{po_id}/delete":{"post":{"summary":"Po Delete","operationId":"po_delete_purchasing_orders__po_id__delete_post","parameters":[{"name":"po_id","in":"path","required":true,"schema":{"type":"integer","title":"Po Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/purchasing/orders/{po_id}/invoice-details":{"post":{"summary":"Po Invoice Details","description":"Record/update the supplier document references on a PO — including\nAFTER it has been received.\n\nThe supplier's sales invoice often arrives days after the goods, so this\nlets Purchasing/Admin attach the invoice no., DR no., invoice date, and\npayment terms to an existing PO at any time. Used for the liquidation\npacket (the printed PO is stapled to the supplier invoice, so the PO must\ncarry the invoice number for traceability). The due date is recomputed\nfrom the invoice date + terms. Blank fields are written as cleared so an\nedit can also correct a typo.","operationId":"po_invoice_details_purchasing_orders__po_id__invoice_details_post","parameters":[{"name":"po_id","in":"path","required":true,"schema":{"type":"integer","title":"Po Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/purchasing/canvass/from-requisition/{req_id}":{"get":{"summary":"Canvass From Requisition","description":"Pre-fill a canvass form from a requisition's purchase-sourced lines.","operationId":"canvass_from_requisition_purchasing_canvass_from_requisition__req_id__get","parameters":[{"name":"req_id","in":"path","required":true,"schema":{"type":"integer","title":"Req Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Canvass From Requisition Create","description":"Create canvass sheet linked to a requisition.","operationId":"canvass_from_requisition_create_purchasing_canvass_from_requisition__req_id__post","parameters":[{"name":"req_id","in":"path","required":true,"schema":{"type":"integer","title":"Req Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/purchasing/orders/from-requisition/{req_id}":{"get":{"summary":"Po From Requisition","description":"Skip canvass — go straight to PO(s) from requisition purchase lines.\nGroups lines by supplier so each supplier gets its own PO.","operationId":"po_from_requisition_purchasing_orders_from_requisition__req_id__get","parameters":[{"name":"req_id","in":"path","required":true,"schema":{"type":"integer","title":"Req Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Po From Requisition Create","description":"Create one PO per supplier group from requisition — no canvass.\n\nForm sends data grouped by supplier index:\n  supplier_id_0, po_date_0, branch_id_0,\n  ingredient_id_0[], qty_0[], unit_0[], unit_price_0[]\n  supplier_id_1, po_date_1, ...  (for second supplier group)","operationId":"po_from_requisition_create_purchasing_orders_from_requisition__req_id__post","parameters":[{"name":"req_id","in":"path","required":true,"schema":{"type":"integer","title":"Req Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/purchasing/orders/{po_id}/pdf":{"get":{"summary":"Po Export Pdf","description":"prices=0 -> supplier copy: item, spec, qty, unit only. No unit\nprice, amounts, received columns or pricing summary (Oct 22, 2026 --\nfor market goods whose price changes daily).","operationId":"po_export_pdf_purchasing_orders__po_id__pdf_get","parameters":[{"name":"po_id","in":"path","required":true,"schema":{"type":"integer","title":"Po Id"}},{"name":"prices","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Prices"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/purchasing/orders/{po_id}/xlsx":{"get":{"summary":"Po Export Xlsx","operationId":"po_export_xlsx_purchasing_orders__po_id__xlsx_get","parameters":[{"name":"po_id","in":"path","required":true,"schema":{"type":"integer","title":"Po Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/purchasing/orders/{po_id}/transmittal":{"get":{"summary":"Po Transmittal Pdf","description":"Downloadable Transmittal / Delivery Receipt (DR) form for a PO.\n\nA goods-movement document (not a money document): it lists what is being\ndelivered/transmitted with quantities, carries the supplier invoice + DR\nreferences and terms when present, and provides Delivered-by / Received-by\nsign-off lines. Amounts are intentionally omitted so it can be handed to a\ndriver or branch without exposing pricing.","operationId":"po_transmittal_pdf_purchasing_orders__po_id__transmittal_get","parameters":[{"name":"po_id","in":"path","required":true,"schema":{"type":"integer","title":"Po Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/company":{"get":{"summary":"Company Settings Page","operationId":"company_settings_page_settings_company_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Company Settings Save","operationId":"company_settings_save_settings_company_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_company_settings_save_settings_company_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/company/logo":{"get":{"summary":"Company Logo Serve","operationId":"company_logo_serve_settings_company_logo_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Company Logo Upload","operationId":"company_logo_upload_settings_company_logo_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_company_logo_upload_settings_company_logo_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/approvals/count":{"get":{"summary":"Approvals Count","description":"Lightweight JSON endpoint for nav badge polling.","operationId":"approvals_count_approvals_count_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/approvals":{"get":{"summary":"Approvals Page","operationId":"approvals_page_approvals_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reorder":{"get":{"summary":"Reorder Page","operationId":"reorder_page_reorder_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Branch Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reorder/create-requisition":{"post":{"summary":"Reorder Create Requisition","description":"Create a requisition from selected reorder items.\n\nForm fields:\n  branch_id         (the requesting branch)\n  ingredient_id[]   (selected items)\n  qty_<ing_id>      (chosen qty for each item)\n  source_<ing_id>   (where to fulfill from)\n  notes             (optional notes for the whole requisition)","operationId":"reorder_create_requisition_reorder_create_requisition_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/stock-releases":{"get":{"summary":"Sr List","operationId":"sr_list_stock_releases_get","parameters":[{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Sr Create","operationId":"sr_create_stock_releases_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/stock-releases/settings":{"post":{"summary":"Sr Settings","operationId":"sr_settings_stock_releases_settings_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/stock-releases/new":{"get":{"summary":"Sr New","operationId":"sr_new_stock_releases_new_get","parameters":[{"name":"kind","in":"query","required":false,"schema":{"type":"string","default":"rts","title":"Kind"}},{"name":"po_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Po Id"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stock-releases/{rid}":{"get":{"summary":"Sr Detail","operationId":"sr_detail_stock_releases__rid__get","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"integer","title":"Rid"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stock-releases/{rid}/{action}":{"post":{"summary":"Sr Action","operationId":"sr_action_stock_releases__rid___action__post","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"integer","title":"Rid"}},{"name":"action","in":"path","required":true,"schema":{"type":"string","title":"Action"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stock-releases/{rid}/pdf":{"get":{"summary":"Sr Pdf","operationId":"sr_pdf_stock_releases__rid__pdf_get","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"integer","title":"Rid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/my-signature":{"get":{"summary":"My Signature","operationId":"my_signature_my_signature_get","parameters":[{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"My Signature Save","operationId":"my_signature_save_my_signature_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/my-signature/image":{"get":{"summary":"My Signature Image","operationId":"my_signature_image_my_signature_image_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/access-review":{"get":{"summary":"Access Review","operationId":"access_review_admin_access_review_get","parameters":[{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/access-review/{action}":{"post":{"summary":"Access Review Action","operationId":"access_review_action_admin_access_review__action__post","parameters":[{"name":"action","in":"path","required":true,"schema":{"type":"string","title":"Action"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/petty-cash":{"get":{"summary":"Petty Cash Home","operationId":"petty_cash_home_petty_cash_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Branch Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/petty-cash/funds":{"get":{"summary":"Funds List","operationId":"funds_list_petty_cash_funds_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Fund Create","operationId":"fund_create_petty_cash_funds_post","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_fund_create_petty_cash_funds_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/petty-cash/funds/{fund_id}":{"post":{"summary":"Fund Update","operationId":"fund_update_petty_cash_funds__fund_id__post","parameters":[{"name":"fund_id","in":"path","required":true,"schema":{"type":"integer","title":"Fund Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_fund_update_petty_cash_funds__fund_id__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/petty-cash/expenses/new":{"get":{"summary":"Expense New","operationId":"expense_new_petty_cash_expenses_new_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Branch Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Expense Create","operationId":"expense_create_petty_cash_expenses_new_post","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_expense_create_petty_cash_expenses_new_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/petty-cash/expenses/{expense_id}/receipt":{"get":{"summary":"Expense Receipt","operationId":"expense_receipt_petty_cash_expenses__expense_id__receipt_get","parameters":[{"name":"expense_id","in":"path","required":true,"schema":{"type":"integer","title":"Expense Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/petty-cash/expenses/{expense_id}/delete":{"post":{"summary":"Expense Delete","operationId":"expense_delete_petty_cash_expenses__expense_id__delete_post","parameters":[{"name":"expense_id","in":"path","required":true,"schema":{"type":"integer","title":"Expense Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/petty-cash/liquidations/submit":{"post":{"summary":"Liquidation Submit","operationId":"liquidation_submit_petty_cash_liquidations_submit_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_liquidation_submit_petty_cash_liquidations_submit_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/petty-cash/liquidations":{"get":{"summary":"Liquidations List","operationId":"liquidations_list_petty_cash_liquidations_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"submitted","title":"Status"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/petty-cash/liquidations/{liq_id}/archive":{"post":{"summary":"Liquidation Archive","operationId":"liquidation_archive_petty_cash_liquidations__liq_id__archive_post","parameters":[{"name":"liq_id","in":"path","required":true,"schema":{"type":"integer","title":"Liq Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/petty-cash/liquidations/{liq_id}/restore":{"post":{"summary":"Liquidation Restore","operationId":"liquidation_restore_petty_cash_liquidations__liq_id__restore_post","parameters":[{"name":"liq_id","in":"path","required":true,"schema":{"type":"integer","title":"Liq Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/petty-cash/liquidations/{liq_id}/delete":{"post":{"summary":"Liquidation Delete","operationId":"liquidation_delete_petty_cash_liquidations__liq_id__delete_post","parameters":[{"name":"liq_id","in":"path","required":true,"schema":{"type":"integer","title":"Liq Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/petty-cash/liquidations/bulk-archive":{"post":{"summary":"Liquidation Bulk Archive","description":"Bulk archive/restore selected liquidations (superadmin cleanup).","operationId":"liquidation_bulk_archive_petty_cash_liquidations_bulk_archive_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/petty-cash/liquidations/bulk-delete":{"post":{"summary":"Liquidation Bulk Delete","description":"Bulk hard-delete selected liquidations (superadmin). Each runs in its own\ntransaction reusing the per-row delete logic: the still-owed amount is\nrestored to the fund, the approval's replenishment is removed, then the\nexpenses and the liquidation are deleted. One failure won't abort the batch.","operationId":"liquidation_bulk_delete_petty_cash_liquidations_bulk_delete_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/petty-cash/liquidations/{liq_id}":{"get":{"summary":"Liquidation Detail","operationId":"liquidation_detail_petty_cash_liquidations__liq_id__get","parameters":[{"name":"liq_id","in":"path","required":true,"schema":{"type":"integer","title":"Liq Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/petty-cash/liquidations/{liq_id}/export.csv":{"get":{"summary":"Liquidation Export Csv","operationId":"liquidation_export_csv_petty_cash_liquidations__liq_id__export_csv_get","parameters":[{"name":"liq_id","in":"path","required":true,"schema":{"type":"integer","title":"Liq Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/petty-cash/liquidations/{liq_id}/export.xlsx":{"get":{"summary":"Liquidation Export Xlsx","operationId":"liquidation_export_xlsx_petty_cash_liquidations__liq_id__export_xlsx_get","parameters":[{"name":"liq_id","in":"path","required":true,"schema":{"type":"integer","title":"Liq Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/petty-cash/liquidations/{liq_id}/print":{"get":{"summary":"Liquidation Print","description":"Standalone printable view. Renders the same data as detail but\nstripped of nav/sidebar with print-optimized CSS and window.print()\non load. Users hit their browser's Save as PDF / Cancel from the\ndialog if they only want a preview.","operationId":"liquidation_print_petty_cash_liquidations__liq_id__print_get","parameters":[{"name":"liq_id","in":"path","required":true,"schema":{"type":"integer","title":"Liq Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/petty-cash/liquidations/{liq_id}/approve":{"post":{"summary":"Liquidation Approve","description":"Approve a liquidation. Any expense IDs in `rejected_ids` (comma-separated)\nget marked rejected; the rest are approved. The approved total becomes\na replenishment that adds back to the fund balance.\n\nPhase 3 (Aug 12, 2026): approval also generates real POs (for stock\ncategories) and expense records (for expense categories) in the same\ntransaction. See _pc_generate_pos_and_expense_records for the split\nlogic; if generation fails the whole approve rolls back cleanly.","operationId":"liquidation_approve_petty_cash_liquidations__liq_id__approve_post","parameters":[{"name":"liq_id","in":"path","required":true,"schema":{"type":"integer","title":"Liq Id"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_liquidation_approve_petty_cash_liquidations__liq_id__approve_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/petty-cash/categories":{"get":{"summary":"Categories Page","operationId":"categories_page_petty_cash_categories_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Category Create","operationId":"category_create_petty_cash_categories_post","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_category_create_petty_cash_categories_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/petty-cash/categories/{cat_id}/toggle-stock":{"post":{"summary":"Category Toggle Stock","description":"Flip is_stock. Stock categories generate real POs (with ingredient\n+ inventory movement) on liquidation approval; expense categories\ngenerate an expense-record row instead. See Phase 1 header comment.","operationId":"category_toggle_stock_petty_cash_categories__cat_id__toggle_stock_post","parameters":[{"name":"cat_id","in":"path","required":true,"schema":{"type":"integer","title":"Cat Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/petty-cash/categories/{cat_id}/toggle":{"post":{"summary":"Category Toggle","operationId":"category_toggle_petty_cash_categories__cat_id__toggle_post","parameters":[{"name":"cat_id","in":"path","required":true,"schema":{"type":"integer","title":"Cat Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/petty-cash/categories/{cat_id}/delete":{"post":{"summary":"Category Delete","operationId":"category_delete_petty_cash_categories__cat_id__delete_post","parameters":[{"name":"cat_id","in":"path","required":true,"schema":{"type":"integer","title":"Cat Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/petty-cash/reports":{"get":{"summary":"Reports Page","operationId":"reports_page_petty_cash_reports_get","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"this_month","title":"Period"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/petty-cash/overview":{"get":{"summary":"Pc Overview","operationId":"pc_overview_petty_cash_overview_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/petty-cash/liquidate":{"get":{"summary":"Liquidate Page","operationId":"liquidate_page_petty_cash_liquidate_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/petty-cash/liquidations/{liq_id}/v2/{action}":{"post":{"summary":"Liquidation V2 Action","operationId":"liquidation_v2_action_petty_cash_liquidations__liq_id__v2__action__post","parameters":[{"name":"liq_id","in":"path","required":true,"schema":{"type":"integer","title":"Liq Id"}},{"name":"action","in":"path","required":true,"schema":{"type":"string","title":"Action"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/petty-cash/liquidations/{liq_id}/review":{"post":{"summary":"Liquidation V2 Review","description":"Oct 29, 2026 -- the approver checks every line (voucher or Cash PO)\nagainst the receipts stapled to the printed set: OK / reject (voucher) /\ntake out (PO). Save keeps the ticks; Approve needs every line decided.","operationId":"liquidation_v2_review_petty_cash_liquidations__liq_id__review_post","parameters":[{"name":"liq_id","in":"path","required":true,"schema":{"type":"integer","title":"Liq Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/petty-cash/liquidations/{liq_id}/packet.pdf":{"get":{"summary":"Liquidation Packet","description":"Oct 29, 2026 -- the printed set for the approver: liquidation form,\ntransport / meals form, every petty cash voucher, every Cash / COD PO.\nReceipts are stapled behind by hand.","operationId":"liquidation_packet_petty_cash_liquidations__liq_id__packet_pdf_get","parameters":[{"name":"liq_id","in":"path","required":true,"schema":{"type":"integer","title":"Liq Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/petty-cash/liquidations/{liq_id}/form.pdf":{"get":{"summary":"Liquidation Form Pdf","description":"Joy's Petty Cash Liquidation Form.","operationId":"liquidation_form_pdf_petty_cash_liquidations__liq_id__form_pdf_get","parameters":[{"name":"liq_id","in":"path","required":true,"schema":{"type":"integer","title":"Liq Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/petty-cash/liquidations/{liq_id}/transport.pdf":{"get":{"summary":"Liquidation Transport Pdf","description":"Transportation / Meals / Telephone Liquidation Form -- the vouchers.","operationId":"liquidation_transport_pdf_petty_cash_liquidations__liq_id__transport_pdf_get","parameters":[{"name":"liq_id","in":"path","required":true,"schema":{"type":"integer","title":"Liq Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/petty-cash/expenses/{expense_id}/voucher.pdf":{"get":{"summary":"Voucher Pdf","operationId":"voucher_pdf_petty_cash_expenses__expense_id__voucher_pdf_get","parameters":[{"name":"expense_id","in":"path","required":true,"schema":{"type":"integer","title":"Expense Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/petty-cash/vouchers.pdf":{"get":{"summary":"Vouchers Sheet","description":"8 vouchers per A4: a liquidation's vouchers (liq_id), a fund's\nnot-yet-liquidated ones (fund_id), or a list (ids=1,2,3).","operationId":"vouchers_sheet_petty_cash_vouchers_pdf_get","parameters":[{"name":"liq_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Liq Id"}},{"name":"fund_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fund Id"}},{"name":"ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ids"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/petty-cash/categories/{cat_id}/form":{"post":{"summary":"Category Form Place","operationId":"category_form_place_petty_cash_categories__cat_id__form_post","parameters":[{"name":"cat_id","in":"path","required":true,"schema":{"type":"integer","title":"Cat Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/petty-cash/custodians":{"get":{"summary":"Custodians Page","operationId":"custodians_page_petty_cash_custodians_get","parameters":[{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/petty-cash/custodians/{brand_id}":{"post":{"summary":"Custodians Save","operationId":"custodians_save_petty_cash_custodians__brand_id__post","parameters":[{"name":"brand_id","in":"path","required":true,"schema":{"type":"integer","title":"Brand Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/petty-cash/cleanup":{"get":{"summary":"Pc Cleanup Page","operationId":"pc_cleanup_page_petty_cash_cleanup_get","parameters":[{"name":"before","in":"query","required":false,"schema":{"type":"string","default":"","title":"Before"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Pc Cleanup Apply","operationId":"pc_cleanup_apply_petty_cash_cleanup_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/petty-cash/cleanup/{expense_id}/undo":{"post":{"summary":"Pc Cleanup Undo","operationId":"pc_cleanup_undo_petty_cash_cleanup__expense_id__undo_post","parameters":[{"name":"expense_id","in":"path","required":true,"schema":{"type":"integer","title":"Expense Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/petty-cash/funds/{fund_id}/reimbursed":{"post":{"summary":"Fund Reimbursed","operationId":"fund_reimbursed_petty_cash_funds__fund_id__reimbursed_post","parameters":[{"name":"fund_id","in":"path","required":true,"schema":{"type":"integer","title":"Fund Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/notifications":{"get":{"summary":"Notifications Status","operationId":"notifications_status_settings_notifications_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/notifications/test":{"post":{"summary":"Send Test Email","operationId":"send_test_email_settings_notifications_test_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/branch-thresholds":{"get":{"summary":"Thresholds Matrix","operationId":"thresholds_matrix_branch_thresholds_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"category_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/branch-thresholds/save":{"post":{"summary":"Save Cell","description":"Save a single cell. Empty value clears the override (falls back to master).","operationId":"save_cell_branch_thresholds_save_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_save_cell_branch_thresholds_save_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/branch-thresholds/template.csv":{"get":{"summary":"Thresholds Template","operationId":"thresholds_template_branch_thresholds_template_csv_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/branch-thresholds/export.csv":{"get":{"summary":"Thresholds Export","operationId":"thresholds_export_branch_thresholds_export_csv_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/branch-thresholds/bulk-upload":{"post":{"summary":"Thresholds Bulk Upload","operationId":"thresholds_bulk_upload_branch_thresholds_bulk_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_thresholds_bulk_upload_branch_thresholds_bulk_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/daily-report":{"get":{"summary":"Reports List","operationId":"reports_list_daily_report_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Branch Id"}},{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year"}},{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Month"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/daily-report/export":{"get":{"summary":"Reports List Export","operationId":"reports_list_export_daily_report_export_get","parameters":[{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"csv","title":"Fmt"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Branch Id"}},{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year"}},{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Month"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/daily-report/{report_id}/archive":{"post":{"summary":"Dr Archive","operationId":"dr_archive_daily_report__report_id__archive_post","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/daily-report/{report_id}/restore":{"post":{"summary":"Dr Restore","operationId":"dr_restore_daily_report__report_id__restore_post","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/daily-report/{report_id}/delete":{"post":{"summary":"Dr Delete","operationId":"dr_delete_daily_report__report_id__delete_post","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/daily-report/bulk-archive":{"post":{"summary":"Dr Bulk Archive","description":"Bulk archive/restore selected daily reports (superadmin cleanup).","operationId":"dr_bulk_archive_daily_report_bulk_archive_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/daily-report/bulk-delete":{"post":{"summary":"Dr Bulk Delete","description":"Bulk hard-delete selected daily reports (superadmin). Each runs in its own\ntransaction reusing the per-row delete logic. Daily reports post no inventory,\nso there is nothing to reverse — only the report and its lines are removed.","operationId":"dr_bulk_delete_daily_report_bulk_delete_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/daily-report/new":{"get":{"summary":"Report New","operationId":"report_new_daily_report_new_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Branch Id"}},{"name":"report_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Date"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/daily-report/{report_id}/edit":{"get":{"summary":"Report Edit","operationId":"report_edit_daily_report__report_id__edit_get","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","title":"Report Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/daily-report/save":{"post":{"summary":"Report Save","description":"Single endpoint for both create and edit (idempotent on\n(branch_id, report_date) pair).","operationId":"report_save_daily_report_save_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/daily-report/import":{"get":{"summary":"Dr Import Page","operationId":"dr_import_page_daily_report_import_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/daily-report/import/template.xlsx":{"get":{"summary":"Dr Import Template","operationId":"dr_import_template_daily_report_import_template_xlsx_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/daily-report/import/preview":{"post":{"summary":"Dr Import Preview","operationId":"dr_import_preview_daily_report_import_preview_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_dr_import_preview_daily_report_import_preview_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/daily-report/import/commit":{"post":{"summary":"Dr Import Commit","operationId":"dr_import_commit_daily_report_import_commit_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/daily-report/admin/targets":{"get":{"summary":"Targets Page","operationId":"targets_page_daily_report_admin_targets_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/daily-report/admin/targets/save":{"post":{"summary":"Targets Save","operationId":"targets_save_daily_report_admin_targets_save_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/daily-report/dashboard":{"get":{"summary":"Branches Dashboard","operationId":"branches_dashboard_daily_report_dashboard_get","parameters":[{"name":"report_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Date"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/daily-report/dashboard/export":{"get":{"summary":"Branches Dashboard Export","description":"Export the All-branches sales snapshot as CSV or Excel.","operationId":"branches_dashboard_export_daily_report_dashboard_export_get","parameters":[{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"csv","title":"Fmt"}},{"name":"report_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/daily-report/dashboard/email-management":{"post":{"summary":"Branches Dashboard Email","description":"Email the All-branches sales snapshot to selected Management recipients.","operationId":"branches_dashboard_email_daily_report_dashboard_email_management_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/daily-report/86-typed":{"get":{"summary":"Typed 86 Review","operationId":"typed_86_review_daily_report_86_typed_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start"}},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Typed 86 Save","operationId":"typed_86_save_daily_report_86_typed_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/daily-report/rsv-day":{"get":{"summary":"Rsv Day Fragment","description":"Reservations panel for the form, re-drawn when the date changes.","operationId":"rsv_day_fragment_daily_report_rsv_day_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"report_date","in":"query","required":false,"schema":{"type":"string","default":"","title":"Report Date"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/daily-report/86-log":{"get":{"summary":"Log 86","description":"Nov 10, 2026: every 86'd dish across reports. A dish that carried\nover day to day shows once, with how many reports it was on.","operationId":"log_86_daily_report_86_log_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start"}},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End"}},{"name":"reason","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},{"name":"fmt","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fmt"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/daily-report/{report_id}":{"get":{"summary":"Report View","operationId":"report_view_daily_report__report_id__get","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","title":"Report Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/daily-report/{report_id}/summary":{"get":{"summary":"Report Summary","operationId":"report_summary_daily_report__report_id__summary_get","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","title":"Report Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/daily-report/{report_id}/summary.pdf":{"get":{"summary":"Summary Pdf","operationId":"summary_pdf_daily_report__report_id__summary_pdf_get","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/daily-report/{report_id}/summary.xlsx":{"get":{"summary":"Summary Xlsx","operationId":"summary_xlsx_daily_report__report_id__summary_xlsx_get","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/daily-report/{report_id}/summary.csv":{"get":{"summary":"Summary Csv","description":"CSV export of the daily report summary. Same content as the PDF and\nExcel exports (all fed by _build_summary_data), but flat CSV opens\ncleanly in any spreadsheet, email preview, or plain-text pipeline --\nhandy for owners who want raw data to slice in their own tools.","operationId":"summary_csv_daily_report__report_id__summary_csv_get","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/daily-report/{report_id}/email-owners":{"post":{"summary":"Email Owners","operationId":"email_owners_daily_report__report_id__email_owners_post","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/daily-report/{report_id}/email-management":{"post":{"summary":"Email Owners","operationId":"email_owners_daily_report__report_id__email_management_post","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/daily-report/{report_id}/viber-link":{"get":{"summary":"Viber Link","description":"Returns a URL the user clicks to forward the summary to Viber.\nViber's viber:// scheme accepts ?text= for a pre-filled forward message.","operationId":"viber_link_daily_report__report_id__viber_link_get","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/daily-report/{report_id}/copy-text":{"get":{"summary":"Copy Text","description":"Returns the full detailed summary text as JSON for the Copy button\nto read and place on the clipboard. Unlike Viber, no length limit.","operationId":"copy_text_daily_report__report_id__copy_text_get","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/daily-report/admin/owners":{"get":{"summary":"Owners Page","operationId":"owners_page_daily_report_admin_owners_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/daily-report/admin/management":{"get":{"summary":"Owners Page","operationId":"owners_page_daily_report_admin_management_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/daily-report/admin/owners/save":{"post":{"summary":"Owners Save","operationId":"owners_save_daily_report_admin_owners_save_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_owners_save_daily_report_admin_owners_save_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/daily-report/admin/management/save":{"post":{"summary":"Owners Save","operationId":"owners_save_daily_report_admin_management_save_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_owners_save_daily_report_admin_management_save_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/daily-report/admin/bulk-upload":{"get":{"summary":"Bulk Upload Page","operationId":"bulk_upload_page_daily_report_admin_bulk_upload_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Bulk Upload Submit","operationId":"bulk_upload_submit_daily_report_admin_bulk_upload_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/daily-report/admin/bulk-template.csv":{"get":{"summary":"Bulk Template Csv","operationId":"bulk_template_csv_daily_report_admin_bulk_template_csv_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/reports/financial":{"get":{"summary":"Fin Financial Report","operationId":"fin_financial_report_reports_financial_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/reports/financial/export":{"get":{"summary":"Fin Financial Report Export","operationId":"fin_financial_report_export_reports_financial_export_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/cash-deposits":{"get":{"summary":"Deposits Report","operationId":"deposits_report_cash_deposits_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"d_from","in":"query","required":false,"schema":{"type":"string","default":"","title":"D From"}},{"name":"d_to","in":"query","required":false,"schema":{"type":"string","default":"","title":"D To"}},{"name":"show","in":"query","required":false,"schema":{"type":"string","default":"problems","title":"Show"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"","title":"Fmt"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Deposit Create","operationId":"deposit_create_cash_deposits_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/cash-deposits/new":{"get":{"summary":"Deposit New","operationId":"deposit_new_cash_deposits_new_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cash-deposits/{did}":{"get":{"summary":"Deposit Detail","operationId":"deposit_detail_cash_deposits__did__get","parameters":[{"name":"did","in":"path","required":true,"schema":{"type":"integer","title":"Did"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cash-deposits/{did}/photo":{"get":{"summary":"Deposit Photo","operationId":"deposit_photo_cash_deposits__did__photo_get","parameters":[{"name":"did","in":"path","required":true,"schema":{"type":"integer","title":"Did"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cash-deposits/{did}/{action}":{"post":{"summary":"Deposit Action","operationId":"deposit_action_cash_deposits__did___action__post","parameters":[{"name":"did","in":"path","required":true,"schema":{"type":"integer","title":"Did"}},{"name":"action","in":"path","required":true,"schema":{"type":"string","title":"Action"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cash-turnovers":{"get":{"summary":"Cto List","operationId":"cto_list_cash_turnovers_get","parameters":[{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Cto Create","operationId":"cto_create_cash_turnovers_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/cash-turnovers/new":{"get":{"summary":"Cto New","operationId":"cto_new_cash_turnovers_new_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cash-turnovers/{tid}":{"get":{"summary":"Cto Detail","operationId":"cto_detail_cash_turnovers__tid__get","parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"integer","title":"Tid"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cash-turnovers/{tid}/{action}":{"post":{"summary":"Cto Action","operationId":"cto_action_cash_turnovers__tid___action__post","parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"integer","title":"Tid"}},{"name":"action","in":"path","required":true,"schema":{"type":"string","title":"Action"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cash-turnovers/{tid}/pdf":{"get":{"summary":"Cto Pdf","operationId":"cto_pdf_cash_turnovers__tid__pdf_get","parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"integer","title":"Tid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cashier-reports":{"get":{"summary":"Cvr List","operationId":"cvr_list_cashier_reports_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"d_from","in":"query","required":false,"schema":{"type":"string","default":"","title":"D From"}},{"name":"d_to","in":"query","required":false,"schema":{"type":"string","default":"","title":"D To"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"","title":"Status"}},{"name":"cashier","in":"query","required":false,"schema":{"type":"string","default":"","title":"Cashier"}},{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"","title":"Fmt"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Cvr Save","operationId":"cvr_save_cashier_reports_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/cashier-reports/new":{"get":{"summary":"Cvr New","operationId":"cvr_new_cashier_reports_new_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"report_date","in":"query","required":false,"schema":{"type":"string","default":"","title":"Report Date"}},{"name":"shift","in":"query","required":false,"schema":{"type":"string","default":"","title":"Shift"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cashier-reports/{rid}":{"get":{"summary":"Cvr Detail","operationId":"cvr_detail_cashier_reports__rid__get","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"integer","title":"Rid"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"edit","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Edit"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cashier-reports/{rid}/{action}":{"post":{"summary":"Cvr Action","operationId":"cvr_action_cashier_reports__rid___action__post","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"integer","title":"Rid"}},{"name":"action","in":"path","required":true,"schema":{"type":"string","title":"Action"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cashier-reports/{rid}/pdf":{"get":{"summary":"Cvr Pdf","operationId":"cvr_pdf_cashier_reports__rid__pdf_get","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"integer","title":"Rid"}},{"name":"download","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Download"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cashier-reports/{rid}/email":{"post":{"summary":"Cvr Email","operationId":"cvr_email_cashier_reports__rid__email_post","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"integer","title":"Rid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reports/sales-summary":{"get":{"summary":"Sales Summary","operationId":"sales_summary_reports_sales_summary_get","parameters":[{"name":"preset","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preset"}},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start"}},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End"}},{"name":"pick","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pick"}},{"name":"group","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group"}},{"name":"align","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Align"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reports/sales-summary.xlsx":{"get":{"summary":"Sales Summary Xlsx","operationId":"sales_summary_xlsx_reports_sales_summary_xlsx_get","parameters":[{"name":"preset","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preset"}},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start"}},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End"}},{"name":"pick","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pick"}},{"name":"group","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group"}},{"name":"align","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Align"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/business-units":{"get":{"summary":"Bu List","operationId":"bu_list_admin_business_units_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Bu Create","description":"Create a new Business Unit. Newly created BUs land at the end.","operationId":"bu_create_admin_business_units_post","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_bu_create_admin_business_units_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/business-units/{bu_id}/edit":{"get":{"summary":"Bu Edit","operationId":"bu_edit_admin_business_units__bu_id__edit_get","parameters":[{"name":"bu_id","in":"path","required":true,"schema":{"type":"integer","title":"Bu Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Bu Edit Save","operationId":"bu_edit_save_admin_business_units__bu_id__edit_post","parameters":[{"name":"bu_id","in":"path","required":true,"schema":{"type":"integer","title":"Bu Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_bu_edit_save_admin_business_units__bu_id__edit_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/business-units/{bu_id}/logo":{"get":{"summary":"Bu Logo","description":"Serve BU logo image. No auth check on logo content.","operationId":"bu_logo_admin_business_units__bu_id__logo_get","parameters":[{"name":"bu_id","in":"path","required":true,"schema":{"type":"integer","title":"Bu Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/business-units/branches":{"get":{"summary":"Bu Assign Branches","operationId":"bu_assign_branches_admin_business_units_branches_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/business-units/branches/save":{"post":{"summary":"Bu Assign Branches Save","operationId":"bu_assign_branches_save_admin_business_units_branches_save_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/business-units/users":{"get":{"summary":"Bu Assign Users","operationId":"bu_assign_users_admin_business_units_users_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/business-units/users/save":{"post":{"summary":"Bu Assign Users Save","operationId":"bu_assign_users_save_admin_business_units_users_save_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/brands":{"get":{"summary":"Brands List","operationId":"brands_list_admin_brands_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Brand Create","operationId":"brand_create_admin_brands_post","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_brand_create_admin_brands_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/brands/{brand_id}/edit":{"get":{"summary":"Brand Edit","operationId":"brand_edit_admin_brands__brand_id__edit_get","parameters":[{"name":"brand_id","in":"path","required":true,"schema":{"type":"integer","title":"Brand Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Brand Edit Save","operationId":"brand_edit_save_admin_brands__brand_id__edit_post","parameters":[{"name":"brand_id","in":"path","required":true,"schema":{"type":"integer","title":"Brand Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_brand_edit_save_admin_brands__brand_id__edit_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/brands/{brand_id}/logo":{"get":{"summary":"Brand Logo","description":"Serve brand logo image.","operationId":"brand_logo_admin_brands__brand_id__logo_get","parameters":[{"name":"brand_id","in":"path","required":true,"schema":{"type":"integer","title":"Brand Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/brands/assign-branches":{"get":{"summary":"Brand Assign Branches","operationId":"brand_assign_branches_admin_brands_assign_branches_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/brands/assign-branches/save":{"post":{"summary":"Brand Assign Branches Save","operationId":"brand_assign_branches_save_admin_brands_assign_branches_save_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/reports/price-trends-pro":{"get":{"summary":"Price Trends Pro","operationId":"price_trends_pro_reports_price_trends_pro_get","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"6","title":"Period"}},{"name":"from_date","in":"query","required":false,"schema":{"type":"string","default":"","title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"type":"string","default":"","title":"To Date"}},{"name":"bu_id","in":"query","required":false,"schema":{"type":"string","default":"","title":"Bu Id"}},{"name":"brand_id","in":"query","required":false,"schema":{"type":"string","default":"","title":"Brand Id"}},{"name":"branch_id","in":"query","required":false,"schema":{"type":"string","default":"","title":"Branch Id"}},{"name":"supplier_id","in":"query","required":false,"schema":{"type":"string","default":"","title":"Supplier Id"}},{"name":"category_id","in":"query","required":false,"schema":{"type":"string","default":"","title":"Category Id"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"view_mode","in":"query","required":false,"schema":{"type":"string","default":"timeseries","title":"View Mode"}},{"name":"compare_by","in":"query","required":false,"schema":{"type":"string","default":"branch","title":"Compare By"}},{"name":"gaps_mode","in":"query","required":false,"schema":{"type":"string","default":"placeholder","title":"Gaps Mode"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reports/price-trends-pro/export":{"get":{"summary":"Price Trends Pro Export","operationId":"price_trends_pro_export_reports_price_trends_pro_export_get","parameters":[{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"csv","title":"Fmt"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"6","title":"Period"}},{"name":"from_date","in":"query","required":false,"schema":{"type":"string","default":"","title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"type":"string","default":"","title":"To Date"}},{"name":"bu_id","in":"query","required":false,"schema":{"type":"string","default":"","title":"Bu Id"}},{"name":"brand_id","in":"query","required":false,"schema":{"type":"string","default":"","title":"Brand Id"}},{"name":"branch_id","in":"query","required":false,"schema":{"type":"string","default":"","title":"Branch Id"}},{"name":"supplier_id","in":"query","required":false,"schema":{"type":"string","default":"","title":"Supplier Id"}},{"name":"category_id","in":"query","required":false,"schema":{"type":"string","default":"","title":"Category Id"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"view_mode","in":"query","required":false,"schema":{"type":"string","default":"timeseries","title":"View Mode"}},{"name":"compare_by","in":"query","required":false,"schema":{"type":"string","default":"branch","title":"Compare By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor":{"get":{"summary":"Labor Home","operationId":"labor_home_labor_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/employees":{"get":{"summary":"Employees List","operationId":"employees_list_labor_employees_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"department_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Department Id"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"active","title":"Status"}},{"name":"employment_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employment Type"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/employees/new":{"get":{"summary":"Employee New","operationId":"employee_new_labor_employees_new_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/employees/{emp_id}/edit":{"get":{"summary":"Employee Edit","operationId":"employee_edit_labor_employees__emp_id__edit_get","parameters":[{"name":"emp_id","in":"path","required":true,"schema":{"type":"integer","title":"Emp Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/employees/save":{"post":{"summary":"Employee Save","operationId":"employee_save_labor_employees_save_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/labor/employees/import":{"get":{"summary":"Employee Import Page","operationId":"employee_import_page_labor_employees_import_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/employees/import/template.xlsx":{"get":{"summary":"Employee Import Template","operationId":"employee_import_template_labor_employees_import_template_xlsx_get","parameters":[{"name":"kind","in":"query","required":false,"schema":{"type":"string","default":"foh","title":"Kind"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/employees/import/preview":{"post":{"summary":"Employee Import Preview","operationId":"employee_import_preview_labor_employees_import_preview_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_employee_import_preview_labor_employees_import_preview_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/employees/import/commit":{"post":{"summary":"Employee Import Commit","operationId":"employee_import_commit_labor_employees_import_commit_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/labor/positions":{"get":{"summary":"Positions Page","operationId":"positions_page_labor_positions_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/positions/save":{"post":{"summary":"Positions Save","operationId":"positions_save_labor_positions_save_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_positions_save_labor_positions_save_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/positions/{pos_id}/toggle":{"post":{"summary":"Positions Toggle","operationId":"positions_toggle_labor_positions__pos_id__toggle_post","parameters":[{"name":"pos_id","in":"path","required":true,"schema":{"type":"integer","title":"Pos Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/holidays":{"get":{"summary":"Holidays Page","operationId":"holidays_page_labor_holidays_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/holidays/save":{"post":{"summary":"Holidays Save","operationId":"holidays_save_labor_holidays_save_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_holidays_save_labor_holidays_save_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/holidays/{hol_id}/delete":{"post":{"summary":"Holidays Delete","operationId":"holidays_delete_labor_holidays__hol_id__delete_post","parameters":[{"name":"hol_id","in":"path","required":true,"schema":{"type":"integer","title":"Hol Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/time-entries":{"get":{"summary":"Time Entries Page","operationId":"time_entries_page_labor_time_entries_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Branch Id"}},{"name":"entry_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entry Date"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/time-entries/save":{"post":{"summary":"Time Entries Save","operationId":"time_entries_save_labor_time_entries_save_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/labor/shifts":{"get":{"summary":"Shifts Page","operationId":"shifts_page_labor_shifts_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/shifts/save":{"post":{"summary":"Shift Save","operationId":"shift_save_labor_shifts_save_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_shift_save_labor_shifts_save_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/shifts/{shift_id}/toggle":{"post":{"summary":"Shift Toggle","operationId":"shift_toggle_labor_shifts__shift_id__toggle_post","parameters":[{"name":"shift_id","in":"path","required":true,"schema":{"type":"integer","title":"Shift Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/shifts/{shift_id}/delete":{"post":{"summary":"Shift Delete","operationId":"shift_delete_labor_shifts__shift_id__delete_post","parameters":[{"name":"shift_id","in":"path","required":true,"schema":{"type":"integer","title":"Shift Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/schedule":{"get":{"summary":"Schedule Page","description":"Schedule grid view. weeks=1 (single week) or weeks=2 (bi-weekly), or\nperiod=cutoff (one payroll cut-off; ct = direct / agency / offsetting).","operationId":"schedule_page_labor_schedule_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Branch Id"}},{"name":"week_start","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Week Start"}},{"name":"weeks","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Weeks"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"week","title":"Period"}},{"name":"ct","in":"query","required":false,"schema":{"type":"string","default":"direct","title":"Ct"}},{"name":"add","in":"query","required":false,"schema":{"type":"string","default":"","title":"Add"}},{"name":"dept","in":"query","required":false,"schema":{"type":"string","default":"","title":"Dept"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/schedule/save":{"post":{"summary":"Schedule Save","operationId":"schedule_save_labor_schedule_save_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/labor/schedule/copy-to-entries":{"post":{"summary":"Schedule Copy To Entries","description":"Copy all schedule entries for branch_id on target_date into\ntime_entries (creates entries with planned hours as actual hours).\nIf a time_entry already exists for an (employee, date), it's skipped.","operationId":"schedule_copy_to_entries_labor_schedule_copy_to_entries_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_schedule_copy_to_entries_labor_schedule_copy_to_entries_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/schedule/export.xlsx":{"get":{"summary":"Schedule Export Xlsx","operationId":"schedule_export_xlsx_labor_schedule_export_xlsx_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Branch Id"}},{"name":"week_start","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Week Start"}},{"name":"weeks","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Weeks"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"week","title":"Period"}},{"name":"ct","in":"query","required":false,"schema":{"type":"string","default":"direct","title":"Ct"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/schedule/export.pdf":{"get":{"summary":"Schedule Export Pdf","description":"Nov 4, 2026 (Joy): cost is optional (tick \"Show cost\"), rows are coloured by\ndepartment, and one PDF can hold a whole brand or the branches you tick\n(?b=1&b=5...), one branch per page.","operationId":"schedule_export_pdf_labor_schedule_export_pdf_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Branch Id"}},{"name":"week_start","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Week Start"}},{"name":"weeks","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Weeks"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"week","title":"Period"}},{"name":"ct","in":"query","required":false,"schema":{"type":"string","default":"direct","title":"Ct"}},{"name":"cost","in":"query","required":false,"schema":{"type":"string","default":"","title":"Cost"}},{"name":"brand_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand Id"}},{"name":"dept","in":"query","required":false,"schema":{"type":"string","default":"","title":"Dept"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/analytics":{"get":{"summary":"Labor Analytics","operationId":"labor_analytics_labor_analytics_get","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"this_month","title":"Period"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Branch Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/leave":{"get":{"summary":"Leave List","operationId":"leave_list_labor_leave_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"open","title":"Status"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"d_from","in":"query","required":false,"schema":{"type":"string","default":"","title":"D From"}},{"name":"d_to","in":"query","required":false,"schema":{"type":"string","default":"","title":"D To"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Leave Create","operationId":"leave_create_labor_leave_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/labor/leave/new":{"get":{"summary":"Leave New","operationId":"leave_new_labor_leave_new_get","parameters":[{"name":"employee_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employee Id"}},{"name":"d","in":"query","required":false,"schema":{"type":"string","default":"","title":"D"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/leave/{rid}":{"get":{"summary":"Leave Detail","operationId":"leave_detail_labor_leave__rid__get","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"integer","title":"Rid"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/leave/{rid}/attachment":{"get":{"summary":"Leave Attachment","operationId":"leave_attachment_labor_leave__rid__attachment_get","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"integer","title":"Rid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/leave/{rid}/{action}":{"post":{"summary":"Leave Action","operationId":"leave_action_labor_leave__rid___action__post","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"integer","title":"Rid"}},{"name":"action","in":"path","required":true,"schema":{"type":"string","title":"Action"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/leave/settings":{"get":{"summary":"Leave Settings","operationId":"leave_settings_labor_leave_settings_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"new_pin","in":"query","required":false,"schema":{"type":"string","default":"","title":"New Pin"}},{"name":"pin_emp","in":"query","required":false,"schema":{"type":"string","default":"","title":"Pin Emp"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Leave Settings Save","operationId":"leave_settings_save_labor_leave_settings_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/labor/leave/settings/slips":{"post":{"summary":"Portal Slips","description":"Nov 5, 2026 (Joy -- many staff, most agency, no Resto360 login): make phone links + PINs\nfor a whole branch at once and print them as cut-out slips (QR code, link, PIN).\nPINs are only ever shown on this printout.","operationId":"portal_slips_labor_leave_settings_slips_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/my-leave/{token}":{"get":{"summary":"Portal Home","operationId":"portal_home_my_leave__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/my-leave/{token}/login":{"post":{"summary":"Portal Login","operationId":"portal_login_my_leave__token__login_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/my-leave/{token}/logout":{"post":{"summary":"Portal Logout","operationId":"portal_logout_my_leave__token__logout_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/my-leave/{token}/file":{"post":{"summary":"Portal File","operationId":"portal_file_my_leave__token__file_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/my-leave/{token}/cancel/{rid}":{"post":{"summary":"Portal Cancel","operationId":"portal_cancel_my_leave__token__cancel__rid__post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}},{"name":"rid","in":"path","required":true,"schema":{"type":"integer","title":"Rid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/attendance/import/{imp_id}/undo":{"post":{"summary":"Import Undo","description":"Nov 6, 2026 (Joy -- a file saved to the wrong branch or the wrong people): take that upload's\ndays back out. Days a later upload has replaced are left alone.","operationId":"import_undo_labor_attendance_import__imp_id__undo_post","parameters":[{"name":"imp_id","in":"path","required":true,"schema":{"type":"integer","title":"Imp Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/attendance/import":{"get":{"summary":"Import Page","operationId":"import_page_labor_attendance_import_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Import Preview","operationId":"import_preview_labor_attendance_import_post","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/labor/attendance/import/commit":{"post":{"summary":"Import Commit","operationId":"import_commit_labor_attendance_import_commit_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/labor/attendance":{"get":{"summary":"Attendance Page","operationId":"attendance_page_labor_attendance_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"d_from","in":"query","required":false,"schema":{"type":"string","default":"","title":"D From"}},{"name":"d_to","in":"query","required":false,"schema":{"type":"string","default":"","title":"D To"}},{"name":"view","in":"query","required":false,"schema":{"type":"string","default":"grid","title":"View"}},{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"","title":"Fmt"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"","title":"Period"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/attendance/note":{"post":{"summary":"Attendance Note","operationId":"attendance_note_labor_attendance_note_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/labor/timekeeping":{"get":{"summary":"Tk List","operationId":"tk_list_labor_timekeeping_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","default":"","title":"Kind"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"open","title":"Status"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Tk Create","operationId":"tk_create_labor_timekeeping_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/labor/cutoffs":{"post":{"summary":"Cutoffs Save","operationId":"cutoffs_save_labor_cutoffs_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/labor/tk-rules":{"post":{"summary":"Tk Rules Save","operationId":"tk_rules_save_labor_tk_rules_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/labor/breaks":{"post":{"summary":"Breaks Save","description":"Break schedule per shift code (e.g. AM shifts 15:00-16:00).","operationId":"breaks_save_labor_breaks_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/labor/timekeeping/new":{"get":{"summary":"Tk New","operationId":"tk_new_labor_timekeeping_new_get","parameters":[{"name":"kind","in":"query","required":false,"schema":{"type":"string","default":"ot","title":"Kind"}},{"name":"employee_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employee Id"}},{"name":"d","in":"query","required":false,"schema":{"type":"string","default":"","title":"D"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/timekeeping/{rid}":{"get":{"summary":"Tk Detail","operationId":"tk_detail_labor_timekeeping__rid__get","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"integer","title":"Rid"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/timekeeping/{rid}/{action}":{"post":{"summary":"Tk Action","operationId":"tk_action_labor_timekeeping__rid___action__post","parameters":[{"name":"rid","in":"path","required":true,"schema":{"type":"integer","title":"Rid"}},{"name":"action","in":"path","required":true,"schema":{"type":"string","title":"Action"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/my-leave/{token}/tk":{"post":{"summary":"Portal Tk","operationId":"portal_tk_my_leave__token__tk_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/dtr":{"get":{"summary":"Dtr Page","operationId":"dtr_page_labor_dtr_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"etype","in":"query","required":false,"schema":{"type":"string","default":"direct","title":"Etype"}},{"name":"start","in":"query","required":false,"schema":{"type":"string","default":"","title":"Start"}},{"name":"employee_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employee Id"}},{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"","title":"Fmt"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/dtr/exceptions":{"get":{"summary":"Dtr Exceptions Page","operationId":"dtr_exceptions_page_labor_dtr_exceptions_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"etype","in":"query","required":false,"schema":{"type":"string","default":"direct","title":"Etype"}},{"name":"start","in":"query","required":false,"schema":{"type":"string","default":"","title":"Start"}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","default":"","title":"Kind"}},{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"","title":"Fmt"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/dtr/submit":{"post":{"summary":"Dtr Submit","description":"Nov 5, 2026: 'handed to Accounting' -- remembers which days were assumed per schedule,\nso the next cut-off's DTR shows what actually happened on them.","operationId":"dtr_submit_labor_dtr_submit_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/labor/dtr/unsubmit":{"post":{"summary":"Dtr Unsubmit","description":"Nov 5, 2026: undo 'Handed to Accounting' (clicked by mistake, or Accounting gave it back).","operationId":"dtr_unsubmit_labor_dtr_unsubmit_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/labor/schedule/template.xlsx":{"get":{"summary":"Schedule Template","operationId":"schedule_template_labor_schedule_template_xlsx_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"week_start","in":"query","required":false,"schema":{"type":"string","default":"","title":"Week Start"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"cutoff","title":"Period"}},{"name":"ct","in":"query","required":false,"schema":{"type":"string","default":"direct","title":"Ct"}},{"name":"weeks","in":"query","required":false,"schema":{"type":"string","default":"1","title":"Weeks"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/schedule/upload":{"post":{"summary":"Schedule Upload","operationId":"schedule_upload_labor_schedule_upload_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/labor/schedule/import":{"get":{"summary":"Sched Import Page","operationId":"sched_import_page_labor_schedule_import_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Sched Import Preview","operationId":"sched_import_preview_labor_schedule_import_post","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/labor/schedule/import/commit":{"post":{"summary":"Sched Import Commit","operationId":"sched_import_commit_labor_schedule_import_commit_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/labor/contracts/tool":{"get":{"summary":"Contracts Tool","operationId":"contracts_tool_labor_contracts_tool_get","parameters":[{"name":"employee_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employee Id"}},{"name":"open","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Open"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/contracts/api/sync":{"post":{"summary":"Api Sync","operationId":"api_sync_labor_contracts_api_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/labor/contracts/api/libraries":{"post":{"summary":"Api Libraries","operationId":"api_libraries_labor_contracts_api_libraries_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/labor/contracts":{"get":{"summary":"Contracts List","operationId":"contracts_list_labor_contracts_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"show","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Show"}},{"name":"msg","in":"query","required":false,"schema":{"type":"string","default":"","title":"Msg"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/contracts/{cid}/share":{"get":{"summary":"Contract Share Page","operationId":"contract_share_page_labor_contracts__cid__share_get","parameters":[{"name":"cid","in":"path","required":true,"schema":{"type":"integer","title":"Cid"}},{"name":"msg","in":"query","required":false,"schema":{"type":"string","default":"","title":"Msg"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Contract Share Save","operationId":"contract_share_save_labor_contracts__cid__share_post","parameters":[{"name":"cid","in":"path","required":true,"schema":{"type":"integer","title":"Cid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/labor/contracts/share-all":{"post":{"summary":"Contract Share All","description":"Share (or stop sharing) every contract I made with one user -- e.g. HR.","operationId":"contract_share_all_labor_contracts_share_all_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/labor/contracts/import":{"post":{"summary":"Contracts Import","description":"One-time: bring contracts + libraries saved in the old stand-alone file\n(exported with contracts_export_helper.html).","operationId":"contracts_import_labor_contracts_import_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/labor/contracts/hr-emails":{"post":{"summary":"Save Hr Emails","operationId":"save_hr_emails_labor_contracts_hr_emails_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/labor/contracts/api/email":{"post":{"summary":"Api Email","operationId":"api_email_labor_contracts_api_email_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/butchery/api/where":{"get":{"summary":"Api Where","operationId":"api_where_butchery_api_where_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"type":"string","default":"","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/butchery/api/dispatch-pick":{"get":{"summary":"Api Dispatch Pick","operationId":"api_dispatch_pick_butchery_api_dispatch_pick_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"ingredient_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Ingredient Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/butchery/storage":{"get":{"summary":"Storage Units Page","operationId":"storage_units_page_butchery_storage_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/butchery/storage/template.xlsx":{"get":{"summary":"Storage Template","operationId":"storage_template_butchery_storage_template_xlsx_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/butchery/storage/import":{"post":{"summary":"Storage Import","operationId":"storage_import_butchery_storage_import_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/butchery/storage/save":{"post":{"summary":"Storage Units Save","operationId":"storage_units_save_butchery_storage_save_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/butchery/slabs":{"get":{"summary":"Slabs List","operationId":"slabs_list_butchery_slabs_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"open","title":"Status"}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","default":"","title":"Kind"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/butchery/slabs/export.xlsx":{"get":{"summary":"Slabs Export","description":"The slab list as Excel, same filters as the page: a Summary sheet (per\ntype and per item), the Slabs, and what's received but not registered.\nSupplier, PO and cost only for purchasers / managers.","operationId":"slabs_export_butchery_slabs_export_xlsx_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"open","title":"Status"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","default":"","title":"Kind"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/butchery/api/slabs-at":{"get":{"summary":"Api Slabs At","description":"Slabs in stock at a branch — for picking / scanning on a transfer.","operationId":"api_slabs_at_butchery_api_slabs_at_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/butchery/slabs/receive":{"get":{"summary":"Slabs Receive Form","operationId":"slabs_receive_form_butchery_slabs_receive_get","parameters":[{"name":"line_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Line Id"}},{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"ingredient_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Ingredient Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Slabs Receive Save","operationId":"slabs_receive_save_butchery_slabs_receive_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/butchery/slabs/stickers":{"get":{"summary":"Slabs Stickers","operationId":"slabs_stickers_butchery_slabs_stickers_get","parameters":[{"name":"ids","in":"query","required":false,"schema":{"type":"string","default":"","title":"Ids"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/butchery/slabs/{slab_id}":{"get":{"summary":"Slab Detail","operationId":"slab_detail_butchery_slabs__slab_id__get","parameters":[{"name":"slab_id","in":"path","required":true,"schema":{"type":"integer","title":"Slab Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/butchery/slabs/{slab_id}/move":{"post":{"summary":"Slab Move","operationId":"slab_move_butchery_slabs__slab_id__move_post","parameters":[{"name":"slab_id","in":"path","required":true,"schema":{"type":"integer","title":"Slab Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/butchery/slabs/{slab_id}/hold":{"post":{"summary":"Slab Hold","description":"Manager: put a slab on hold, or release it back to stock.","operationId":"slab_hold_butchery_slabs__slab_id__hold_post","parameters":[{"name":"slab_id","in":"path","required":true,"schema":{"type":"integer","title":"Slab Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/butchery/{report_id}/tags":{"get":{"summary":"Butchery Tags","description":"Labels with QR — restaurant or retail preset, A4 sheet or label printer.","operationId":"butchery_tags_butchery__report_id__tags_get","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","title":"Report Id"}},{"name":"preset","in":"query","required":false,"schema":{"type":"string","default":"restaurant","title":"Preset"}},{"name":"sheet","in":"query","required":false,"schema":{"type":"string","default":"a4_21","title":"Sheet"}},{"name":"use_by_days","in":"query","required":false,"schema":{"type":"string","default":"3","title":"Use By Days"}},{"name":"best_before_days","in":"query","required":false,"schema":{"type":"string","default":"5","title":"Best Before Days"}},{"name":"price_kg","in":"query","required":false,"schema":{"type":"string","default":"","title":"Price Kg"}},{"name":"only","in":"query","required":false,"schema":{"type":"string","default":"","title":"Only"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/butchery/{report_id}/tags/log":{"post":{"summary":"Butchery Tags Log","description":"Called by the page right before printing. A reprint needs a reason.","operationId":"butchery_tags_log_butchery__report_id__tags_log_post","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/butchery/trace/{code}":{"get":{"summary":"Butchery Trace","description":"What a scanned label shows. Logged-in staff: the full chain (supplier\nand PO only for purchasers / managers). Anyone else: product info only.","operationId":"butchery_trace_butchery_trace__code__get","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/butchery/labels/export":{"get":{"summary":"Butchery Labels Export","description":"Traceability export: one row per label, with where it came from.","operationId":"butchery_labels_export_butchery_labels_export_get","parameters":[{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"xlsx","title":"Fmt"}},{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"from_date","in":"query","required":false,"schema":{"type":"string","default":"","title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"type":"string","default":"","title":"To Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/butchery/audit":{"get":{"summary":"Butchery Audit","description":"z14-butchery-audit: comprehensive butchery audit page.","operationId":"butchery_audit_butchery_audit_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"from_date","in":"query","required":false,"schema":{"type":"string","default":"","title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"type":"string","default":"","title":"To Date"}},{"name":"tab","in":"query","required":false,"schema":{"type":"string","default":"overview","title":"Tab"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/butchery/reprints":{"get":{"summary":"Butchery Reprints Redirect","operationId":"butchery_reprints_redirect_butchery_reprints_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"from_date","in":"query","required":false,"schema":{"type":"string","default":"","title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"type":"string","default":"","title":"To Date"}},{"name":"error","in":"query","required":false,"schema":{"type":"string","default":"","title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"type":"string","default":"","title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/butchery/audit/export.xlsx":{"get":{"summary":"Butchery Audit Export","description":"z14-butchery-audit: multi-sheet Excel export.","operationId":"butchery_audit_export_butchery_audit_export_xlsx_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"from_date","in":"query","required":false,"schema":{"type":"string","default":"","title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"type":"string","default":"","title":"To Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/butchery/audit/email":{"post":{"summary":"Butchery Audit Email","description":"z14-butchery-audit: Email audit summary to selected recipients.","operationId":"butchery_audit_email_butchery_audit_email_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/butchery":{"get":{"summary":"Butchery List","operationId":"butchery_list_butchery_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"","title":"Status"}},{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"cleanup","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Cleanup"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/butchery/new":{"get":{"summary":"Butchery New Form","operationId":"butchery_new_form_butchery_new_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Butchery New Submit","operationId":"butchery_new_submit_butchery_new_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/butchery/bulk-archive":{"post":{"summary":"Butchery Bulk Archive","description":"Bulk archive/restore selected butchery reports (superadmin cleanup).","operationId":"butchery_bulk_archive_butchery_bulk_archive_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/butchery/bulk-delete":{"post":{"summary":"Butchery Bulk Delete","description":"Bulk hard-delete selected butchery reports (superadmin). Mirrors the\nper-row delete rule: committed reports posted inventory and cannot be\ndeleted, so they are skipped and kept; only drafts (and voided) are removed,\nalong with their yields and portions. Each runs in its own transaction.","operationId":"butchery_bulk_delete_butchery_bulk_delete_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/butchery/{report_id}/reopen":{"post":{"summary":"Butchery Reopen","description":"Nov 16 2026 (Joy): superadmin / admin can reopen a verified report to fix a\nmistake. Takes back every stock entry the Verify posted, puts the slab back to\n'being cut', and returns the report to Draft — then fix it and verify again,\nor delete the draft (the slab goes back in stock).","operationId":"butchery_reopen_butchery__report_id__reopen_post","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/butchery/bulk-force-delete":{"post":{"summary":"Butchery Bulk Force Delete","description":"Superadmin: permanently delete selected reports INCLUDING committed ones,\nreversing the inventory each commit posted (for clearing test data). For\ncommitted reports this removes the linked USED_OUT/RECEIVED/WASTED movements\nso stock returns to its pre-commit state, then deletes the report.","operationId":"butchery_bulk_force_delete_butchery_bulk_force_delete_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/butchery/{report_id}":{"get":{"summary":"Butchery Edit","operationId":"butchery_edit_butchery__report_id__get","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","title":"Report Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/butchery/{report_id}/save":{"post":{"summary":"Butchery Save","operationId":"butchery_save_butchery__report_id__save_post","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/butchery/settings/notify":{"post":{"summary":"Butchery Notify Settings","operationId":"butchery_notify_settings_butchery_settings_notify_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/butchery/{report_id}/send":{"post":{"summary":"Butchery Send","description":"Butcher / supervisor sends a draft to the manager. Stock does not\nmove yet — it posts only when a manager verifies.","operationId":"butchery_send_butchery__report_id__send_post","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/butchery/{report_id}/commit":{"post":{"summary":"Butchery Commit","description":"Apply the butchery to inventory. Locks the report.\n\n1. Stock-on-hand check — hard block if slab weight > current stock.\n   Admin/manager can override by resubmitting with ?override=1.\n2. Proportional cost allocation — every output gets:\n       cost = (row_weight / total_yield_weight) × slab_total_cost\n   Guarantees output costs sum exactly to slab_total_cost.\n3. Waste with ingredient → RECEIVED (saleable byproduct).\n   Waste without ingredient → WASTED against slab ingredient (discarded).","operationId":"butchery_commit_butchery__report_id__commit_post","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/butchery/{report_id}/delete":{"post":{"summary":"Butchery Delete","description":"Delete a draft report. Committed reports cannot be deleted.","operationId":"butchery_delete_butchery__report_id__delete_post","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/butchery/{report_id}/labels":{"get":{"summary":"Butchery Labels","description":"Printable page of portion labels with customization.","operationId":"butchery_labels_butchery__report_id__labels_get","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/butchery/{report_id}/labels/save-defaults":{"post":{"summary":"Butchery Labels Save Defaults","description":"Save current sticker settings as user defaults (and branch defaults if admin).","operationId":"butchery_labels_save_defaults_butchery__report_id__labels_save_defaults_post","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/butchery/admin/slabs":{"get":{"summary":"Admin Slabs","operationId":"admin_slabs_butchery_admin_slabs_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","default":"","title":"Kind"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/butchery/admin/slabs/toggle":{"post":{"summary":"Admin Slabs Toggle","operationId":"admin_slabs_toggle_butchery_admin_slabs_toggle_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/butchery/{report_id}/pdf":{"get":{"summary":"Butchery Export Pdf","description":"Export a butchery report as a PDF (PO style).","operationId":"butchery_export_pdf_butchery__report_id__pdf_get","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","title":"Report Id"}},{"name":"copy","in":"query","required":false,"schema":{"type":"string","default":"","title":"Copy"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/butchery/blank-form.pdf":{"get":{"summary":"Butchery Blank Form Pdf","description":"Download a blank printable butchery form for manual recording.","operationId":"butchery_blank_form_pdf_butchery_blank_form_pdf_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/butchery/admin/bulk-template.xlsx":{"get":{"summary":"Butchery Bulk Template","description":"Download Excel template for bulk-uploading butchery reports.","operationId":"butchery_bulk_template_butchery_admin_bulk_template_xlsx_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/butchery/admin/bulk-upload":{"get":{"summary":"Butchery Bulk Upload Form","operationId":"butchery_bulk_upload_form_butchery_admin_bulk_upload_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Butchery Bulk Upload Process","operationId":"butchery_bulk_upload_process_butchery_admin_bulk_upload_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/reservations/insights":{"get":{"summary":"Rsv Insights Page","operationId":"rsv_insights_page_reservations_insights_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"last_30","title":"Period"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"}},{"name":"brand_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Brand Id"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reservations/insights.xlsx":{"get":{"summary":"Rsv Insights Xlsx","operationId":"rsv_insights_xlsx_reservations_insights_xlsx_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"last_30","title":"Period"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"}},{"name":"brand_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Brand Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reservations/{rsv_id}/forget-guest":{"post":{"summary":"Rsv Forget Guest","operationId":"rsv_forget_guest_reservations__rsv_id__forget_guest_post","parameters":[{"name":"rsv_id","in":"path","required":true,"schema":{"type":"integer","title":"Rsv Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reservations":{"get":{"summary":"Reservations List","operationId":"reservations_list_reservations_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Status"}},{"name":"bu_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Bu Id"}},{"name":"brand_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Brand Id"}},{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"today","title":"Period"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"view","in":"query","required":false,"schema":{"type":"string","default":"calendar","title":"View"}},{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Month"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reservations/email-summary":{"post":{"summary":"Reservations Email Summary","description":"Email a summary of reservations (current filter view) to a recipient.","operationId":"reservations_email_summary_reservations_email_summary_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/dashboard/reservations":{"get":{"summary":"Reservations Dashboard","description":"Executive Dashboard — reservations view.","operationId":"reservations_dashboard_dashboard_reservations_get","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"this_month","title":"Period"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"}},{"name":"bu_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Bu Id"}},{"name":"brand_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Brand Id"}},{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard/reservations/export":{"get":{"summary":"Dashboard Reservations Export","description":"Export the Reservations Dashboard data — CSV (raw bookings list) or\nXLSX (multi-sheet: KPIs + raw bookings).","operationId":"dashboard_reservations_export_dashboard_reservations_export_get","parameters":[{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"csv","title":"Fmt"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"this_month","title":"Period"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"}},{"name":"bu_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Bu Id"}},{"name":"brand_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Brand Id"}},{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard/reservations/email":{"post":{"summary":"Dashboard Reservations Email","description":"Email the Reservations Dashboard summary (KPIs only, not raw rows).","operationId":"dashboard_reservations_email_dashboard_reservations_email_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/reservations/sales-import":{"get":{"summary":"Sales Import Page","operationId":"sales_import_page_reservations_sales_import_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reservations/sales-import/template.xlsx":{"get":{"summary":"Sales Import Template","operationId":"sales_import_template_reservations_sales_import_template_xlsx_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/reservations/sales-import/preview":{"post":{"summary":"Sales Import Preview","operationId":"sales_import_preview_reservations_sales_import_preview_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_sales_import_preview_reservations_sales_import_preview_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reservations/sales-import/commit":{"post":{"summary":"Sales Import Commit","operationId":"sales_import_commit_reservations_sales_import_commit_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/reservations/remarks":{"get":{"summary":"Reservations Remarks","operationId":"reservations_remarks_reservations_remarks_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/reservations/remarks/export.csv":{"get":{"summary":"Reservations Remarks Csv","operationId":"reservations_remarks_csv_reservations_remarks_export_csv_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/reservations/remarks/export.xlsx":{"get":{"summary":"Reservations Remarks Xlsx","operationId":"reservations_remarks_xlsx_reservations_remarks_export_xlsx_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/reservations/export":{"get":{"summary":"Reservations Export","operationId":"reservations_export_reservations_export_get","parameters":[{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"csv","title":"Fmt"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Status"}},{"name":"bu_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Bu Id"}},{"name":"brand_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Brand Id"}},{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"today","title":"Period"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reservations/branch/{branch_id}.ics":{"get":{"summary":"Reservations Ical Feed","description":"iCal feed for a single branch. Public-with-token — no session\nrequired so calendar clients can fetch it. Wrong or missing token\n→ 403. Cancelled + no_show excluded from the feed.","operationId":"reservations_ical_feed_reservations_branch__branch_id__ics_get","parameters":[{"name":"branch_id","in":"path","required":true,"schema":{"type":"integer","title":"Branch Id"}},{"name":"token","in":"query","required":false,"schema":{"type":"string","default":"","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reservations/branch/{branch_id}/ical-regenerate":{"post":{"summary":"Reservations Ical Regenerate","description":"Rotate the branch's ical_token. Admin-scope only. Old URL stops\nworking immediately after this.","operationId":"reservations_ical_regenerate_reservations_branch__branch_id__ical_regenerate_post","parameters":[{"name":"branch_id","in":"path","required":true,"schema":{"type":"integer","title":"Branch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reservations/timeline":{"get":{"summary":"Reservations Timeline","operationId":"reservations_timeline_reservations_timeline_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"view","in":"query","required":false,"schema":{"type":"string","default":"day","title":"View"}},{"name":"timeline_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timeline Date"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reservations/weekly":{"get":{"summary":"Reservations Weekly","operationId":"reservations_weekly_reservations_weekly_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"week_start","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Week Start"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reservations/bulk-viber":{"get":{"summary":"Bulk Viber Page","description":"Page showing all Viber messages for a given date so staff can\ncopy them one by one or all at once.","operationId":"bulk_viber_page_reservations_bulk_viber_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"rsv_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rsv Date"}},{"name":"status_filter","in":"query","required":false,"schema":{"type":"string","default":"confirmed","title":"Status Filter"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reservations/new":{"get":{"summary":"Reservation New Form","operationId":"reservation_new_form_reservations_new_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"prefill_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefill Date"}},{"name":"prefill_time","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefill Time"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Reservation Create","operationId":"reservation_create_reservations_new_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/reservations/{rsv_id}":{"get":{"summary":"Reservation Edit","operationId":"reservation_edit_reservations__rsv_id__get","parameters":[{"name":"rsv_id","in":"path","required":true,"schema":{"type":"integer","title":"Rsv Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reservations/{rsv_id}/save":{"post":{"summary":"Reservation Update","operationId":"reservation_update_reservations__rsv_id__save_post","parameters":[{"name":"rsv_id","in":"path","required":true,"schema":{"type":"integer","title":"Rsv Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reservations/{rsv_id}/attachments":{"post":{"summary":"Reservation Attachment Upload","operationId":"reservation_attachment_upload_reservations__rsv_id__attachments_post","parameters":[{"name":"rsv_id","in":"path","required":true,"schema":{"type":"integer","title":"Rsv Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reservations/{rsv_id}/attachments/{att_id}":{"get":{"summary":"Reservation Attachment Download","operationId":"reservation_attachment_download_reservations__rsv_id__attachments__att_id__get","parameters":[{"name":"rsv_id","in":"path","required":true,"schema":{"type":"integer","title":"Rsv Id"}},{"name":"att_id","in":"path","required":true,"schema":{"type":"integer","title":"Att Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reservations/{rsv_id}/attachments/{att_id}/delete":{"post":{"summary":"Reservation Attachment Delete","operationId":"reservation_attachment_delete_reservations__rsv_id__attachments__att_id__delete_post","parameters":[{"name":"rsv_id","in":"path","required":true,"schema":{"type":"integer","title":"Rsv Id"}},{"name":"att_id","in":"path","required":true,"schema":{"type":"integer","title":"Att Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reservations/{rsv_id}/pdf":{"get":{"summary":"Reservation Pdf","description":"Download reservation confirmation PDF.","operationId":"reservation_pdf_reservations__rsv_id__pdf_get","parameters":[{"name":"rsv_id","in":"path","required":true,"schema":{"type":"integer","title":"Rsv Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reservations/{rsv_id}/export.xlsx":{"get":{"summary":"Reservation Xlsx","description":"Download a single reservation's details as Excel.","operationId":"reservation_xlsx_reservations__rsv_id__export_xlsx_get","parameters":[{"name":"rsv_id","in":"path","required":true,"schema":{"type":"integer","title":"Rsv Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reservations/{rsv_id}/invoice":{"get":{"summary":"Reservation Invoice Editor","operationId":"reservation_invoice_editor_reservations__rsv_id__invoice_get","parameters":[{"name":"rsv_id","in":"path","required":true,"schema":{"type":"integer","title":"Rsv Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Reservation Invoice Save","operationId":"reservation_invoice_save_reservations__rsv_id__invoice_post","parameters":[{"name":"rsv_id","in":"path","required":true,"schema":{"type":"integer","title":"Rsv Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reservations/{rsv_id}/invoice/pull-from-quote":{"post":{"summary":"Reservation Invoice Pull From Quote","description":"Fill the statement's Particulars from this reservation's linked\nquotation. Reuses _quote_totals so the figures match the quote exactly\n(same set-menu x pax, add-ons, and service/catering charge with its\nsaved label). Replaces the current particulars -- it's a starting\npoint the user can then edit or delete rows from.\n\nMapping note: statement rows are (description, unit_price, pax) with\namount = unit_price x pax. The quote's charge and add-ons are FLAT peso\namounts, not per-pax, so those come across as a single line each with\npax = 1 and unit_price = the amount. The set-menu line is genuinely\nper-pax, so it maps naturally to price x pax.","operationId":"reservation_invoice_pull_from_quote_reservations__rsv_id__invoice_pull_from_quote_post","parameters":[{"name":"rsv_id","in":"path","required":true,"schema":{"type":"integer","title":"Rsv Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reservations/{rsv_id}/invoice.pdf":{"get":{"summary":"Reservation Invoice Pdf","operationId":"reservation_invoice_pdf_reservations__rsv_id__invoice_pdf_get","parameters":[{"name":"rsv_id","in":"path","required":true,"schema":{"type":"integer","title":"Rsv Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reservations/{rsv_id}/invoice.xlsx":{"get":{"summary":"Reservation Invoice Xlsx","operationId":"reservation_invoice_xlsx_reservations__rsv_id__invoice_xlsx_get","parameters":[{"name":"rsv_id","in":"path","required":true,"schema":{"type":"integer","title":"Rsv Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/quotations":{"get":{"summary":"Quotations List","operationId":"quotations_list_quotations_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/quotations/new":{"get":{"summary":"Quotation New","operationId":"quotation_new_quotations_new_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/reservations/{rsv_id}/quotation":{"get":{"summary":"Reservation Quotation","operationId":"reservation_quotation_reservations__rsv_id__quotation_get","parameters":[{"name":"rsv_id","in":"path","required":true,"schema":{"type":"integer","title":"Rsv Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/quotations/{qid}":{"get":{"summary":"Quotation Editor","operationId":"quotation_editor_quotations__qid__get","parameters":[{"name":"qid","in":"path","required":true,"schema":{"type":"integer","title":"Qid"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Quotation Save","operationId":"quotation_save_quotations__qid__post","parameters":[{"name":"qid","in":"path","required":true,"schema":{"type":"integer","title":"Qid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/quotations/{qid}/delete":{"post":{"summary":"Quotation Delete","operationId":"quotation_delete_quotations__qid__delete_post","parameters":[{"name":"qid","in":"path","required":true,"schema":{"type":"integer","title":"Qid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/quotations/{qid}/pdf":{"get":{"summary":"Quotation Pdf","operationId":"quotation_pdf_quotations__qid__pdf_get","parameters":[{"name":"qid","in":"path","required":true,"schema":{"type":"integer","title":"Qid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/quotations/{qid}/docx":{"get":{"summary":"Quotation Docx","operationId":"quotation_docx_quotations__qid__docx_get","parameters":[{"name":"qid","in":"path","required":true,"schema":{"type":"integer","title":"Qid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reservations/{rsv_id}/email":{"post":{"summary":"Reservation Email","description":"Email the reservation confirmation PDF to a recipient.","operationId":"reservation_email_reservations__rsv_id__email_post","parameters":[{"name":"rsv_id","in":"path","required":true,"schema":{"type":"integer","title":"Rsv Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reservations/branch-zones/{branch_id}":{"get":{"summary":"Branch Zones","description":"HTMX: return <option> tags for the distinct zones in a branch.","operationId":"branch_zones_reservations_branch_zones__branch_id__get","parameters":[{"name":"branch_id","in":"path","required":true,"schema":{"type":"integer","title":"Branch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reservations/{rsv_id}/status":{"post":{"summary":"Reservation Set Status","operationId":"reservation_set_status_reservations__rsv_id__status_post","parameters":[{"name":"rsv_id","in":"path","required":true,"schema":{"type":"integer","title":"Rsv Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reservations/{rsv_id}/delete":{"post":{"summary":"Reservation Delete","operationId":"reservation_delete_reservations__rsv_id__delete_post","parameters":[{"name":"rsv_id","in":"path","required":true,"schema":{"type":"integer","title":"Rsv Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/tables":{"get":{"summary":"Tables Admin","operationId":"tables_admin_admin_tables_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/tables/save":{"post":{"summary":"Tables Save","operationId":"tables_save_admin_tables_save_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/tables/{table_id}/delete":{"post":{"summary":"Table Delete","operationId":"table_delete_admin_tables__table_id__delete_post","parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"integer","title":"Table Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/tables/floor-plan/{branch_id}":{"get":{"summary":"Get Floor Plan","operationId":"get_floor_plan_admin_tables_floor_plan__branch_id__get","parameters":[{"name":"branch_id","in":"path","required":true,"schema":{"type":"integer","title":"Branch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/tables/floor-plan/{branch_id}/upload":{"post":{"summary":"Upload Floor Plan","operationId":"upload_floor_plan_admin_tables_floor_plan__branch_id__upload_post","parameters":[{"name":"branch_id","in":"path","required":true,"schema":{"type":"integer","title":"Branch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/tables/floor-plan/{branch_id}/delete":{"post":{"summary":"Delete Floor Plan","operationId":"delete_floor_plan_admin_tables_floor_plan__branch_id__delete_post","parameters":[{"name":"branch_id","in":"path","required":true,"schema":{"type":"integer","title":"Branch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/tables/excel-template/{branch_id}":{"get":{"summary":"Tables Excel Template","operationId":"tables_excel_template_admin_tables_excel_template__branch_id__get","parameters":[{"name":"branch_id","in":"path","required":true,"schema":{"type":"integer","title":"Branch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/tables/excel-upload/{branch_id}":{"post":{"summary":"Tables Excel Upload","operationId":"tables_excel_upload_admin_tables_excel_upload__branch_id__post","parameters":[{"name":"branch_id","in":"path","required":true,"schema":{"type":"integer","title":"Branch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/tables/groups/{branch_id}/add":{"post":{"summary":"Add Table Group","operationId":"add_table_group_admin_tables_groups__branch_id__add_post","parameters":[{"name":"branch_id","in":"path","required":true,"schema":{"type":"integer","title":"Branch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/tables/groups/{group_id}/delete":{"post":{"summary":"Delete Table Group","operationId":"delete_table_group_admin_tables_groups__group_id__delete_post","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"integer","title":"Group Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reservations/available-units":{"get":{"summary":"Available Units Fragment","operationId":"available_units_fragment_reservations_available_units_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"reservation_date","in":"query","required":false,"schema":{"type":"string","default":"","title":"Reservation Date"}},{"name":"start_time","in":"query","required":false,"schema":{"type":"string","default":"","title":"Start Time"}},{"name":"duration_minutes","in":"query","required":false,"schema":{"type":"integer","default":120,"title":"Duration Minutes"}},{"name":"exclude_rsv_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Exclude Rsv Id"}},{"name":"party_size","in":"query","required":false,"schema":{"type":"integer","default":2,"title":"Party Size"}},{"name":"selected_table_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Selected Table Id"}},{"name":"selected_group_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Selected Group Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/seating":{"get":{"summary":"Seating Live","operationId":"seating_live_seating_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/seating/floor-data":{"get":{"summary":"Seating Floor Data","description":"HTMX endpoint — returns refreshed floor HTML fragment.","operationId":"seating_floor_data_seating_floor_data_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/seating/walkin-count":{"post":{"summary":"Seating Walkin Count","description":"Nov 13, 2026 (Joy): count a walk-in party without picking a table --\nfor busy moments, so the day's seated count still matches the covers.","operationId":"seating_walkin_count_seating_walkin_count_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/seating/seat":{"post":{"summary":"Seating Seat","description":"Seat a guest at a table (walk-in or from waitlist).","operationId":"seating_seat_seating_seat_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/seating/release/{table_id}":{"post":{"summary":"Seating Release","description":"Release a table — mark as available, complete the reservation.","operationId":"seating_release_seating_release__table_id__post","parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"integer","title":"Table Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/seating/share/{table_id}":{"post":{"summary":"Seating Share","description":"Add another group to an already-occupied table. Each shared group is its\nOWN seating/check — it gets its own reservation row (own start time), so it\ncan later be released on its own with its own sales + time-out.","operationId":"seating_share_seating_share__table_id__post","parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"integer","title":"Table Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/seating/edit-group/{table_id}":{"post":{"summary":"Seating Edit Group","description":"Rectify one sub-group's name / pax on a shared table (also updates that\ngroup's own reservation so its check/pax stay in step).","operationId":"seating_edit_group_seating_edit_group__table_id__post","parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"integer","title":"Table Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/seating/release-group/{table_id}":{"post":{"summary":"Seating Release Group","description":"Release one sub-group (batch) from a shared table — closes that group's\nown check: its sales + its own time-out — while the rest stay seated. Full\nrelease of a non-shared table uses the normal Release button.","operationId":"seating_release_group_seating_release_group__table_id__post","parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"integer","title":"Table Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/seating/transfer-group/{table_id}":{"post":{"summary":"Seating Transfer Group","description":"Move ONE group from a shared table to another table. The group keeps its\nown reservation/check; if the destination is occupied it shares there, and\nif it's free the group simply takes it. The source table loses that group\n(collapsing back to a single party when only one remains).","operationId":"seating_transfer_group_seating_transfer_group__table_id__post","parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"integer","title":"Table Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/seating/transfer":{"post":{"summary":"Seating Transfer","description":"Move a seated guest from one table to another.\n\nBlocks the move when the destination is either occupied right now, or has\nan overlapping confirmed/seated reservation later today. A guest seated\nfrom the waitlist is moved the same way and their waitlist record follows.","operationId":"seating_transfer_seating_transfer_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/seating/waitlist/add":{"post":{"summary":"Waitlist Add","description":"Add a guest to the waitlist.","operationId":"waitlist_add_seating_waitlist_add_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/seating/waitlist/{wl_id}/notify":{"post":{"summary":"Waitlist Notify","description":"Mark waitlist guest as notified (table ready).","operationId":"waitlist_notify_seating_waitlist__wl_id__notify_post","parameters":[{"name":"wl_id","in":"path","required":true,"schema":{"type":"integer","title":"Wl Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/seating/waitlist/{wl_id}/cancel":{"post":{"summary":"Waitlist Cancel","description":"Remove a guest from the waitlist.","operationId":"waitlist_cancel_seating_waitlist__wl_id__cancel_post","parameters":[{"name":"wl_id","in":"path","required":true,"schema":{"type":"integer","title":"Wl Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/seating/waitlist/cleanup":{"post":{"summary":"Waitlist Cleanup","description":"Clean up the live waitlist queue without deleting anything.\n\nmode = 'abandon_today'  -> mark today's leftover waiting/notified as abandoned\nmode = 'archive_before' -> mark waiting/notified created before a date as abandoned\nEntries stay in history with status 'abandoned' (counted as abandoned in analytics).","operationId":"waitlist_cleanup_seating_waitlist_cleanup_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/seating/waitlist/{wl_id}/delete":{"post":{"summary":"Waitlist Delete","description":"Permanently delete a single waitlist entry (branch-access checked).","operationId":"waitlist_delete_seating_waitlist__wl_id__delete_post","parameters":[{"name":"wl_id","in":"path","required":true,"schema":{"type":"integer","title":"Wl Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/seating/waitlist/purge":{"post":{"summary":"Waitlist Purge","description":"Permanently delete waitlist entries added before a date (all statuses).\n\nDestructive — use to clear out old / test history. Branch-scoped to a\nchosen branch, or all the user's branches when none is selected.","operationId":"waitlist_purge_seating_waitlist_purge_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/seating/waitlist/history":{"get":{"summary":"Waitlist History","operationId":"waitlist_history_seating_waitlist_history_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Status"}},{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"html","title":"Fmt"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reservations/{rsv_id}/tables/save":{"post":{"summary":"Reservation Tables Save","description":"Save multi-table assignment for a reservation.","operationId":"reservation_tables_save_reservations__rsv_id__tables_save_post","parameters":[{"name":"rsv_id","in":"path","required":true,"schema":{"type":"integer","title":"Rsv Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/price-alerts":{"get":{"summary":"Price Alerts Page","operationId":"price_alerts_page_price_alerts_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","default":"","title":"Kind"}},{"name":"group","in":"query","required":false,"schema":{"type":"string","default":"","title":"Group"}},{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"dismissed","in":"query","required":false,"schema":{"type":"string","default":"","title":"Dismissed"}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","default":"up","title":"Direction"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/price-alerts/card":{"get":{"summary":"Price Alerts Card","description":"Dashboard fragment: last 7 days, top 6, newest first.","operationId":"price_alerts_card_price_alerts_card_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/price-alerts/count":{"get":{"summary":"Price Alerts Count","operationId":"price_alerts_count_price_alerts_count_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/price-alerts/{alert_id}/dismiss":{"post":{"summary":"Price Alert Dismiss","operationId":"price_alert_dismiss_price_alerts__alert_id__dismiss_post","parameters":[{"name":"alert_id","in":"path","required":true,"schema":{"type":"integer","title":"Alert Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/price-alerts/settings":{"post":{"summary":"Price Alert Settings Save","operationId":"price_alert_settings_save_price_alerts_settings_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/price-alerts/email-now":{"post":{"summary":"Price Alert Email Now","operationId":"price_alert_email_now_price_alerts_email_now_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/price-alerts/{alert_id}/update-price":{"post":{"summary":"Price Alert Update Price","operationId":"price_alert_update_price_price_alerts__alert_id__update_price_post","parameters":[{"name":"alert_id","in":"path","required":true,"schema":{"type":"integer","title":"Alert Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/price-alerts/ingredient/{ingredient_id}/purchases":{"get":{"summary":"Ingredient Purchases Card","description":"HTML fragment for the ingredient page (loaded by htmx).","operationId":"ingredient_purchases_card_price_alerts_ingredient__ingredient_id__purchases_get","parameters":[{"name":"ingredient_id","in":"path","required":true,"schema":{"type":"integer","title":"Ingredient Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/price-alerts/ingredient/{ingredient_id}/use-purchase/{txn_id}":{"post":{"summary":"Ingredient Use Purchase Price","description":"Set the list price to what was paid on one delivery. The price is\nworked out here from the delivery itself -- never taken from the form.","operationId":"ingredient_use_purchase_price_price_alerts_ingredient__ingredient_id__use_purchase__txn_id__post","parameters":[{"name":"ingredient_id","in":"path","required":true,"schema":{"type":"integer","title":"Ingredient Id"}},{"name":"txn_id","in":"path","required":true,"schema":{"type":"integer","title":"Txn Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/price-alerts/ingredient/{ingredient_id}/export":{"get":{"summary":"Price Alert Ingredient Export","operationId":"price_alert_ingredient_export_price_alerts_ingredient__ingredient_id__export_get","parameters":[{"name":"ingredient_id","in":"path","required":true,"schema":{"type":"integer","title":"Ingredient Id"}},{"name":"alert","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Alert"}},{"name":"price","in":"query","required":false,"schema":{"type":"string","default":"","title":"Price"}},{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"pdf","title":"Fmt"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/price-alerts/ingredient/{ingredient_id}":{"get":{"summary":"Price Alert Ingredient","operationId":"price_alert_ingredient_price_alerts_ingredient__ingredient_id__get","parameters":[{"name":"ingredient_id","in":"path","required":true,"schema":{"type":"integer","title":"Ingredient Id"}},{"name":"alert","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Alert"}},{"name":"price","in":"query","required":false,"schema":{"type":"string","default":"","title":"Price"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/price-alerts/preferred-units":{"get":{"summary":"Preferred Units Page","operationId":"preferred_units_page_price_alerts_preferred_units_get","parameters":[{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"show","in":"query","required":false,"schema":{"type":"string","default":"bought","title":"Show"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Preferred Units Apply","operationId":"preferred_units_apply_price_alerts_preferred_units_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/price-alerts/ref/{ref}":{"get":{"summary":"Price Alert Open Ref","description":"Open the PO or requisition behind a delivery's reference number\n(transactions.ref_po holds 'PO-0645', 'REQ-1099', or the newer\nper-branch format). POs are tried first, then requisitions.","operationId":"price_alert_open_ref_price_alerts_ref__ref__get","parameters":[{"name":"ref","in":"path","required":true,"schema":{"type":"string","title":"Ref"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/price-alerts/export.xlsx":{"get":{"summary":"Price Alerts Export","operationId":"price_alerts_export_price_alerts_export_xlsx_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","default":"","title":"Kind"}},{"name":"group","in":"query","required":false,"schema":{"type":"string","default":"","title":"Group"}},{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","default":"","title":"Direction"}},{"name":"dismissed","in":"query","required":false,"schema":{"type":"string","default":"","title":"Dismissed"}},{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"xlsx","title":"Fmt"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/price-alerts/export":{"get":{"summary":"Price Alerts Export","operationId":"price_alerts_export_price_alerts_export_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","default":"","title":"Kind"}},{"name":"group","in":"query","required":false,"schema":{"type":"string","default":"","title":"Group"}},{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","default":"","title":"Direction"}},{"name":"dismissed","in":"query","required":false,"schema":{"type":"string","default":"","title":"Dismissed"}},{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"xlsx","title":"Fmt"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/merge-items":{"get":{"summary":"Merge Page","operationId":"merge_page_admin_merge_items_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"keep","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Keep"}},{"name":"merge","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Merge"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Merge Do","operationId":"merge_do_admin_merge_items_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/pack-sizes/save":{"post":{"summary":"Pack Size Save","operationId":"pack_size_save_pack_sizes_save_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/pack-sizes":{"get":{"summary":"Pack Sizes Page","operationId":"pack_sizes_page_pack_sizes_get","parameters":[{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"show","in":"query","required":false,"schema":{"type":"string","default":"ordered","title":"Show"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Pack Sizes Apply","operationId":"pack_sizes_apply_pack_sizes_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/pack-sizes/export.xlsx":{"get":{"summary":"Pack Sizes Export","operationId":"pack_sizes_export_pack_sizes_export_xlsx_get","parameters":[{"name":"show","in":"query","required":false,"schema":{"type":"string","default":"ordered","title":"Show"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pack-sizes/export":{"get":{"summary":"Pack Sizes Export","operationId":"pack_sizes_export_pack_sizes_export_get","parameters":[{"name":"show","in":"query","required":false,"schema":{"type":"string","default":"ordered","title":"Show"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pack-sizes/import":{"post":{"summary":"Pack Sizes Import","operationId":"pack_sizes_import_pack_sizes_import_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_pack_sizes_import_pack_sizes_import_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/menu-price-check/ingredient/{ingredient_id}":{"get":{"summary":"Menu Price Check Ingredient","operationId":"menu_price_check_ingredient_menu_price_check_ingredient__ingredient_id__get","parameters":[{"name":"ingredient_id","in":"path","required":true,"schema":{"type":"integer","title":"Ingredient Id"}},{"name":"dish","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dish"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/menu-price-check/settings":{"post":{"summary":"Menu Price Check Settings","operationId":"menu_price_check_settings_menu_price_check_settings_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/menu-price-check/email-now":{"post":{"summary":"Menu Price Check Email Now","operationId":"menu_price_check_email_now_menu_price_check_email_now_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/menu-price-check":{"get":{"summary":"Menu Price Check","operationId":"menu_price_check_menu_price_check_get","parameters":[{"name":"brand_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand Id"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"show","in":"query","required":false,"schema":{"type":"string","default":"priced","title":"Show"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","default":"worst","title":"Sort"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/menu-price-check/export":{"get":{"summary":"Menu Price Check Export","operationId":"menu_price_check_export_menu_price_check_export_get","parameters":[{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"xlsx","title":"Fmt"}},{"name":"brand_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand Id"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"show","in":"query","required":false,"schema":{"type":"string","default":"priced","title":"Show"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","default":"worst","title":"Sort"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounting":{"get":{"summary":"Acct Home","operationId":"acct_home_accounting_get","parameters":[{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounting/pfp/new":{"get":{"summary":"Pfp New","operationId":"pfp_new_accounting_pfp_new_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"po_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Po Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounting/pfp":{"post":{"summary":"Pfp Create","operationId":"pfp_create_accounting_pfp_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/accounting/pfp/{pid}":{"get":{"summary":"Pfp Detail","operationId":"pfp_detail_accounting_pfp__pid__get","parameters":[{"name":"pid","in":"path","required":true,"schema":{"type":"integer","title":"Pid"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounting/pfp/{pid}/approve":{"post":{"summary":"Pfp Approve","operationId":"pfp_approve_accounting_pfp__pid__approve_post","parameters":[{"name":"pid","in":"path","required":true,"schema":{"type":"integer","title":"Pid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounting/pfp/{pid}/review":{"post":{"summary":"Pfp Review","description":"Oct 29, 2026 -- the approver's review, PO by PO against the attached\ninvoice (the paper the purchaser hands over with the printed PFP).\nSaves the ticks; with action=approve also approves once all are ticked.","operationId":"pfp_review_accounting_pfp__pid__review_post","parameters":[{"name":"pid","in":"path","required":true,"schema":{"type":"integer","title":"Pid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounting/pfp/{pid}/lines/{line_id}/take-out":{"post":{"summary":"Pfp Take Out","description":"Take one PO off a PFP that is still waiting for approval (doesn't\nmatch the invoice, invoice missing...). The PO goes back to the waiting\nlist; the totals are recomputed; the reason stays on the PFP.","operationId":"pfp_take_out_accounting_pfp__pid__lines__line_id__take_out_post","parameters":[{"name":"pid","in":"path","required":true,"schema":{"type":"integer","title":"Pid"}},{"name":"line_id","in":"path","required":true,"schema":{"type":"integer","title":"Line Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounting/pfp/{pid}/void":{"post":{"summary":"Pfp Void","operationId":"pfp_void_accounting_pfp__pid__void_post","parameters":[{"name":"pid","in":"path","required":true,"schema":{"type":"integer","title":"Pid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounting/transmittals/new":{"get":{"summary":"Trm New","operationId":"trm_new_accounting_transmittals_new_get","parameters":[{"name":"brand_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Brand Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounting/transmittals":{"post":{"summary":"Trm Create","operationId":"trm_create_accounting_transmittals_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/accounting/transmittals/{tid}":{"get":{"summary":"Trm Detail","operationId":"trm_detail_accounting_transmittals__tid__get","parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"integer","title":"Tid"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounting/transmittals/{tid}/received":{"post":{"summary":"Trm Received","operationId":"trm_received_accounting_transmittals__tid__received_post","parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"integer","title":"Tid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounting/vat":{"get":{"summary":"Vat Page","operationId":"vat_page_accounting_vat_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Vat Save","operationId":"vat_save_accounting_vat_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/accounting/pfp/{pid}/pdf":{"get":{"summary":"Pfp Pdf","description":"z14-pfp-comments-toggle: comments=0 omits the warnings/notes from PDF.","operationId":"pfp_pdf_accounting_pfp__pid__pdf_get","parameters":[{"name":"pid","in":"path","required":true,"schema":{"type":"integer","title":"Pid"}},{"name":"comments","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Comments"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounting/pfp/{pid}/packet.pdf":{"get":{"summary":"Pfp Packet","description":"Oct 29, 2026 -- what the purchaser prints for the approver: the PFP\nform followed by every PO on it, in one PDF (invoices are attached by\nhand behind each PO).  z14: comments param forwarded to pfp_pdf.","operationId":"pfp_packet_accounting_pfp__pid__packet_pdf_get","parameters":[{"name":"pid","in":"path","required":true,"schema":{"type":"integer","title":"Pid"}},{"name":"comments","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Comments"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounting/pfp/{pid}/xlsx":{"get":{"summary":"Pfp Xlsx","operationId":"pfp_xlsx_accounting_pfp__pid__xlsx_get","parameters":[{"name":"pid","in":"path","required":true,"schema":{"type":"integer","title":"Pid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounting/transmittals/{tid}/pdf":{"get":{"summary":"Trm Pdf","operationId":"trm_pdf_accounting_transmittals__tid__pdf_get","parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"integer","title":"Tid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounting/cleanup":{"get":{"summary":"Cleanup Page","operationId":"cleanup_page_accounting_cleanup_get","parameters":[{"name":"before","in":"query","required":false,"schema":{"type":"string","default":"","title":"Before"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Cleanup Apply","operationId":"cleanup_apply_accounting_cleanup_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/accounting/cleanup/{po_id}/undo":{"post":{"summary":"Cleanup Undo","operationId":"cleanup_undo_accounting_cleanup__po_id__undo_post","parameters":[{"name":"po_id","in":"path","required":true,"schema":{"type":"integer","title":"Po Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profile":{"get":{"summary":"Profile Page","operationId":"profile_page_profile_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Profile Update","operationId":"profile_update_profile_post","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_profile_update_profile_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/forgot-password":{"get":{"summary":"Forgot Password Page","operationId":"forgot_password_page_forgot_password_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Forgot Password Submit","operationId":"forgot_password_submit_forgot_password_post","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_forgot_password_submit_forgot_password_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reset-password":{"get":{"summary":"Reset Password Page","operationId":"reset_password_page_reset_password_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Reset Password Submit","operationId":"reset_password_submit_reset_password_post","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_reset_password_submit_reset_password_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/ingredients/audit-summary":{"get":{"summary":"Ingredient Audit Summary","operationId":"ingredient_audit_summary_admin_ingredients_audit_summary_get","parameters":[{"name":"tab","in":"query","required":false,"schema":{"type":"string","default":"price","title":"Tab"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"}},{"name":"changed_by_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Changed By User Id"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"flag_pct","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"default":10.0,"title":"Flag Pct"}},{"name":"only_flagged","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Only Flagged"}},{"name":"fmt","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fmt"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/disposal":{"get":{"summary":"Disposal List","operationId":"disposal_list_disposal_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Status"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Branch Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Disposal Create","operationId":"disposal_create_disposal_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/disposal/summary":{"get":{"summary":"Disposal Summary","operationId":"disposal_summary_disposal_summary_get","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"this_month","title":"Period"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/disposal/new":{"get":{"summary":"Disposal New","operationId":"disposal_new_disposal_new_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Branch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/disposal/onhand":{"get":{"summary":"Disposal Onhand","description":"JSON {ingredient_id: on-hand qty (base unit)} for a branch — lets the\nNew-slip picker show stock and float in-stock items up.","operationId":"disposal_onhand_disposal_onhand_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Branch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/disposal/lookup-label":{"get":{"summary":"Disposal Lookup Label","description":"JSON: resolve a scanned butchery label for the New-slip form.","operationId":"disposal_lookup_label_disposal_lookup_label_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"type":"string","default":"","title":"Code"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Branch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/disposal/{slip_id}":{"get":{"summary":"Disposal Detail","operationId":"disposal_detail_disposal__slip_id__get","parameters":[{"name":"slip_id","in":"path","required":true,"schema":{"type":"integer","title":"Slip Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/disposal/scan/{token}":{"get":{"summary":"Disposal Scan","operationId":"disposal_scan_disposal_scan__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/disposal/{slip_id}/slip":{"get":{"summary":"Disposal Slip","operationId":"disposal_slip_disposal__slip_id__slip_get","parameters":[{"name":"slip_id","in":"path","required":true,"schema":{"type":"integer","title":"Slip Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/disposal/{slip_id}/send":{"post":{"summary":"Disposal Send","operationId":"disposal_send_disposal__slip_id__send_post","parameters":[{"name":"slip_id","in":"path","required":true,"schema":{"type":"integer","title":"Slip Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/disposal/{slip_id}/sign":{"post":{"summary":"Disposal Sign","operationId":"disposal_sign_disposal__slip_id__sign_post","parameters":[{"name":"slip_id","in":"path","required":true,"schema":{"type":"integer","title":"Slip Id"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_disposal_sign_disposal__slip_id__sign_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/disposal/{slip_id}/cancel":{"post":{"summary":"Disposal Cancel","operationId":"disposal_cancel_disposal__slip_id__cancel_post","parameters":[{"name":"slip_id","in":"path","required":true,"schema":{"type":"integer","title":"Slip Id"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_disposal_cancel_disposal__slip_id__cancel_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/disposal/{slip_id}/lines/{line_id}/photo":{"post":{"summary":"Disposal Line Photo","operationId":"disposal_line_photo_disposal__slip_id__lines__line_id__photo_post","parameters":[{"name":"slip_id","in":"path","required":true,"schema":{"type":"integer","title":"Slip Id"}},{"name":"line_id","in":"path","required":true,"schema":{"type":"integer","title":"Line Id"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_disposal_line_photo_disposal__slip_id__lines__line_id__photo_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/disposal/{slip_id}/lines/{line_id}/photo/delete":{"post":{"summary":"Disposal Line Photo Delete","operationId":"disposal_line_photo_delete_disposal__slip_id__lines__line_id__photo_delete_post","parameters":[{"name":"slip_id","in":"path","required":true,"schema":{"type":"integer","title":"Slip Id"}},{"name":"line_id","in":"path","required":true,"schema":{"type":"integer","title":"Line Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/disposal/photo/{line_id}":{"get":{"summary":"Disposal Photo","operationId":"disposal_photo_disposal_photo__line_id__get","parameters":[{"name":"line_id","in":"path","required":true,"schema":{"type":"integer","title":"Line Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/disposal/{slip_id}/delete":{"post":{"summary":"Disposal Delete","operationId":"disposal_delete_disposal__slip_id__delete_post","parameters":[{"name":"slip_id","in":"path","required":true,"schema":{"type":"integer","title":"Slip Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reports/sales":{"get":{"summary":"Sales Report Summary","operationId":"sales_report_summary_reports_sales_get","parameters":[{"name":"preset","in":"query","required":false,"schema":{"type":"string","default":"","title":"Preset"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","default":"","title":"From"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","default":"","title":"To"}},{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"brand_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Brand Id"}},{"name":"bu_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Bu Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reports/sales/export":{"get":{"summary":"Sales Report Export","operationId":"sales_report_export_reports_sales_export_get","parameters":[{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"csv","title":"Fmt"}},{"name":"preset","in":"query","required":false,"schema":{"type":"string","default":"","title":"Preset"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","default":"","title":"From"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","default":"","title":"To"}},{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"brand_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Brand Id"}},{"name":"bu_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Bu Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reports/sales/viber-link":{"get":{"summary":"Sales Report Viber Link","operationId":"sales_report_viber_link_reports_sales_viber_link_get","parameters":[{"name":"preset","in":"query","required":false,"schema":{"type":"string","default":"","title":"Preset"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","default":"","title":"From"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","default":"","title":"To"}},{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"brand_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Brand Id"}},{"name":"bu_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Bu Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reports/sales/email-management":{"post":{"summary":"Sales Report Email","operationId":"sales_report_email_reports_sales_email_management_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/reports/sales/branch/{branch_id}/daily":{"get":{"summary":"Branch Daily Sales","operationId":"branch_daily_sales_reports_sales_branch__branch_id__daily_get","parameters":[{"name":"branch_id","in":"path","required":true,"schema":{"type":"integer","title":"Branch Id"}},{"name":"preset","in":"query","required":false,"schema":{"type":"string","default":"","title":"Preset"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","default":"","title":"From"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","default":"","title":"To"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reports/sales/branch/{branch_id}/daily/export":{"get":{"summary":"Branch Daily Sales Export","operationId":"branch_daily_sales_export_reports_sales_branch__branch_id__daily_export_get","parameters":[{"name":"branch_id","in":"path","required":true,"schema":{"type":"integer","title":"Branch Id"}},{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"csv","title":"Fmt"}},{"name":"preset","in":"query","required":false,"schema":{"type":"string","default":"","title":"Preset"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","default":"","title":"From"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","default":"","title":"To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reports/sales/branch/{branch_id}/daily/email-management":{"post":{"summary":"Branch Daily Email","operationId":"branch_daily_email_reports_sales_branch__branch_id__daily_email_management_post","parameters":[{"name":"branch_id","in":"path","required":true,"schema":{"type":"integer","title":"Branch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/sales-targets":{"get":{"summary":"Admin Targets Grid","operationId":"admin_targets_grid_admin_sales_targets_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"months_ahead","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Months Ahead"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/sales-targets/branches":{"get":{"summary":"Admin Branch Targets Grid","description":"Per-branch sales-target overrides. When set, replaces the BU-share\nallocation for that branch in the chosen month.","operationId":"admin_branch_targets_grid_admin_sales_targets_branches_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"months_ahead","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Months Ahead"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/sales-targets/branches/save":{"post":{"summary":"Admin Branch Targets Save","description":"Save per-branch overrides. Form posts as\nbtarget_<branch_id>_<year_month> = amount (commas allowed; blank deletes).","operationId":"admin_branch_targets_save_admin_sales_targets_branches_save_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/sales-targets/save":{"post":{"summary":"Admin Targets Save","description":"Save targets from the grid editor. Form posts as\ntarget_<bu_id>_<year_month> = amount (string with commas allowed).","operationId":"admin_targets_save_admin_sales_targets_save_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/sales-targets/template.csv":{"get":{"summary":"Admin Targets Template","description":"Download a CSV template the user can fill in offline and upload back.","operationId":"admin_targets_template_admin_sales_targets_template_csv_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/sales-targets/upload":{"post":{"summary":"Admin Targets Upload","description":"Bulk upload monthly targets from CSV or Excel.\nExpected columns: bu_name, year_month (YYYY-MM), target_amount","operationId":"admin_targets_upload_admin_sales_targets_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_admin_targets_upload_admin_sales_targets_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/transfers":{"get":{"summary":"Transfers List","operationId":"transfers_list_transfers_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Status"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"source_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Id"}},{"name":"dest_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dest Id"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"}},{"name":"variance","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Variance"}},{"name":"period","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}},{"name":"dir","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dir"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Transfer Create","operationId":"transfer_create_transfers_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/transfers/incoming":{"get":{"summary":"Transfers Incoming","operationId":"transfers_incoming_transfers_incoming_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"source_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Id"}},{"name":"dest_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dest Id"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"}},{"name":"brand_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand Id"}},{"name":"period","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/transfers/new":{"get":{"summary":"Transfer New","operationId":"transfer_new_transfers_new_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/transfers/report":{"get":{"summary":"Transfer Report","operationId":"transfer_report_transfers_report_get","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"this_month","title":"Period"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"}},{"name":"source_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Source Id"}},{"name":"dest_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Dest Id"}},{"name":"ingredient_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Ingredient Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/transfers/report/export":{"get":{"summary":"Transfer Report Export","operationId":"transfer_report_export_transfers_report_export_get","parameters":[{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"csv","title":"Fmt"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"this_month","title":"Period"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"}},{"name":"source_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Source Id"}},{"name":"dest_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Dest Id"}},{"name":"ingredient_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Ingredient Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/transfers/bulk-archive":{"post":{"summary":"Transfers Bulk Archive","description":"Bulk archive/restore selected transfers (superadmin cleanup).","operationId":"transfers_bulk_archive_transfers_bulk_archive_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/transfers/bulk-delete":{"post":{"summary":"Transfers Bulk Delete","description":"Bulk hard-delete selected transfers (superadmin). Each runs in its own\ntransaction reusing the per-row delete logic, so one failure won't abort\nthe batch, and every posted stock leg is reversed (transactions by ref_no).","operationId":"transfers_bulk_delete_transfers_bulk_delete_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/transfers/variances":{"get":{"summary":"Transfer Variances","operationId":"transfer_variances_transfers_variances_get","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"this_month","title":"Period"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"}},{"name":"source_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Id"}},{"name":"dest_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dest Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/transfers/variances/export":{"get":{"summary":"Transfer Variances Export","operationId":"transfer_variances_export_transfers_variances_export_get","parameters":[{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"xlsx","title":"Fmt"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"this_month","title":"Period"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"}},{"name":"source_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Id"}},{"name":"dest_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dest Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/transfers/revalue":{"get":{"summary":"Transfer Revalue Preview","operationId":"transfer_revalue_preview_transfers_revalue_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/transfers/revalue/apply":{"post":{"summary":"Transfer Revalue Apply","operationId":"transfer_revalue_apply_transfers_revalue_apply_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/transfers/revalue/undo":{"post":{"summary":"Transfer Revalue Undo","operationId":"transfer_revalue_undo_transfers_revalue_undo_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/transfers/{transfer_id}":{"get":{"summary":"Transfer Detail","operationId":"transfer_detail_transfers__transfer_id__get","parameters":[{"name":"transfer_id","in":"path","required":true,"schema":{"type":"integer","title":"Transfer Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/transfers/{transfer_id}/slip":{"get":{"summary":"Transfer Slip","operationId":"transfer_slip_transfers__transfer_id__slip_get","parameters":[{"name":"transfer_id","in":"path","required":true,"schema":{"type":"integer","title":"Transfer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/transfers/{transfer_id}/confirm":{"post":{"summary":"Transfer Confirm","operationId":"transfer_confirm_transfers__transfer_id__confirm_post","parameters":[{"name":"transfer_id","in":"path","required":true,"schema":{"type":"integer","title":"Transfer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/transfers/{transfer_id}/cancel":{"post":{"summary":"Transfer Cancel","description":"Cancel an in-transit transfer and return every line's stock to source.","operationId":"transfer_cancel_transfers__transfer_id__cancel_post","parameters":[{"name":"transfer_id","in":"path","required":true,"schema":{"type":"integer","title":"Transfer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/transfers/{transfer_id}/archive":{"post":{"summary":"Transfer Archive","operationId":"transfer_archive_transfers__transfer_id__archive_post","parameters":[{"name":"transfer_id","in":"path","required":true,"schema":{"type":"integer","title":"Transfer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/transfers/{transfer_id}/restore":{"post":{"summary":"Transfer Restore","operationId":"transfer_restore_transfers__transfer_id__restore_post","parameters":[{"name":"transfer_id","in":"path","required":true,"schema":{"type":"integer","title":"Transfer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/transfers/{transfer_id}/delete":{"post":{"summary":"Transfer Delete","operationId":"transfer_delete_transfers__transfer_id__delete_post","parameters":[{"name":"transfer_id","in":"path","required":true,"schema":{"type":"integer","title":"Transfer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendar/user/{user_id}.ics":{"get":{"summary":"Activities Ical Feed","description":"Per-user iCal feed. Public-with-token (calendar clients don't\ncarry a session). Wrong/missing token → 403. Filters events by the\nsame audience logic as the /calendar page.","operationId":"activities_ical_feed_calendar_user__user_id__ics_get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"token","in":"query","required":false,"schema":{"type":"string","default":"","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendar/user/{user_id}/ical-regenerate":{"post":{"summary":"Activities Ical Regenerate","description":"Rotate the user's ical_token. A user can only rotate their own\n(or a superadmin can rotate anyone's, e.g. after offboarding).","operationId":"activities_ical_regenerate_calendar_user__user_id__ical_regenerate_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendar":{"get":{"summary":"Calendar Month","operationId":"calendar_month_calendar_get","parameters":[{"name":"year","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Year"}},{"name":"month","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Month"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendar/list":{"get":{"summary":"Calendar List","operationId":"calendar_list_calendar_list_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"cleanup","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Cleanup"}},{"name":"archived","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendar/new":{"get":{"summary":"Event New","operationId":"event_new_calendar_new_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Event Create","operationId":"event_create_calendar_new_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/calendar/bulk-archive":{"post":{"summary":"Calendar Bulk Archive","operationId":"calendar_bulk_archive_calendar_bulk_archive_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/calendar/bulk-restore":{"post":{"summary":"Calendar Bulk Restore","operationId":"calendar_bulk_restore_calendar_bulk_restore_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/calendar/bulk-delete":{"post":{"summary":"Calendar Bulk Delete","operationId":"calendar_bulk_delete_calendar_bulk_delete_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/calendar/{event_id}/edit":{"get":{"summary":"Event Edit","operationId":"event_edit_calendar__event_id__edit_get","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"integer","title":"Event Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendar/{event_id}":{"post":{"summary":"Event Update","operationId":"event_update_calendar__event_id__post","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"integer","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendar/{event_id}/delete":{"post":{"summary":"Event Delete","operationId":"event_delete_calendar__event_id__delete_post","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"integer","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendar/{event_id}/cancel":{"post":{"summary":"Event Cancel","operationId":"event_cancel_calendar__event_id__cancel_post","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"integer","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/calendar/{event_id}/reinstate":{"post":{"summary":"Event Reinstate","operationId":"event_reinstate_calendar__event_id__reinstate_post","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"integer","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/announcements":{"get":{"summary":"Announcements List","operationId":"announcements_list_announcements_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"cleanup","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Cleanup"}},{"name":"archived","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/announcements/new":{"get":{"summary":"Announcement New","operationId":"announcement_new_announcements_new_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Announcement Create","operationId":"announcement_create_announcements_new_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/announcements/{ann_id}/edit":{"get":{"summary":"Announcement Edit","operationId":"announcement_edit_announcements__ann_id__edit_get","parameters":[{"name":"ann_id","in":"path","required":true,"schema":{"type":"integer","title":"Ann Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/announcements/bulk-archive":{"post":{"summary":"Announcements Bulk Archive","operationId":"announcements_bulk_archive_announcements_bulk_archive_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/announcements/bulk-restore":{"post":{"summary":"Announcements Bulk Restore","operationId":"announcements_bulk_restore_announcements_bulk_restore_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/announcements/bulk-delete":{"post":{"summary":"Announcements Bulk Delete","operationId":"announcements_bulk_delete_announcements_bulk_delete_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/announcements/{ann_id}":{"post":{"summary":"Announcement Update","operationId":"announcement_update_announcements__ann_id__post","parameters":[{"name":"ann_id","in":"path","required":true,"schema":{"type":"integer","title":"Ann Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/announcements/{ann_id}/delete":{"post":{"summary":"Announcement Delete","operationId":"announcement_delete_announcements__ann_id__delete_post","parameters":[{"name":"ann_id","in":"path","required":true,"schema":{"type":"integer","title":"Ann Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/seating/plans":{"get":{"summary":"Plans Library","operationId":"plans_library_seating_plans_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Branch Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/seating/plans/new":{"post":{"summary":"Plans New","operationId":"plans_new_seating_plans_new_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_plans_new_seating_plans_new_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/seating/plan/{layout_id}":{"get":{"summary":"Plan Editor","operationId":"plan_editor_seating_plan__layout_id__get","parameters":[{"name":"layout_id","in":"path","required":true,"schema":{"type":"integer","title":"Layout Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/seating/plan/{layout_id}/save":{"post":{"summary":"Plan Save","operationId":"plan_save_seating_plan__layout_id__save_post","parameters":[{"name":"layout_id","in":"path","required":true,"schema":{"type":"integer","title":"Layout Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/seating/plan/{layout_id}/save-template":{"post":{"summary":"Plan Save Template","operationId":"plan_save_template_seating_plan__layout_id__save_template_post","parameters":[{"name":"layout_id","in":"path","required":true,"schema":{"type":"integer","title":"Layout Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_plan_save_template_seating_plan__layout_id__save_template_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/seating/plan/{layout_id}/parties":{"get":{"summary":"Plan Parties","operationId":"plan_parties_seating_plan__layout_id__parties_get","parameters":[{"name":"layout_id","in":"path","required":true,"schema":{"type":"integer","title":"Layout Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/seating/plan/{layout_id}/state":{"get":{"summary":"Plan State","description":"Current layout JSON + server time — the Live view polls this so timers\nand seat/release done on another device show up.","operationId":"plan_state_seating_plan__layout_id__state_get","parameters":[{"name":"layout_id","in":"path","required":true,"schema":{"type":"integer","title":"Layout Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/seating/plan/{layout_id}/live":{"post":{"summary":"Plan Live","description":"Live seating actions on a layout's tables. Body: {action, table_id,\nname, pax, minutes}. action in seat | release | extend | seat_all | free_all.\nEach table's live occupant lives in element.live = {name, pax, at, mins}.","operationId":"plan_live_seating_plan__layout_id__live_post","parameters":[{"name":"layout_id","in":"path","required":true,"schema":{"type":"integer","title":"Layout Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/seating/plan/{layout_id}/report":{"get":{"summary":"Plan Report","operationId":"plan_report_seating_plan__layout_id__report_get","parameters":[{"name":"layout_id","in":"path","required":true,"schema":{"type":"integer","title":"Layout Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/seating/plan/{layout_id}/report.pdf":{"get":{"summary":"Plan Report Pdf","operationId":"plan_report_pdf_seating_plan__layout_id__report_pdf_get","parameters":[{"name":"layout_id","in":"path","required":true,"schema":{"type":"integer","title":"Layout Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/seating/plan/{layout_id}/report.xlsx":{"get":{"summary":"Plan Report Xlsx","operationId":"plan_report_xlsx_seating_plan__layout_id__report_xlsx_get","parameters":[{"name":"layout_id","in":"path","required":true,"schema":{"type":"integer","title":"Layout Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/seating/plan/{layout_id}/delete":{"post":{"summary":"Plan Delete","operationId":"plan_delete_seating_plan__layout_id__delete_post","parameters":[{"name":"layout_id","in":"path","required":true,"schema":{"type":"integer","title":"Layout Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Home","operationId":"home__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/login":{"get":{"summary":"Login Page","operationId":"login_page_login_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}},"post":{"summary":"Login Submit","operationId":"login_submit_login_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_login_submit_login_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/logout":{"post":{"summary":"Logout","operationId":"logout_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/entries":{"get":{"summary":"Entries Page","operationId":"entries_page_entries_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Branch Id"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"this_month","title":"Period"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"}},{"name":"txn_type","in":"query","required":false,"schema":{"type":"string","default":"ALL","title":"Txn Type"}},{"name":"cleanup","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Cleanup"}},{"name":"item","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Item"}},{"name":"supplier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supplier"}},{"name":"ref","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ref"}},{"name":"check","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Check"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Create Entry","operationId":"create_entry_entries_post","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_create_entry_entries_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/entries/export":{"get":{"summary":"Entries Export","operationId":"entries_export_entries_export_get","parameters":[{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"csv","title":"Fmt"}},{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Branch Id"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"this_month","title":"Period"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"}},{"name":"txn_type","in":"query","required":false,"schema":{"type":"string","default":"ALL","title":"Txn Type"}},{"name":"item","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Item"}},{"name":"supplier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supplier"}},{"name":"ref","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ref"}},{"name":"check","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Check"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard":{"get":{"summary":"Dashboard","operationId":"dashboard_dashboard_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Branch Id"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"this_month","title":"Period"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/branch/{branch_id}/today":{"get":{"summary":"Branch Day View","description":"Branch 'Day at a Glance' — operational dashboard for a single branch.\n\nCombines yesterday's sales, today's reservations, current inventory\nalerts, and variance flags into one screen. Gated by:\n  1. can_access(user, \"branch_day_view\")  — section permission\n  2. visible_branches(user)               — must include this branch","operationId":"branch_day_view_branch__branch_id__today_get","parameters":[{"name":"branch_id","in":"path","required":true,"schema":{"type":"integer","title":"Branch Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/branches/linkage-check":{"get":{"summary":"Branches Linkage Check","description":"Quick diagnostic: which branches have brand + BU + has_reservations correctly set.","operationId":"branches_linkage_check_branches_linkage_check_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/branches/enable-reservations-bulk":{"get":{"summary":"Branches Enable Reservations Bulk","description":"Bulk-enable has_reservations on all branches whose name doesn't look\npurchasing-only. Admin-only. One-shot — redirects back to linkage-check.","operationId":"branches_enable_reservations_bulk_branches_enable_reservations_bulk_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/branches":{"get":{"summary":"Branches Page","operationId":"branches_page_branches_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Branch Create","operationId":"branch_create_branches_post","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_branch_create_branches_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/branches/new":{"get":{"summary":"Branch New","operationId":"branch_new_branches_new_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/branches/{branch_id}/edit":{"get":{"summary":"Branch Edit","operationId":"branch_edit_branches__branch_id__edit_get","parameters":[{"name":"branch_id","in":"path","required":true,"schema":{"type":"integer","title":"Branch Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/branches/{branch_id}":{"post":{"summary":"Branch Update","operationId":"branch_update_branches__branch_id__post","parameters":[{"name":"branch_id","in":"path","required":true,"schema":{"type":"integer","title":"Branch Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_branch_update_branches__branch_id__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/branches/{branch_id}/toggle":{"post":{"summary":"Branch Toggle","operationId":"branch_toggle_branches__branch_id__toggle_post","parameters":[{"name":"branch_id","in":"path","required":true,"schema":{"type":"integer","title":"Branch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/brands":{"get":{"summary":"Brands Page","description":"List brands with their code and business unit. Small enough\n(typically <10 rows) that no pagination is needed.","operationId":"brands_page_brands_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Brand Create","operationId":"brand_create_brands_post","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_brand_create_brands_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/brands/new":{"get":{"summary":"Brand New","operationId":"brand_new_brands_new_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/brands/{brand_id}/edit":{"get":{"summary":"Brand Edit","operationId":"brand_edit_brands__brand_id__edit_get","parameters":[{"name":"brand_id","in":"path","required":true,"schema":{"type":"integer","title":"Brand Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/brands/{brand_id}":{"post":{"summary":"Brand Update","operationId":"brand_update_brands__brand_id__post","parameters":[{"name":"brand_id","in":"path","required":true,"schema":{"type":"integer","title":"Brand Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_brand_update_brands__brand_id__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/categories":{"get":{"summary":"Categories Page","operationId":"categories_page_categories_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"letter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Letter"}},{"name":"cleanup","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Cleanup"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Category Create","operationId":"category_create_categories_post","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_category_create_categories_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/categories/export":{"get":{"summary":"Categories Export","operationId":"categories_export_categories_export_get","parameters":[{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"csv","title":"Fmt"}},{"name":"letter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Letter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/categories/bulk-delete":{"post":{"summary":"Categories Bulk Delete","description":"Cleanup-mode bulk delete: permanently remove the selected categories,\nbut only ones with zero linked ingredients (mirrors the per-row guard).\nAny selected category that still has ingredients is skipped, not deleted.","operationId":"categories_bulk_delete_categories_bulk_delete_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/categories/new":{"get":{"summary":"Category New","operationId":"category_new_categories_new_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/categories/{category_id}/edit":{"get":{"summary":"Category Edit","operationId":"category_edit_categories__category_id__edit_get","parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"integer","title":"Category Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/categories/{category_id}":{"post":{"summary":"Category Update","operationId":"category_update_categories__category_id__post","parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"integer","title":"Category Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_category_update_categories__category_id__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/categories/{category_id}/delete":{"post":{"summary":"Category Delete","operationId":"category_delete_categories__category_id__delete_post","parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"integer","title":"Category Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingredients":{"get":{"summary":"Ingredients List","operationId":"ingredients_list_ingredients_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"letter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Letter"}},{"name":"category_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Id"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"active","title":"Status"}},{"name":"item_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Item Type"}},{"name":"consigned","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Consigned"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"cleanup","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Cleanup"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Ingredient Create","operationId":"ingredient_create_ingredients_post","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_ingredient_create_ingredients_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingredients/export":{"get":{"summary":"Ingredients Export","operationId":"ingredients_export_ingredients_export_get","parameters":[{"name":"fmt","in":"query","required":false,"schema":{"type":"string","default":"csv","title":"Fmt"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"letter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Letter"}},{"name":"category_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Id"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"active","title":"Status"}},{"name":"consigned","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Consigned"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingredients/new":{"get":{"summary":"Ingredient New","operationId":"ingredient_new_ingredients_new_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingredients/{ingredient_id}/edit":{"get":{"summary":"Ingredient Edit","operationId":"ingredient_edit_ingredients__ingredient_id__edit_get","parameters":[{"name":"ingredient_id","in":"path","required":true,"schema":{"type":"integer","title":"Ingredient Id"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingredients/{ingredient_id}/allergens/apply-suggested":{"post":{"summary":"Ingredient Apply Suggested Allergens","description":"One-click apply for the \"allergen hints\" audit: recomputes the\nsuggestion server-side from the ingredient's CURRENT name (client\nvalues ignored -- so if someone renames the ingredient between the\naudit page loading and clicking Apply, we recompute rather than\nblindly trust the stale form value), then sets the ingredient's\nallergens field to the recomputed value.\nOnly applies when the field is currently empty -- if the user has\nalready typed something manually since the audit rendered, we leave\ntheir work alone and skip. Human still owns final state.","operationId":"ingredient_apply_suggested_allergens_ingredients__ingredient_id__allergens_apply_suggested_post","parameters":[{"name":"ingredient_id","in":"path","required":true,"schema":{"type":"integer","title":"Ingredient Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingredients/allergens/apply-suggested-bulk":{"post":{"summary":"Ingredient Apply Suggested Allergens Bulk","description":"Bulk companion to the single-ingredient endpoint: applies suggestions\nto every ticked ingredient on the audit page in one submit. Same\nprotections -- recomputes server-side per ingredient, skips ones with\na non-empty allergens value. Reports how many actually landed.","operationId":"ingredient_apply_suggested_allergens_bulk_ingredients_allergens_apply_suggested_bulk_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/ingredients/bulk-deactivate":{"post":{"summary":"Ingredients Bulk Deactivate","description":"Cleanup-mode bulk action: deactivate (archive) or reactivate the\nselected ingredients in one go. Admin/superadmin only, mirroring the\nper-row toggle. Deactivating is a safe, reversible status change — it\nhides items from active lists without deleting anything they reference.","operationId":"ingredients_bulk_deactivate_ingredients_bulk_deactivate_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/ingredients/bulk-delete":{"post":{"summary":"Ingredients Bulk Delete","description":"Cleanup-mode HARD delete. Permanently removes selected ingredients, but\nonly those nothing references — anything used in a PO, requisition,\ntransfer, or canvass (or protected by any other foreign key) is skipped and\nreported, never deleted. Owned price history is removed with the ingredient.\nEach ingredient runs in its own transaction so one in-use item can't abort\nthe batch. Superadmin only.","operationId":"ingredients_bulk_delete_ingredients_bulk_delete_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/ingredients/{ingredient_id}":{"post":{"summary":"Ingredient Update","operationId":"ingredient_update_ingredients__ingredient_id__post","parameters":[{"name":"ingredient_id","in":"path","required":true,"schema":{"type":"integer","title":"Ingredient Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_ingredient_update_ingredients__ingredient_id__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingredients/{ingredient_id}/history":{"get":{"summary":"Ingredient Price History","operationId":"ingredient_price_history_ingredients__ingredient_id__history_get","parameters":[{"name":"ingredient_id","in":"path","required":true,"schema":{"type":"integer","title":"Ingredient Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingredients/{ingredient_id}/audit":{"get":{"summary":"Ingredient Audit History","description":"Field-level change history for one ingredient. Admin-only per the\n'ingredients are highly restricted' policy. Anyone else who can view\nthe ingredient list can see the ingredient's price history via the\nseparate /history page but not the full field-by-field edit trail.","operationId":"ingredient_audit_history_ingredients__ingredient_id__audit_get","parameters":[{"name":"ingredient_id","in":"path","required":true,"schema":{"type":"integer","title":"Ingredient Id"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"}},{"name":"changed_by_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Changed By User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingredients/{ingredient_id}/toggle":{"post":{"summary":"Ingredient Toggle","operationId":"ingredient_toggle_ingredients__ingredient_id__toggle_post","parameters":[{"name":"ingredient_id","in":"path","required":true,"schema":{"type":"integer","title":"Ingredient Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/audit-log":{"get":{"summary":"Admin Audit Log","description":"Superadmin-only view of every field change across recipes,\ningredients, and suppliers. Filterable by entity type, date range,\nwho made the change, and entity name/code. Serves both the HTML page\nand (with fmt=csv) a CSV export of the current filter set.","operationId":"admin_audit_log_admin_audit_log_get","parameters":[{"name":"entity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"}},{"name":"changed_by_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Changed By User Id"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"fmt","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fmt"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingredients/bulk-upload":{"get":{"summary":"Ingredient Bulk Upload Form","operationId":"ingredient_bulk_upload_form_ingredients_bulk_upload_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Ingredient Bulk Upload","description":"Bulk-create ingredients from CSV / XLSX.\n\nFor each row, we either: create cleanly, create with warnings\n(missing price or unit -- still useful, just flagged), or skip\nentirely (no name, no/unknown category, duplicate name). The\ndetailed per-row outcome is shown on a results page, not just a\nbanner -- the user wants to see WHICH rows had issues.","operationId":"ingredient_bulk_upload_ingredients_bulk_upload_post","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_ingredient_bulk_upload_ingredients_bulk_upload_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingredients/template.csv":{"get":{"summary":"Ingredient Template Download","description":"Sample CSV with example rows so users see the expected shape.","operationId":"ingredient_template_download_ingredients_template_csv_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/ingredients/bulk-update":{"get":{"summary":"Ingredient Bulk Update Form","operationId":"ingredient_bulk_update_form_ingredients_bulk_update_get","parameters":[{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Ingredient Bulk Update Parse","description":"Stage 1 of bulk update: parse the file, compute deltas, save to\nbulk_update_jobs with a unique token, redirect to preview. Nothing\nis written to the ingredients table here.","operationId":"ingredient_bulk_update_parse_ingredients_bulk_update_post","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_ingredient_bulk_update_parse_ingredients_bulk_update_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingredients/update-template.csv":{"get":{"summary":"Ingredient Update Template","description":"Template for bulk-update. Only includes name + commonly-updated\ncolumns, so users don't think they need to fill every field.","operationId":"ingredient_update_template_ingredients_update_template_csv_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/ingredients/audit":{"get":{"summary":"Ingredients Audit Page","description":"HTML audit report — admin only.","operationId":"ingredients_audit_page_ingredients_audit_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/ingredients/audit.xlsx":{"get":{"summary":"Ingredients Audit Xlsx","description":"Excel export of the audit report — one sheet per issue category.","operationId":"ingredients_audit_xlsx_ingredients_audit_xlsx_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/ingredients/bulk-update/preview/{token}":{"get":{"summary":"Ingredient Bulk Update Preview","operationId":"ingredient_bulk_update_preview_ingredients_bulk_update_preview__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingredients/bulk-update/apply/{token}":{"post":{"summary":"Ingredient Bulk Update Apply","description":"Stage 2: actually run the UPDATEs we previewed. Idempotent\nagainst re-clicking (applied_at gets set, second attempts bounce).","operationId":"ingredient_bulk_update_apply_ingredients_bulk_update_apply__token__post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingredients/bulk-update/cancel/{token}":{"post":{"summary":"Ingredient Bulk Update Cancel","description":"Discard a pending bulk-update preview without applying it.","operationId":"ingredient_bulk_update_cancel_ingredients_bulk_update_cancel__token__post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingredients/calorie-lookup":{"get":{"summary":"Ingredient Calorie Lookup Home","description":"Calorie auto-lookup landing page. Now accepts three filters so you\ncan target a specific slice of the ingredient list instead of taking\nwhichever 25 the database happens to return next:\n  parent      -- category.parent (e.g. \"Meat\", \"Dairy\", \"Produce\")\n  category_id -- specific subcategory row id\n  q           -- name search (case-insensitive substring)\nAll filters compose. Counts and the run form both respect them so\nthe numbers on screen match what a search click will actually process.","operationId":"ingredient_calorie_lookup_home_ingredients_calorie_lookup_get","parameters":[{"name":"parent","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent"}},{"name":"category_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Id"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingredients/calorie-lookup/run":{"post":{"summary":"Ingredient Calorie Lookup Run","operationId":"ingredient_calorie_lookup_run_ingredients_calorie_lookup_run_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_ingredient_calorie_lookup_run_ingredients_calorie_lookup_run_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingredients/calorie-lookup/preview/{token}":{"get":{"summary":"Ingredient Calorie Lookup Preview","operationId":"ingredient_calorie_lookup_preview_ingredients_calorie_lookup_preview__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingredients/calorie-lookup/apply/{token}":{"post":{"summary":"Ingredient Calorie Lookup Apply","operationId":"ingredient_calorie_lookup_apply_ingredients_calorie_lookup_apply__token__post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingredients/calorie-lookup/cancel/{token}":{"post":{"summary":"Ingredient Calorie Lookup Cancel","operationId":"ingredient_calorie_lookup_cancel_ingredients_calorie_lookup_cancel__token__post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ingredients/similar":{"get":{"summary":"Api Ingredients Similar","description":"Advisory only: returns existing active ingredient names that are close in\nSPELLING to `name` (typo-level), for a 'did you mean…' heads-up on the form.\nNever blocks — exact-word duplicates are handled separately by the hard check.\nSkips number-only differences (grades/sizes) to stay quiet.","operationId":"api_ingredients_similar_api_ingredients_similar_get","parameters":[{"name":"name","in":"query","required":false,"schema":{"type":"string","default":"","title":"Name"}},{"name":"exclude_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Exclude Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/entries/item-suggest":{"get":{"summary":"Entries Item Suggest","description":"Nov 9, 2026 (Joy): names for the Item dropdown on Daily entries --\nexact-text matches first, then similar spellings.","operationId":"entries_item_suggest_api_entries_item_suggest_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ingredients/search":{"get":{"summary":"Search Ingredients","operationId":"search_ingredients_api_ingredients_search_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/entries/{entry_id}/delete":{"post":{"summary":"Delete Entry","operationId":"delete_entry_entries__entry_id__delete_post","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"integer","title":"Entry Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/entries/bulk-delete":{"post":{"summary":"Entries Bulk Delete","description":"Bulk-delete selected data entries in Cleanup mode.\n\nMirrors the single-row delete logic for each id, running each row in\nits own get_db() block so a single failure (missing row, DB constraint,\npoisoned transaction on Postgres) can't abort the whole batch. Same\nrole gate as the single-row route.\n\nREQ-linked entries (ref_po starts with \"REQ-\") are silently skipped for\nnon-admin/superadmin roles — same rule as the per-row delete, since a\nbulk operation shouldn't quietly bypass the guard rail. Superadmin and\nadmin can bulk-delete them if they choose (the requisition will show\nfulfilled but the inventory row will be gone; same trade-off as the\nper-row admin override). The final tally message names how many were\nskipped so the operator sees the block, not silence.","operationId":"entries_bulk_delete_entries_bulk_delete_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/entries/{entry_id}/archive":{"post":{"summary":"Archive Entry","description":"Archive (soft-delete) a single daily entry.","operationId":"archive_entry_entries__entry_id__archive_post","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"integer","title":"Entry Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/entries/bulk-archive":{"post":{"summary":"Entries Bulk Archive","description":"Bulk archive selected daily entries (Cleanup mode).","operationId":"entries_bulk_archive_entries_bulk_archive_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/entries/archived":{"get":{"summary":"Entries Archived Page","description":"Browse archived daily entries. Restore or permanently delete\nfrom here. Wider default window (last_90) since users come here\nwhen they need to find something they deleted.","operationId":"entries_archived_page_entries_archived_get","parameters":[{"name":"branch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Branch Id"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"last_90","title":"Period"}},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Date"}},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Date"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/entries/{entry_id}/restore":{"post":{"summary":"Restore Entry","description":"Restore a single archived entry back to transactions.","operationId":"restore_entry_entries__entry_id__restore_post","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"integer","title":"Entry Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/entries/{entry_id}/permanent-delete":{"post":{"summary":"Permanent Delete Entry","description":"Hard-delete an archived entry. Cannot be undone.","operationId":"permanent_delete_entry_entries__entry_id__permanent_delete_post","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"integer","title":"Entry Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/entries/{entry_id}/edit":{"get":{"summary":"Entry Edit Form","operationId":"entry_edit_form_entries__entry_id__edit_get","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"integer","title":"Entry Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Entry Edit Save","operationId":"entry_edit_save_entries__entry_id__edit_post","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"integer","title":"Entry Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_entry_edit_save_entries__entry_id__edit_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_admin_targets_upload_admin_sales_targets_upload_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_admin_targets_upload_admin_sales_targets_upload_post"},"Body_branch_create_branches_post":{"properties":{"name":{"type":"string","title":"Name"},"code":{"type":"string","title":"Code","default":""},"branch_type":{"type":"string","title":"Branch Type","default":""},"address":{"type":"string","title":"Address","default":""},"description":{"type":"string","title":"Description","default":""},"brand_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand Id"},"business_unit_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Unit Id"},"is_active":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Is Active"},"include_in_sales_report":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Include In Sales Report"},"not_yet_open":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Not Yet Open"},"non_sales_branch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Non Sales Branch"}},"type":"object","required":["name"],"title":"Body_branch_create_branches_post"},"Body_branch_update_branches__branch_id__post":{"properties":{"name":{"type":"string","title":"Name"},"code":{"type":"string","title":"Code","default":""},"branch_type":{"type":"string","title":"Branch Type","default":""},"address":{"type":"string","title":"Address","default":""},"description":{"type":"string","title":"Description","default":""},"brand_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand Id"},"business_unit_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Unit Id"},"is_active":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Is Active"},"include_in_sales_report":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Include In Sales Report"},"not_yet_open":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Not Yet Open"},"non_sales_branch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Non Sales Branch"}},"type":"object","required":["name"],"title":"Body_branch_update_branches__branch_id__post"},"Body_brand_create_admin_brands_post":{"properties":{"business_unit_id":{"type":"integer","title":"Business Unit Id"},"name":{"type":"string","title":"Name"},"dba":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dba"}},"type":"object","required":["business_unit_id","name"],"title":"Body_brand_create_admin_brands_post"},"Body_brand_create_brands_post":{"properties":{"name":{"type":"string","title":"Name"},"code":{"type":"string","title":"Code","default":""},"business_unit_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Unit Id"}},"type":"object","required":["name"],"title":"Body_brand_create_brands_post"},"Body_brand_edit_save_admin_brands__brand_id__edit_post":{"properties":{"business_unit_id":{"type":"integer","title":"Business Unit Id"},"name":{"type":"string","title":"Name"},"dba":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dba"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_active":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Is Active"},"logo":{"anyOf":[{"type":"string","format":"binary"},{"type":"null"}],"title":"Logo"},"clear_logo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Clear Logo"}},"type":"object","required":["business_unit_id","name"],"title":"Body_brand_edit_save_admin_brands__brand_id__edit_post"},"Body_brand_update_brands__brand_id__post":{"properties":{"name":{"type":"string","title":"Name"},"code":{"type":"string","title":"Code","default":""},"business_unit_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Unit Id"}},"type":"object","required":["name"],"title":"Body_brand_update_brands__brand_id__post"},"Body_bu_create_admin_business_units_post":{"properties":{"name":{"type":"string","title":"Name"},"dba":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dba"}},"type":"object","required":["name"],"title":"Body_bu_create_admin_business_units_post"},"Body_bu_edit_save_admin_business_units__bu_id__edit_post":{"properties":{"name":{"type":"string","title":"Name"},"dba":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dba"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"tin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tin"},"contact_person":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Person"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"is_active":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Is Active"},"logo":{"anyOf":[{"type":"string","format":"binary"},{"type":"null"}],"title":"Logo"},"clear_logo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Clear Logo"}},"type":"object","required":["name"],"title":"Body_bu_edit_save_admin_business_units__bu_id__edit_post"},"Body_category_create_categories_post":{"properties":{"subcategory":{"type":"string","title":"Subcategory"},"parent":{"type":"string","title":"Parent","default":""}},"type":"object","required":["subcategory"],"title":"Body_category_create_categories_post"},"Body_category_create_petty_cash_categories_post":{"properties":{"name":{"type":"string","title":"Name"},"is_stock":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Is Stock"}},"type":"object","required":["name"],"title":"Body_category_create_petty_cash_categories_post"},"Body_category_update_categories__category_id__post":{"properties":{"subcategory":{"type":"string","title":"Subcategory"},"parent":{"type":"string","title":"Parent","default":""}},"type":"object","required":["subcategory"],"title":"Body_category_update_categories__category_id__post"},"Body_classification_add_recipes_classifications_add_post":{"properties":{"name":{"type":"string","title":"Name"}},"type":"object","required":["name"],"title":"Body_classification_add_recipes_classifications_add_post"},"Body_company_logo_upload_settings_company_logo_post":{"properties":{"logo":{"type":"string","format":"binary","title":"Logo"},"remove_logo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remove Logo"}},"type":"object","title":"Body_company_logo_upload_settings_company_logo_post"},"Body_company_settings_save_settings_company_post":{"properties":{"company_name":{"type":"string","title":"Company Name","default":""},"company_dba":{"type":"string","title":"Company Dba","default":""},"company_address":{"type":"string","title":"Company Address","default":""},"company_city":{"type":"string","title":"Company City","default":""},"company_tin":{"type":"string","title":"Company Tin","default":""},"company_contact_person":{"type":"string","title":"Company Contact Person","default":""},"company_email":{"type":"string","title":"Company Email","default":""},"company_phone":{"type":"string","title":"Company Phone","default":""}},"type":"object","title":"Body_company_settings_save_settings_company_post"},"Body_cost_visibility_save_users__user_id__cost_visibility_post":{"properties":{"decision":{"type":"string","title":"Decision"},"access_decision":{"type":"string","title":"Access Decision","default":"default"}},"type":"object","required":["decision"],"title":"Body_cost_visibility_save_users__user_id__cost_visibility_post"},"Body_create_entry_entries_post":{"properties":{"txn_date":{"type":"string","title":"Txn Date"},"txn_type":{"type":"string","title":"Txn Type"},"branch_id":{"type":"integer","title":"Branch Id"},"ingredient_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ingredient Id"},"qty":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qty"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"total_amount":{"type":"number","title":"Total Amount","default":0},"target_branch_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Branch Id"},"adjust_dir":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Adjust Dir"},"ref_po":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ref Po"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"confirm_duplicate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confirm Duplicate"}},"type":"object","required":["txn_date","txn_type","branch_id"],"title":"Body_create_entry_entries_post"},"Body_department_add_recipes_departments_add_post":{"properties":{"name":{"type":"string","title":"Name"},"recipe_id":{"type":"string","title":"Recipe Id","default":""}},"type":"object","required":["name"],"title":"Body_department_add_recipes_departments_add_post"},"Body_department_remove_recipes_departments_remove_post":{"properties":{"department_id":{"type":"integer","title":"Department Id"},"recipe_id":{"type":"string","title":"Recipe Id","default":""}},"type":"object","required":["department_id"],"title":"Body_department_remove_recipes_departments_remove_post"},"Body_department_rename_recipes_departments_rename_post":{"properties":{"department_id":{"type":"integer","title":"Department Id"},"name":{"type":"string","title":"Name"},"recipe_id":{"type":"string","title":"Recipe Id","default":""}},"type":"object","required":["department_id","name"],"title":"Body_department_rename_recipes_departments_rename_post"},"Body_dishtype_add_recipes_dishtypes_add_post":{"properties":{"name":{"type":"string","title":"Name"},"recipe_id":{"type":"string","title":"Recipe Id","default":""}},"type":"object","required":["name"],"title":"Body_dishtype_add_recipes_dishtypes_add_post"},"Body_dishtype_remove_recipes_dishtypes_remove_post":{"properties":{"dish_type_id":{"type":"integer","title":"Dish Type Id"},"recipe_id":{"type":"string","title":"Recipe Id","default":""}},"type":"object","required":["dish_type_id"],"title":"Body_dishtype_remove_recipes_dishtypes_remove_post"},"Body_dishtype_rename_recipes_dishtypes_rename_post":{"properties":{"dish_type_id":{"type":"integer","title":"Dish Type Id"},"name":{"type":"string","title":"Name"},"recipe_id":{"type":"string","title":"Recipe Id","default":""}},"type":"object","required":["dish_type_id","name"],"title":"Body_dishtype_rename_recipes_dishtypes_rename_post"},"Body_disposal_cancel_disposal__slip_id__cancel_post":{"properties":{"cancel_reason":{"type":"string","title":"Cancel Reason","default":""}},"type":"object","title":"Body_disposal_cancel_disposal__slip_id__cancel_post"},"Body_disposal_line_photo_disposal__slip_id__lines__line_id__photo_post":{"properties":{"photo":{"type":"string","format":"binary","title":"Photo"}},"type":"object","title":"Body_disposal_line_photo_disposal__slip_id__lines__line_id__photo_post"},"Body_disposal_sign_disposal__slip_id__sign_post":{"properties":{"confirm":{"type":"string","title":"Confirm","default":""}},"type":"object","title":"Body_disposal_sign_disposal__slip_id__sign_post"},"Body_dr_import_preview_daily_report_import_preview_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_dr_import_preview_daily_report_import_preview_post"},"Body_employee_import_preview_labor_employees_import_preview_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"department_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Department Id"}},"type":"object","required":["file"],"title":"Body_employee_import_preview_labor_employees_import_preview_post"},"Body_entry_edit_save_entries__entry_id__edit_post":{"properties":{"txn_date":{"type":"string","title":"Txn Date"},"qty":{"type":"number","title":"Qty"},"total_amount":{"type":"number","title":"Total Amount","default":0},"target_branch_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Branch Id"},"adjust_dir":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Adjust Dir"},"ref_po":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ref Po"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"confirm_duplicate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confirm Duplicate"}},"type":"object","required":["txn_date","qty"],"title":"Body_entry_edit_save_entries__entry_id__edit_post"},"Body_expense_create_petty_cash_expenses_new_post":{"properties":{"branch_id":{"type":"integer","title":"Branch Id"},"expense_date":{"type":"string","title":"Expense Date"},"category_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Id"},"amount":{"type":"string","title":"Amount"},"vendor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"benefiting_branch_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Benefiting Branch Id"},"ingredient_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ingredient Id"},"qty":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qty"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"from_loc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Loc"},"to_loc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Loc"},"receipt_no":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Receipt No"},"po_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Po Id"},"receipt":{"anyOf":[{"type":"string","format":"binary"},{"type":"null"}],"title":"Receipt"}},"type":"object","required":["branch_id","expense_date","amount"],"title":"Body_expense_create_petty_cash_expenses_new_post"},"Body_forgot_password_submit_forgot_password_post":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"Body_forgot_password_submit_forgot_password_post"},"Body_format_add_recipes_formats_add_post":{"properties":{"name":{"type":"string","title":"Name"},"recipe_id":{"type":"string","title":"Recipe Id","default":""}},"type":"object","required":["name"],"title":"Body_format_add_recipes_formats_add_post"},"Body_format_remove_recipes_formats_remove_post":{"properties":{"format_id":{"type":"integer","title":"Format Id"},"recipe_id":{"type":"string","title":"Recipe Id","default":""}},"type":"object","required":["format_id"],"title":"Body_format_remove_recipes_formats_remove_post"},"Body_format_rename_recipes_formats_rename_post":{"properties":{"format_id":{"type":"integer","title":"Format Id"},"name":{"type":"string","title":"Name"},"recipe_id":{"type":"string","title":"Recipe Id","default":""}},"type":"object","required":["format_id","name"],"title":"Body_format_rename_recipes_formats_rename_post"},"Body_fund_create_petty_cash_funds_post":{"properties":{"branch_id":{"type":"integer","title":"Branch Id"},"starting_balance":{"type":"string","title":"Starting Balance"},"custodian_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custodian User Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["branch_id","starting_balance"],"title":"Body_fund_create_petty_cash_funds_post"},"Body_fund_update_petty_cash_funds__fund_id__post":{"properties":{"starting_balance":{"type":"string","title":"Starting Balance"},"custodian_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custodian User Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"is_active":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Is Active"}},"type":"object","required":["starting_balance"],"title":"Body_fund_update_petty_cash_funds__fund_id__post"},"Body_holidays_save_labor_holidays_save_post":{"properties":{"holiday_date":{"type":"string","title":"Holiday Date"},"name":{"type":"string","title":"Name"},"holiday_type":{"type":"string","title":"Holiday Type","default":"regular"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["holiday_date","name"],"title":"Body_holidays_save_labor_holidays_save_post"},"Body_ingredient_bulk_update_parse_ingredients_bulk_update_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_ingredient_bulk_update_parse_ingredients_bulk_update_post"},"Body_ingredient_bulk_upload_ingredients_bulk_upload_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_ingredient_bulk_upload_ingredients_bulk_upload_post"},"Body_ingredient_calorie_lookup_run_ingredients_calorie_lookup_run_post":{"properties":{"batch_size":{"type":"string","title":"Batch Size","default":"25"},"include_skipped":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Include Skipped"},"parent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent"},"category_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Id"},"q":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},"type":"object","title":"Body_ingredient_calorie_lookup_run_ingredients_calorie_lookup_run_post"},"Body_ingredient_create_ingredients_post":{"properties":{"name":{"type":"string","title":"Name"},"category_id":{"type":"integer","title":"Category Id"},"item_type":{"type":"string","title":"Item Type","default":"food"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"unit_cost":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit Cost"},"pack_qty":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pack Qty"},"cost_per_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cost Per Unit"},"reorder_threshold":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reorder Threshold"},"supplier_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supplier Id"},"sku":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sku"},"brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"},"dept_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dept Notes"},"needs_pricing":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Needs Pricing"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"yield_percent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Yield Percent"},"allergens":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Allergens"},"calories_per_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calories Per Unit"},"portion_size_g":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Portion Size G"},"cost_per_portion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cost Per Portion"},"calories_per_portion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calories Per Portion"},"pricing_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pricing Mode"},"parent_ingredient_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Ingredient Id"},"preferred_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferred Unit"},"is_consigned":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Is Consigned"},"buffer_pct":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Buffer Pct"}},"type":"object","required":["name","category_id"],"title":"Body_ingredient_create_ingredients_post"},"Body_ingredient_update_ingredients__ingredient_id__post":{"properties":{"name":{"type":"string","title":"Name"},"category_id":{"type":"integer","title":"Category Id"},"item_type":{"type":"string","title":"Item Type","default":"food"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"unit_cost":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit Cost"},"pack_qty":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pack Qty"},"cost_per_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cost Per Unit"},"reorder_threshold":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reorder Threshold"},"supplier_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supplier Id"},"sku":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sku"},"brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"},"dept_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dept Notes"},"needs_pricing":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Needs Pricing"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"yield_percent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Yield Percent"},"allergens":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Allergens"},"calories_per_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calories Per Unit"},"portion_size_g":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Portion Size G"},"cost_per_portion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cost Per Portion"},"calories_per_portion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calories Per Portion"},"pricing_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pricing Mode"},"parent_ingredient_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Ingredient Id"},"preferred_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferred Unit"},"is_consigned":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Is Consigned"},"buffer_pct":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Buffer Pct"}},"type":"object","required":["name","category_id"],"title":"Body_ingredient_update_ingredients__ingredient_id__post"},"Body_liquidation_approve_petty_cash_liquidations__liq_id__approve_post":{"properties":{"rejected_ids":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rejected Ids"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"Body_liquidation_approve_petty_cash_liquidations__liq_id__approve_post"},"Body_liquidation_submit_petty_cash_liquidations_submit_post":{"properties":{"branch_id":{"type":"integer","title":"Branch Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["branch_id"],"title":"Body_liquidation_submit_petty_cash_liquidations_submit_post"},"Body_login_submit_login_post":{"properties":{"email":{"type":"string","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"Body_login_submit_login_post"},"Body_owners_save_daily_report_admin_management_save_post":{"properties":{"owner_emails":{"type":"string","title":"Owner Emails","default":""}},"type":"object","title":"Body_owners_save_daily_report_admin_management_save_post"},"Body_owners_save_daily_report_admin_owners_save_post":{"properties":{"owner_emails":{"type":"string","title":"Owner Emails","default":""}},"type":"object","title":"Body_owners_save_daily_report_admin_owners_save_post"},"Body_pack_sizes_import_pack_sizes_import_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_pack_sizes_import_pack_sizes_import_post"},"Body_plan_save_template_seating_plan__layout_id__save_template_post":{"properties":{"name":{"type":"string","title":"Name"}},"type":"object","required":["name"],"title":"Body_plan_save_template_seating_plan__layout_id__save_template_post"},"Body_plans_new_seating_plans_new_post":{"properties":{"branch_id":{"type":"integer","title":"Branch Id","default":0},"name":{"type":"string","title":"Name","default":""},"event_date":{"type":"string","title":"Event Date","default":""},"reservation_id":{"type":"string","title":"Reservation Id","default":""},"start_from":{"type":"string","title":"Start From","default":"blank"},"venue_name":{"type":"string","title":"Venue Name","default":""},"is_template":{"type":"integer","title":"Is Template","default":0}},"type":"object","title":"Body_plans_new_seating_plans_new_post"},"Body_positions_save_labor_positions_save_post":{"properties":{"name":{"type":"string","title":"Name"},"department_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Department Id"},"default_rate":{"type":"string","title":"Default Rate","default":"0"}},"type":"object","required":["name"],"title":"Body_positions_save_labor_positions_save_post"},"Body_prep_group_add_recipes_prep_groups_add_post":{"properties":{"name":{"type":"string","title":"Name"},"recipe_id":{"type":"string","title":"Recipe Id","default":""}},"type":"object","required":["name"],"title":"Body_prep_group_add_recipes_prep_groups_add_post"},"Body_prep_group_remove_recipes_prep_groups_remove_post":{"properties":{"prep_group_id":{"type":"integer","title":"Prep Group Id"},"recipe_id":{"type":"string","title":"Recipe Id","default":""}},"type":"object","required":["prep_group_id"],"title":"Body_prep_group_remove_recipes_prep_groups_remove_post"},"Body_prep_group_rename_recipes_prep_groups_rename_post":{"properties":{"prep_group_id":{"type":"integer","title":"Prep Group Id"},"name":{"type":"string","title":"Name"},"recipe_id":{"type":"string","title":"Recipe Id","default":""}},"type":"object","required":["prep_group_id","name"],"title":"Body_prep_group_rename_recipes_prep_groups_rename_post"},"Body_profile_update_profile_post":{"properties":{"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"current_password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Password"},"new_password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"New Password"},"confirm_password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confirm Password"}},"type":"object","required":["name","email"],"title":"Body_profile_update_profile_post"},"Body_protein_add_recipes_proteins_add_post":{"properties":{"name":{"type":"string","title":"Name"},"recipe_id":{"type":"string","title":"Recipe Id","default":""}},"type":"object","required":["name"],"title":"Body_protein_add_recipes_proteins_add_post"},"Body_protein_remove_recipes_proteins_remove_post":{"properties":{"protein_id":{"type":"integer","title":"Protein Id"},"recipe_id":{"type":"string","title":"Recipe Id","default":""}},"type":"object","required":["protein_id"],"title":"Body_protein_remove_recipes_proteins_remove_post"},"Body_protein_rename_recipes_proteins_rename_post":{"properties":{"protein_id":{"type":"integer","title":"Protein Id"},"name":{"type":"string","title":"Name"},"recipe_id":{"type":"string","title":"Recipe Id","default":""}},"type":"object","required":["protein_id","name"],"title":"Body_protein_rename_recipes_proteins_rename_post"},"Body_recipes_new_recipes_new_post":{"properties":{"name":{"type":"string","title":"Name"},"recipe_type":{"type":"string","title":"Recipe Type","default":"recipe"}},"type":"object","required":["name"],"title":"Body_recipes_new_recipes_new_post"},"Body_reset_password_submit_reset_password_post":{"properties":{"token":{"type":"string","title":"Token"},"password":{"type":"string","title":"Password"},"confirm_password":{"type":"string","title":"Confirm Password"}},"type":"object","required":["token","password","confirm_password"],"title":"Body_reset_password_submit_reset_password_post"},"Body_sales_import_preview_reservations_sales_import_preview_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_sales_import_preview_reservations_sales_import_preview_post"},"Body_save_cell_branch_thresholds_save_post":{"properties":{"ingredient_id":{"type":"integer","title":"Ingredient Id"},"branch_id":{"type":"integer","title":"Branch Id"},"threshold":{"type":"string","title":"Threshold","default":""}},"type":"object","required":["ingredient_id","branch_id"],"title":"Body_save_cell_branch_thresholds_save_post"},"Body_schedule_copy_to_entries_labor_schedule_copy_to_entries_post":{"properties":{"branch_id":{"type":"integer","title":"Branch Id"},"target_date":{"type":"string","title":"Target Date"}},"type":"object","required":["branch_id","target_date"],"title":"Body_schedule_copy_to_entries_labor_schedule_copy_to_entries_post"},"Body_shift_save_labor_shifts_save_post":{"properties":{"shift_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shift Id"},"code":{"type":"string","title":"Code"},"begin_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Begin Time"},"end_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Time"},"default_hours":{"type":"string","title":"Default Hours","default":"8"},"sort_order":{"type":"string","title":"Sort Order","default":"100"}},"type":"object","required":["code"],"title":"Body_shift_save_labor_shifts_save_post"},"Body_stocktake_adjust_all_stocktake__session_id__adjust_all_post":{"properties":{"reason":{"type":"string","title":"Reason"}},"type":"object","required":["reason"],"title":"Body_stocktake_adjust_all_stocktake__session_id__adjust_all_post"},"Body_stocktake_adjust_one_stocktake__session_id__adjust__count_id__post":{"properties":{"reason":{"type":"string","title":"Reason"}},"type":"object","required":["reason"],"title":"Body_stocktake_adjust_one_stocktake__session_id__adjust__count_id__post"},"Body_stocktake_complete_stocktake__session_id__complete_post":{"properties":{"count_date":{"type":"string","title":"Count Date","default":""}},"type":"object","title":"Body_stocktake_complete_stocktake__session_id__complete_post"},"Body_stocktake_nonfood_start_stocktake_nonfood_start_post":{"properties":{"branch_id":{"type":"integer","title":"Branch Id"}},"type":"object","required":["branch_id"],"title":"Body_stocktake_nonfood_start_stocktake_nonfood_start_post"},"Body_stocktake_start_stocktake_start_post":{"properties":{"branch_id":{"type":"integer","title":"Branch Id"},"category_id":{"type":"string","title":"Category Id","default":""},"include_all":{"type":"string","title":"Include All","default":""}},"type":"object","required":["branch_id"],"title":"Body_stocktake_start_stocktake_start_post"},"Body_stocktake_writeoff_stocktake__session_id__writeoff__count_id__post":{"properties":{"reason":{"type":"string","title":"Reason"}},"type":"object","required":["reason"],"title":"Body_stocktake_writeoff_stocktake__session_id__writeoff__count_id__post"},"Body_supplier_bulk_upload_suppliers_bulk_upload_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_supplier_bulk_upload_suppliers_bulk_upload_post"},"Body_supplier_create_suppliers_post":{"properties":{"name":{"type":"string","title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","default":""},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone","default":""},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address","default":""},"contact_person":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Person","default":""},"payment_terms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Terms","default":""},"tin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tin","default":""},"business_style":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Style","default":""},"bank_account_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bank Account Name","default":""},"bank_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bank Name","default":""},"bank_account_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bank Account Number","default":""}},"type":"object","required":["name"],"title":"Body_supplier_create_suppliers_post"},"Body_supplier_update_suppliers__supplier_id__post":{"properties":{"name":{"type":"string","title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","default":""},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone","default":""},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address","default":""},"contact_person":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Person","default":""},"payment_terms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Terms","default":""},"tin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tin","default":""},"business_style":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Style","default":""},"bank_account_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bank Account Name","default":""},"bank_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bank Name","default":""},"bank_account_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bank Account Number","default":""}},"type":"object","required":["name"],"title":"Body_supplier_update_suppliers__supplier_id__post"},"Body_sv_pos_names_import_sales_variance_pos_names_import_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_sv_pos_names_import_sales_variance_pos_names_import_post"},"Body_sv_upload_sales_variance_upload_post":{"properties":{"branch_id":{"type":"integer","title":"Branch Id"},"date_from":{"type":"string","title":"Date From"},"date_to":{"type":"string","title":"Date To"},"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["branch_id","date_from","date_to","file"],"title":"Body_sv_upload_sales_variance_upload_post"},"Body_thresholds_bulk_upload_branch_thresholds_bulk_upload_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_thresholds_bulk_upload_branch_thresholds_bulk_upload_post"},"Body_user_create_users_post":{"properties":{"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role"},"home_branch_id":{"type":"integer","title":"Home Branch Id"},"password":{"type":"string","title":"Password"},"branch_ids":{"items":{"type":"string"},"type":"array","title":"Branch Ids","default":[]},"business_unit_ids":{"items":{"type":"string"},"type":"array","title":"Business Unit Ids","default":[]},"brand_ids_picker":{"items":{"type":"string"},"type":"array","title":"Brand Ids Picker","default":[]},"can_approve_recipes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Can Approve Recipes"},"position":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Position"}},"type":"object","required":["name","email","role","home_branch_id","password"],"title":"Body_user_create_users_post"},"Body_user_update_users__user_id__post":{"properties":{"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role"},"home_branch_id":{"type":"integer","title":"Home Branch Id"},"password":{"type":"string","title":"Password","default":""},"branch_ids":{"items":{"type":"string"},"type":"array","title":"Branch Ids","default":[]},"business_unit_ids":{"items":{"type":"string"},"type":"array","title":"Business Unit Ids","default":[]},"brand_ids_picker":{"items":{"type":"string"},"type":"array","title":"Brand Ids Picker","default":[]},"can_approve_recipes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Can Approve Recipes"},"position":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Position"}},"type":"object","required":["name","email","role","home_branch_id"],"title":"Body_user_update_users__user_id__post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}