### Usage example: instantiate IikoServer and get token Source: https://pyiiko.readthedocs.io/ru/latest/_sources/index.rst.txt Shows how to import IikoServer, create an instance with your iiko server credentials, and call the token() method to receive an authentication token. The output displays the token as 'Ваш токен: 2klm423423o4fdlkmdsr234'. ```python >>> from Pyiiko import IikoServer >>> i = IikoServer(ip = 'your ip', login = 'login', password = 'password') >>> i.token() Ваш токен: 2klm423423o4fdlkmdsr234 ``` -------------------------------- ### IikoServer.edi(edi, gln, inn, kpp, name) Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Retrieves a list of EDI orders for a registered EDI participant and specified supplier. Requires ediSystem GUID and either gln or inn. ```APIDOC ## IikoServer.edi(edi, gln, inn, kpp, name) ### Description Retrieves a list of EDI orders for a registered EDI participant and specified supplier. Requires ediSystem GUID and either gln or inn. ### Method GET ### Endpoint /edi ### Parameters #### Query Parameters - **edi** (string) - Required - GUID identifier of the EDI participant. - **gln** (string) - Optional - GLN of the supplier. Must be provided if inn is not. - **inn** (string) - Optional - INN of the supplier. Must be provided if gln is not. - **kpp** (string) - Optional - KPP of the supplier. - **name** (string) - Optional - Name of the supplier. ### Response #### Success Response (200) - **orders** (array) - List of EDI orders. #### Response Example { "orders": [] } ``` -------------------------------- ### events_filter body example Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Example XML body for filtering events by event types and order numbers. ```xml orderCancelPrecheque orderPaid 175658 ``` -------------------------------- ### server_info() Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Returns a JSON file with information about the server and license status. ```APIDOC ## server_info() ### Description Returns a JSON file with information about the server and license status. ### Method Function call ### Parameters None ### Response Returns server information in JSON format. ``` -------------------------------- ### FrontWebAPI.quick_menu(token) Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Retrieves the quick menu for the default table from the front web API. Requires a valid token. ```APIDOC ## FrontWebAPI.quick_menu(token) ### Description Retrieves the quick menu for the default table from the front web API. ### Method GET ### Endpoint /quick_menu ### Parameters #### Path Parameters - **token** (string) - Required - Authentication token. ### Response #### Success Response (200) - **quick_menu** (array) - List of quick menu items. #### Response Example { "quick_menu": [] } ``` -------------------------------- ### stores() Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Returns a list of all stores. ```APIDOC ## stores() ### Description Returns a list of all stores. ### Method Function call ### Parameters None ### Response Returns all stores of the TP as a corporateItemDto structure. ``` -------------------------------- ### FrontWebAPI.products(token) Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Retrieves products from the front web API. Requires a valid token. ```APIDOC ## FrontWebAPI.products(token) ### Description Retrieves products from the front web API. ### Method GET ### Endpoint /products ### Parameters #### Path Parameters - **token** (string) - Required - Authentication token. ### Response #### Success Response (200) - **products** (array) - List of product objects. #### Response Example { "products": [] } ``` -------------------------------- ### FrontWebAPI.kitchen(token) Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Retrieves kitchen orders from the front web API. Requires a valid token. ```APIDOC ## FrontWebAPI.kitchen(token) ### Description Retrieves kitchen orders from the front web API. ### Method GET ### Endpoint /kitchen ### Parameters #### Path Parameters - **token** (string) - Required - Authentication token. ### Response #### Success Response (200) - **kitchen** (array) - List of kitchen order objects. #### Response Example { "kitchen": [] } ``` -------------------------------- ### token() Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Retrieves a token for authentication. No parameters are documented. ```APIDOC ## token() ### Description Retrieves a token for authentication. ### Method token ### Parameters None documented. ### Response No response details documented. ``` -------------------------------- ### suppliers() Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Returns a list of all suppliers. ```APIDOC ## suppliers() ### Description Returns a list of all suppliers. ### Method Function call ### Parameters None ### Response Returns a list of all suppliers. Structure: employees. ``` -------------------------------- ### version() Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Returns the version of iiko as a string. ```APIDOC ## version() ### Description Returns the version of iiko as a string. ### Method version ### Parameters None documented. ### Response Returns the iiko version as a string. ``` -------------------------------- ### get_token() Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Retrieves a new authentication token. Note that each authorization occupies a license slot, and the token can be used until it expires. If you already have a token and only one server license, requesting another token will cause an error. ```APIDOC ## get_token() ### Description Retrieves a new authentication token. Each authorization occupies a license slot. The token can be used until it expires. If you already have a token and only one server license, requesting another token will cause an error. ### Method N/A ### Endpoint N/A ### Parameters None ### Request Example N/A ### Response #### Success Response - **token** (string) - The new authentication token. #### Response Example N/A ``` -------------------------------- ### production_doc Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Loads a production act (акт приготовления). Takes an XML parameter. ```APIDOC ## production_doc ### Description Loads a production act (акт приготовления). Takes an XML parameter. ### Method production_doc ### Parameters - **xml** (string) - Required - XML content of the production act. ``` -------------------------------- ### IikoServer.employees() Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Retrieves the list of employees. ```APIDOC ## IikoServer.employees() ### Description Retrieves the list of employees. ### Method GET ### Endpoint /employees ### Parameters None ### Response #### Success Response (200) - **employees** (array) - List of employee objects. #### Response Example { "employees": [] } ``` -------------------------------- ### mounthly_plan(departament, **kwargs) Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Generates a daily revenue plan report for a department within a date range. ```APIDOC ## mounthly_plan(departament, **kwargs) ### Description Generates a daily revenue plan report for a department within a date range. ### Method N/A ### Endpoint N/A ### Parameters #### Path Parameters - **departament** (GUID) - Required - Department identifier. #### Query Parameters - **dateFrom** (DD.MM.YYYY) - Required - Start date. - **dateTo** (DD.MM.YYYY) - Required - End date. ### Request Example N/A ### Response #### Success Response - **budgetPlanItemDtoes** (object) - Structure as per XSD Plan for daily revenue. #### Response Example N/A ``` -------------------------------- ### session(from_time=None, to_time=None) Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Returns information about cash sessions within a specified time range. ```APIDOC ## session(from_time=None, to_time=None) ### Description Returns information about cash sessions within the specified time range. ### Method Function call ### Parameters - **from_time** (ISO format) - Optional - Start time for requesting cash session data. - **to_time** (ISO format) - Optional - End time (exclusive) for requesting cash session data. ### Response Returns information about cash sessions. ``` -------------------------------- ### terminals() Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Returns a list of all terminals. ```APIDOC ## terminals() ### Description Returns a list of all terminals. ### Method Function call ### Parameters None ### Response Returns all terminals of the TP as a terminalDto structure. Typically only front terminals are of interest; see terminal search /corporation/terminal/search. ``` -------------------------------- ### store_presets() Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Returns presets for warehouse operation reports. ```APIDOC ## store_presets() ### Description Returns presets for warehouse operation reports. ### Method Function call ### Parameters None ### Response Returns a structure storeReportPresets (see XSD Presets for warehouse operation reports). ``` -------------------------------- ### products_find Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Searches the nomenclature by various criteria. Returns matching product items. ```APIDOC ## products_find ### Description Searches the nomenclature by various criteria. Returns matching product items. ### Method products_find ### Parameters - **includeDeleted** (bool) - Optional - Whether to include deleted items in the result. Default false. Implemented in 5.0 and newer. - **name** (regex) - Optional - Name. - **code** (regex) - Optional - Quick access code in IikoFront. - **mainUnit** (regex) - Optional - Base unit of measure. - **num** (regex) - Optional - Article number. - **cookingPlaceType** (regex) - Optional - Cooking place type. - **productGroupType** (regex) - Optional - Parent group type. - **productType** (regex) - Optional - Nomenclature type. ### Response Returns a list of matching product items. Search includes all non-deleted items, including supplier goods. ``` -------------------------------- ### suppliers_price(code, date=None) Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Returns the price list of a supplier, optionally for a specific date. ```APIDOC ## suppliers_price(code, date=None) ### Description Returns the price list of a supplier. If a date is provided, returns the price list effective on that date; otherwise returns the latest price list. ### Method Function call ### Parameters - **code** - Required - Supplier code. - **date** (DD.MM.YYYY) - Optional - Start date of the price list. If not specified, the latest price list is returned. ### Response Returns the supplier's price list. ``` -------------------------------- ### products Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Retrieves the nomenclature (list of products). Optionally includes deleted items. Returns a list of product items with types and groups. ```APIDOC ## products ### Description Retrieves the nomenclature (list of products). Optionally includes deleted items. Returns a list of product items with types and groups. ### Method products ### Parameters - **includeDeleted** (bool) - Optional - Whether to include deleted items in the result. Default false. Implemented in 5.0 and newer. ### Response Returns a list of product items. Each item has a type (GOODS, DISH, PREPARED, SERVICE, MODIFIER, OUTER, PETROL, RATE) and group type (PRODUCTS, MODIFIERS). ``` -------------------------------- ### IikoServer.events_meta() Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Retrieves the event tree metadata. ```APIDOC ## IikoServer.events_meta() ### Description Retrieves the event tree metadata. ### Method GET ### Endpoint /events_meta ### Parameters None ### Response #### Success Response (200) - **meta** (object) - Event tree metadata. #### Response Example { "meta": {} } ``` -------------------------------- ### ingredient_entry(departament, includeSubtree=False, **kwargs) Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Generates a report on the inclusion of a product in a dish. The report can be filtered by department, date range, and product article. ```APIDOC ## ingredient_entry(departament, includeSubtree=False, **kwargs) ### Description Generates a report on the inclusion of a product in a dish. The report can be filtered by department, date range, and product article. ### Method N/A ### Endpoint N/A ### Parameters #### Path Parameters - **departament** (GUID) - Required - Department identifier. #### Query Parameters - **dateFrom** (DD.MM.YYYY) - Required - Start date. - **dateTo** (DD.MM.YYYY) - Required - End date. - **productArticle** (string) - Required - Product article (search priority: productArticle, product). - **includeSubtree** (bool) - Optional - Whether to include subtree rows in the report (default false). ### Request Example N/A ### Response #### Success Response - **budgetPlanItemDtoes** (object) - Structure as per XSD Plan for daily revenue. #### Response Example N/A ``` -------------------------------- ### FrontWebAPI.product_groups(token) Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Retrieves the hierarchical menu (product groups) from the front web API. Requires a valid token. ```APIDOC ## FrontWebAPI.product_groups(token) ### Description Retrieves the hierarchical menu (product groups) from the front web API. ### Method GET ### Endpoint /product_groups ### Parameters #### Path Parameters - **token** (string) - Required - Authentication token. ### Response #### Success Response (200) - **product_groups** (array) - List of product group objects. #### Response Example { "product_groups": [] } ``` -------------------------------- ### store_operation(stores=None, documentTypes=None, productDetalization=True, showCostCorrections=True, presetId=None) Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Returns a report on warehouse operations with options for filtering by stores, document types, product detailization, cost corrections, and presets. ```APIDOC ## store_operation(stores=None, documentTypes=None, productDetalization=True, showCostCorrections=True, presetId=None) ### Description Returns a report on warehouse operations. Supports filtering by stores, document types, product detailization, cost corrections, and presets. ### Method Function call ### Parameters - **dateFrom** (DD.MM.YYYY) - Required - Start date. - **dateTo** (DD.MM.YYYY) - Required - End date. - **stores** (GUID) - Optional - List of stores for the report. If null or empty, all stores are included. - **documentTypes** - Optional - Document types to include. If null or empty, all documents are included. - **productDetalization** (boolean) - Optional - If true, report includes product information but not dates. If false, report includes each document as one line and fills document sums. - **showCostCorrections** (boolean) - Optional - Whether to include cost corrections. Only considered if a document type filter is set; otherwise corrections are included. - **presetId** (GUID) - Optional - Id of a preset report. If specified, all settings except dates are ignored. ### Response Returns a structure storeReportPresets (see XSD Presets for warehouse operation reports). ``` -------------------------------- ### sales(departament, dishDetails=False, allRevenue=True, **kwargs) Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Returns a revenue report for a department over a date range, with optional filtering by hours, dish details, and payment types. ```APIDOC ## sales(departament, dishDetails=False, allRevenue=True, **kwargs) ### Description Returns a revenue report for the specified department and date range. Supports filtering by hour intervals, dish details, and payment types. ### Method Function call ### Parameters - **department** (GUID) - Required - Department identifier. - **dateFrom** (DD.MM.YYYY) - Required - Start date. - **dateTo** (DD.MM.YYYY) - Required - End date. - **hourFrom** (hh) - Optional - Start hour of the sampling interval within a day (default -1, all day). - **hourTo** (hh) - Optional - End hour of the sampling interval within a day (default -1, all day). - **dishDetails** (boolean) - Optional - Whether to include dish breakdown (true/false), default false. - **allRevenue** (boolean) - Optional - Filter by payment types (true - all types, false - only revenue), default true. ### Response Returns a structure dayDishValue (see XSD Revenue Report). ``` -------------------------------- ### FrontWebAPI.tables(token) Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Retrieves tables from the front web API. Requires a valid token. ```APIDOC ## FrontWebAPI.tables(token) ### Description Retrieves tables from the front web API. ### Method GET ### Endpoint /tables ### Parameters #### Path Parameters - **token** (string) - Required - Authentication token. ### Response #### Success Response (200) - **tables** (array) - List of table objects. #### Response Example { "tables": [] } ``` -------------------------------- ### reports_balance(timestamp, account=None, counteragent=None, department=None) Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Returns balances by accounts, counterparties, and departments at a given accounting date-time. ```APIDOC ## reports_balance(timestamp, account=None, counteragent=None, department=None) ### Description Returns quantitative (amount) and monetary (sum) balances of products (product) in warehouses (store) at the specified accounting date-time. ### Method Function call ### Parameters - **timestamp** (string) - Required - Accounting date-time of the report in format yyyy-MM-dd'T'HH:mm:ss. - **account** (optional) - id of account for filtering (can specify multiple). - **counteragent** (optional) - id of counterparty for filtering (can specify multiple). - **department** (optional) - id of department for filtering (can specify multiple). ### Response Returns quantitative (amount) and monetary (sum) balances of products (product) in warehouses (store) at the specified accounting date-time. ``` -------------------------------- ### suppliers_find(name='', code='') Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Searches for suppliers by name and/or code using regular expressions. ```APIDOC ## suppliers_find(name='', code='') ### Description Searches for suppliers by name and/or code using regular expressions. ### Method Function call ### Parameters - **name** (regex) - Optional - Regular expression for supplier name. - **code** (regex) - Optional - Regular expression for supplier code. ### Response Returns a list of found suppliers. Structure: employees (see XSD Employees). ``` -------------------------------- ### FrontWebAPI.orders(token) Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Retrieves orders from the front web API. Requires a valid token. ```APIDOC ## FrontWebAPI.orders(token) ### Description Retrieves orders from the front web API. ### Method GET ### Endpoint /orders ### Parameters #### Path Parameters - **token** (string) - Required - Authentication token. ### Response #### Success Response (200) - **orders** (array) - List of order objects. #### Response Example { "orders": [] } ``` -------------------------------- ### olap(report=None, data_from=None, data_to=None, **kwargs) Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Generates an OLAP report for sales, transactions, deliveries, or stock control. Allows grouping by fields and columns. ```APIDOC ## olap(report=None, data_from=None, data_to=None, **kwargs) ### Description Generates an OLAP report for sales, transactions, deliveries, or stock control. Allows grouping by fields and columns. ### Method N/A ### Endpoint N/A ### Parameters #### Query Parameters - **report** (enum) - Required - Report type: SALES, TRANSACTIONS, DELIVERIES, STOCK. - **groupRow** (string) - Optional - Grouping fields, e.g., groupRow=WaiterName&groupRow=OpenTime. - **groupCol** (string) - Optional - Fields for column grouping. ### Request Example N/A ### Response #### Success Response - **olapReport** (object) - OLAP report data. #### Response Example N/A ``` -------------------------------- ### FrontWebAPI.token() Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Retrieves the authentication token for the front web API. ```APIDOC ## FrontWebAPI.token() ### Description Retrieves the authentication token for the front web API. ### Method GET ### Endpoint /token ### Parameters None ### Response #### Success Response (200) - **token** (string) - Authentication token. #### Response Example { "token": "string" } ``` -------------------------------- ### FrontWebAPI.quit(token) Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Destroys the token, invalidating the session. Requires a valid token. ```APIDOC ## FrontWebAPI.quit(token) ### Description Destroys the token, invalidating the session. ### Method POST ### Endpoint /quit ### Parameters #### Path Parameters - **token** (string) - Required - Authentication token. ### Response #### Success Response (200) - **status** (string) - Confirmation of token destruction. #### Response Example { "status": "success" } ``` -------------------------------- ### groups() Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Returns a list of groups and departments. The result includes all department groups, departments, and points of sale as a groupDto structure. ```APIDOC ## groups() ### Description Returns a list of groups and departments. The result includes all department groups, departments, and points of sale as a groupDto structure. ### Method N/A ### Endpoint N/A ### Parameters None ### Request Example N/A ### Response #### Success Response - **groupDto** (object) - Structure containing groups, departments, and points of sale. #### Response Example N/A ``` -------------------------------- ### IikoServer.events(**kwargs) Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Retrieves a list of events with optional filters for time range and revision. Returns eventsList format. ```APIDOC ## IikoServer.events(**kwargs) ### Description Retrieves a list of events with optional filters for time range and revision. Returns eventsList format. ### Method GET ### Endpoint /events ### Parameters #### Query Parameters - **from_time** (string) - Optional - Start time in ISO format yyyy-MM-ddTHH:mm:ss.SSS. Default is start of current day. - **to_time** (string) - Optional - End time (exclusive) in ISO format yyyy-MM-ddTHH:mm:ss.SSS. Default is no boundary. - **from_rev** (integer) - Optional - Revision number from which to request events. Use revision + 1 from previous response for new events. ### Response #### Success Response (200) - **events** (array) - List of events in eventsList format. #### Response Example { "events": [] } ``` -------------------------------- ### invoice_in(**kwargs) Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Exports incoming invoices. Filters by date range and supplier ID. ```APIDOC ## invoice_in(**kwargs) ### Description Exports incoming invoices. Filters by date range and supplier ID. ### Method N/A ### Endpoint N/A ### Parameters #### Query Parameters - **from** (YYYY-MM-DD) - Required - Start date (inclusive). - **to** (YYYY-MM-DD) - Required - End date (inclusive, time not considered). - **supplierId** (GUID) - Required - Supplier ID. ### Request Example N/A ### Response #### Success Response - **invoice** (object) - XSD Incoming invoice. #### Response Example N/A ``` -------------------------------- ### FrontWebAPI.users(token) Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Retrieves users from the front web API. Requires a valid token. ```APIDOC ## FrontWebAPI.users(token) ### Description Retrieves users from the front web API. ### Method GET ### Endpoint /users ### Parameters #### Path Parameters - **token** (string) - Required - Authentication token. ### Response #### Success Response (200) - **users** (array) - List of user objects. #### Response Example { "users": [] } ``` -------------------------------- ### olap Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Executes an OLAP report query. Parameters include reportType, fields, and aggregation fields. Returns a report structure. ```APIDOC ## olap ### Description Executes an OLAP report query. Parameters include reportType, fields, and aggregation fields. Returns a report structure. ### Method olap ### Parameters - **reportType** (string) - Required - Type of report: SALES, TRANSACTIONS, DELIVERIES. - **fields** (list) - Required - List of fields for the report. Grouping is allowed if the field's Grouping column is true. - **agr** (string) - Optional - Aggregation fields, e.g., agr=DishDiscountSum&agr=VoucherNum. ### Response Returns a report structure. ``` -------------------------------- ### IikoServer.departments() Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Retrieves the hierarchy of departments. Returns department types such as CORPORATION, JURPERSON, etc. ```APIDOC ## IikoServer.departments() ### Description Retrieves the hierarchy of departments. Returns department types such as CORPORATION, JURPERSON, etc. ### Method GET ### Endpoint /departments ### Parameters None ### Response #### Success Response (200) - **departments** (array) - List of department objects. #### Response Example { "departments": [] } ``` -------------------------------- ### FrontWebAPI.deliveries(token) Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Retrieves deliveries from the front web API. Requires a valid token. ```APIDOC ## FrontWebAPI.deliveries(token) ### Description Retrieves deliveries from the front web API. ### Method GET ### Endpoint /deliveries ### Parameters #### Path Parameters - **token** (string) - Required - Authentication token. ### Response #### Success Response (200) - **deliveries** (array) - List of delivery objects. #### Response Example { "deliveries": [] } ``` -------------------------------- ### IikoServer.departments_find(code) Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Searches for a department by its code. Returns corporateItemDto if found. ```APIDOC ## IikoServer.departments_find(code) ### Description Searches for a department by its code. Returns corporateItemDto if found. ### Method GET ### Endpoint /departments_find ### Parameters #### Query Parameters - **code** (string) - Required - Code of the trade enterprise. Regular expression; if a plain string is given, it searches for any occurrence of that string in the code. ### Response #### Success Response (200) - **department** (object) - corporateItemDto structure. #### Response Example { "department": {} } ``` -------------------------------- ### IikoBiz Class Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html The IikoBiz class provides methods to interact with the Iiko business API, including operations for orders, cities, nomenclature, and stop lists. ```APIDOC ## IikoBiz Class ### Description The IikoBiz class is initialized with login and password and provides methods to interact with the Iiko business API. ### Constructor `IikoBiz(login, password)` ### Methods #### all_orders(token, **kwargs) - **Description**: Retrieves all orders. - **Parameters**: token (string) - Required, **kwargs - additional parameters. #### cities(token, org) - **Description**: Returns the list of cities for the given organization. - **Parameters**: token (string) - Required, org - organization identifier. #### cities_list(token, org) - **Description**: Returns the list of all cities for the given organization. - **Parameters**: token (string) - Required, org - organization identifier. #### courier(token, org) - **Description**: Retrieves courier information. - **Parameters**: token (string) - Required, org - organization identifier. #### customer_history(token, org, customer) - **Description**: Retrieves customer history. - **Parameters**: token (string) - Required, org - organization identifier, customer - customer identifier. #### events(token, timeout=None) - **Description**: Gets the stop-list for the restaurant network. - **Parameters**: token (string) - Required, timeout (optional) - request timeout. #### events_meta(token, body, timeout=None) - **Description**: Gets meta information of the event journal (description of returned data). - **Parameters**: token (string) - Required, body - request body, timeout (optional) - request timeout. #### events_session(token, body, timeout=None) - **Description**: Gets information about cash sessions. - **Parameters**: token (string) - Required, body - request body, timeout (optional) - request timeout. #### nomenclature(token, org) - **Description**: Gets the nomenclature tree. - **Parameters**: token (string) - Required, org - organization identifier. #### orders_courier(token, org, courier) - **Description**: Retrieves courier orders. - **Parameters**: token (string) - Required, org - organization identifier, courier - courier identifier. #### organization(token) - **Description**: Retrieves organization information. - **Parameters**: token (string) - Required. #### stop_list(token, org) - **Description**: Gets the stop-list for the restaurant network. - **Parameters**: token (string) - Required, org - organization identifier. #### streets(token, org, citi_id) - **Description**: Returns the list of streets of a city for the given organization. - **Parameters**: token (string) - Required, org - organization identifier, citi_id - city identifier. #### token() - **Description**: Returns the token. ``` -------------------------------- ### invoice_out(**kwargs) Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Exports outgoing invoices. Filters by date range and optionally by supplier ID. ```APIDOC ## invoice_out(**kwargs) ### Description Exports outgoing invoices. Filters by date range and optionally by supplier ID. ### Method N/A ### Endpoint N/A ### Parameters #### Query Parameters - **from** (YYYY-MM-DD) - Required - Start date (inclusive). - **to** (YYYY-MM-DD) - Required - End date (inclusive, time not considered). - **supplierId** (GUID) - Optional - Supplier ID. ### Request Example N/A ### Response #### Success Response - **invoice** (object) - XSD Incoming invoice. #### Response Example N/A ``` -------------------------------- ### FrontWebAPI.sections(token) Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Retrieves sections (departments) from the front web API. Requires a valid token. ```APIDOC ## FrontWebAPI.sections(token) ### Description Retrieves sections (departments) from the front web API. ### Method GET ### Endpoint /sections ### Parameters #### Path Parameters - **token** (string) - Required - Authentication token. ### Response #### Success Response (200) - **sections** (array) - List of section objects. #### Response Example { "sections": [] } ``` -------------------------------- ### IikoServer.close_session(dateFrom, dateTo) Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Retrieves a list of cash register sessions within a specified date range. Returns CloseSessionDto objects. ```APIDOC ## IikoServer.close_session(dateFrom, dateTo) ### Description Retrieves a list of cash register sessions within a specified date range. Returns CloseSessionDto objects. ### Method GET ### Endpoint /close_session ### Parameters #### Query Parameters - **dateFrom** (string) - Optional - Start date in format DD.MM.YYYY. - **dateTo** (string) - Optional - End date in format DD.MM.YYYY. ### Response #### Success Response (200) - **sessions** (array) - List of CloseSessionDto objects. #### Response Example { "sessions": [] } ``` -------------------------------- ### Card5 Class Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html The Card5 class provides methods for customer and card management, loyalty programs, corporate nutrition, and reporting. ```APIDOC ## Card5 Class ### Description The Card5 class is initialized with login and password and provides methods for managing customers, cards, loyalty programs, and corporate nutrition. ### Constructor `Card5(login, password)` ### Methods #### add_card(token, customer_id, org, card) - **Description**: Creates a new card and issues it to the guest of the organization. - **Parameters**: token (string) - Required, customer_id - customer identifier, org - organization identifier, card - card data. #### add_category_customer(token, customer_id, **kwargs) - **Description**: Adds a new category to the guest of the organization. - **Parameters**: token (string) - Required, customer_id - customer identifier, **kwargs - additional parameters. #### add_to_nutrition_organization(token, customer_id, **kwargs) - **Description**: Includes a specific guest in a specific corporate nutrition program of a specific organization. - **Parameters**: token (string) - Required, customer_id - customer identifier, **kwargs - additional parameters. #### calculate_checkin_result(token, orders) - **Description**: Calculates the loyalty program for an order. - **Parameters**: token (string) - Required, orders - order data. #### check_and_get_combo_price(token, combo) - **Description**: Checks a combo dish and calculates its cost. - **Parameters**: token (string) - Required, combo - combo data. #### corporate_nutrition_report(token, org, **kwargs) - **Description**: Gets a report on orders of guests of the specified corporate nutrition program for the specified period. - **Parameters**: token (string) - Required, org - organization identifier, **kwargs - additional parameters. #### corporate_nutritions(token, org) - **Description**: Gets the list of active corporate nutrition programs for the organization. - **Parameters**: token (string) - Required, org - organization identifier. #### create_customer(token, customer) - **Description**: Creates a guest or updates guest information. - **Parameters**: token (string) - Required, customer - customer data. #### delete_card(token, customer_id, **kwargs) - **Description**: Deletes a card with the given track from the guest of the organization. - **Parameters**: token (string) - Required, customer_id - customer identifier, **kwargs - additional parameters. #### get_balances_by_guests(token, users, **kwargs) - **Description**: Gets guest balances for the requested guests and a specific program account. - **Parameters**: token (string) - Required, users - list of users, **kwargs - additional parameters. #### get_categories_by_guests(token, users, **kwargs) - **Description**: Gets guest categories for the requested guests. - **Parameters**: token (string) - Required, users - list of users, **kwargs - additional parameters. #### get_combos_info(token, org) - **Description**: Gets descriptions of all combos and combo categories for the organization. - **Parameters**: token (string) - Required, org - organization identifier. #### get_counters_by_guests(token, users, **kwargs) - **Description**: Gets guest metrics for the requested guests, metric types, and periods. - **Parameters**: token (string) - Required, users - list of users, **kwargs - additional parameters. #### get_customer_by_card(token, **kwargs) - **Description**: Gets guest data by card number. - **Parameters**: token (string) - Required, **kwargs - additional parameters. #### get_customer_by_id(token, **kwargs) - **Description**: Gets guest data by identifier. - **Parameters**: token (string) - Required, **kwargs - additional parameters. #### get_customer_by_phone(token, **kwargs) - **Description**: Gets guest data by phone number. - **Parameters**: token (string) - Required, **kwargs - additional parameters. #### get_customers_by_organization_and_by_period(token, **kwargs) - **Description**: Gets a report on orders of guests of the specified corporate nutrition program for the specified period. - **Parameters**: token (string) - Required, **kwargs - additional parameters. #### get_manual_condition_infos(token, org) - **Description**: Gets manual conditions. - **Parameters**: token (string) - Required, org - organization identifier. #### organization(token) - **Description**: Retrieves organization information. - **Parameters**: token (string) - Required. #### remove_category_customer(token, customer_id, **kwargs) - **Description**: Removes a category from the guest of the organization. - **Parameters**: token (string) - Required, customer_id - customer identifier, **kwargs - additional parameters. #### send_sms(token, org, **kwargs) - **Description**: Sends an SMS. - **Parameters**: token (string) - Required, org - organization identifier, **kwargs - additional parameters. #### token() - **Description**: Returns the token. #### transactions_report(token, org, **kwargs) - **Description**: Gets a report on transactions of guests of the organization for the specified period. - **Parameters**: token (string) - Required, org - organization identifier, **kwargs - additional parameters. ``` -------------------------------- ### product_expense Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Retrieves product expense by sales. Parameters include department, date range, and hour range. Returns a dayDishValue structure. ```APIDOC ## product_expense ### Description Retrieves product expense by sales. Parameters include department, date range, and hour range. Returns a dayDishValue structure. ### Method product_expense ### Parameters - **department** (GUID) - Required - Department identifier. - **dateFrom** (DD.MM.YYYY) - Required - Start date. - **dateTo** (DD.MM.YYYY) - Required - End date. - **hourFrom** (hh) - Optional - Start hour of the sampling interval in a day (default -1, all day). - **hourTo** (hh) - Optional - End hour of the sampling interval in a day (default -1, all day). ### Response Returns a dayDishValue structure (see XSD for product expense by sales). ``` -------------------------------- ### stores_find(code) Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Searches for a store by its code using a regular expression. ```APIDOC ## stores_find(code) ### Description Searches for a store by its code. The code is a regular expression; if a plain string is given, it searches for any case-sensitive occurrence of that string in the store code. ### Method Function call ### Parameters - **code** (storeCode) - Required - Store code as a regular expression. ### Response Returns corporateItemDto if a store with the given code exists. Requires store codes to be filled in the TP (optional field, empty by default). ``` -------------------------------- ### quit_token Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Destroys the current token. ```APIDOC ## quit_token ### Description Destroys the current token. ### Method quit_token ### Parameters None. ``` -------------------------------- ### groups_search(**kwargs) Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Searches for department groups by name or department ID. ```APIDOC ## groups_search(**kwargs) ### Description Searches for department groups by name or department ID. ### Method N/A ### Endpoint N/A ### Parameters #### Query Parameters - **name** (regex) - Required - Name of the group. - **departmentId** (string) - Required - ID of the department. ### Request Example N/A ### Response #### Success Response - **groupDto** (object) - Matching group structures. #### Response Example N/A ``` -------------------------------- ### terminals_search(_anonymous=False_, **kwargs) Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Searches for terminals based on optional filters. Returns a list of terminalDto objects if matching terminals exist. ```APIDOC ## terminals_search(_anonymous=False_, **kwargs) ### Description Searches for terminals based on optional filters. Returns a list of terminalDto objects if matching terminals exist. ### Method terminals_search ### Parameters - **anonymous** (bool) - Optional - Fronts have anonymous=false, back offices and system terminals have true. - **name** (regex) - Optional - Terminal name as displayed in the back office. - **computerName** (regex) - Optional - Computer name. ### Response Returns a list of terminalDto objects if matching terminals exist. ``` -------------------------------- ### olap2 Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Retrieves OLAP report fields with metadata about filtering, aggregation, and grouping capabilities. Returns a JSON structure of fields. ```APIDOC ## olap2 ### Description Retrieves OLAP report fields with metadata about filtering, aggregation, and grouping capabilities. Returns a JSON structure of fields. ### Method olap2 ### Parameters - **reportType** (string) - Required - Type of report: SALES, TRANSACTIONS, DELIVERIES. - **json** (json) - Optional - JSON with fields. ### Response Returns a JSON structure of fields with information on filtering, aggregation, and grouping capabilities. Deprecated fields are not included. ``` -------------------------------- ### invoice_number_in(current_year=True, **kwargs) Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Exports an incoming invoice by its number. Can filter by date range or current year. ```APIDOC ## invoice_number_in(current_year=True, **kwargs) ### Description Exports an incoming invoice by its number. Can filter by date range or current year. ### Method N/A ### Endpoint N/A ### Parameters #### Query Parameters - **number** (string) - Required - Document number. - **from** (YYYY-MM-DD) - Optional - Start date (inclusive).".- **to** (YYYY-MM-DD) - Optional - End date (inclusive, time not considered).".- **currentYear** (bool) - Optional - Only for current year (default True).".".### Request Example N/A ".### Response #### Success Response - **invoice** (object) - XSD Incoming invoice. ".#### Response Example N/A ``` -------------------------------- ### IikoServer.events_filter(body) Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Retrieves events filtered by event IDs and order number. Body is XML with events and orderNums. ```APIDOC ## IikoServer.events_filter(body) ### Description Retrieves events filtered by event IDs and order number. Body is XML with events and orderNums. ### Method POST ### Endpoint /events_filter ### Parameters #### Request Body - **body** (string) - Required - XML content with events and orderNums. ### Request Example orderCancelPrecheque orderPaid 175658 ### Response #### Success Response (200) - **groups** (object) - Tree of events in groupsList format. #### Response Example { "groups": {} } ``` -------------------------------- ### invoice_number_out(current_year=True, **kwargs) Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html Exports an outgoing invoice by its number. Can filter by date range or current year. ```APIDOC ## invoice_number_out(current_year=True, **kwargs) ### Description Exports an outgoing invoice by its number. Can filter by date range or current year. ### Method N/A ### Endpoint N/A ### Parameters #### Query Parameters - **number** (string) - Required - Document number. - **from** (YYYY-MM-DD) - Optional - Start date (inclusive). - **to** (YYYY-MM-DD) - Optional - End date (inclusive, time not considered). - **currentYear** (bool) - Optional - Only for current year (default True). ### Request Example N/A ### Response #### Success Response - **invoice** (object) - XSD Outgoing invoice. #### Response Example N/A ``` -------------------------------- ### OLAP report fields JSON structure Source: https://pyiiko.readthedocs.io/ru/latest/Pyiiko.html JSON structure for OLAP report fields, including field name, type, aggregation/grouping/filtering flags, and tags. Used with the olap2 function. ```json { "FieldName":{ "name":"StringValue", "type":"StringValue", "aggregationAllowed":"booleanValue", "groupingAllowed":"booleanValue", "filteringAllowed":"booleanValue", "tags":[ "StringValue1", "StringValue2", "...", "StringValueN" ] } } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.