### REGOS API Endpoint Example Source: https://docs.regos.uz/ru/api/intro/quick-start This example shows the format of the REGOS API Endpoint and how to construct a request to retrieve account information. The endpoint includes a base URL, an integration key, API version, and the specific method. ```HTTP https://integration.regos.uz/gateway/out/{integrationKey}/v1/{method} https://integration.regos.uz/gateway/out/11v5929ba236415hb31346ede021bdi4/v1/Account/Get ``` -------------------------------- ### Get PromoProgramSetting Response Example (JSON) Source: https://docs.regos.uz/ru/api/references/promoprogramsetting/get This is an example of a JSON response from the /v1/PromoProgramSetting/Get endpoint. It shows a successful response ('ok': true) containing an array of promotion program settings. ```json { "ok": true, "result": [ { "id": 1, "program_id": 1, "program_type_id": 1, "type": 1, "key": "general_settings", "value": "{\"discount\":1,\"payment_type\":1}", "deleted": false, "last_update": 1719297926 } ] } ``` -------------------------------- ### Getting Endpoint and Integration Key Source: https://docs.regos.uz/ru/api/intro/quick-start To start using the API, you need to obtain an Endpoint and an integration ID (`connected_integration_id`). These are generated when creating an integration in REGOS.Online. The Endpoint is the base URL for API requests, and the `connected_integration_id` is your integration's unique identifier. ```APIDOC ## Obtaining Endpoint and Integration Key To begin working with the API, you need to obtain two essential components: the **Endpoint** and the integration ID (`connected_integration_id`). These are automatically generated upon creating an integration within REGOS.Online. The Endpoint serves as the base address to which requests will be sent, while `connected_integration_id` acts as the unique identifier for your integration. After creating an integration in your REGOS.Online account, you will receive an **Endpoint** for making API requests and a string key in the format `11v5929ba236415hb31346ede021bdi4`. **Example Endpoint Format:** ``` https://integration.regos.uz/gateway/out/{integrationKey}/v1/{method} ``` **Example Request for Account Information:** ``` https://integration.regos.uz/gateway/out/11v5929ba236415hb31346ede021bdi4/v1/Account/Get ``` ``` -------------------------------- ### Get Connected Integration Settings Request Example Source: https://docs.regos.uz/ru/api/integrations/connectedintegrationsetting/get Example of a POST request to the /v1/ConnectedIntegrationSetting/Get endpoint. It demonstrates the required 'integration_key' and optional 'firm_id' parameters for fetching integration settings. ```json { "integration_key": "marketplace_toserver", "firm_id": 1 } ``` -------------------------------- ### Get Connected Integration Settings Response Example Source: https://docs.regos.uz/ru/api/integrations/connectedintegrationsetting/get Example of a successful response from the /v1/ConnectedIntegrationSetting/Get API endpoint. It shows the structure of the 'result' array, containing ConnectedIntegrationSetting objects with their properties. ```json { "ok": true, "result": [ { "id": 1, "key": "marketplace_toserver", "value": "1", "name": "Fitst setting", "name_var": "FIRST_INTEGRATION_SETTING", "dataType": "Integer", "last_update": 1712345678 } ] } ``` -------------------------------- ### RetailPaymentReport Get Request Example Source: https://docs.regos.uz/ru/api/retail/retailpaymentreport/get Example JSON payload for requesting a retail payment report. It specifies the start and end dates, the reporting period interval, and optionally, operating cash IDs. ```json { "start_date":"2021-05-01", "end_date":"2021-08-01", "period_interval": "Month", "operating_cash_ids ":[1] } ``` -------------------------------- ### Get PromoProgramSetting Request Example (JSON) Source: https://docs.regos.uz/ru/api/references/promoprogramsetting/get This is an example of a JSON request body to retrieve promotion program settings. It demonstrates how to specify filters like individual IDs, arrays of IDs, program IDs, and a key. ```json { "id": 1, "ids": [ 1 ], "type_ids": [ 1 ], "program_id": 1, "program_ids": [ 1 ], "key": "keyExample" } ``` -------------------------------- ### POST /v1/PromoProgramSetting/Add Source: https://docs.regos.uz/ru/api/references/promoprogramsetting/add Creates new promotion settings. Expects an array of settings as input. ```APIDOC ## POST /v1/PromoProgramSetting/Add ### Description Creates new promotion settings. Expects an array of settings as input. ### Method POST ### Endpoint /v1/PromoProgramSetting/Add ### Parameters #### Request Body - **program_id** (Int64) - Required - ID of the promotion. - **key** (String) - Required - Name of the setting. - **value** (String) - Required - Value of the setting. ### Request Example ```json [ { "program_id":1, "key": "general_settings", "value": "{\"discount\":1,\"payment_type\":1}" } ] ``` ### Response #### Success Response (200) - **new_id** (Int64) - ID of the created promotion setting. #### Response Example ```json { "ok": true, "result": { "new_id": 1 } } ``` ``` -------------------------------- ### UserDashboard Get Response Example Source: https://docs.regos.uz/ru/api/widgets/userdashboard/get Example response from the UserDashboard Get endpoint. It contains a boolean 'ok' status and a 'result' array of Dashboard objects. ```json { "ok": true, "result": [ { "id": 3, "name": "Дэшбоард1", "firm_id": 2, "stock_id": 1, "is_fixed": false, "is_creator": true, "last_update": 1534151629 } ] } ``` -------------------------------- ### Example Request Body with SortOrders Source: https://docs.regos.uz/ru/api/store/docadditionalexpenses/get Illustrates a full request body example incorporating the SortOrders model. ```APIDOC ## Example Request Body ### Description An example of a comprehensive request body, including various filters and the `sort_orders` parameter. ### Request Example ```json { "start_date":1534153454, "end_date":1534157896, "ids":[1], "firm_ids":[1], "stock_ids":[1], "partner_ids":[1], "contract_ids":[1], "vat_calculation_type": "No", "parent_doc_type_id": 1, "parent_doc_id": 1, "search": "example", "performed": false, "blocked": false, "deleted_mark": false, "sort_orders": [ { "column": "CODE", "direction": "ASC" } ], "limit": 1, "offset": 1 } ``` ``` -------------------------------- ### UserStock Get Request Example (JSON) Source: https://docs.regos.uz/ru/api/settings-and-security/userstock/get Example of a POST request to the UserStock Get endpoint. It requires the user_id as input to specify which user's stock information to retrieve. ```json { "user_id": 1 } ``` -------------------------------- ### Example Purchase Operation Response (JSON) Source: https://docs.regos.uz/ru/api/store/purchaseoperation/get This snippet illustrates the structure of a successful response from the /v1/PurchaseOperation/Get endpoint. It includes an array of purchase operations, each with detailed item information, quantities, costs, and timestamps. ```json { "ok": true, "result": [ { "id": 1, "document_id": 1, "item": { "id": 1, "group": { "id": 1, "parent_id": 1, "name": "Бакалея", "path": "Продукты/Бакалея", "child_count": 1, "last_update": 1533619486 }, "department": { "id": 1, "name": "Напитки", "last_update": 1671689500 }, "vat": { "id": 1, "value": 12, "name": "12%", "enabled": true, "last_update": 1672188628 }, "barcode_list": "9582638638288, 2042993381221", "base_barcode": "9582638638288", "unit": { "id": 1, "name": "Кг", "type": 1, "description": "Килограмм", "kkm_code": 235, "last_update": 1713435678 }, "unit2": { "id": 1, "name": "Кг", "type": 1, "description": "Килограмм", "kkm_code": 235, "last_update": 1713435678 }, "color": { "id": 1, "name": "Красный", "last_update": 1671716048 }, "size": { "id": 1, "name": "S", "last_update": 1671715998 }, "brand": { "id": 1, "name": "Coca-cola", "last_update": 1671716103 }, "producer": { "id": 1, "name": "Coca-Cola Co.", "last_update": 1688063968 }, "country": { "id": 1, "name": "СОЕДИНЕННЫЕ ШТАТЫ", "fullname": "Соединенные Штаты Америки", "code": "840", "alfa2": "US", "alfa3": "USA", "last_update": 1535245932 }, "compound": true, "deleted_mark": false, "image_url": "https://cdn.regos.uz/5fbc650b-6166-4e1b-8864-f93c0617bbf8/i_1678063359_905ee850-3e41-4ec9-b70a-b78b5d7d52f0.png", "parent_id": 1, "has_child": false, "last_update": 1688064039, "type": "Item", "code": 1, "name": "Coca-Cola", "fullname": "Coca-cola 0.5l", "description": "Состав: вода, сахар, краситель.", "articul": "4780069000017", "kdt": 1, "min_quantity": 1, "icps": "02202002001000000", "assemblable": true, "disassemblable": true, "is_labeled": true, "comission_tin": "32641859724615", "package_code": "example123", "origin": "BuyingAndSelling", "partner_id": 1 }, "quantity": 56.1, "cost": 12000.1, "vat_value": 12.1, "vat_calculation_type": "No", "price": 15000.1, "current_price": 12000.1, "last_purchase_cost": 10000.1, "description": "example", "additional_expenses_amount": 1.1, "last_update": 1706943394 } ] } ``` -------------------------------- ### MovementOperation Get Response Example (JSON) Source: https://docs.regos.uz/ru/api/store/movementoperation/get Example JSON response structure for the MovementOperation Get endpoint. It includes a 'result' array containing movement operation details and 'next_offset' and 'total' for pagination. ```json { "ok": true, "result": [ { "id": 1, "document_id": 1, "item": { "id": 1, "group": { "id": 1, "parent_id": 1, "name": "Бакалея", "path": "Продукты/Бакалея", "child_count": 1, "last_update": 1533619486 }, "department": { "id": 1, "name": "Напитки", "last_update": 1671689500 }, "vat": { "id": 1, "value": 12, "name": "12%", "enabled": true, "last_update": 1672188628 }, "barcode_list": "9582638638288, 2042993381221", "base_barcode": "9582638638288", "unit": { "id": 1, "name": "Кг", "type": 1, "description": "Килограмм", "kkm_code": 235, "last_update": 1713435678 }, "unit2": { "id": 1, "name": "Кг", "type": 1, "description": "Килограмм", "kkm_code": 235, "last_update": 1713435678 }, "color": { "id": 1, "name": "Красный", "last_update": 1671716048 }, "size": { "id": 1, "name": "S", "last_update": 1671715998 }, "brand": { "id": 1, "name": "Coca-cola", "last_update": 1671716103 }, "producer": { "id": 1, "name": "Coca-Cola Co.", "last_update": 1688063968 }, "country": { "id": 1, "name": "СОЕДИНЕННЫЕ ШТАТЫ", "fullname": "Соединенные Штаты Америки", "code": "840", "alfa2": "US", "alfa3": "USA", "last_update": 1535245932 }, "compound": true, "deleted_mark": false, "image_url": "https://cdn.regos.uz/5fbc650b-6166-4e1b-8864-f93c0617bbf8/i_1678063359_905ee850-3e41-4ec9-b70a-b78b5d7d52f0.png", "parent_id": 1, "has_child": false, "last_update": 1688064039, "type": "Item", "code": 1, "name": "Coca-Cola", "fullname": "Coca-cola 0.5l", "description": "Состав: вода, сахар, краситель.", "articul": "4780069000017", "kdt": 1, "min_quantity": 1, "icps": "02202002001000000", "assemblable": true, "disassemblable": true, "is_labeled": true, "comission_tin": "32641859724615", "package_code": "example123", "origin": "BuyingAndSelling", "partner_id": 1 }, "quantity": 1.1, "price": 1.1, "last_purchase_cost": 1.1, "description": "example", "last_update": 1549447143 } ], "next_offset": 0, "total": 1 } ``` -------------------------------- ### UserStock Get Response Example (JSON) Source: https://docs.regos.uz/ru/api/settings-and-security/userstock/get Example response from the UserStock Get endpoint. It includes a success status and a list of UserStock objects, each containing details about a warehouse and its associated firm. ```json { "ok": true, "result": [ { "id": 1, "user_id": 1, "stock": { "id": 1, "name": "Новомосковская", "firm": { "id": 1, "group": { "id": 1, "parent_id": 0, "name": "Предприятия", "child_count": 0, "last_update": 1715233269 }, "deleted_mark": false, "last_update": 1715863600, "name": "REGOS", "fullname": "ООО \"REGOS Software\"", "boss_name": "Андрей", "address": "Мукими, 8А", "phones": "+998987654321", "description": "EasyTrade successor", "inn": "305930137", "bank_name": "Ипак Йули", "mfo": "01101", "rs": "22125489632541254782", "oked": "62090", "vat_index": "1325489654785" }, "deleted_mark": false, "description": "example", "area": 1.1, "last_update": 1705583155 } } ] } ``` -------------------------------- ### Get DocAccountMovement Response Example Source: https://docs.regos.uz/ru/api/finance/docaccountmovement/get An example JSON response from the '/v1/DocAccountMovement/Get' endpoint, illustrating the structure of returned account movement documents. Includes details like document ID, code, date, firm information, and account details. ```json { "ok": true, "result": [ { "id": 1, "code": "PMV-0000001", "date": 1697103786, "firm": { "id": 1, "group": { "id": 1, "parent_id": 0, "name": "Предприятия", "child_count": 0, "last_update": 1715233269 }, "deleted_mark": false, "last_update": 1715863600, "name": "REGOS", "fullname": "ООО \"REGOS Software\"", "boss_name": "Андрей", "address": "Мукими, 8А", "phones": "+998987654321", "description": "EasyTrade successor", "inn": "305930137", "bank_name": "Ипак Йули", "mfo": "01101", "rs": "22125489632541254782", "oked": "62090", "vat_index": "1325489654785" }, "account_sender": { "id": 1, "code": "00001", "name": "Основной счет", "currency": { "id": 1, "code_num": 860, "code_chr": "UZS", "name": "Узбекский сум", "exchange_rate": 1, "is_base": true, "deleted": false, "last_update": 1664715017 }, "last_update": 1693395102 }, "amount_sended": 100.1, "account_receiver": { "id": 2, "code": "00002", "name": "Основной счет2", "currency": { "id": 1, "code_num": 860, "code_chr": "UZS", "name": "Узбекский сум", "exchange_rate": 1, "is_base": true, "deleted": false, "last_update": 1664715017 }, "last_update": 1693395102 }, "amount_received": 100.1, "description": "example", "attached_user": { "id": 1, "full_name": "John Fitzgerald Kennedy" } } ], "next_offset": 0, "total": 1 } ``` -------------------------------- ### UserGroup Get Response Example Source: https://docs.regos.uz/ru/api/settings-and-security/usergroup/get Example response from the UserGroup Get endpoint. The 'result' field contains an array of UserGroup objects, each with properties like 'id', 'parent_id', 'name', 'child_count', and 'last_update'. ```json { "ok": true, "result": [ { "id": 1, "parent_id": 1, "name": "Administrators", "child_count": 1, "last_update": 1529755889 } ] } ``` -------------------------------- ### Promotional Action Settings Source: https://docs.regos.uz/ru/api/intro/changelog Introduces the 'Application Order' setting for the 'Discount by Condition' promotional action. ```APIDOC ## Promotional Actions ### Description Adds the 'Application Order' setting for the 'Discount by Condition' promotional action. ### Method N/A ### Endpoint N/A ``` -------------------------------- ### Response Example for PartnerBalance Get Source: https://docs.regos.uz/ru/api/references/partnerbalance/get Example JSON response from the PartnerBalance Get endpoint. It includes a 'result' array containing detailed reconciliation act objects, each with currency, firm, and document type information. ```json { "ok": true, "result": [ { "exchange_rate": 1.0, "currency": { "id": 1, "code_num": 860, "code_chr": "UZS", "name": "Узбекский сум", "exchange_rate": 1.0, "is_base": true, "deleted": false, "last_update": 1574075456 }, "currency_amount": 0.0, "id": 41, "date": 1581404315, "document_code": "2020-0000021", "document_id": 1, "start_amount": -26156500.0, "debit": 0.0, "credit": 0.0, "firm": { "id": 1, "group": { "id": 1, "parent_id": 0, "name": "Предприятия", "child_count": 0, "last_update": 1715233269 }, "deleted_mark": false, "last_update": 1715863600, "name": "REGOS", "fullname": "ООО \"REGOS Software\"", "boss_name": "Андрей", "address": "Мукими, 8А", "phones": "+998987654321", "description": "EasyTrade successor", "inn": "305930137", "bank_name": "Ипак Йули", "mfo": "01101", "rs": "22125489632541254782", "oked": "62090", "vat_index": "1325489654785" }, "document_type": { "id": 1, "name": "Склад: Поступление от контрагента", "last_update": 1533650969 } } ] } ``` -------------------------------- ### PromoProgram Get Request Example Source: https://docs.regos.uz/ru/api/references/promoprogram/get This snippet demonstrates a POST request to the /v1/PromoProgram/Get endpoint. It includes optional parameters like program IDs, type IDs, and a flag to check if retail cards are allowed, which is specific to bonus systems. ```json { "ids":[1], "type_ids":[1], "allowed_retail_card": true } ``` -------------------------------- ### API Response Example with DocWholeSaleReturn Source: https://docs.regos.uz/ru/api/store/docwholesalereturn/get Provides an example of a successful API response. It includes a `result` array containing `DocWholeSaleReturn` objects, along with pagination information like `next_offset` and `total`. ```json { "ok": true, "result": [ { "id": 1, "date": 1539938097, "code": "WRT-0000001", "partner": { "id": 1, "group": { "id": 1, "parent_id": 1, "name": "Поставщики", "child_count": 1, "last_update": 1693395102 }, "legal_status": "Legal", "name": "Coca-cola company", "fullname": "Eric George Blair", "boss_name": "Arthur", "address": "100017, A.Qodiriy ko’chasi 981 uy", "phones": "+998987654321", "description": "Book Shop", "inn": "123456789", "bank_name": "Ipak Yo'li Banki", "mfo": "00450", "rs": "29802000600000444085", "oked": "62.03.0", "vat_index": "12", "deleted_mark": false, "last_update": 1728627216 }, "stock": { "id": 1, "name": "Новомосковская", "address": "example", "firm": { "id": 1, "group": { "id": 1, "parent_id": 0, "name": "Предприятия", "child_count": 0, "last_update": 1715233269 }, "deleted_mark": false, "last_update": 1715863600, "name": "REGOS", "fullname": "ООО \"REGOS Software\"", "boss_name": "Андрей", "address": "Мукими, 8А", "phones": "+998987654321", "description": "EasyTrade successor", "inn": "305930137", "bank_name": "Ипак Йули", "mfo": "01101", "rs": "22125489632541254782", "oked": "62090", "vat_index": "1325489654785" }, "description": "example", "area": 1.1, "deleted_mark": false, "last_update": 1705583155 }, "currency": { "id": 1, "code_num": 123, "code_chr": "UZS", "name": "Узбекский сум", "exchange_rate": 1.1, "is_base": false, "deleted": false, "last_update": 1533619909 }, "contract": { "id": 1, "code": "example", "name": "example", "date": 1533619909, "start_date": 1533619909, "end_date": 1533619909, "partner_id": 1, "firm_id": 1, "direction": "Income", "currency_id": 1, "amount": 1.1, "details": "example", "description": "example", "attached_user_id": 1, "active": false, "deleted_mark": false } } ], "next_offset": 1, "total": 1 } ``` -------------------------------- ### ConnectedIntegration Get Response Example (JSON) Source: https://docs.regos.uz/ru/api/integrations/connectedintegration/get Example JSON response from the ConnectedIntegration Get endpoint. It shows the structure of the returned data, including a list of connected integrations with their details and schedule information. ```json { "ok": true, "result": [ { "key": "THIRD_INTEGRATION", "connected_integration_id": "FIRST_INTEGRATION", "owner": "Global", "handler": "MarketPlace", "scheduled": true, "schedule": { "scheduler_uuid": "550e8400-e29b-41d4-a716-446655440000", "period_type": "Day", "period_value": 1, "last_execute": "2024-04-25 14:30:15" }, "check_enabled": true, "is_active": true, "name": "Integration 3", "description": "third intefration", "image_url": "regos.uz/example.png" } ] } ``` -------------------------------- ### ItemImage Get Request Example (JSON) Source: https://docs.regos.uz/ru/api/references/itemimage/get Example POST request payload for the ItemImage Get endpoint. It demonstrates how to specify item IDs, image IDs, and flags for including compressed image data. ```json { "item_ids":[39,40], "ids":[23,24], "include_data":true, "compress_data":true } ``` -------------------------------- ### Add Partner Request Example (JSON) Source: https://docs.regos.uz/ru/api/references/partner/add Example JSON payload for the POST /v1/Partner/Add API endpoint. This demonstrates the structure and required fields for adding a new counterparty, including basic information and optional details. ```json { "group_id": 0, "legal_status": "Natural", "name": "Trade max", "fullName": "ООО Trade max", "boss_name": "ООО Trade max", "address": "Ташкент 11", "phones": "90 567-123-23, 91 345-89-21", "description": "Описание", "inn": "200100", "bank_name": "NBU", "mfo": "00040", "rs": "29802000600000444085", "oked": "123", "vat_index": "1325489654785" } ``` -------------------------------- ### ConnectedIntegration Get Request Example (JSON) Source: https://docs.regos.uz/ru/api/integrations/connectedintegration/get Example JSON payload for the ConnectedIntegration Get endpoint. This demonstrates how to specify optional parameters like integration keys, IDs, and include flags to filter the results. ```json { "keys": ["THIRD_INTEGRATION"], "connected_integration_ids": ["3"], "include_schedule": true, "include_name": true, "handler": "MarketPlace" } ``` -------------------------------- ### POST Request Example for Adding Opening Balance Source: https://docs.regos.uz/ru/api/documents/docopeningbalance/add This example demonstrates the JSON payload required to create a new opening balance document. It includes parameters such as date, partner ID, firm ID, debit and credit amounts, exchange rate, and currency ID. ```json { "date": 1534153454, "partner_id": 244, "firm_id": 2, "debit": 2340000.1, "credit": 160000.1, "exchange_rate": 10500.1, "currency_id": 2 } ``` -------------------------------- ### Get Target Settings Response Example Source: https://docs.regos.uz/ru/api/firm/targetsetting/get Example of a successful response from the /v1/TargetSetting/Get endpoint. It shows the 'ok' status and a 'result' array containing target setting objects, each with details like id, target_id, type, value, include status, and last update timestamp. ```json { "ok": true, "result": [ { "id": 1, "target_id": 1, "type": "Item", "value": 1, "include": true, "last_update": 1712345678 } ] } ``` -------------------------------- ### User Get API Response Example (JSON) Source: https://docs.regos.uz/ru/api/settings-and-security/user/get Example of a JSON response from the User Get endpoint. It includes a 'result' array containing user objects, pagination details like 'next_offset' and 'total', and an 'ok' status. ```json { "ok": true, "result": [ { "id": 1, "full_name": "John Fitzgerald Kennedy", "main_phone": "998123456789", "user_group": { "id": 1, "parent_id": 1, "name": "Administrators", "child_count": 1, "last_update": 1529755889 }, "enable_hints": true, "system": true, "seller_barcode": "1010000001000000", "last_update": 1532276019, "first_name": "John", "last_name": "Kennedy", "middle_name": "Fitzgerald", "sex": "Male", "date_of_birth": "1993-12-21", "address": "456 Elm Street, Suite 3, Los Angeles, CA 90001, USA", "phones": "998123456789", "email": "example@example.com", "description": "example", "login": "Admin", "can_authorize": true, "active": true, "language_code": "RUS" } ], "next_offset": 1, "total": 1 } ``` -------------------------------- ### Unit Get Request Example Source: https://docs.regos.uz/ru/api/references/unit/get Example JSON payload for the Unit Get endpoint. This demonstrates how to specify IDs, type, sorting preferences, search terms, and pagination limits for retrieving measurement unit data. ```json { "ids": [ 1 ], "type": 1, "sort_orders": [ { "column": "Name", "direction": "desc" } ], "search": "example", "limit": 20, "offset": 3 } ``` -------------------------------- ### Add Partner Response Example (JSON) Source: https://docs.regos.uz/ru/api/references/partner/add Example JSON response from the POST /v1/Partner/Add API endpoint. This shows the structure of a successful response, including a boolean indicating success and the ID of the newly created partner. ```json { "ok": true, "result": { "new_id": 16 } } ``` -------------------------------- ### Add Single Promo Program Setting (POST) Source: https://docs.regos.uz/ru/api/references/promoprogramsetting/addsingle Creates a new promotion setting. Requires program_id, key, and value as input. Returns the new_id of the created setting upon success. ```json { "program_id": 1, "key": "general_settings", "value": "{\"discount\":1,\"payment_type\":1}" } ``` -------------------------------- ### Partner Get Response Example (JSON) Source: https://docs.regos.uz/ru/api/references/partner/get An example JSON response from the Partner Get endpoint. It includes a success status, a list of partner objects, the next offset for pagination, and the total count of matching records. ```json { "ok": true, "result": [ { "id": 1, "group": { "id": 1, "parent_id": 1, "name": "Поставщики", "child_count": 1, "last_update": 1693395102 }, "legal_status": "Legal", "name": "Coca-cola company", "fullname": "Eric George Blair", "boss_name": "Arthur", "address": "100017, A.Qodiriy ko’chasi 981 uy", "phones": "+998987654321", "description": "Book Shop", "inn": "123456789", "bank_name": "Ipak Yo'li Banki", "mfo": "00450", "rs": "29802000600000444085", "oked": "62.03.0", "vat_index": "12", "deleted_mark": false, "last_update": 1728627216 } ], "next_offset": 1, "total": 1 } ``` -------------------------------- ### Example Request and Response for Wholesale Documents Source: https://docs.regos.uz/ru/api/store/docwholesale/get Demonstrates the structure of a request to retrieve wholesale documents and the corresponding success response, including sorting parameters. ```APIDOC ## GET /websites/regos_uz_ru_api/wholesale ### Description Retrieves a list of wholesale documents with optional filtering, sorting, and pagination. ### Method GET ### Endpoint /websites/regos_uz_ru_api/wholesale ### Parameters #### Query Parameters - **start_date** (integer) - Optional - Start date for filtering documents. - **end_date** (integer) - Optional - End date for filtering documents. - **ids** (array of integer) - Optional - Filter by document IDs. - **firm_ids** (array of integer) - Optional - Filter by firm IDs. - **stock_ids** (array of integer) - Optional - Filter by stock IDs. - **partner_ids** (array of integer) - Optional - Filter by partner IDs. - **contract_ids** (array of integer) - Optional - Filter by contract IDs. - **status_ids** (array of integer) - Optional - Filter by status IDs. - **attached_user_ids** (array of integer) - Optional - Filter by attached user IDs. - **limit** (integer) - Optional - Maximum number of documents to return. - **offset** (integer) - Optional - Offset for pagination. - **sort_orders** (array of SortOrder) - Optional - Specifies the sorting criteria. #### Request Body Not applicable for GET requests. ### Request Example ```json { "start_date":1534153454, "end_date":1534157896, "ids":[1], "firm_ids":[1], "stock_ids":[1], "partner_ids":[1], "contract_ids":[1], "status_ids":[1], "attached_user_ids":[1], "sort_orders": [ { "column": "Date", "direction":"Desc" } ], "limit":1, "offset":1 } ``` ### Response #### Success Response (200) - **result** (Array of DocWholeSale) - Array of wholesale documents. - **next_offset** (integer) - Offset for the next page of results. - **total** (integer) - Total number of documents available. #### Response Example ```json { "ok": true, "result": [ { "id": 1, "date": 1539784256, "code": "WSL-0000001", "partner": { "id": 1, "group": { "id": 1, "parent_id": 1, "name": "Поставщики", "child_count": 1, "last_update": 1693395102 }, "legal_status": "Legal", "name": "Coca-cola company", "fullname": "Eric George Blair", "boss_name": "Arthur", "address": "100017, A.Qodiriy ko’chasi 981 uy", "phones": "+998987654321", "description": "Book Shop", "inn": "123456789", "bank_name": "Ipak Yo'li Banki", "mfo": "00450", "rs": "29802000600000444085", "oked": "62.03.0", "vat_index": "12", "deleted_mark": false, "last_update": 1728627216 }, "stock": { "id": 1, "name": "Новомосковская", "address": "example", "firm": { "id": 1, "group": { "id": 1, "parent_id": 0, "name": "Предприятия", "child_count": 0, "last_update": 1715233269 }, "deleted_mark": false, "last_update": 1715863600, "name": "REGOS", "fullname": "ООО \"REGOS Software\"", "boss_name": "Андрей", "address": "Мукими, 8А", "phones": "+998987654321", "description": "EasyTrade successor", "inn": "305930137", "bank_name": "Ипак Йули", "mfo": "01101", "rs": "22125489632541254782", "oked": "62090", "vat_index": "1325489654785" }, "description": "example", "area": 1.1, "deleted_mark": false, "last_update": 1705583155 }, "currency": { "id": 1, "code_num": 123, "code_chr": "UZS", "name": "Узбекский сум", "exchange_rate": 1.1, "is_base": false, "deleted": false, "last_update": 1533619909 }, "contract": { "id": 1, "code": "example", "name": "example", "date": 1533619909, "start_date": 1533619909, "end_date": 1533619909, "partner_id": 1, "firm_id": 1, "direction": "Income", "currency_id": 1, "amount": 1.1, "details": "example", "description": "example", "attached_user_id": 1, "active": false, "deleted_mark": false, "last_update": 1533619909 }, "description": "example", "amount": 1400, "vat_calculation_type": "No", "exchange_rate": 1 } ], "next_offset": 2, "total": 10 } ``` ``` -------------------------------- ### Get Widget Types (JSON Example) Source: https://docs.regos.uz/ru/api/widgets/widgettype/get This snippet shows an example of the JSON response returned by the WidgetType Get endpoint. The response contains a boolean 'ok' status and a 'result' array, where each element represents a widget type with its properties. ```json { "ok": true, "result": [ { "id": 1, "name": "Мои цели", "name_key": "app_widget_type_1_name", "description": "app_widget_type_1_description", "last_update": 1712345678 } ] } ```