{ "openapi": "3.0.0", "info": { "title": "API Документация", "version": "1.1.1" }, "paths": { "/api/": {}, "/api/v1/supplier/registry": { "post": { "tags": [ "Реестр поставщиков привязанных к площадкам" ], "summary": "Добавление поставщика в ЕРП", "operationId": "2a526007e07eefe8db7c809b9c099186", "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "supplierIinBin", "agreementTextBase64", "signature" ], "properties": { "supplierIinBin": { "description": "ИИН или БИН поставщика", "type": "string", "example": "123456789012" }, "agreementTextBase64": { "description": "Текст соглашения в формате Base64", "type": "string", "example": "U29tZSBiYXNlNjQgdGV4dA==" }, "signature": { "description": "Электронная подпись", "type": "string", "example": "Подпись12345" } }, "type": "object" } } } }, "responses": { "201": { "description": "Успешное выполнение операции", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Операция выполнена успешно" } }, "type": "object" } } } }, "401": { "description": "Неавторизован" }, "422": { "description": "Ошибка валидации или обработки данных", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Ошибка: некорректные данные" } }, "type": "object" } } } }, "500": { "description": "Внутренняя ошибка сервера" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/supplier/info/{iin_bin}": { "get": { "tags": [ "Реестр поставщиков привязанных к площадкам" ], "summary": "Информация о конкретном поставщике в ЕРП", "operationId": "081afcc6d960bde1235750b472c882fd", "parameters": [ { "name": "iin_bin", "in": "path", "description": "ИИН или БИН поставщика", "required": true, "schema": { "type": "string", "example": "123456789012" } } ], "responses": { "200": { "description": "Успешное выполнение", "content": { "application/json": { "schema": { "properties": { "data": { "description": "Список поставщиков", "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 1 }, "platformId": { "type": "integer", "example": 123 }, "platformName": { "type": "string", "example": "Platform Name" }, "platformDescription": { "type": "string", "example": "Описание платформы" }, "supplierIinBin": { "type": "string", "example": "123456789012" }, "supplierNameRu": { "type": "string", "example": "Название поставщика на русском" }, "supplierNameGos": { "type": "string", "example": "Название поставщика на казахском языке" }, "registryDate": { "type": "string", "format": "date-time", "example": "2024-01-01 10:00:00" } }, "type": "object" } }, "availableRegistryDate": { "description": "Дата, когда будет доступно прикрепление к площадке", "type": "string", "format": "date-time", "example": "2024-01-02 10:00:00" } }, "type": "object" } } } }, "401": { "description": "Неавторизован" }, "422": { "description": "Ошибка валидации или обработки данных", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Ошибка: некорректные данные" } }, "type": "object" } } } }, "500": { "description": "Внутренняя ошибка сервера" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/supplier/blocks/{iin_bin}": { "get": { "tags": [ "Реестр поставщиков привязанных к площадкам" ], "summary": "Информация о блокировках поставщика по БИН/ИИН", "operationId": "2c340b55826c0d500f43e73fb87310bc", "parameters": [ { "name": "iin_bin", "in": "path", "description": "ИИН или БИН поставщика", "required": true, "schema": { "type": "string", "example": "123456789012" } } ], "responses": { "200": { "description": "Успешное выполнение", "content": { "application/json": { "schema": { "properties": { "data": { "description": "Список поставщиков", "type": "array", "items": { "properties": { "createdAt": { "description": "Дата создания блокировки", "type": "string", "format": "date-time", "example": "2024-01-01 10:00:00" }, "blockedFrom": { "description": "Дата начала блокировки", "type": "string", "format": "date-time", "example": "2024-02-01 10:00:00" }, "blockedTill": { "description": "Дата окончания блокировки", "type": "string", "format": "date-time", "example": "2024-02-15 10:00:00" }, "additionalData": { "description": "Дополнительная информация о блокировке", "properties": { "rejected": { "description": "кол-во отклоненых", "type": "integer", "example": 5 }, "total": { "description": "кол-во заказов", "type": "integer", "example": 6 }, "rejected_percent": { "description": "процент отклонения", "type": "numeric", "example": 83.33333333333333 } }, "type": "object" }, "reason": { "description": "Причина блокировки", "properties": { "id": { "type": "integer", "example": 1 }, "nameRu": { "type": "string", "example": "Причина блокировки на рус. языке" }, "nameGos": { "type": "string", "example": "Причина блокировки на гос. языке" }, "symbolCode": { "type": "string", "example": "SYMBOL_CODE" } }, "type": "object" } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Неавторизован" }, "422": { "description": "Ошибка валидации или обработки данных", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Ошибка: некорректные данные" } }, "type": "object" } } } }, "500": { "description": "Внутренняя ошибка сервера" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/supplier/list/": { "get": { "tags": [ "Реестр поставщиков привязанных к площадкам" ], "summary": "Список поставщиков ЕРП", "operationId": "0253d7b9e8596ac8fff570e1ae07c9e6", "requestBody": { "required": true, "content": { "application/json": { "schema": { "properties": { "filter": { "properties": { "supplierIinBin": { "type": "array", "items": { "type": "string", "example": "123456789012" } } }, "type": "object" }, "limit": { "type": "integer", "minimum": 1, "example": 10 }, "page": { "type": "integer", "minimum": 1, "example": 1 } }, "type": "object" } } } }, "responses": { "200": { "description": "Успешное выполнение", "content": { "application/json": { "schema": { "properties": { "data": { "description": "Список поставщиков", "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 1 }, "platformId": { "type": "integer", "example": 123 }, "platformName": { "type": "string", "example": "Platform Name" }, "platformDescription": { "type": "string", "example": "Описание платформы" }, "supplierIinBin": { "type": "string", "example": "123456789012" }, "supplierNameRu": { "type": "string", "example": "Название поставщика на русском" }, "supplierNameGos": { "type": "string", "example": "Название поставщика на казахском языке" }, "registryDate": { "type": "string", "format": "date-time", "example": "2024-01-01 10:00:00" } }, "type": "object" } }, "meta": { "description": "Метаданные пагинации", "properties": { "total": { "type": "integer", "example": 100 }, "count": { "type": "integer", "example": 10 } }, "type": "object" }, "links": { "description": "Ссылки пагинации", "properties": { "prev": { "type": "string", "example": "/api/v1/supplier/list?page=1&limit=10", "nullable": true }, "next": { "type": "string", "example": "/api/v1/supplier/list?page=3&limit=10", "nullable": true } }, "type": "object" } }, "type": "object" } } } }, "401": { "description": "Неавторизован" }, "422": { "description": "Ошибка валидации или обработки данных", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Ошибка: некорректные данные" } }, "type": "object" } } } }, "500": { "description": "Внутренняя ошибка сервера" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/distributors/registry": { "post": { "tags": [ "Дистрибьюторы" ], "summary": "Регистрация дистрибьютора", "operationId": "2def4ee40f9e4f85af01e2c8c82edc71", "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "type", "companyBinIin", "products" ], "properties": { "type": { "description": "Тип заявки", "type": "string", "enum": [ "DISTRIBUTOR", "SELF_DEALER", "OTP" ], "example": "DISTRIBUTOR" }, "companyBinIin": { "description": "ИИН/БИН компании (12 символов)", "type": "string", "example": "123456789012" }, "patentCertNumber": { "description": "Номер патентного сертификата (опционально)", "type": "string", "example": "CERT123", "nullable": true }, "products": { "type": "array", "items": { "required": [ "kztin", "regions" ], "properties": { "kztin": { "description": "KZTIN товара", "type": "string", "example": "KZ123456789" }, "regions": { "description": "Массив КАТО кодов регионов", "type": "array", "items": { "type": "string", "example": "010000000" } } }, "type": "object" } }, "fileUrls": { "description": "Ссылки на файлы заявки (опционально). Файлы скачиваются асинхронно", "type": "array", "items": { "type": "string", "format": "uri", "example": "https://example.com/document.pdf" }, "nullable": true } }, "type": "object" } } } }, "responses": { "200": { "description": "Успешная регистрация", "content": { "application/json": { "schema": { "properties": { "appId": { "type": "integer", "example": 123 }, "products": { "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 456 }, "kztin": { "type": "string", "example": "KZ123456789" } }, "type": "object" } } }, "type": "object" } } } }, "400": { "description": "Ошибка валидации" }, "404": { "description": "Компания или товар не найдены" }, "409": { "description": "Заявка уже существует" }, "422": { "description": "Невозможно зарегистрировать самостоятельного дилера" }, "500": { "description": "Внутренняя ошибка сервера" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/distributors/revoke": { "post": { "tags": [ "Дистрибьюторы" ], "summary": "Отзыв регистрации дистрибьютора", "operationId": "d696e0d433fef7c58ca5763d059338d2", "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "appId" ], "properties": { "appId": { "description": "ID заявки дистрибьютора", "type": "integer", "example": 123 } }, "type": "object" } } } }, "responses": { "200": { "description": "Заявка успешно отозвана", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Заявка успешно отозвана" } }, "type": "object" } } } }, "403": { "description": "Нет доступа к заявке" }, "404": { "description": "Заявка не найдена" }, "500": { "description": "Внутренняя ошибка сервера" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/distributors/dealers/add": { "post": { "tags": [ "Дистрибьюторы" ], "summary": "Добавление дилера", "operationId": "512b7e5a0c545639f6b55fa2dc08f00c", "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "distributorBinIin", "dealerBinIin", "products" ], "properties": { "distributorBinIin": { "description": "ИИН/БИН дистрибьютора (12 символов)", "type": "string", "example": "123456789012" }, "dealerBinIin": { "description": "ИИН/БИН дилера (12 символов)", "type": "string", "example": "111111111111" }, "products": { "type": "array", "items": { "required": [ "kztin", "regions" ], "properties": { "kztin": { "description": "KZTIN товара", "type": "string", "example": "KZ123456789" }, "regions": { "description": "Массив КАТО кодов регионов", "type": "array", "items": { "type": "string", "example": "010000000" } } }, "type": "object" } } }, "type": "object" } } } }, "responses": { "200": { "description": "Дилер успешно добавлен", "content": { "application/json": { "schema": { "type": "array", "items": { "properties": { "appId": { "type": "integer", "example": 123 }, "dealerBinIin": { "type": "string", "example": "111111111111" }, "dealers": { "type": "array", "items": { "properties": { "dealerId": { "type": "integer", "example": 456 }, "kztin": { "type": "string", "example": "KZ123456789" } }, "type": "object" } } }, "type": "object" } } } } }, "404": { "description": "Активная заявка дистрибьютора не найдена" }, "500": { "description": "Внутренняя ошибка сервера" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/distributors/dealers/remove": { "post": { "tags": [ "Дистрибьюторы" ], "summary": "Удаление дилера", "operationId": "2d72828816e2f30726c3b2753ced52b6", "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "distributorBinIin", "kztin", "dealerBinIins" ], "properties": { "distributorBinIin": { "description": "ИИН/БИН дистрибьютора (12 символов)", "type": "string", "example": "123456789012" }, "kztin": { "description": "KZTIN товара", "type": "string", "example": "KZ123456789" }, "dealerBinIins": { "description": "Массив ИИН/БИН дилеров для удаления", "type": "array", "items": { "type": "string", "example": "111111111111" } } }, "type": "object" } } } }, "responses": { "200": { "description": "Дилер успешно удален", "content": { "application/json": { "schema": { "properties": { "kztin": { "type": "string", "example": "KZ123456789" }, "message": { "type": "string", "example": "Дилер успешно удален" } }, "type": "object" } } } }, "404": { "description": "Дистрибьютор или дилер не найден" }, "410": { "description": "Дилер уже удален" }, "500": { "description": "Внутренняя ошибка сервера" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/distributors/regions": { "put": { "tags": [ "Дистрибьюторы" ], "summary": "Обновление регионов дилера или дистрибьютора", "operationId": "50f25363e3c92c2f499504f4688ca4ff", "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "distributorBinIin", "dealerBinIin", "kztin", "regions" ], "properties": { "distributorBinIin": { "description": "ИИН/БИН дистрибьютора (12 символов)", "type": "string", "example": "123456789012" }, "dealerBinIin": { "description": "ИИН/БИН дилера (12 символов). Если совпадает с distributorBinIin - обновляются регионы дистрибьютора", "type": "string", "example": "111111111111" }, "kztin": { "description": "KZTIN товара", "type": "string", "example": "KZ123456789" }, "regions": { "description": "Новый массив КАТО кодов регионов", "type": "array", "items": { "type": "string", "example": "010000000" } } }, "type": "object" } } } }, "responses": { "200": { "description": "Регионы успешно обновлены", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Регионы успешно обновлены" } }, "type": "object" } } } }, "403": { "description": "Нет доступа к заявке" }, "404": { "description": "Заявка или дилер не найден" }, "500": { "description": "Внутренняя ошибка сервера" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/distributors/info": { "get": { "tags": [ "Дистрибьюторы" ], "summary": "Получение информации о дистрибьюторах и дилерах (множество товаров)", "operationId": "84c547f026a4ebe85ba79e2dc1c4ab50", "parameters": [ { "name": "kztins[]", "in": "query", "description": "Массив KZTIN товаров", "required": true, "schema": { "type": "array", "items": { "type": "string", "example": "KZ123456789" } } }, { "name": "limit", "in": "query", "description": "Количество записей на страницу (по умолчанию 15)", "required": false, "schema": { "type": "integer", "example": 20 } } ], "responses": { "200": { "description": "Успешный ответ", "content": { "application/json": { "schema": { "properties": { "data": { "type": "array", "items": { "properties": { "kztin": { "type": "string", "example": "KZ123456789" }, "name_ru": { "type": "string", "example": "Название товара" }, "distributors": { "type": "array", "items": { "properties": { "distributorBinIin": { "type": "string", "example": "123456789012" }, "distributorName": { "type": "string", "example": "ТОО Дистрибьютор" }, "type": { "type": "string", "example": "distributor" }, "regions": { "type": "array", "items": { "type": "string", "example": "010000000" } }, "dealers": { "type": "array", "items": { "properties": { "dealerBinIin": { "type": "string", "example": "111111111111" }, "dealerName": { "type": "string", "example": "ТОО Дилер" }, "regions": { "type": "array", "items": { "type": "string", "example": "010000000" } } }, "type": "object" } } }, "type": "object" } } }, "type": "object" } }, "meta": { "properties": { "current_page": { "type": "integer", "example": 1 }, "total": { "type": "integer", "example": 50 }, "per_page": { "type": "integer", "example": 20 } }, "type": "object" } }, "type": "object" } } } }, "401": { "description": "Неавторизован" }, "500": { "description": "Внутренняя ошибка сервера" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/distributors/product/{kztin}": { "get": { "tags": [ "Дистрибьюторы" ], "summary": "Получение информации о дистрибьюторах и дилерах по одному товару", "operationId": "56aa922cbe25629ff88d830c746291b4", "parameters": [ { "name": "kztin", "in": "path", "description": "KZTIN товара", "required": true, "schema": { "type": "string", "example": "KZ123456789" } } ], "responses": { "200": { "description": "Успешный ответ", "content": { "application/json": { "schema": { "properties": { "kztin": { "type": "string", "example": "KZ123456789" }, "distributors": { "type": "array", "items": { "properties": { "appId": { "type": "integer", "example": 123 }, "companyName": { "type": "string", "example": "ТОО Дистрибьютор" }, "companyBinIin": { "type": "string", "example": "123456789012" }, "type": { "type": "string", "example": "distributor" }, "hasRightAddDealer": { "type": "boolean", "example": true }, "regions": { "type": "array", "items": { "properties": { "kato": { "type": "string", "example": "010000000" } }, "type": "object" } }, "dealers": { "type": "array", "items": { "properties": { "dealerBinIin": { "type": "string", "example": "111111111111" }, "dealerName": { "type": "string", "example": "ТОО Дилер" }, "regions": { "type": "array", "items": { "properties": { "kato": { "type": "string", "example": "010000000" } }, "type": "object" } } }, "type": "object" } } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Неавторизован" }, "500": { "description": "Внутренняя ошибка сервера" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/distributors/batch-import": { "post": { "tags": [ "Дистрибьюторы" ], "summary": "Массовый импорт дистрибьюторов с дилерами", "operationId": "3f5d3ffac5a21e23dd3613f72a833430", "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "distributors" ], "properties": { "distributors": { "description": "Массив дистрибьюторов (минимум 1, максимум 100)", "type": "array", "items": { "required": [ "type", "companyBinIin", "products" ], "properties": { "type": { "description": "Тип дистрибьютора", "type": "string", "example": "DISTRIBUTOR" }, "companyBinIin": { "description": "ИИН/БИН компании (12 символов)", "type": "string", "example": "123456789012" }, "patentCertNumber": { "description": "Номер патентного сертификата (опционально)", "type": "string", "example": "CERT123", "nullable": true }, "products": { "type": "array", "items": { "required": [ "kztin", "regions" ], "properties": { "kztin": { "type": "string", "example": "KZ123456789" }, "regions": { "type": "array", "items": { "type": "string", "example": "010000000" } } }, "type": "object" } }, "fileUrls": { "description": "Ссылки на файлы заявки (опционально)", "type": "array", "items": { "type": "string", "format": "uri", "example": "https://example.com/document.pdf" }, "nullable": true }, "dealers": { "description": "Дилеры (опционально)", "type": "array", "items": { "required": [ "dealerBinIin", "products" ], "properties": { "dealerBinIin": { "type": "string", "example": "111111111111" }, "products": { "type": "array", "items": { "required": [ "kztin", "regions" ], "properties": { "kztin": { "type": "string", "example": "KZ123456789" }, "regions": { "type": "array", "items": { "type": "string", "example": "010000000" } } }, "type": "object" } } }, "type": "object" } } }, "type": "object" } } }, "type": "object" } } } }, "responses": { "200": { "description": "Результат импорта", "content": { "application/json": { "schema": { "properties": { "success": { "description": "Всегда true если запрос выполнен", "type": "boolean", "example": true }, "total": { "description": "Всего дистрибьюторов в запросе", "type": "integer", "example": 10 }, "successful": { "description": "Успешно обработано", "type": "integer", "example": 9 }, "failed": { "description": "Ошибок", "type": "integer", "example": 1 }, "details": { "type": "array", "items": { "properties": { "index": { "type": "integer", "example": 0 }, "companyBinIin": { "type": "string", "example": "123456789012" }, "status": { "type": "string", "enum": [ "success", "failed" ], "example": "success" }, "appId": { "description": "Только при status=success", "type": "integer", "example": 123 }, "error": { "description": "Только при status=failed", "type": "string", "example": "Компания не найдена" }, "dealersProcessed": { "description": "Количество успешно добавленных дилеров", "type": "integer", "example": 2 }, "dealers": { "description": "Информация о дилерах", "type": "array", "items": { "properties": { "dealerBinIin": { "type": "string", "example": "111111111111" }, "status": { "type": "string", "enum": [ "success", "failed" ], "example": "success" }, "error": { "description": "Только при status=failed", "type": "string", "example": "Дилер не найден" }, "dealers": { "description": "Только при status=success", "type": "array", "items": { "properties": { "dealerId": { "type": "integer", "example": 456 }, "kztin": { "type": "string", "example": "KZ123456789" } }, "type": "object" } } }, "type": "object" } } }, "type": "object" } } }, "type": "object" } } } }, "400": { "description": "Ошибка валидации" }, "500": { "description": "Внутренняя ошибка сервера" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/contract/{id}": { "get": { "tags": [ "Договоры" ], "summary": "Информация по договору", "operationId": "52d063cfe88e0c2863da1074948b0a0f", "parameters": [ { "name": "id", "in": "path", "description": "Идентификатор договора", "required": true, "schema": { "type": "integer", "example": 1 } } ], "responses": { "200": { "description": "Успешное выполнение", "content": { "application/json": { "schema": { "properties": { "data": { "description": "Данные по договору", "properties": { "id": { "type": "integer", "example": 1 }, "contract_id": { "type": "integer", "example": 597140 }, "contract_root_id": { "type": "integer", "example": 597140 }, "contract_number_sys": { "type": "string", "example": "971140000775/240302/00" }, "status": { "type": "integer", "example": 190 }, "contract_sum": { "type": "number", "format": "float", "example": "6000000.00" }, "contract_sum_wnds": { "type": "number", "format": "float", "example": "6000000.00" }, "fact_sum": { "type": "number", "format": "float", "example": "0.00" }, "fact_sum_wnds": { "type": "number", "format": "float", "example": "0.00" }, "sign_date": { "type": "string", "format": "date-time", "example": "2024-10-11 11:49:50" }, "plan_end_date": { "type": "string", "format": "date-time", "example": "2024-12-31 16:52:59" }, "fact_end_date": { "type": "string", "format": "date-time", "example": null }, "is_additional": { "type": "boolean", "example": false }, "units": { "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 1 }, "point_id": { "type": "integer", "example": 4715778 }, "point_root_id": { "type": "integer", "example": 4715778 }, "order_id": { "type": "integer", "example": 11223359 }, "order_root_id": { "type": "integer", "example": 11223359 }, "contract_sum": { "type": "number", "format": "float", "example": "6000000.00" }, "contract_sum_wnds": { "type": "number", "format": "float", "example": "6000000.00" }, "fact_sum": { "type": "number", "format": "float", "example": "0.00" }, "fact_sum_wnds": { "type": "number", "format": "float", "example": "0.00" }, "supply_date_ru": { "type": "integer", "example": "12" }, "supply_date_kz": { "type": "integer", "example": "12" } }, "type": "object" } } }, "type": "object" } }, "type": "object" } } } }, "401": { "description": "Неавторизован" }, "500": { "description": "Внутренняя ошибка сервера" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/plans": { "get": { "tags": [ "Получение планов" ], "summary": "Получение планов", "operationId": "b082eccc03e992bf0ecee9c437fb51f6", "requestBody": { "required": true, "content": { "application/json": { "schema": { "properties": { "filter": { "properties": { "ref_trade_methods_id": { "type": "array", "items": { "type": "integer", "example": 60 } }, "pln_point_year": { "type": "array", "items": { "type": "integer", "example": 2024 } }, "ref_subject_type_id": { "type": "integer", "example": 1 }, "ref_pln_point_status_id": { "type": "array", "items": { "type": "integer", "example": 2 } }, "is_active": { "type": "integer", "example": 1 }, "is_deleted": { "type": "integer", "example": 0 } }, "type": "object" }, "page": { "type": "integer", "example": 1 }, "limit": { "type": "integer", "example": 10 } }, "type": "object" } } } }, "responses": { "200": { "description": "Успешное выполнение", "content": { "application/json": { "schema": { "properties": { "data": { "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 1 }, "rootrecordId": { "type": "integer", "example": 123 }, "sysSubjectsId": { "type": "integer", "example": 456 }, "subjectBiin": { "type": "string", "example": "123456789012" }, "subjectNameRu": { "type": "string", "example": "Название субъекта на русском" }, "subjectNameKz": { "type": "string", "example": "Название субъекта на казахском" }, "nameRu": { "type": "string", "example": "План на русском" }, "nameKz": { "type": "string", "example": "План на казахском" }, "refTradeMethodsId": { "type": "integer", "example": 2 }, "refUnitsCode": { "type": "string", "example": "код" }, "count": { "type": "integer", "example": 5 }, "price": { "type": "number", "format": "float", "example": 100.5 }, "amount": { "type": "number", "format": "float", "example": 500 }, "refMonthsId": { "type": "integer", "example": 7 }, "refPlnPointStatusId": { "type": "integer", "example": 3 }, "plnPointYear": { "type": "integer", "example": 2024 }, "refSubjectTypeId": { "type": "integer", "example": 1 }, "refEnstruCode": { "type": "string", "example": "EN123" }, "descKz": { "type": "string", "example": "Описание на казахском" }, "descRu": { "type": "string", "example": "Описание на русском" }, "extraDescKz": { "type": "string", "example": "Дополнительное описание на казахском" }, "extraDescRu": { "type": "string", "example": "Дополнительное описание на русском" }, "supplyDateRu": { "type": "string", "format": "date-time", "example": "2024-01-01T00:00:00Z" }, "disablePersonId": { "type": "integer", "example": 123 }, "systemId": { "type": "integer", "example": 456 }, "isPrimary": { "type": "boolean", "example": true }, "PlansKato": { "description": "Список мест доставки", "type": "array", "items": { "properties": { "id": { "description": "Идентификатор записи", "type": "integer", "example": 1 }, "plnPointsId": { "description": "Идентификатор точки плана", "type": "integer", "example": 123 }, "refKatoCode": { "description": "Код KATO", "type": "string", "example": "KATO123" }, "refCountriesCode": { "description": "Код страны", "type": "string", "example": "KZ" }, "fullDeliveryPlaceNameRu": { "description": "Полное название места доставки на русском", "type": "string", "example": "Полное название на русском" }, "fullDeliveryPlaceNameKz": { "description": "Полное название места доставки на казахском", "type": "string", "example": "Толық атау қазақша" }, "count": { "description": "Количество", "type": "integer", "example": 10 }, "isActive": { "description": "Активность записи", "type": "boolean", "example": true }, "isDeleted": { "description": "Флаг удаления", "type": "boolean", "example": false }, "systemId": { "description": "Идентификатор системы", "type": "integer", "example": 456 }, "indexDate": { "description": "Дата индексации", "type": "string", "format": "date-time", "example": "2024-01-01T10:00:00Z" } }, "type": "object" } } }, "type": "object" } }, "meta": { "properties": { "total": { "type": "integer", "example": 100 }, "count": { "type": "integer", "example": 10 } }, "type": "object" }, "links": { "properties": { "prev": { "type": "string", "example": "/api/v1/plans?page=1", "nullable": true }, "next": { "type": "string", "example": "/api/v1/plans?page=3", "nullable": true } }, "type": "object" } }, "type": "object" } } } }, "400": { "description": "Неверные параметры запроса", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string", "example": "error" }, "message": { "type": "string", "example": "Неверные параметры запроса" } }, "type": "object" } } } }, "500": { "description": "Внутренняя ошибка сервера" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/refs/ref_kato": { "get": { "tags": [ "Справочники" ], "summary": "Получение справочника КАТО", "operationId": "6db292d0b3f4cb3f6f8dd41b4e6ee341", "requestBody": { "required": true, "content": { "application/json": { "schema": { "properties": { "page": { "type": "integer", "example": 1 }, "limit": { "type": "integer", "example": 10 } }, "type": "object" } } } }, "responses": { "200": { "description": "Успешное выполнение", "content": { "application/json": { "schema": { "properties": { "data": { "description": "Список записей справочника KATO", "type": "array", "items": { "properties": { "nameGos": { "type": "string", "example": "Название на государственном" }, "nameRu": { "type": "string", "example": "Название на русском" }, "level": { "type": "integer", "example": 1 }, "fullNameRu": { "type": "string", "example": "Полное название на русском" }, "fullNameGos": { "type": "string", "example": "Полное название на государственном" }, "code": { "type": "string", "example": "K123" }, "parentCode": { "type": "string", "example": "P123" } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Неавторизован" }, "422": { "description": "Ошибка валидации" }, "500": { "description": "Внутренняя ошибка сервера" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/refs/ref_enstru": { "get": { "tags": [ "Справочники" ], "summary": "Получение справочника ЕНСТРУ", "operationId": "78f63bcde9e4727c63e362c7a45e634e", "requestBody": { "required": true, "content": { "application/json": { "schema": { "properties": { "page": { "type": "integer", "example": 1 }, "limit": { "type": "integer", "example": 10 } }, "type": "object" } } } }, "responses": { "200": { "description": "Успешное выполнение", "content": { "application/json": { "schema": { "properties": { "data": { "description": "Список записей справочника Enstru", "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 1 }, "nameRu": { "type": "string", "example": "Название на русском" }, "nameGos": { "type": "string", "example": "Название на государственном" }, "code": { "type": "string", "example": "E123" }, "parentId": { "type": "integer", "example": 10 }, "level": { "type": "integer", "example": 1 }, "r": { "type": "string", "example": "r" }, "g": { "type": "string", "example": "g" }, "s": { "type": "string", "example": "s" }, "descRu": { "type": "string", "example": "Описание на русском" }, "descGos": { "type": "string", "example": "Описание на государственном" }, "mkei": { "type": "string", "example": "MKEI123" }, "edizm": { "type": "string", "example": "единица измерения" } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Неавторизован" }, "422": { "description": "Ошибка валидации" }, "500": { "description": "Внутренняя ошибка сервера" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/refs/rnu": { "get": { "tags": [ "Справочники" ], "summary": "Справочник РНУ", "operationId": "173bacf05d3444974c572432d9c65e9e", "requestBody": { "required": true, "content": { "application/json": { "schema": { "properties": { "page": { "type": "integer", "example": 1 }, "limit": { "type": "integer", "example": 10 }, "filter": { "properties": { "supplierIinBin": { "type": "string", "example": "750421402532" } }, "type": "object" } }, "type": "object" } } } }, "responses": { "200": { "description": "Успешное выполнение", "content": { "application/json": { "schema": { "properties": { "data": { "description": "Список записей справочника RNU", "type": "array", "items": { "description": "Информация о записи", "properties": { "id": { "description": "Идентификатор записи", "type": "integer", "example": 123 }, "pid": { "description": "Идентификатор родителя", "type": "integer", "example": 123 }, "supplierNameRu": { "description": "Название поставщика на русском", "type": "string", "example": "Товарищество с ограниченной ответственностью БИОЛОГИЯ МОРЯ" }, "supplierNameKz": { "description": "Название поставщика на казахском", "type": "string", "example": "БИОЛОГИЯ МОРЯ жауапкершілігі шектеулі серіктестігі" }, "supplierBiin": { "description": "БИН поставщика", "type": "string", "example": "123456789012" }, "supplierInnunp": { "description": "ИНН/УНП поставщика", "type": "string", "example": null, "nullable": true }, "systemId": { "description": "Идентификатор системы", "type": "integer", "example": 1 }, "startDate": { "description": "Дата начала", "type": "string", "format": "date-time", "example": "2023-07-31 00:00:00" }, "endDate": { "description": "Дата окончания", "type": "string", "format": "date-time", "example": "2025-07-31 00:00:00" }, "katoList": { "description": "Список KATO", "type": "array", "items": { "type": "integer" }, "example": [ 614830100 ] }, "indexDate": { "description": "Дата последнего обновления индекса", "type": "string", "format": "date-time", "example": "2024-10-04 09:41:57" } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Неавторизован" }, "422": { "description": "Ошибка валидации" }, "500": { "description": "Внутренняя ошибка сервера" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/refs/ref_enstru_national": { "get": { "tags": [ "Справочники" ], "summary": "Справочник нац изъятия", "operationId": "2de925e055044c93253b09e00a38db4e", "requestBody": { "required": true, "content": { "application/json": { "schema": { "properties": { "page": { "type": "integer", "example": 1 }, "limit": { "type": "integer", "example": 10 }, "filter": { "properties": { "nationalCodes": { "type": "array", "items": { "type": "string", "example": "262013.000.000011" } } }, "type": "object" } }, "type": "object" } } } }, "responses": { "200": { "description": "Успешное выполнение", "content": { "application/json": { "schema": { "properties": { "data": { "description": "Список записей справочника Enstru National", "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 1 }, "enstruCode": { "type": "string", "example": "EN123" }, "startDate": { "type": "string", "format": "date-time", "example": "2024-01-01" }, "endDate": { "type": "string", "format": "date-time", "example": "2024-12-31" }, "enstruTypeId": { "type": "integer", "example": 10 } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Неавторизован" }, "422": { "description": "Ошибка валидации" }, "500": { "description": "Внутренняя ошибка сервера" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/refs/ref_units": { "get": { "tags": [ "Справочники" ], "summary": "Получение единиц измерения", "operationId": "4543b0f6bca6548d445aa9927233aeda", "requestBody": { "required": true, "content": { "application/json": { "schema": { "properties": { "page": { "type": "integer", "example": 1 }, "limit": { "type": "integer", "example": 10 }, "filter": { "properties": { "code": { "type": "string", "example": "001" }, "alpha_code": { "type": "string", "example": "nm" } }, "type": "object" } }, "type": "object" } } } }, "responses": { "200": { "description": "Успешное выполнение", "content": { "application/json": { "schema": { "properties": { "data": { "description": "Список записей справочника Units", "type": "array", "items": { "properties": { "code": { "type": "string", "example": "U123" }, "code2": { "type": "string", "example": "U12" }, "alphaCode": { "type": "string", "example": "UA" }, "nameRu": { "type": "string", "example": "Название на русском" }, "nameGos": { "type": "string", "example": "Название на государственном" }, "refSyncVer": { "type": "integer", "example": 1 }, "refSyncFlag": { "type": "boolean", "example": true }, "ord": { "type": "integer", "example": 5 }, "searchRu": { "type": "string", "example": "Поиск на русском" }, "searchGos": { "type": "string", "example": "Поиск на государственном" } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Неавторизован" }, "422": { "description": "Ошибка валидации" }, "500": { "description": "Внутренняя ошибка сервера" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/subjects": { "get": { "tags": [ "Справочники" ], "summary": "Реестр участников", "operationId": "077831759840a33122ba3fe7b94639c6", "requestBody": { "required": true, "content": { "application/json": { "schema": { "properties": { "page": { "type": "integer", "example": 1 }, "limit": { "type": "integer", "example": 10 }, "biin": { "type": "string", "example": "123456789012" } }, "type": "object" } } } }, "responses": { "200": { "description": "Успешное выполнение", "content": { "application/json": { "schema": { "properties": { "data": { "description": "Список субъектов", "type": "array", "items": { "description": "Объект субъекта с динамическими полями, преобразованными в camelCase", "type": "object", "additionalProperties": true } }, "meta": { "description": "Метаданные пагинации", "properties": { "total": { "type": "integer", "example": 100 }, "count": { "type": "integer", "example": 10 } }, "type": "object" }, "links": { "description": "Ссылки пагинации", "properties": { "prev": { "type": "string", "example": "/api/v1/subjects?page=1&limit=10", "nullable": true }, "next": { "type": "string", "example": "/api/v1/subjects?page=3&limit=10", "nullable": true } }, "type": "object" } }, "type": "object" } } } }, "422": { "description": "Ошибка обработки запроса", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "Ошибка: некорректные данные" } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/subject_address/{pid}": { "get": { "tags": [ "Справочники" ], "summary": "Получение информации о адресе компании", "operationId": "ff804e532ae79ba71ecfcd32974c1cc5", "parameters": [ { "name": "pid", "in": "path", "description": "ID родителя", "required": true, "schema": { "type": "integer", "example": 1 } } ], "responses": { "200": { "description": "Успешное выполнение", "content": { "application/json": { "schema": { "properties": { "id": { "description": "Идентификатор записи", "type": "integer", "example": 1 }, "pid": { "description": "Идентификатор субъекта", "type": "integer", "example": 123 }, "indexDate": { "description": "Дата индексации", "type": "string", "format": "date-time", "example": "2024-01-01T00:00:00Z" }, "dateCreate": { "description": "Дата создания записи", "type": "string", "format": "date-time", "example": "2024-01-01T10:00:00Z" }, "editDate": { "description": "Дата последнего изменения", "type": "string", "format": "date-time", "example": "2024-01-02T10:00:00Z" }, "katoCode": { "description": "Код KATO", "type": "string", "example": "KATO123" }, "refSourceCode": { "description": "Код источника", "type": "string", "example": "SOURCE123" }, "addressType": { "description": "Тип адреса", "type": "string", "example": "Residential" }, "address": { "description": "Адрес", "type": "string", "example": "г. Астана, ул. Ленина, д. 10" }, "phone": { "description": "Контактный телефон", "type": "string", "example": "+77012345678" }, "systemId": { "description": "Идентификатор системы", "type": "integer", "example": 456 } }, "type": "object" } } } }, "401": { "description": "Неавторизован" }, "422": { "description": "Ошибка валидации" }, "500": { "description": "Внутренняя ошибка сервера" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/notice": { "get": { "tags": [ "Уведомления" ], "summary": "Получение уведомлений", "operationId": "6d321a2bdc191c5dbcbbc6780bba55e7", "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "dateFrom", "dateTo" ], "properties": { "dateFrom": { "description": "Дата начала диапазона фильтрации", "type": "string", "format": "date-time", "example": "2024-12-14 00:00:00.000000" }, "dateTo": { "description": "Дата конца диапазона фильтрации", "type": "string", "format": "date-time", "example": "2024-12-31 00:00:00.000000" }, "type": { "description": "Тип уведомления (код из справочника `ref_notification_types`)", "type": "string", "example": "CREATE_ORDER" }, "typeIn": { "description": "Список типов уведомлений через запятую (вхождение)", "type": "string", "example": "ORDER_WAITING_CONFIRM,ORDER_PROLONG_DATE" }, "typeNotIn": { "description": "Список типов уведомлений через запятую (исключение)", "type": "string", "example": "CHANGE_POINT,STOP_PLATFORM" } }, "type": "object" } } } }, "responses": { "200": { "description": "Успешный ответ", "content": { "application/json": { "schema": { "properties": { "data": { "type": "array", "items": { "properties": { "createdAt": { "type": "string", "format": "date-time", "example": "2024-11-29 10:00:00" }, "type": { "type": "string", "example": "CREATE_ORDER" }, "link": { "type": "string", "example": "https://example.com/details/123", "nullable": true } }, "type": "object" } }, "meta": { "type": "array", "items": { "properties": { "total": { "type": "integer", "example": 123 }, "count": { "type": "integer", "example": 123 } }, "type": "object" } }, "links": { "type": "array", "items": { "properties": { "prev": { "type": "string", "example": "https://example.com" }, "next": { "type": "string", "example": "https://example.com" } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Неавторизован" }, "422": { "description": "Ошибка валидации фильтров" }, "500": { "description": "Внутренняя ошибка сервера" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/order/offers": { "post": { "tags": [ "Подача ЦП" ], "summary": "Принятие ЦП", "operationId": "bcc266a83eeefd6329dbdb2ebf99f362", "requestBody": { "content": { "application/json": { "schema": { "required": [ "orderId", "plans" ], "properties": { "orderId": { "type": "integer", "example": 123 }, "plans": { "type": "array", "items": { "required": [ "planNumber", "products" ], "properties": { "planNumber": { "type": "integer", "example": 1 }, "products": { "type": "array", "items": { "required": [ "kztin", "offers" ], "properties": { "kztin": { "type": "string", "example": "123456789012" }, "offers": { "type": "array", "items": { "required": [ "supplierIinBin", "priceNoNds", "priceWithNds", "isNds", "publishedAt" ], "properties": { "supplierIinBin": { "type": "string", "example": "123456789012" }, "priceNoNds": { "type": "number", "format": "float", "example": 1000.5 }, "priceWithNds": { "type": "number", "format": "float", "example": 1200.6 }, "isNds": { "type": "boolean", "example": true }, "publishedAt": { "type": "string", "format": "date-time", "example": "2024-12-11 12:00:00" } }, "type": "object" } } }, "type": "object" } } }, "type": "object" } } }, "type": "object" } } } }, "responses": { "200": { "description": "Предложения успешно обработаны", "content": { "application/json": { "schema": { "properties": { "data": { "properties": { "orderId": { "type": "integer", "example": 5006044 }, "acceptedOffers": { "type": "array", "items": { "properties": { "supplierIinBin": { "type": "string", "example": "821128401916" }, "planNumber": { "type": "string", "example": "140" }, "kztin": { "type": "string", "example": "2874007760018" }, "priceNoNds": { "type": "number", "example": 100 }, "priceWithNds": { "type": "number", "example": 116 } }, "type": "object" } }, "rejectedOffers": { "type": "array", "items": { "properties": { "kztin": { "type": "string", "example": "2874007760018" }, "planNumber": { "type": "string", "example": "140" }, "supplierIinBin": { "type": "string", "example": "200340003928" }, "priceNoNds": { "type": "number", "example": 4500 }, "priceWithNds": { "type": "number", "example": 5220 }, "rejectReasonCode": { "type": "integer", "example": 320 }, "rejectReason": { "type": "string", "example": "Поставщик заблокирован" }, "priceRegulation": { "properties": { "median": { "type": "number", "example": 1000 }, "upper_coefficient": { "type": "number", "example": 2.5 }, "max_price": { "type": "number", "example": 2500 } }, "type": "object", "nullable": true } }, "type": "object" } } }, "type": "object" } }, "type": "object" } } } }, "401": { "description": "Неавторизован" }, "422": { "description": "Ошибка валидации" }, "500": { "description": "Внутренняя ошибка сервера" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/order/list": { "get": { "tags": [ "Заказы/Предзаказы" ], "summary": "Сведения о заказах", "operationId": "b035730d2c7f49ac132c00a1e183565f", "requestBody": { "required": true, "content": { "application/json": { "schema": { "properties": { "perPage": { "description": "Количество элементов на странице", "type": "integer", "example": 10 }, "customerBinIin": { "description": "БИН/ИИН клиента", "type": "string", "example": "123456789012" }, "status": { "description": "Статус заказа", "type": "integer", "example": 1 }, "platformName": { "description": "Название платформы", "type": "string", "example": "Platform Name" }, "platformBin": { "description": "БИН платформы", "type": "string", "example": "123456789012" }, "orderId": { "description": "ID заказа", "type": "integer", "example": 123 }, "type": { "description": "Тип заказа", "type": "string", "enum": [ "order", "preorder" ], "example": "order" } }, "type": "object" } } } }, "responses": { "200": { "description": "Успешно получен список товаров", "content": { "application/json": { "schema": { "properties": { "data": { "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 123 }, "type": { "type": "string", "enum": [ "order", "preorder" ], "example": "order" }, "preorderId": { "type": "integer", "example": 123 }, "status": { "type": "array", "items": { "properties": { "symbol_code": { "type": "string", "example": "abc" }, "nameRu": { "type": "string", "example": "Название на русском" }, "nameGos": { "type": "string", "example": "Название на казахском" } }, "type": "object" } }, "unitedLot": { "type": "boolean", "example": false }, "customer": { "properties": { "binIin": { "type": "string", "example": "123456789012" }, "nameGos": { "type": "string", "example": "Гос название" }, "nameRu": { "type": "string", "example": "Название на русском" }, "createdAt": { "type": "string", "format": "date-time", "example": "2024-01-01T00:00:00Z" } }, "type": "object" }, "platform": { "properties": { "name": { "type": "string", "example": "Платформа" }, "binIin": { "type": "string", "example": "123456789012" } }, "type": "object" }, "plans": { "type": "array", "items": { "properties": { "planId": { "type": "integer", "example": 123 }, "rootRecordId": { "type": "integer", "example": 456 }, "enstru": { "type": "string", "example": "Example Enstru" }, "nameRu": { "type": "string", "example": "План на русском" }, "count": { "type": "number", "format": "float", "example": 10.5 }, "isDisableSign": { "type": "boolean", "example": false }, "isNationalExemption": { "type": "boolean", "example": false }, "purchaseType": { "type": "string", "example": "Тип закупки" }, "price": { "type": "number", "format": "float", "example": 100.5 }, "amount": { "type": "number", "format": "float", "example": 1050 }, "supplyDate": { "type": "string", "example": "декабрь, 2025 года" }, "products": { "type": "array", "items": { "properties": { "nameRu": { "type": "string", "example": "Продукт на русском" }, "kztin": { "type": "string", "example": "KZ123456" }, "unitId": { "type": "integer", "example": 123 }, "additionServices": { "type": "array", "items": { "type": "string", "example": "service_code" } }, "deliveryPlaces": { "type": "array", "items": { "properties": { "kato": { "type": "string", "example": "KATO123" }, "count": { "type": "number", "format": "float", "example": 5 } }, "type": "object" } } }, "type": "object" } }, "deliveryInfo": { "type": "array", "items": { "properties": { "kato": { "type": "string", "example": "KATO123" }, "streetType": { "type": "string", "example": "Street" }, "address": { "type": "string", "example": "ул. Ленина" }, "houseNumber": { "type": "string", "example": "10" }, "apartmentNumber": { "type": "string", "example": "5" }, "recipientFullName": { "type": "string", "example": "Иван Иванов" }, "recipientPhoneNumber": { "type": "string", "example": "+77012345678" } }, "type": "object" } } }, "type": "object" } }, "decision": { "properties": { "supplierIinBin": { "type": "string", "example": "123456789012" }, "platformId": { "type": "integer", "example": 123 }, "platformName": { "type": "string", "example": "Platform Name" }, "deadline": { "type": "string", "format": "date-time", "example": "2024-01-01T23:59:59Z" }, "products": { "type": "array", "items": { "properties": { "planNumber": { "type": "integer", "example": 123 }, "kztin": { "type": "string", "example": "0123456789012" } }, "type": "object" } }, "status": { "type": "string", "example": "Approved" } }, "type": "object" }, "dates": { "properties": { "offerStartDate": { "type": "string", "format": "date-time", "example": "2024-01-01T09:00:00Z" }, "offerEndDate": { "type": "string", "format": "date-time", "example": "2024-01-10T18:00:00Z" }, "deadlineDate": { "type": "string", "format": "date-time", "example": "2024-01-20T23:59:59Z" } }, "type": "object" }, "createdAt": { "type": "string", "format": "date-time", "example": "2024-01-01T00:00:00Z" }, "isSpecialOrder": { "type": "boolean", "example": false } }, "type": "object" } }, "meta": { "type": "array", "items": { "properties": { "total": { "type": "integer", "example": 123 }, "count": { "type": "integer", "example": 123 } }, "type": "object" } }, "links": { "type": "array", "items": { "properties": { "prev": { "type": "string", "example": "https://example.com" }, "next": { "type": "string", "example": "https://example.com" } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Неавторизован" }, "422": { "description": "Ошибка валидации" }, "500": { "description": "Внутренняя ошибка сервера" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/order/{order}": { "get": { "tags": [ "Заказы/Предзаказы" ], "summary": "Просмотр заказа", "operationId": "c2c9e6b62393f9a42721f3924f6c4f04", "parameters": [ { "name": "order", "in": "path", "description": "Идентификатор заказа", "required": true, "schema": { "type": "integer", "example": 1 } } ], "responses": { "200": { "description": "Успешно получен список товаров", "content": { "application/json": { "schema": { "properties": { "data": { "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 123 }, "type": { "type": "string", "example": "order/preorder" }, "preorderId": { "type": "integer", "example": 123 }, "status": { "type": "array", "items": { "properties": { "symbol_code": { "type": "string", "example": "abc" }, "nameRu": { "type": "string", "example": "Название на русском" }, "nameGos": { "type": "string", "example": "Название на казахском" } }, "type": "object" } }, "unitedLot": { "type": "boolean", "example": false }, "customer": { "properties": { "binIin": { "type": "string", "example": "123456789012" }, "nameGos": { "type": "string", "example": "Гос название" }, "nameRu": { "type": "string", "example": "Название на русском" }, "createdAt": { "type": "string", "format": "date-time", "example": "2024-01-01T00:00:00Z" } }, "type": "object" }, "platform": { "properties": { "name": { "type": "string", "example": "Платформа" }, "binIin": { "type": "string", "example": "123456789012" } }, "type": "object" }, "plans": { "type": "array", "items": { "properties": { "planId": { "type": "integer", "example": 123 }, "rootRecordId": { "type": "integer", "example": 456 }, "enstru": { "type": "string", "example": "Example Enstru" }, "nameRu": { "type": "string", "example": "План на русском" }, "count": { "type": "number", "format": "float", "example": 10.5 }, "isDisableSign": { "type": "boolean", "example": false }, "isNationalExemption": { "type": "boolean", "example": false }, "purchaseType": { "type": "string", "example": "Тип закупки" }, "price": { "type": "number", "format": "float", "example": 100.5 }, "amount": { "type": "number", "format": "float", "example": 1050 }, "supplyDate": { "type": "string", "example": "декабрь, 2025 года" }, "products": { "type": "array", "items": { "properties": { "nameRu": { "type": "string", "example": "Продукт на русском" }, "kztin": { "type": "string", "example": "KZ123456" }, "unitId": { "type": "integer", "example": 123 }, "additionServices": { "type": "array", "items": { "type": "string", "example": "service_code" } }, "deliveryPlaces": { "type": "array", "items": { "properties": { "kato": { "type": "string", "example": "KATO123" }, "count": { "type": "number", "format": "float", "example": 5 } }, "type": "object" } } }, "type": "object" } }, "deliveryInfo": { "type": "array", "items": { "properties": { "kato": { "type": "string", "example": "KATO123" }, "streetType": { "type": "string", "example": "Street" }, "address": { "type": "string", "example": "ул. Ленина" }, "houseNumber": { "type": "string", "example": "10" }, "apartmentNumber": { "type": "string", "example": "5" }, "recipientFullName": { "type": "string", "example": "Иван Иванов" }, "recipientPhoneNumber": { "type": "string", "example": "+77012345678" } }, "type": "object" } } }, "type": "object" } }, "decision": { "properties": { "supplierIinBin": { "type": "string", "example": "123456789012" }, "platformId": { "type": "integer", "example": 123 }, "platformName": { "type": "string", "example": "Platform Name" }, "products": { "type": "array", "items": { "properties": { "planNumber": { "type": "integer", "example": 123 }, "kztin": { "type": "string", "example": "0123456789012" } }, "type": "object" } }, "deadline": { "type": "string", "format": "date-time", "example": "2024-01-01T23:59:59Z" }, "status": { "type": "string", "example": "Approved" } }, "type": "object" }, "dates": { "properties": { "offerStartDate": { "type": "string", "format": "date-time", "example": "2024-01-01T09:00:00Z" }, "offerEndDate": { "type": "string", "format": "date-time", "example": "2024-01-10T18:00:00Z" }, "deadlineDate": { "type": "string", "format": "date-time", "example": "2024-01-20T23:59:59Z" } }, "type": "object" }, "createdAt": { "type": "string", "format": "date-time", "example": "2024-01-01T00:00:00Z" }, "isSpecialOrder": { "type": "boolean", "example": false } }, "type": "object" } }, "meta": { "type": "array", "items": { "properties": { "total": { "type": "integer", "example": 123 }, "count": { "type": "integer", "example": 123 } }, "type": "object" } }, "links": { "type": "array", "items": { "properties": { "prev": { "type": "string", "example": "https://example.com" }, "next": { "type": "string", "example": "https://example.com" } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Неавторизован" }, "422": { "description": "Ошибка валидации" }, "500": { "description": "Внутренняя ошибка сервера" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/order/registry": { "post": { "tags": [ "Заказы/Предзаказы" ], "summary": "Создание заказа", "operationId": "28d4f09779b3258985f1c2c8cfcc8d22", "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "orderCreatedDate", "customer", "orders" ], "properties": { "orderCreatedDate": { "type": "string", "format": "date-time", "example": "2024-01-01 10:00:00" }, "customer": { "required": [ "bin", "createdUserIin", "signature" ], "properties": { "bin": { "type": "string", "maxLength": 12, "minLength": 12, "example": "123456789012" }, "createdUserIin": { "type": "string", "maxLength": 12, "minLength": 12, "example": "123456789012" }, "signature": { "type": "string", "example": "signature_string" } }, "type": "object" }, "orders": { "type": "array", "items": { "required": [ "unitedLot", "plans" ], "properties": { "onlyPreorder": { "type": "boolean", "example": true }, "unitedLot": { "type": "boolean", "example": false }, "plans": { "type": "array", "items": { "required": [ "planId", "planNumber", "deliveryInfo", "products" ], "properties": { "planId": { "type": "integer", "example": 1 }, "planNumber": { "type": "integer", "example": 123 }, "deliveryInfo": { "type": "array", "items": { "required": [ "kato", "streetTypeCode", "address", "recipientFullName", "recipientPhoneNumber" ], "properties": { "kato": { "type": "string", "example": "KATO123" }, "streetTypeCode": { "type": "string", "example": "ул" }, "address": { "type": "string", "example": "ул. Ленина" }, "houseNumber": { "type": "string", "example": "10", "nullable": true }, "apartmentNumber": { "type": "string", "example": "5", "nullable": true }, "recipientFullName": { "type": "string", "example": "Иван Иванов" }, "recipientPhoneNumber": { "type": "string", "example": "+77012345678" } }, "type": "object" } }, "products": { "type": "array", "items": { "required": [ "kztin", "unitId", "deliveryPlaces" ], "properties": { "kztin": { "type": "string", "example": "KZ123456" }, "unitId": { "type": "integer", "example": 123 }, "additionServiceCodes": { "type": "array", "items": { "type": "string", "example": "service_code" }, "nullable": true }, "deliveryPlaces": { "type": "array", "items": { "required": [ "kato", "cnt" ], "properties": { "kato": { "type": "string", "example": "KATO123" }, "cnt": { "type": "number", "format": "float", "example": 5 } }, "type": "object" } } }, "type": "object" } } }, "type": "object" } } }, "type": "object" } } }, "type": "object" } } } }, "responses": { "201": { "description": "Операция выполнена успешно", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer", "example": 1 }, "plans": { "description": "Список планов", "type": "array", "items": { "properties": { "planId": { "type": "integer", "example": 1 }, "planNumber": { "type": "integer", "example": 123 } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Неавторизован" }, "422": { "description": "Ошибка валидации" }, "500": { "description": "Внутренняя ошибка сервера" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/order/confirm": { "post": { "tags": [ "Заказы/Предзаказы" ], "summary": "Подтверждение заказа", "operationId": "16c0c7ebfb95c62f6826a74ddb606c6d", "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "orderId", "supplierBinIin", "products" ], "properties": { "orderId": { "type": "integer", "example": 123 }, "supplierBinIin": { "type": "string", "example": "123456789012" }, "products": { "type": "array", "items": { "required": [ "kztin" ], "properties": { "kztin": { "type": "string", "example": "KZ123456" } }, "type": "object" } } }, "type": "object" } } } }, "responses": { "200": { "description": "Успешное выполнение операции", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string", "example": "success" }, "orderStatus": { "type": "integer", "example": 1 } }, "type": "object" } } } }, "401": { "description": "Неавторизован" }, "422": { "description": "Ошибка валидации" }, "500": { "description": "Внутренняя ошибка сервера" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/order/reject": { "post": { "tags": [ "Заказы/Предзаказы" ], "summary": "Отклонение заказа", "operationId": "dc23799b7f0e57abb1ead33ee9b45d7c", "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "orderId", "supplierBinIin", "rejectReasonCode" ], "properties": { "orderId": { "description": "Идентификатор заказа", "type": "integer", "example": 123 }, "supplierBinIin": { "description": "БИН/ИИН поставщика", "type": "string", "example": "123456789012" }, "rejectReasonCode": { "description": "Код причины отклонения", "type": "integer", "example": 1 } }, "type": "object" } } } }, "responses": { "200": { "description": "Успешное отклонение заказа", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string", "example": "success" }, "orderStatus": { "description": "Текущий статус заказа", "type": "integer", "example": 2 } }, "type": "object" } } } }, "401": { "description": "Неавторизован" }, "422": { "description": "Ошибка валидации" }, "500": { "description": "Внутренняя ошибка сервера" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/order/exclude-reason/{order}/{supplier}/{reason}": { "get": { "tags": [ "Заказы/Предзаказы" ], "summary": "Отклонение заказа", "operationId": "48ef8ac1fe4ca43e56a6ad1263bc9992", "parameters": [ { "name": "order", "in": "path", "description": "Идентификатор заказа", "required": true, "schema": { "type": "integer", "example": 1 } }, { "name": "supplier", "in": "path", "description": "БИН/ИИН поставщика", "required": true, "schema": { "type": "string", "example": "123456789012" } }, { "name": "reason", "in": "path", "description": "Идентификатор причины отклонения", "required": true, "schema": { "type": "integer", "example": 100 } } ], "responses": { "200": { "description": "Информация об отклонении поставщика", "content": { "application/json": { "schema": { "properties": { "orderId": { "description": "Идентификатор заказа", "type": "integer", "example": 1 }, "supplierId": { "description": "Идентификатор поставщика", "type": "integer", "example": 123 }, "rejectReason": { "properties": { "id": { "description": "Идентификатор причины отклонения", "type": "integer", "example": 100 }, "reject_reason": { "description": "Текст причины отклонения", "type": "string", "example": "Поставщик заблокирован" }, "reject_reason_gos": { "description": "Текст причины отклонения на гос. языке", "type": "string", "example": "Поставщик заблокирован" }, "symbol_code": { "description": "Код причины отклонения", "type": "string", "example": "SupplierBlocked" } }, "type": "object" } }, "type": "object" } } } }, "401": { "description": "Неавторизован" }, "422": { "description": "Ошибка валидации" }, "500": { "description": "Внутренняя ошибка сервера" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/nda/generate/{orderId}": { "post": { "tags": [ "NDA" ], "summary": "Генерация NDA (соглашения о неразглашении) для заказа", "description": "Генерирует NDA документ для заказа по его ID. NDA требуется подписать перед подтверждением заказа. Только платформа, создавшая заказ, может генерировать NDA для него.", "operationId": "83b17c8911b9aba97aaa715dc4e6e119", "parameters": [ { "name": "orderId", "in": "path", "description": "ID заказа", "required": true, "schema": { "type": "integer", "example": 123 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "person_full_name", "person_iin" ], "properties": { "person_full_name": { "description": "ФИО ответственного лица, которое будет подписывать NDA", "type": "string", "maxLength": 500, "example": "Иванов Иван Иванович" }, "person_iin": { "description": "ИИН ответственного лица", "type": "string", "maxLength": 12, "minLength": 12, "example": "123456789012" } }, "type": "object" } } } }, "responses": { "200": { "description": "NDA успешно сгенерирован", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string", "example": "success" }, "message": { "type": "string", "example": "NDA успешно сгенерирован" }, "data": { "properties": { "nda_id": { "description": "ID сгенерированного NDA", "type": "integer", "example": 456 }, "download_url": { "description": "URL для скачивания PDF файла NDA", "type": "string", "example": "https://api.example.com/file/download/789" } }, "type": "object" } }, "type": "object" } } } }, "401": { "description": "Неавторизован" }, "403": { "description": "Доступ запрещен - заказ создан другой платформой", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string", "example": "error" }, "message": { "type": "string", "example": "Доступ запрещен. Вы не можете генерировать NDA для заказа другой платформы" } }, "type": "object" } } } }, "404": { "description": "Заказ не найден", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string", "example": "error" }, "message": { "type": "string", "example": "Заказ не найден" } }, "type": "object" } } } }, "422": { "description": "Ошибка валидации", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "ИИН должен содержать 12 символов" }, "errors": { "properties": { "person_iin": { "type": "array", "items": { "type": "string", "example": "ИИН должен содержать 12 символов" } } }, "type": "object" } }, "type": "object" } } } }, "500": { "description": "Внутренняя ошибка сервера", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string", "example": "error" }, "message": { "type": "string", "example": "Описание ошибки" }, "errors": { "type": "string", "example": "Описание ошибки" } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/nda/sign/{ndaId}": { "post": { "tags": [ "NDA" ], "summary": "Подписание NDA с использованием ЭЦП", "description": "Подписывает сгенерированный NDA документ электронной цифровой подписью. После успешного подписания заказ может быть подтвержден. Только платформа, создавшая NDA, может его подписать.", "operationId": "84d32143fee31bf013ca302dc6666464", "parameters": [ { "name": "ndaId", "in": "path", "description": "ID NDA документа", "required": true, "schema": { "type": "integer", "example": 456 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "signature", "person_iin" ], "properties": { "signature": { "description": "CMS подпись NDA документа в формате Base64", "type": "string", "example": "MIIGzQYJKoZIhvcNAQcCoIIGvjCCBroCAQExDjAMBgorBgEEAYI3AgEE..." }, "person_iin": { "description": "ИИН лица, подписывающего документ", "type": "string", "maxLength": 12, "minLength": 12, "example": "123456789012" } }, "type": "object" } } } }, "responses": { "200": { "description": "NDA успешно подписан", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string", "example": "success" }, "message": { "type": "string", "example": "NDA успешно подписан" }, "data": { "properties": { "nda_id": { "type": "integer", "example": 456 }, "order_id": { "type": "integer", "example": 123 }, "is_signed": { "type": "boolean", "example": true }, "signed_at": { "type": "string", "format": "date-time", "example": "2025-11-25 10:30:00" } }, "type": "object" } }, "type": "object" } } } }, "400": { "description": "Невалидная подпись", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string", "example": "error" }, "message": { "type": "string", "example": "Невалидная подпись" }, "errors": { "type": "string", "example": "Невалидная подпись" } }, "type": "object" } } } }, "401": { "description": "Неавторизован" }, "403": { "description": "Доступ запрещен - NDA создан другой платформой", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string", "example": "error" }, "message": { "type": "string", "example": "Доступ запрещен. Вы не можете подписать NDA другой платформы" } }, "type": "object" } } } }, "404": { "description": "NDA не найден", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string", "example": "error" }, "message": { "type": "string", "example": "NDA не найден" } }, "type": "object" } } } }, "422": { "description": "Ошибка валидации", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "ИИН должен содержать 12 символов" }, "errors": { "properties": { "person_iin": { "type": "array", "items": { "type": "string", "example": "ИИН должен содержать 12 символов" } } }, "type": "object" } }, "type": "object" } } } }, "500": { "description": "Внутренняя ошибка сервера", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string", "example": "error" }, "message": { "type": "string", "example": "Описание ошибки" }, "errors": { "type": "string", "example": "Описание ошибки" } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/protocol/{protocol}": { "get": { "tags": [ "Протоколы итогов" ], "summary": "Получение информации о ПИ", "operationId": "91602a662835ab721499d29ffa9271c9", "parameters": [ { "name": "protocol", "in": "path", "description": "ID протокола заказа", "required": true, "schema": { "type": "integer", "example": 123 } } ], "responses": { "200": { "description": "Успешное выполнение", "content": { "application/json": { "schema": { "properties": { "id": { "type": "integer", "example": 123 }, "orderId": { "type": "integer", "example": 456 }, "type": { "type": "string", "example": "protocol_type" }, "status": { "properties": { "id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "Protocol Status" } }, "type": "object" }, "winner": { "properties": { "supplierId": { "type": "integer", "example": 123 }, "nameRu": { "type": "string", "example": "Название на русском" }, "nameGos": { "type": "string", "example": "Название на казахском языке" }, "binIin": { "type": "string", "example": "123456789012" }, "platform": { "properties": { "id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "Platform Name" }, "description": { "type": "string", "example": "Описание платформы" } }, "type": "object" }, "orderAmountNoNds": { "type": "number", "format": "float", "example": 1000.5 }, "orderAmountWithNds": { "type": "number", "format": "float", "example": 1200.6 }, "publishDate": { "type": "string", "format": "date-time", "example": "2024-01-01T10:00:00Z" }, "platformPublishDate": { "type": "string", "format": "date-time", "example": "2024-01-01T10:00:00Z" }, "status": { "type": "string", "example": "confirmed" }, "statusUpdateDate": { "type": "string", "format": "date-time", "example": "2024-01-01T12:00:00Z", "nullable": true }, "reason": { "properties": { "id": { "type": "integer", "example": 1 }, "text": { "type": "string", "example": "Причина отклонения" } }, "type": "object", "nullable": true }, "exclusionReasonText": { "description": "Текст причины исключения поставщика при рассмотрении проекта ППИ", "type": "string", "example": "Поставщик не соответствует требованиям по срокам поставки", "nullable": true }, "offers": { "type": "array", "items": { "properties": { "planNumber": { "type": "integer", "example": 555555 }, "priceNoNds": { "type": "number", "format": "float", "example": 500.5 }, "priceWithNds": { "type": "number", "format": "float", "example": 500.5 }, "quantity": { "type": "number", "format": "float", "example": 10.5 }, "kztin": { "type": "number", "format": "float", "example": "1111111111111" }, "amountNoNds": { "type": "number", "format": "float", "example": 500.5 }, "amountWithNds": { "type": "number", "format": "float", "example": 500.5 } }, "type": "object" } } }, "type": "object", "nullable": true }, "suppliers": { "type": "array", "items": { "properties": { "supplierId": { "type": "integer", "example": 123 }, "nameRu": { "type": "string", "example": "Название на русском" }, "nameGos": { "type": "string", "example": "Название на казахском языке" }, "binIin": { "type": "string", "example": "123456789012" }, "platform": { "properties": { "id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "Platform Name" }, "description": { "type": "string", "example": "Описание платформы" } }, "type": "object" }, "orderAmountNoNds": { "type": "number", "format": "float", "example": 1000.5 }, "orderAmountWithNds": { "type": "number", "format": "float", "example": 1200.6 }, "publishDate": { "type": "string", "format": "date-time", "example": "2024-01-01T10:00:00Z" }, "platformPublishDate": { "type": "string", "format": "date-time", "example": "2024-01-01T10:00:00Z" }, "status": { "type": "string", "example": "confirmed" }, "statusUpdateDate": { "type": "string", "format": "date-time", "example": "2024-01-01T12:00:00Z", "nullable": true }, "reason": { "properties": { "id": { "type": "integer", "example": 1 }, "text": { "type": "string", "example": "Причина отклонения" } }, "type": "object", "nullable": true }, "exclusionReasonText": { "description": "Текст причины исключения поставщика при рассмотрении проекта ППИ", "type": "string", "example": "Поставщик не соответствует требованиям по срокам поставки", "nullable": true }, "offers": { "type": "array", "items": { "properties": { "planNumber": { "type": "integer", "example": 555555 }, "priceNoNds": { "type": "number", "format": "float", "example": 500.5 }, "priceWithNds": { "type": "number", "format": "float", "example": 500.5 }, "quantity": { "type": "number", "format": "float", "example": 10.5 }, "kztin": { "type": "number", "format": "float", "example": "1111111111111" }, "amountNoNds": { "type": "number", "format": "float", "example": 500.5 }, "amountWithNds": { "type": "number", "format": "float", "example": 500.5 } }, "type": "object" } } }, "type": "object" } }, "protocolFileId": { "type": "integer" }, "protocolFileUrl": { "type": "string" }, "rejectReason": { "properties": { "id": { "type": "integer", "example": 2 }, "rejectReasonRu": { "type": "string", "example": "представлено менее двух ценовых предложений" }, "rejectReasonGos": { "type": "string", "example": "представлено менее двух ценовых предложений" }, "symbolCode": { "type": "string", "example": "NOT_ENOUGH_PRICE_OFFERS" } }, "type": "object", "nullable": true } }, "type": "object" } } } }, "401": { "description": "Неавторизован" }, "422": { "description": "Ошибка валидации" }, "500": { "description": "Внутренняя ошибка сервера" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/order-protocols/{protocol}/review": { "post": { "tags": [ "Протоколы итогов" ], "summary": "Рассмотрение проекта предварительного протокола итогов (ППИ)", "description": "Рассмотрение проекта ППИ с возможностью исключения поставщиков и указания индивидуальных текстовых причин исключения. После рассмотрения создается предварительный протокол итогов в статусе 'Ожидает подписания'.", "operationId": "883ebe01dcbcc1cbb28cf12cc5fd927d", "parameters": [ { "name": "protocol", "in": "path", "description": "ID протокола (должен быть проектом ППИ)", "required": true, "schema": { "type": "integer", "example": 456 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "excluded_suppliers" ], "properties": { "excluded_suppliers": { "description": "Массив исключаемых поставщиков с индивидуальными причинами исключения", "type": "array", "items": { "required": [ "bin_iin", "reason_text" ], "properties": { "bin_iin": { "description": "БИН/ИИН поставщика для исключения", "type": "string", "maxLength": 12, "minLength": 12, "example": "123456789012" }, "reason_text": { "description": "Текст причины исключения поставщика", "type": "string", "maxLength": 1000, "example": "Поставщик не соответствует требованиям по срокам поставки, указанным в спецификации заказа" } }, "type": "object" }, "example": [ { "bin_iin": "123456789012", "reason_text": "Не предоставлены необходимые сертификаты качества на продукцию" }, { "bin_iin": "987654321098", "reason_text": "Предложенная цена превышает установленный лимит бюджета на 25%" } ] } }, "type": "object" } } } }, "responses": { "200": { "description": "Успешное создание предварительного протокола итогов", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string", "example": "success" }, "message": { "type": "string", "example": "Создан предварительный протокол для подписания ID457" } }, "type": "object" } } } }, "401": { "description": "Неавторизован" }, "403": { "description": "Доступ запрещен - рассмотрение доступно только платформе, создавшей заказ", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string", "example": "error" }, "message": { "type": "string", "example": "Рассмотрение проекта ППИ доступно только с платформы оформившей заказ" }, "errors": { "type": "string", "example": "Рассмотрение проекта ППИ доступно только с платформы оформившей заказ" } }, "type": "object" } } } }, "422": { "description": "Ошибка валидации или невалидный статус протокола", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string", "example": "error" }, "message": { "type": "string", "example": "Протокол не является проектом предварительного протокола итогов" }, "errors": { "type": "string", "example": "Протокол не является проектом предварительного протокола итогов" } }, "type": "object" } } } }, "500": { "description": "Внутренняя ошибка сервера", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string", "example": "error" }, "message": { "type": "string", "example": "Описание ошибки" }, "errors": { "type": "string", "example": "Описание ошибки" } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/order-protocols/{protocol}/sign": { "post": { "tags": [ "Протоколы итогов" ], "summary": "Подписание предварительного протокола итогов", "description": "Подписание предварительного протокола итогов с использованием ЭЦП", "operationId": "9015fd0b7066d7c1e845f62b790fd8de", "parameters": [ { "name": "protocol", "in": "path", "description": "ID протокола", "required": true, "schema": { "type": "integer", "example": 457 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "iin", "signature" ], "properties": { "iin": { "description": "ИИН подписывающего лица", "type": "string", "example": "123456789012" }, "signature": { "description": "CMS подпись протокола", "type": "string", "example": "MIIGzQYJKoZIhvcNAQcCoIIGvjCCBroCAQExDjAMBgorBgEEAYI3AgEE..." } }, "type": "object" } } } }, "responses": { "200": { "description": "Протокол успешно подписан", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string", "example": "success" }, "message": { "type": "string", "example": "Протокол успешно подписан" }, "data": { "properties": { "protocol_id": { "type": "integer", "example": 457 }, "order_id": { "type": "integer", "example": 123 } }, "type": "object" } }, "type": "object" } } } }, "400": { "description": "Невалидная подпись" }, "401": { "description": "Неавторизован" }, "403": { "description": "Доступ запрещен" }, "422": { "description": "Ошибка валидации" }, "500": { "description": "Внутренняя ошибка сервера" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/preorder/{preorderId}": { "get": { "tags": [ "Заказы/Предзаказы" ], "summary": "Просмотр предзаказа", "operationId": "ab45b64b7d26dd05db64638d8f057d6a", "parameters": [ { "name": "preorderId", "in": "path", "description": "Идентификатор предзаказа", "required": true, "schema": { "type": "integer", "example": 1 } } ], "responses": { "200": { "description": "Успешное выполнение", "content": { "application/json": { "schema": { "properties": { "preorderId": { "description": "Идентификатор предзаказа", "type": "integer", "example": 1 }, "unitedLot": { "description": "Объединённый лот", "type": "boolean", "example": false }, "purchaseType": { "description": "Тип закупки", "type": "string", "example": "Закупка" }, "status": { "description": "Статус предзаказа", "type": "string", "example": "Активный" }, "offerStartDate": { "description": "Дата начала подачи предложений", "type": "string", "format": "date-time", "example": "2024-01-01T10:00:00Z" }, "offerEndDate": { "description": "Дата окончания подачи предложений", "type": "string", "format": "date-time", "example": "2024-01-05T10:00:00Z" }, "offerList": { "description": "Список предложений", "type": "array", "items": { "properties": { "offerId": { "description": "Идентификатор предложения", "type": "integer", "example": 101 }, "supplierIinBin": { "description": "БИН/ИИН поставщика", "type": "string", "example": "123456789012" }, "supplierName": { "description": "Название поставщика", "type": "string", "example": "Название поставщика" }, "amountNoNds": { "description": "Сумма без НДС", "type": "number", "format": "float", "example": 1000.5 }, "amountWithNds": { "description": "Сумма с НДС", "type": "number", "format": "float", "example": 1200.6 }, "publishedAt": { "description": "Дата публикации предложения", "type": "string", "format": "date-time", "example": "2024-01-01 15:00:00" }, "platformId": { "description": "Идентификатор платформы", "type": "integer", "example": 10 }, "platformName": { "description": "Название платформы", "type": "string", "example": "Платформа" }, "products": { "description": "Список продуктов предложения", "type": "array", "items": { "properties": { "kztin": { "description": "Код продукта (KZTIN)", "type": "string", "example": "KZ123456" }, "productName": { "description": "Название продукта", "type": "string", "example": "Продукт 1" }, "planNumber": { "description": "Номер плана", "type": "integer", "example": 456 }, "unit_id": { "description": "Идентификатор единицы измерения", "type": "integer", "example": 1 }, "priceNoNds": { "description": "Цена без НДС", "type": "number", "format": "float", "example": 500.25 }, "priceWithNds": { "description": "Цена с НДС", "type": "number", "format": "float", "example": 600.3 }, "amountNoNds": { "description": "Сумма без НДС", "type": "number", "format": "float", "example": 1000.5 }, "amountWithNds": { "description": "Сумма с НДС", "type": "number", "format": "float", "example": 1200.6 } }, "type": "object" } } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Неавторизован" }, "422": { "description": "Ошибка валидации" }, "500": { "description": "Внутренняя ошибка сервера" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/refs/orders/ref_street_types": { "get": { "tags": [ "Справочники" ], "summary": "Справочник типов улиц", "operationId": "71f083c127de5f9030869295538a2fa2", "requestBody": { "required": true, "content": { "application/json": { "schema": { "properties": { "page": { "type": "integer", "example": 1 }, "limit": { "type": "integer", "example": 10 } }, "type": "object" } } } }, "responses": { "200": { "description": "Успешное выполнение", "content": { "application/json": { "schema": { "properties": { "data": { "description": "Список типов улиц", "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 1 }, "nameRu": { "type": "string", "example": "Улица на русском" }, "shortNameRu": { "type": "string", "example": "Короткое название на русском" }, "nameGos": { "type": "string", "example": "Улица на казахском" }, "shortNameGos": { "type": "string", "example": "Короткое название на казахском" }, "code": { "type": "string", "example": "Код" } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Неавторизован" }, "500": { "description": "Внутренняя ошибка сервера" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/refs/orders/ref_order_addition_services": { "get": { "tags": [ "Справочники" ], "summary": "Справочник доп услуг", "operationId": "1b71cfab8991dae06e85e407c085dc6a", "requestBody": { "required": true, "content": { "application/json": { "schema": { "properties": { "page": { "type": "integer", "example": 1 }, "limit": { "type": "integer", "example": 10 } }, "type": "object" } } } }, "responses": { "200": { "description": "Успешное выполнение", "content": { "application/json": { "schema": { "properties": { "data": { "description": "Список дополнительных услуг", "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 1 }, "code": { "type": "string", "example": "Код" }, "nameRu": { "type": "string", "example": "Название на русском" }, "nameGos": { "type": "string", "example": "Название на казахском" } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Неавторизован" }, "500": { "description": "Внутренняя ошибка сервера" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/refs/orders/ref_order_reject_reasons": { "get": { "tags": [ "Справочники" ], "summary": "Справочник причин отклонения", "operationId": "a13e76c108a95f77e4d3e1d007029932", "requestBody": { "required": true, "content": { "application/json": { "schema": { "properties": { "page": { "type": "integer", "example": 1 }, "limit": { "type": "integer", "example": 10 } }, "type": "object" } } } }, "responses": { "200": { "description": "Успешное выполнение", "content": { "application/json": { "schema": { "properties": { "data": { "description": "Список причин отклонения заказа", "type": "array", "items": { "properties": { "id": { "type": "integer", "example": 1 }, "nameRu": { "type": "string", "example": "Причина на русском" }, "nameGos": { "type": "string", "example": "Причина на казахском" }, "egzId": { "type": "integer", "example": 10 }, "penalties": { "type": "string", "example": "Штрафы" } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Неавторизован" }, "500": { "description": "Внутренняя ошибка сервера" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/special-order/registry": { "post": { "tags": [ "Заказы по особому порядку" ], "summary": "Создание заказа по особому порядку", "description": "Создание заказов для компаний, имеющих доступ к особому порядку закупок. Заказы создаются с подписью заказчика и автоматически отправляются в систему ЕГЗ.", "operationId": "e07b5839ff18ebb002a349d939a2a777", "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "orderCreatedDate", "customer", "orders" ], "properties": { "orderCreatedDate": { "description": "Дата и время создания заказа на торговой площадке", "type": "string", "format": "date-time", "example": "2025-11-25 10:30:00" }, "customer": { "description": "Информация о заказчике", "required": [ "bin", "createdUserIin", "signature" ], "properties": { "bin": { "description": "БИН заказчика", "type": "string", "maxLength": 12, "minLength": 12, "example": "123456789012" }, "createdUserIin": { "description": "ИИН пользователя, создавшего заказ", "type": "string", "maxLength": 12, "minLength": 12, "example": "987654321098" }, "signature": { "description": "ЭЦП заказчика в формате Base64", "type": "string", "example": "MIIGzQYJKoZIhvcNAQcCoIIGvjCCBroCAQExDjAMBgorBgEEAYI3AgEE..." } }, "type": "object" }, "orders": { "description": "Массив заказов для создания", "type": "array", "items": { "required": [ "purchaseType", "unitedLot", "deliveryInfo", "units" ], "properties": { "purchaseType": { "description": "Тип закупки: 1 - Первичная, 2 - Повторная", "type": "integer", "enum": [ 1, 2 ], "example": 1 }, "unitedLot": { "description": "Признак объединённой партии", "type": "boolean", "example": false }, "deliveryInfo": { "description": "Информация о местах доставки", "type": "array", "items": { "required": [ "guid", "kato", "streetTypeCode", "address", "recipientFullName", "recipientPhoneNumber" ], "properties": { "guid": { "description": "Уникальный идентификатор адреса", "type": "string", "example": "550e8400-e29b-41d4-a716-446655440000" }, "kato": { "description": "Код КАТО", "type": "string", "example": "751010000" }, "streetTypeCode": { "description": "Код типа улицы", "type": "string", "example": "STR" }, "address": { "description": "Адрес доставки", "type": "string", "example": "ул. Абая" }, "houseNumber": { "description": "Номер дома", "type": "string", "example": "15", "nullable": true }, "apartmentNumber": { "description": "Номер квартиры", "type": "string", "example": "25", "nullable": true }, "recipientFullName": { "description": "ФИО получателя", "type": "string", "example": "Иванов Иван Иванович" }, "recipientPhoneNumber": { "description": "Телефон получателя", "type": "string", "example": "+77012345678" } }, "type": "object" } }, "units": { "description": "Предметы заказа", "type": "array", "items": { "required": [ "enstru", "cnt", "unitId", "products", "deliveryPlaces" ], "properties": { "enstru": { "description": "Код ЕНСТРУ", "type": "string", "example": "12345678" }, "cnt": { "description": "Количество", "type": "number", "format": "float", "example": 10.5 }, "unitId": { "description": "ID единицы измерения", "type": "integer", "example": 1 }, "products": { "description": "Товары в предмете заказа", "type": "array", "items": { "required": [ "kztin", "unitId" ], "properties": { "kztin": { "description": "Код КЗТИН товара", "type": "string", "example": "1234567890123" }, "unitId": { "description": "ID единицы измерения", "type": "integer", "example": 1 }, "additionServiceCodes": { "description": "Коды дополнительных услуг", "type": "array", "items": { "type": "string", "example": "SRV001" }, "nullable": true } }, "type": "object" } }, "deliveryPlaces": { "description": "Места доставки для предмета заказа", "type": "array", "items": { "required": [ "guid", "cnt" ], "properties": { "guid": { "description": "GUID адреса из deliveryInfo", "type": "string", "example": "550e8400-e29b-41d4-a716-446655440000" }, "cnt": { "description": "Количество для доставки", "type": "number", "format": "float", "example": 5.5 } }, "type": "object" } } }, "type": "object" } } }, "type": "object" } } }, "type": "object" } } } }, "responses": { "201": { "description": "Заказы успешно созданы", "content": { "application/json": { "schema": { "properties": { "orders": { "description": "Массив созданных заказов", "type": "array", "items": { "properties": { "id": { "description": "ID созданного заказа", "type": "integer", "example": 123 }, "rootrecord_id": { "description": "ID заказа в системе", "type": "integer", "example": 456 }, "type": { "description": "Тип заказа", "type": "string", "example": "order" }, "is_special_order": { "description": "Признак особого порядка", "type": "boolean", "example": true }, "status": { "properties": { "id": { "type": "integer", "example": 1 }, "name": { "type": "string", "example": "Создан" } }, "type": "object" }, "customer": { "properties": { "bin_iin": { "type": "string", "example": "123456789012" }, "name_ru": { "type": "string", "example": "ТОО Заказчик" }, "name_gos": { "type": "string", "example": "ЖШС Тапсырыс беруші" } }, "type": "object" }, "created_at": { "type": "string", "format": "date-time", "example": "2025-11-25T10:30:00Z" } }, "type": "object" } }, "message": { "type": "string", "example": "Операция выполнена успешно" } }, "type": "object" } } } }, "401": { "description": "Неавторизован" }, "422": { "description": "Ошибка валидации или обработки данных", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", "example": "БИН клиента должен содержать 12 символов" }, "trace": { "description": "Stack trace (только в не-production окружении)", "type": "string", "example": "Exception trace...", "nullable": true } }, "type": "object" } } } }, "500": { "description": "Внутренняя ошибка сервера" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/technical-specification/generate/{orderId}": { "get": { "tags": [ "Техническая спецификация" ], "summary": "Генерация технической спецификации для заказа", "description": "Генерирует PDF документ технической спецификации для подтвержденного заказа. При повторном запросе возвращает ранее сгенерированный документ. Документ содержит информацию о всех товарах заказа: КЗТИН, наименование, характеристики, сопутствующие услуги, количество, единицу измерения и сроки поставки.", "operationId": "8e7b111348c35b6e1862eff59923c639", "parameters": [ { "name": "orderId", "in": "path", "description": "ID заказа", "required": true, "schema": { "type": "integer", "example": 123 } } ], "responses": { "200": { "description": "Техническая спецификация успешно сформирована", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string", "example": "success" }, "message": { "type": "string", "example": "Техническая спецификация успешно сформирована" }, "data": { "properties": { "specification_id": { "description": "ID технической спецификации", "type": "integer", "example": 456 }, "download_url": { "description": "URL для скачивания PDF файла", "type": "string", "example": "/api/v1/file/789" } }, "type": "object" } }, "type": "object" } } } }, "401": { "description": "Неавторизован" }, "404": { "description": "Заказ не найден", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string", "example": "error" }, "message": { "type": "string", "example": "Заказ не найден" } }, "type": "object" } } } }, "500": { "description": "Ошибка сервера или заказ не подтвержден", "content": { "application/json": { "schema": { "properties": { "status": { "type": "string", "example": "error" }, "message": { "type": "string", "example": "Техническая спецификация доступна только для подтвержденных заказов" } }, "type": "object" } } } } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/price-regulation/by-kztins": { "get": { "tags": [ "Регулирование цен" ], "summary": "Получить нижние и верхние пороги регулирования цен", "operationId": "fbb0effea74e9586ecd4a138d935be72", "parameters": [ { "name": "kztin[]", "in": "query", "description": "Массив kztin", "required": true, "schema": { "type": "string", "example": "2870004110184" } } ], "responses": { "200": { "description": "Успешный ответ с данными прайсов", "content": { "application/json": { "schema": { "properties": { "data": { "type": "array", "items": { "properties": { "kztin": { "type": "string", "example": "2870004110184" }, "median": { "type": "number", "format": "float", "example": 899927 }, "maxCoefficient": { "type": "number", "format": "float", "example": 3 }, "maxPrice": { "type": "number", "format": "float", "example": 2699781 }, "priceCount": { "type": "integer", "example": 54 }, "activeTill": { "type": "string", "example": "2025-12-12 12:00:00" }, "sources": { "type": "array", "items": { "type": "string" }, "example": [ "OFD", "Marketplace" ] } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Неавторизован" }, "422": { "description": "Ошибка валидации" }, "500": { "description": "Внутренняя ошибка сервера" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/price-regulation/recalculate": { "post": { "tags": [ "Регулирование цен" ], "summary": "Пересчёт медианной цены по указанному КЗТИН", "operationId": "d88aed0fa29c65ca1f57089fbbb86831", "requestBody": { "required": true, "content": { "application/json": { "schema": { "properties": { "kztin": { "type": "string" } }, "type": "object" } } } }, "responses": { "200": { "description": "Успешный ответ", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string" }, "priceRegulation": { "properties": { "kztin": { "type": "string", "example": "2870004110184" }, "median": { "type": "number", "format": "float", "example": 899927 }, "maxCoefficient": { "type": "number", "format": "float", "example": 3 }, "maxPrice": { "type": "number", "format": "float", "example": 2699781 }, "priceCount": { "type": "integer", "example": 54 }, "activeTill": { "type": "string", "example": "2025-12-12 12:00:00" }, "sources": { "type": "array", "items": { "type": "string" }, "example": [ "OFD", "Marketplace" ] } }, "type": "object" } }, "type": "object" } } } }, "401": { "description": "Неавторизован" }, "422": { "description": "Ошибка валидации" }, "500": { "description": "Внутренняя ошибка сервера" } }, "security": [ { "bearerAuth": [] } ] } }, "/api/v1/price-regulation/ranges": { "get": { "tags": [ "Регулирование цен" ], "summary": "Получить активные диапазоны цен", "description": "Возвращает коллекцию активных диапазонов сумм.", "operationId": "faa5c8757800961d7ff3d9e69bb7ead2", "responses": { "200": { "description": "Успешный ответ с коллекцией диапазонов сумм", "content": { "application/json": { "schema": { "properties": { "data": { "type": "array", "items": { "properties": { "lowerLimit": { "type": "number", "format": "float", "example": 10000 }, "upperLimit": { "type": "number", "format": "float", "example": 19999.99, "nullable": true }, "upperCoefficient": { "type": "number", "format": "float", "example": 1.5 }, "startDate": { "type": "string", "example": "2025-12-12 12:00:00" }, "endDate": { "type": "string", "example": "2026-12-12 12:00:00", "nullable": true } }, "type": "object" } } }, "type": "object" } } } }, "401": { "description": "Неавторизован" }, "500": { "description": "Внутренняя ошибка сервера" } }, "security": [ { "bearerAuth": [] } ] } } }, "components": { "securitySchemes": { "bearerAuth": { "type": "http", "description": "Введите Bearer токен для авторизации", "bearerFormat": "JWT", "scheme": "bearer" } } }, "tags": [ { "name": "Реестр поставщиков привязанных к площадкам", "description": "Реестр поставщиков привязанных к площадкам" }, { "name": "Дистрибьюторы", "description": "Дистрибьюторы" }, { "name": "Договоры", "description": "Договоры" }, { "name": "Получение планов", "description": "Получение планов" }, { "name": "Справочники", "description": "Справочники" }, { "name": "Уведомления", "description": "Уведомления" }, { "name": "Подача ЦП", "description": "Подача ЦП" }, { "name": "Заказы/Предзаказы", "description": "Заказы/Предзаказы" }, { "name": "NDA", "description": "NDA" }, { "name": "Протоколы итогов", "description": "Протоколы итогов" }, { "name": "Заказы по особому порядку", "description": "Заказы по особому порядку" }, { "name": "Техническая спецификация", "description": "Техническая спецификация" }, { "name": "Регулирование цен", "description": "Регулирование цен" } ] }