{"openapi":"3.1.0","info":{"title":"Zolotenkov MRP — Public API v1","description":"Public REST API for integrations (1C, Ozon, WB и т.п.). Authenticate with `Authorization: Bearer zol_pat_live_...`.","license":{"name":""},"version":"1.0.0"},"paths":{"/api/external/v1/manufacturing-orders":{"get":{"tags":["manufacturing"],"operationId":"list","parameters":[{"name":"limit","in":"query","description":"1..=200, default 50","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"Opaque cursor from previous response","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","description":"NOT_STARTED | IN_PROGRESS | BLOCKED | PARTIALLY_DONE | DONE","required":false,"schema":{"type":"string"}},{"name":"type","in":"query","description":"MAKE_TO_STOCK | MAKE_TO_ORDER","required":false,"schema":{"type":"string"}},{"name":"item_variant_id","in":"query","description":"Filter by manufactured item variant id","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"created_after","in":"query","description":"created_date >= value. ISO-8601: date `2026-08-01` (start of day, UTC) or timestamp `2026-08-01T00:00:00Z`","required":false,"schema":{"type":"string"}},{"name":"created_before","in":"query","description":"created_date < value. ISO-8601: date `2026-08-01` (start of day, UTC) or timestamp `2026-08-01T00:00:00Z`","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Cursor-paginated list of manufacturing orders","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManufacturingOrderListResponse"}}}},"400":{"description":"Invalid filter or cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"Missing/invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Missing scope read:manufacturing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Rate limit exceeded; retry delay is returned in Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"pat":["read:manufacturing"]}]},"post":{"tags":["manufacturing"],"operationId":"create","parameters":[{"name":"Idempotency-Key","in":"header","description":"Обязателен. Повтор с тем же ключом возвращает прежний ответ и второго задания не создаёт","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManufacturingOrderCreateRequest"}}},"required":true},"responses":{"201":{"description":"Производственное задание создано, в статусе NOT_STARTED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManufacturingOrderDetailResponse"}}}},"400":{"description":"Некорректное тело либо ссылка на строку другого клиента","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"Missing/invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Missing scope write:manufacturing.order.create","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"Idempotency-Key повторён с другим телом","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"Учётный период закрыт либо задание завести нельзя (manufacturing_order_transition_not_allowed)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Исчерпан суточный предел документов ключа (document_quota_exceeded) либо частота обращений","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"pat":["write:manufacturing.order.create"]}]}},"/api/external/v1/manufacturing-orders/{id}":{"get":{"tags":["manufacturing"],"operationId":"get_one","parameters":[{"name":"id","in":"path","description":"Manufacturing order id","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Manufacturing order with its material lines","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManufacturingOrderDetailResponse"}}}},"401":{"description":"Missing/invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Missing scope read:manufacturing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"No such order in this tenant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Rate limit exceeded; retry delay is returned in Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"pat":["read:manufacturing"]}]}},"/api/external/v1/manufacturing-orders/{id}/complete":{"post":{"tags":["manufacturing"],"operationId":"complete","parameters":[{"name":"id","in":"path","description":"Manufacturing order id","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"Idempotency-Key","in":"header","description":"Обязателен. Повтор с тем же ключом возвращает прежний ответ и выпуск второй раз не приходует","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManufacturingOrderTransitionRequest"}}},"required":true},"responses":{"200":{"description":"Задание завершено, выпуск оприходован","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManufacturingOrderDetailResponse"}}}},"400":{"description":"Тело запроса — не JSON-объект","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"Missing/invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Missing scope write:manufacturing.order.complete","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"В этом учёте такого задания нет","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"Idempotency-Key повторён с другим телом","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"Задание не запущено или уже завершено (manufacturing_order_invalid_status) либо учётный период закрыт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Исчерпан суточный предел документов ключа (document_quota_exceeded) либо частота обращений","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"pat":["write:manufacturing.order.complete"]}]}},"/api/external/v1/manufacturing-orders/{id}/start":{"post":{"tags":["manufacturing"],"operationId":"start","parameters":[{"name":"id","in":"path","description":"Manufacturing order id","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"Idempotency-Key","in":"header","description":"Обязателен. Повтор с тем же ключом возвращает прежний ответ и материалы второй раз не списывает","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManufacturingOrderTransitionRequest"}}},"required":true},"responses":{"200":{"description":"Задание запущено, материалы списаны","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManufacturingOrderDetailResponse"}}}},"400":{"description":"Тело запроса — не JSON-объект","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"Missing/invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Missing scope write:manufacturing.order.start","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"В этом учёте такого задания нет","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"Idempotency-Key повторён с другим телом","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"Задание уже запущено (manufacturing_order_invalid_status), не хватает материалов либо учётный период закрыт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Исчерпан суточный предел документов ключа (document_quota_exceeded) либо частота обращений","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"pat":["write:manufacturing.order.start"]}]}},"/api/external/v1/manufacturing-orders/{id}/tasks":{"get":{"tags":["manufacturing"],"operationId":"list_tasks","parameters":[{"name":"id","in":"path","description":"Manufacturing order id","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Production tasks of the order, in technology order","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManufacturingTaskListResponse"}}}},"401":{"description":"Missing/invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Missing scope read:manufacturing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"No such order in this tenant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Rate limit exceeded; retry delay is returned in Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"pat":["read:manufacturing"]}]}},"/api/external/v1/operations":{"get":{"tags":["manufacturing"],"operationId":"list","parameters":[{"name":"limit","in":"query","description":"1..=200, default 50","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"Opaque cursor from previous response","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Cursor-paginated list of production operations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationListResponse"}}}},"400":{"description":"Invalid cursor or limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"Missing/invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Missing scope read:manufacturing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Rate limit exceeded; retry delay is returned in Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"pat":["read:manufacturing"]}]}},"/api/external/v1/operations/{id}":{"get":{"tags":["manufacturing"],"operationId":"get_one","parameters":[{"name":"id","in":"path","description":"Operation id","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Single production operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationDto"}}}},"401":{"description":"Missing/invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Missing scope read:manufacturing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"No such operation in this tenant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Rate limit exceeded; retry delay is returned in Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"pat":["read:manufacturing"]}]}},"/api/external/v1/products":{"get":{"tags":["products"],"operationId":"list","parameters":[{"name":"limit","in":"query","description":"1..=200, default 50","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"Opaque cursor from previous response","required":false,"schema":{"type":"string"}},{"name":"updated_after","in":"query","description":"Return only products with updated_at >= value. ISO-8601: date `2026-08-01` (start of day, UTC) or timestamp `2026-08-01T00:00:00Z`","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Cursor-paginated list of products","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductListResponse"}}}},"401":{"description":"Missing/invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Missing scope read:catalog","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Rate limit exceeded; retry delay is returned in Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"pat":["read:catalog"]}]},"post":{"tags":["products"],"operationId":"create","parameters":[{"name":"Idempotency-Key","in":"header","description":"Required, ≤200 chars; replays return cached response","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductCreateRequest"}}},"required":true},"responses":{"200":{"description":"Replay of original idempotent request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductDto"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductDto"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"Missing/invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"402":{"description":"Free-plan SKU limit exceeded (`SUBSCRIPTION_LIMIT`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Missing scope write:catalog.product.create","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"Idempotency-Key reused with different payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Rate limit exceeded (`rate_limited`) or the key's daily document quota is exhausted (`document_quota_exceeded`); retry delay is returned in Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"pat":["write:catalog.product.create"]}]}},"/api/external/v1/products/{id}":{"patch":{"tags":["products"],"operationId":"update","parameters":[{"name":"id","in":"path","description":"Product id","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"Idempotency-Key","in":"header","description":"Обязателен. Повтор с тем же ключом возвращает прежний ответ","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Карточка изменена","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductDto"}}}},"400":{"description":"Некорректное тело либо ссылка на строку другого клиента","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"Missing/invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Missing scope write:catalog.product.update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"В этом учёте такого товара нет","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"Idempotency-Key повторён с другим телом","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Rate limit exceeded; retry delay is returned in Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"pat":["write:catalog.product.update"]}]}},"/api/external/v1/purchase-orders":{"get":{"tags":["purchasing"],"operationId":"list","parameters":[{"name":"limit","in":"query","description":"1..=200, default 50","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"Opaque cursor from previous response","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","description":"OPEN | DONE","required":false,"schema":{"type":"string"}},{"name":"delivery_status","in":"query","description":"NOT_RECEIVED | PARTIALLY_RECEIVED | RECEIVED","required":false,"schema":{"type":"string"}},{"name":"supplier_id","in":"query","description":"Filter by supplier id","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"created_after","in":"query","description":"date >= value. ISO-8601: date `2026-08-01` (start of day, UTC) or timestamp `2026-08-01T00:00:00Z`","required":false,"schema":{"type":"string"}},{"name":"created_before","in":"query","description":"date < value. ISO-8601: date `2026-08-01` (start of day, UTC) or timestamp `2026-08-01T00:00:00Z`","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Cursor-paginated list of purchase orders","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderListResponse"}}}},"400":{"description":"Invalid filter or cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"Missing/invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Missing scope read:purchase","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Rate limit exceeded; retry delay is returned in Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"pat":["read:purchase"]}]},"post":{"tags":["purchasing"],"operationId":"create","parameters":[{"name":"Idempotency-Key","in":"header","description":"Обязателен. Повтор с тем же ключом возвращает прежний ответ и второго заказа не создаёт","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderCreateRequest"}}},"required":true},"responses":{"201":{"description":"Заказ поставщику создан","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderDetailResponse"}}}},"400":{"description":"Некорректное тело либо ссылка на строку другого клиента","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"Missing/invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Missing scope write:purchase.order.create","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"Idempotency-Key повторён с другим телом","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"Учётный период закрыт","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Исчерпан суточный предел документов ключа (document_quota_exceeded) либо частота обращений","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"pat":["write:purchase.order.create"]}]}},"/api/external/v1/purchase-orders/{id}":{"get":{"tags":["purchasing"],"operationId":"get_one","parameters":[{"name":"id","in":"path","description":"Purchase order id","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Purchase order with its lines","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderDetailResponse"}}}},"401":{"description":"Missing/invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Missing scope read:purchase","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"No such order in this tenant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Rate limit exceeded; retry delay is returned in Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"pat":["read:purchase"]}]}},"/api/external/v1/purchase-orders/{id}/receipts":{"get":{"tags":["purchasing"],"operationId":"list_receipts","parameters":[{"name":"id","in":"path","description":"Purchase order id","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Receipt events of the order, newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderReceiptListResponse"}}}},"401":{"description":"Missing/invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Missing scope read:purchase","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"No such order in this tenant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Rate limit exceeded; retry delay is returned in Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"pat":["read:purchase"]}]},"post":{"tags":["purchasing"],"operationId":"create_receipt","parameters":[{"name":"id","in":"path","description":"Purchase order id","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"Idempotency-Key","in":"header","description":"Обязателен. Повтор с тем же ключом возвращает прежний ответ и материал второй раз не приходует","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseReceiptCreateRequest"}}},"required":true},"responses":{"201":{"description":"Приход оформлен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseReceiptCreatedResponse"}}}},"400":{"description":"Некорректное тело либо ссылка на склад другого клиента","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"Missing/invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Missing scope write:purchase.receipt.create","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"В этом учёте такого заказа нет","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"Приход недопустим (purchase_receipt_not_allowed) либо Idempotency-Key повторён с другим телом","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Исчерпан суточный предел документов ключа (document_quota_exceeded) либо частота обращений","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"pat":["write:purchase.receipt.create"]}]}},"/api/external/v1/recipes":{"get":{"tags":["manufacturing"],"operationId":"list","parameters":[{"name":"limit","in":"query","description":"1..=200, default 50","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"Opaque cursor from previous response","required":false,"schema":{"type":"string"}},{"name":"item_id","in":"query","description":"Filter by manufactured item id","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"item_variant_id","in":"query","description":"Filter by manufactured item variant id","required":false,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Cursor-paginated list of bills of materials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipeListResponse"}}}},"400":{"description":"Invalid cursor or limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"Missing/invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Missing scope read:manufacturing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Rate limit exceeded; retry delay is returned in Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"pat":["read:manufacturing"]}]}},"/api/external/v1/recipes/{id}":{"get":{"tags":["manufacturing"],"operationId":"get_one","parameters":[{"name":"id","in":"path","description":"Recipe id","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Bill of materials with its operations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipeDto"}}}},"401":{"description":"Missing/invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Missing scope read:manufacturing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"No such recipe in this tenant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Rate limit exceeded; retry delay is returned in Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"pat":["read:manufacturing"]}]}},"/api/external/v1/sales-orders":{"get":{"tags":["sales"],"operationId":"list","parameters":[{"name":"limit","in":"query","description":"1..=200, default 50","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"Opaque cursor from previous response","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","description":"OPEN | DONE | CANCELLED","required":false,"schema":{"type":"string"}},{"name":"delivery_status","in":"query","description":"NOT_SHIPPED | PACKED | PARTIALLY_PACKED | PARTIALLY_SHIPPED | SHIPPED","required":false,"schema":{"type":"string"}},{"name":"customer_id","in":"query","description":"Filter by customer id","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"created_after","in":"query","description":"created_date >= value. ISO-8601: date `2026-08-01` (start of day, UTC) or timestamp `2026-08-01T00:00:00Z`","required":false,"schema":{"type":"string"}},{"name":"created_before","in":"query","description":"created_date < value. ISO-8601: date `2026-08-01` (start of day, UTC) or timestamp `2026-08-01T00:00:00Z`","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Cursor-paginated list of sales orders","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOrderListResponse"}}}},"400":{"description":"Invalid filter or cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"Missing/invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Missing scope read:sales","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Rate limit exceeded; retry delay is returned in Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"pat":["read:sales"]}]},"post":{"tags":["sales"],"operationId":"create","parameters":[{"name":"Idempotency-Key","in":"header","description":"Обязателен. Повтор с тем же ключом возвращает прежний ответ и второго заказа не создаёт","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOrderCreateRequest"}}},"required":true},"responses":{"201":{"description":"Заказ создан","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOrderDetailResponse"}}}},"400":{"description":"Некорректное тело либо ссылка на строку другого клиента","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"Missing/invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Missing scope write:sales.order.create","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"Idempotency-Key повторён с другим телом","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Исчерпан суточный предел документов ключа (document_quota_exceeded) либо частота обращений","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"pat":["write:sales.order.create"]}]}},"/api/external/v1/sales-orders/{id}":{"get":{"tags":["sales"],"operationId":"get_one","parameters":[{"name":"id","in":"path","description":"Sales order id","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Sales order with its lines","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOrderDetailResponse"}}}},"401":{"description":"Missing/invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Missing scope read:sales","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"No such order in this tenant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Rate limit exceeded; retry delay is returned in Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"pat":["read:sales"]}]},"patch":{"tags":["sales"],"operationId":"update","parameters":[{"name":"id","in":"path","description":"Sales order id","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"Idempotency-Key","in":"header","description":"Обязателен. Повтор с тем же ключом возвращает прежний ответ","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOrderUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Заказ изменён","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOrderDetailResponse"}}}},"400":{"description":"Некорректное тело либо ссылка на строку другого клиента","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"Missing/invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Missing scope write:sales.order.update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"В этом учёте такого заказа нет","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"Заказ уже завершён (sales_order_not_editable) либо Idempotency-Key повторён с другим телом","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Rate limit exceeded; retry delay is returned in Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"pat":["write:sales.order.update"]}]}},"/api/external/v1/security/telemetry":{"get":{"tags":["security"],"operationId":"get_telemetry","parameters":[{"name":"windowStart","in":"query","description":"RFC3339 start, inclusive","required":true,"schema":{"type":"string"}},{"name":"windowEnd","in":"query","description":"RFC3339 end, exclusive; exactly 24 hours after windowStart","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Privacy-safe exact-24h security telemetry with a 7-day baseline","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityTelemetryResponseDto"}}}},"400":{"description":"Missing, invalid or non-24h window","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"Missing/invalid PAT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Missing scope read:security-telemetry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"pat":["read:security-telemetry"]}]}},"/api/external/v1/stock":{"get":{"tags":["stock"],"operationId":"list","parameters":[{"name":"limit","in":"query","description":"1..=200, default 50","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"Opaque cursor from previous response","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Cursor-paginated list of stock entries","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockListResponse"}}}},"401":{"description":"Missing/invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Missing scope read:stock","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Rate limit exceeded; retry delay is returned in Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"pat":["read:stock"]}]}},"/api/external/v1/stock-adjustments":{"post":{"tags":["stock"],"operationId":"create","parameters":[{"name":"Idempotency-Key","in":"header","description":"Обязателен. Повтор с тем же ключом возвращает прежний ответ и остаток второй раз не двигает","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockAdjustmentCreateRequest"}}},"required":true},"responses":{"200":{"description":"Повтор идемпотентного запроса","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockAdjustmentCreatedResponse"}}}},"201":{"description":"Корректировка оформлена","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockAdjustmentCreatedResponse"}}}},"400":{"description":"Некорректное тело, ссылка на строку другого клиента либо уход остатка в минус","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"Missing/invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Missing scope write:inventory.adjustment.create","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"Idempotency-Key повторён с другим телом","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"Дата документа в закрытом учётном периоде или в будущем","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Исчерпан суточный предел документов ключа (document_quota_exceeded) либо частота обращений","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"pat":["write:inventory.adjustment.create"]}]}},"/api/external/v1/stock-movements":{"get":{"tags":["stock"],"operationId":"list","parameters":[{"name":"limit","in":"query","description":"1..=200, default 50","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"Opaque cursor from previous response","required":false,"schema":{"type":"string"}},{"name":"item_id","in":"query","description":"Filter by item id","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"item_variant_id","in":"query","description":"Filter by item variant id","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"storage_place_id","in":"query","description":"Filter by storage place id","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"entity_type","in":"query","description":"STOCK_ADJUSTMENT | PURCHASE_ORDER | PURCHASE_ORDER_RECEIPT | SHIPMENT | MANUFACTURING_ORDER | SALES_RETURN","required":false,"schema":{"type":"string"}},{"name":"date_from","in":"query","description":"date >= value. ISO-8601: date `2026-08-01` (start of day, UTC) or timestamp `2026-08-01T00:00:00Z`","required":false,"schema":{"type":"string"}},{"name":"date_to","in":"query","description":"date < value. ISO-8601: date `2026-08-01` (start of day, UTC) or timestamp `2026-08-01T00:00:00Z`","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Cursor-paginated list of stock movements","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockMovementListResponse"}}}},"400":{"description":"Invalid filter or cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"Missing/invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Missing scope read:stock","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Rate limit exceeded; retry delay is returned in Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"pat":["read:stock"]}]}},"/api/external/v1/suppliers":{"get":{"tags":["purchasing"],"operationId":"list","parameters":[{"name":"limit","in":"query","description":"1..=200, default 50","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"cursor","in":"query","description":"Opaque cursor from previous response","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Cursor-paginated list of suppliers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierListResponse"}}}},"400":{"description":"Invalid filter or cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"Missing/invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Missing scope read:purchase","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Rate limit exceeded; retry delay is returned in Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"pat":["read:purchase"]}]}},"/api/external/v1/suppliers/{id}":{"get":{"tags":["purchasing"],"operationId":"get_one","parameters":[{"name":"id","in":"path","description":"Supplier id","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Supplier card","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierDto"}}}},"401":{"description":"Missing/invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Missing scope read:purchase","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"No such supplier in this tenant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Rate limit exceeded; retry delay is returned in Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"pat":["read:purchase"]}]}}},"components":{"schemas":{"CountRateDto":{"type":"object","required":["count","rate"],"properties":{"count":{"type":"integer","format":"int64"},"rate":{"type":"string","description":"Доля от числа наблюдавшихся попыток в этом окне, от 0 до 1."}}},"DuplicateProfileCountersDto":{"type":"object","required":["coverageAvailable","exactNormalizedEmail"],"properties":{"coverageAvailable":{"type":"boolean","description":"Покрытие есть только когда сервер наблюдал все успешные и конфликтные\nпопытки в окне; пустое окно намеренно не считается доказательством."},"exactNormalizedEmail":{"$ref":"#/components/schemas/CountRateDto"}}},"EmailCategoryCountersDto":{"type":"object","required":["disposable","freeProvider","businessOrOther","invalid"],"properties":{"businessOrOther":{"$ref":"#/components/schemas/CountRateDto"},"disposable":{"$ref":"#/components/schemas/CountRateDto"},"freeProvider":{"$ref":"#/components/schemas/CountRateDto"},"invalid":{"$ref":"#/components/schemas/CountRateDto"}}},"EmailSignalCountersDto":{"type":"object","required":["coverageAvailable","coveredAttempts","unavailableAttempts","categories"],"properties":{"categories":{"$ref":"#/components/schemas/EmailCategoryCountersDto"},"coverageAvailable":{"type":"boolean","description":"`false` означает пробел покрытия, а не подтверждённый чистый ноль."},"coveredAttempts":{"type":"integer","format":"int64"},"unavailableAttempts":{"type":"integer","format":"int64"}}},"ErrorBody":{"type":"object","required":["error","message","request_id"],"properties":{"details":{},"error":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"}}},"ManufacturingOrderCreateRequest":{"type":"object","required":["item_variant_id","quantity"],"properties":{"created_date":{"type":["string","null"],"format":"date-time","description":"Дата документа. Не прислали — «сейчас»."},"item_variant_id":{"type":"integer","format":"int64","description":"Что изготавливаем — вариант изделия. Строки материалов система соберёт\nсама по спецификации изделия, как и в интерфейсе; присылать их незачем."},"manufacturing_location_id":{"type":["integer","null"],"format":"int64","description":"Производственная локация. Не прислали — склад из настроек производства,\nкак в интерфейсе."},"number":{"type":["string","null"],"description":"Номер документа. Не прислали — система выдаёт следующий сама, тем же\nсчётчиком, что и интерфейс."},"planned_start_date":{"type":["string","null"],"format":"date-time","description":"Плановая дата начала работ."},"production_date":{"type":["string","null"],"format":"date-time","description":"Срок производства."},"quantity":{"type":"string","description":"Плановое количество выпуска. Строго больше нуля."},"shipping_date":{"type":["string","null"],"format":"date-time","description":"Плановая дата отгрузки."}}},"ManufacturingOrderDetailResponse":{"allOf":[{"$ref":"#/components/schemas/ManufacturingOrderDto"},{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ManufacturingOrderItemDto"},"description":"Материалы заказа — строки списания."}}}]},"ManufacturingOrderDto":{"type":"object","required":["id","number","status","type","item_variant","quantity","created_date","priority"],"properties":{"actual_quantity":{"type":["string","null"],"description":"Фактически выпущено; `null`, пока выпуска не было."},"completed_at":{"type":["string","null"],"format":"date-time"},"created_date":{"type":"string","format":"date-time"},"id":{"type":"string"},"item_variant":{"$ref":"#/components/schemas/ManufacturingOrderVariantDto","description":"Что изготавливаем."},"manufacturing_location_id":{"type":["string","null"],"description":"Производственная локация; `null` — заказ без указания локации."},"number":{"type":"string","description":"Человекочитаемый номер документа, например `MO-1001`."},"output_batch_number":{"type":["string","null"],"description":"Партия выпуска, если по изделию ведётся партионный учёт."},"output_expiry_date":{"type":["string","null"],"format":"date"},"output_manufacture_date":{"type":["string","null"],"format":"date"},"planned_start_date":{"type":["string","null"],"format":"date-time","description":"Плановая дата начала работ."},"priority":{"type":"integer","format":"int32","description":"Ручной порядок в расписании цеха: меньше — раньше."},"production_date":{"type":["string","null"],"format":"date-time","description":"Срок производства — то, ради чего внешний помощник и приходит\nв этот раздел."},"quantity":{"type":"string","description":"Плановое количество выпуска."},"sales_order_id":{"type":["string","null"],"description":"Заказ покупателя, под который открыт производственный заказ."},"shipping_date":{"type":["string","null"],"format":"date-time","description":"Плановая дата отгрузки."},"started_at":{"type":["string","null"],"format":"date-time"},"status":{"type":"string","description":"`NOT_STARTED` | `IN_PROGRESS` | `BLOCKED` | `PARTIALLY_DONE` | `DONE`."},"type":{"type":"string","description":"`MAKE_TO_STOCK` | `MAKE_TO_ORDER`."}}},"ManufacturingOrderItemDto":{"type":"object","required":["id","item_id","item_variant_id","title","quantity"],"properties":{"actual_quantity":{"type":["string","null"],"description":"Сколько израсходовано фактически; `null`, пока факт не зафиксирован."},"id":{"type":"string"},"item_id":{"type":"string"},"item_variant_id":{"type":"string"},"quantity":{"type":"string","description":"Сколько материала запланировано на весь заказ."},"sku":{"type":["string","null"]},"title":{"type":"string"}}},"ManufacturingOrderListResponse":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ManufacturingOrderDto"}},"next_cursor":{"type":["string","null"]}}},"ManufacturingOrderTransitionRequest":{"type":"object","description":"Тело ручек запуска и завершения — пустой объект.\n\nПолей у него нет сознательно. `ManufacturingService::update` принимает\nзадание целиком и пересобирает строки материалов, когда изменились\nколичество или вариант изделия; отдай в него частичное тело клиента — оно\nзатрёт поля задания, а в худшем случае сотрёт строки материалов вместе с\nпривязками партий (ZOL-845). Поэтому обработчик читает текущее задание сам и\nменяет в нём **только** статус, а клиенту сказать тут нечего."},"ManufacturingOrderVariantDto":{"type":"object","required":["id","item_id","title","item_title"],"properties":{"id":{"type":"string","description":"id варианта изготавливаемого изделия."},"item_id":{"type":"string"},"item_title":{"type":"string"},"sku":{"type":["string","null"],"description":"`variant_code` варианта — тот же SKU, что отдаёт `/products`."},"title":{"type":"string","description":"Название варианта; пусто у изделия без вариантов — тогда смотрите\n`item_title`."}}},"ManufacturingTaskDto":{"type":"object","required":["id","manufacturing_order_id","operation_id","operation_title","status","position","duration","cost_per_hour","total_cost"],"properties":{"actual_cost_cents":{"type":["integer","null"],"format":"int64","description":"Фактическая стоимость операции в копейках."},"actual_time_minutes":{"type":["integer","null"],"format":"int32","description":"Фактическое время операции в минутах."},"cost_per_hour":{"type":"string","description":"Плановая стоимость часа."},"duration":{"type":"string","description":"Норма времени на единицу изделия, в единицах операции (обычно часы)."},"id":{"type":"string"},"manufacturing_order_id":{"type":"string"},"operation_id":{"type":"string","description":"Операция из справочника `/operations`."},"operation_title":{"type":"string"},"operation_type":{"type":["string","null"],"description":"Вид операции из технологии изделия; `null`, если не заполнен."},"position":{"type":"integer","format":"int32","description":"Порядок операции в технологии изделия."},"resource_id":{"type":["string","null"],"description":"Станок или участок; `null`, если не назначен."},"resource_name":{"type":["string","null"]},"status":{"type":"string","description":"`NOT_STARTED` | `IN_PROGRESS` | `PAUSED` | `BLOCKED` | `COMPLETED`."},"total_cost":{"type":"string","description":"Плановая стоимость операции на весь заказ:\n`cost_per_hour * duration * quantity`."}}},"ManufacturingTaskListResponse":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ManufacturingTaskDto"}}}},"OperationDto":{"type":"object","required":["id","title","cost_per_hour","position"],"properties":{"cost_per_hour":{"type":"string","description":"Плановая стоимость единицы времени операции (колонка `rate`)."},"id":{"type":"string"},"position":{"type":"integer","format":"int32","description":"Порядок операции в справочнике — тот же, что видит клиент на экране."},"title":{"type":"string"},"unit_id":{"type":["string","null"],"description":"Единица измерения времени операции; `null`, если единица удалена."},"unit_name":{"type":["string","null"]}}},"OperationListResponse":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OperationDto"}},"next_cursor":{"type":["string","null"]}}},"PasswordRecoveryOutcomeCountersDto":{"type":"object","required":["rateLimit","recipientMissing","recipientIneligible","smtpSent","smtpFailed","completed","tokenInvalid"],"properties":{"completed":{"type":"integer","format":"int64"},"rateLimit":{"type":"integer","format":"int64"},"recipientIneligible":{"type":"integer","format":"int64"},"recipientMissing":{"type":"integer","format":"int64"},"smtpFailed":{"type":"integer","format":"int64"},"smtpSent":{"type":"integer","format":"int64"},"tokenInvalid":{"type":"integer","format":"int64"}}},"ProductCreateRequest":{"type":"object","required":["title"],"properties":{"can_buy":{"type":"boolean"},"can_make":{"type":"boolean"},"can_sell":{"type":"boolean"},"category_id":{"type":["integer","null"],"format":"int64"},"cost_price":{"type":["string","null"],"description":"Явная плановая себестоимость. Для покупного товара обязательна: отсутствие\nзначения не должно превращаться в неотличимый от настоящего ноль."},"is_kit":{"type":"boolean","description":"ZOL-1349: при создании можно сразу пометить товар как Kit/Bundle.\nFoundation-уровень — auto-assembly включится отдельным child-тикетом."},"sku":{"type":["string","null"]},"title":{"type":"string"},"unit_id":{"type":["integer","null"],"format":"int64"}}},"ProductDto":{"type":"object","required":["id","title","can_sell","can_buy","can_make","is_kit","archived","created_at","updated_at"],"properties":{"archived":{"type":"boolean"},"can_buy":{"type":"boolean"},"can_make":{"type":"boolean"},"can_sell":{"type":"boolean"},"category_id":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"id":{"type":"string","description":"id товара (строкой — на случай миграции на uuid в v2)."},"is_kit":{"type":"boolean","description":"ZOL-1349: товар-комплект (Kit/Bundle). Foundation-этап: только чтение,\nauto-assembly и UI отгрузятся следующими child-тикетами ZOL-1348."},"sku":{"type":["string","null"],"description":"Внутренний `variant_code` основной строки `item` (используется как SKU\nдо появления отдельного поля `sku`, см. §1.5 плана)."},"title":{"type":"string"},"unit_id":{"type":["string","null"]},"updated_at":{"type":"string","format":"date-time"}}},"ProductListResponse":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ProductDto"}},"next_cursor":{"type":["string","null"]}}},"ProductUpdateRequest":{"type":"object","description":"ZOL-10436: изменение карточки товара. Поле, которого нет в теле, не\nменяется — это `PATCH`, а не замена карточки целиком.\n\nОбнулить ссылочное поле (снять категорию, снять единицу измерения) телом\nнельзя: `null` и «поля нет» в JSON одинаково приезжают как `None`. Снять\nкатегорию можно в интерфейсе; отдельное значение-«сброс» здесь заводить не\nстали — оно нужно ровно там, где ключ уже ошибся.\n\nЧего в этом теле сознательно нет:\n- `archived` — архивация внутри продукта требует отдельного права\n  (`delete_archive_items`), и право «изменять карточку товара» его не\n  включает;\n- `is_kit` — переключение комплекта связано правилами совместимости с\n  партионным учётом и меняет способ расчёта доступности. Пометить товар\n  комплектом можно при создании.","properties":{"can_buy":{"type":["boolean","null"]},"can_make":{"type":["boolean","null"]},"can_sell":{"type":["boolean","null"]},"category_id":{"type":["integer","null"],"format":"int64"},"cost_price":{"type":["string","null"],"description":"Плановая себестоимость основного варианта."},"sku":{"type":["string","null"]},"title":{"type":["string","null"]},"unit_id":{"type":["integer","null"],"format":"int64"}}},"PurchaseOrderCreateRequest":{"type":"object","required":["supplier_id","items"],"properties":{"currency":{"type":["string","null"]},"date":{"type":["string","null"],"format":"date-time","description":"Дата документа. Не прислали — «сейчас»."},"expected_date":{"type":["string","null"],"format":"date-time","description":"Ожидаемая дата поставки."},"items":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseOrderItemWriteRequest"},"description":"Хотя бы одна строка. Заказ без строк не документ, а заготовка."},"number":{"type":["string","null"],"description":"Номер документа. Не прислали — система выдаёт следующий сама, тем же\nсчётчиком, что и интерфейс."},"supplier_id":{"type":"integer","format":"int64","description":"Поставщик обязателен: заказ без поставщика — не заказ, а напоминание.\nВ базе колонка необязательная ради старых строк, но заводить такие\nдокументы извне незачем."}}},"PurchaseOrderDetailResponse":{"allOf":[{"$ref":"#/components/schemas/PurchaseOrderDto"},{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseOrderItemDto"}}}}]},"PurchaseOrderDto":{"type":"object","required":["id","number","status","delivery_status","date","total_amount","tax_amount","total_amount_with_tax"],"properties":{"completed_at":{"type":["string","null"],"format":"date-time","description":"Момент, когда заказ стал полностью полученным."},"currency":{"type":["string","null"]},"date":{"type":"string","format":"date-time"},"delivery_status":{"type":"string","description":"Приёмка: `NOT_RECEIVED` | `PARTIALLY_RECEIVED` | `RECEIVED`."},"expected_date":{"type":["string","null"],"format":"date-time","description":"Ожидаемая дата поставки — то, ради чего внешний помощник и приходит\nв этот раздел."},"id":{"type":"string"},"notes":{"type":["string","null"]},"number":{"type":"string","description":"Человекочитаемый номер документа, например `PO-1001`."},"status":{"type":"string","description":"`OPEN` | `DONE`."},"supplier":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PurchaseOrderSupplierDto","description":"`null`, если заказ заведён без поставщика: колонка `supplier_id`\nнеобязательная, и такие строки в базе есть."}]},"tax_amount":{"type":"string","description":"НДС документа — сумма уже округлённых по строкам величин."},"total_amount":{"type":"string","description":"Сумма без НДС."},"total_amount_with_tax":{"type":"string","description":"Итого с НДС."}}},"PurchaseOrderItemDto":{"type":"object","required":["id","item_id","item_variant_id","title","quantity","price","received_quantity","line_amount","line_tax_amount","line_amount_with_tax"],"properties":{"batch_number":{"type":["string","null"]},"expiry_date":{"type":["string","null"],"format":"date"},"id":{"type":"string"},"item_id":{"type":"string"},"item_variant_id":{"type":"string"},"line_amount":{"type":"string"},"line_amount_with_tax":{"type":"string"},"line_tax_amount":{"type":"string"},"price":{"type":"string","description":"Цена за единицу без НДС."},"quantity":{"type":"string"},"received_quantity":{"type":"string","description":"Сколько по этой строке уже принято — сумма по событиям приёмки."},"sku":{"type":["string","null"],"description":"`variant_code` варианта — тот же SKU, что отдаёт `/products`."},"tax_rate":{"type":["string","null"],"description":"Ставка НДС в процентах; `null` и ноль означают «налога нет»."},"title":{"type":"string"}}},"PurchaseOrderItemWriteRequest":{"type":"object","description":"Строка заказа в запросе на запись. Публичный контракт: идентификаторы\nплоские и числовые, вложенных сущностей нет — интеграции незачем собирать\nвнутренний `ItemVariantDto` целиком, чтобы завести строку.","required":["item_variant_id","quantity","price"],"properties":{"batch_number":{"type":["string","null"],"description":"Номер партии — заполняется, когда товар учитывается партиями."},"expiry_date":{"type":["string","null"],"format":"date"},"item_variant_id":{"type":"integer","format":"int64"},"price":{"type":"string","description":"Цена за единицу без НДС."},"quantity":{"type":"string"},"tax_rate":{"type":["string","null"],"description":"Ставка НДС в процентах; отсутствие поля и ноль означают «налога нет»."}}},"PurchaseOrderListResponse":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseOrderDto"}},"next_cursor":{"type":["string","null"]}}},"PurchaseOrderReceiptDto":{"type":"object","required":["id","received_at","items"],"properties":{"id":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseOrderReceiptItemDto"}},"received_at":{"type":"string","format":"date-time"},"storage_place_id":{"type":["string","null"],"description":"Склад, на который принят товар; `null` — приёмка без указания места."}}},"PurchaseOrderReceiptItemDto":{"type":"object","required":["id","purchase_order_item_id","item_id","item_variant_id","title","quantity"],"properties":{"batch_number":{"type":["string","null"]},"expiry_date":{"type":["string","null"],"format":"date"},"id":{"type":"string"},"item_id":{"type":"string"},"item_variant_id":{"type":"string"},"purchase_order_item_id":{"type":"string","description":"Строка заказа, к которой относится приёмка."},"quantity":{"type":"string"},"sku":{"type":["string","null"]},"title":{"type":"string"}}},"PurchaseOrderReceiptListResponse":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseOrderReceiptDto"}}}},"PurchaseOrderSupplierDto":{"type":"object","required":["id"],"properties":{"id":{"type":"string","description":"id поставщика (строкой — на случай миграции на uuid в v2)."},"inn":{"type":["string","null"]},"name":{"type":["string","null"]}}},"PurchaseReceiptCreateRequest":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseReceiptItemRequest"}},"storage_place_id":{"type":["integer","null"],"format":"int64","description":"Склад, на который приходуется товар. Не прислали — склад по умолчанию,\nкак в интерфейсе."}}},"PurchaseReceiptCreatedResponse":{"type":"object","description":"Ответ на оформление прихода: и само событие приёмки, и карточка заказа\nпосле него. Второе здесь не украшение: агенту нужно увидеть, сколько\nосталось принять и закрылся ли заказ, а без этого он пошёл бы за тем же\nвторым запросом.","required":["receipt","order"],"properties":{"order":{"$ref":"#/components/schemas/PurchaseOrderDetailResponse"},"receipt":{"$ref":"#/components/schemas/PurchaseOrderReceiptDto"}}},"PurchaseReceiptItemRequest":{"type":"object","description":"Строка прихода: сколько принято по конкретной строке заказа.","required":["purchase_order_item_id","quantity"],"properties":{"batch_number":{"type":["string","null"]},"expiry_date":{"type":["string","null"],"format":"date"},"purchase_order_item_id":{"type":"integer","format":"int64","description":"`items[].id` из карточки заказа, а не идентификатор товара."},"quantity":{"type":"string"}}},"RecipeDto":{"type":"object","required":["id","item_id","item_title","materials","operations"],"properties":{"id":{"type":"string"},"item_id":{"type":"string","description":"Изделие, для которого написана спецификация."},"item_title":{"type":"string"},"item_variant_id":{"type":["string","null"],"description":"Вариант изделия; `null` — спецификация написана на изделие целиком и\nдействует для всех его вариантов."},"item_variant_title":{"type":["string","null"]},"materials":{"type":"array","items":{"$ref":"#/components/schemas/RecipeMaterialDto"},"description":"Состав материалов на одну единицу изделия."},"operations":{"type":"array","items":{"$ref":"#/components/schemas/RecipeOperationDto"},"description":"Технология: операции изделия по порядку."},"sku":{"type":["string","null"]}}},"RecipeListResponse":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RecipeDto"}},"next_cursor":{"type":["string","null"]}}},"RecipeMaterialDto":{"type":"object","required":["id","item_id","item_variant_id","title","quantity"],"properties":{"id":{"type":"string"},"item_id":{"type":"string"},"item_variant_id":{"type":"string"},"notes":{"type":["string","null"]},"quantity":{"type":"string","description":"Расход на одну единицу изделия."},"sku":{"type":["string","null"],"description":"`variant_code` варианта материала — тот же SKU, что отдаёт `/products`."},"title":{"type":"string"}}},"RecipeOperationDto":{"type":"object","required":["id","operation_id","operation_title","position","duration","cost_per_hour"],"properties":{"cost_per_hour":{"type":"string"},"duration":{"type":"string","description":"Норма времени на единицу изделия, в единицах операции (обычно часы)."},"id":{"type":"string"},"notes":{"type":["string","null"]},"operation_id":{"type":"string","description":"Операция из справочника `/operations`."},"operation_title":{"type":"string"},"operation_type":{"type":["string","null"],"description":"Вид операции; `null`, если не заполнен."},"position":{"type":"integer","format":"int32","description":"Порядок операции в технологии."}}},"RegistrationAbuseCountersDto":{"type":"object","required":["rateLimit","honeypot","automationUserAgent","other","maxMaskedNetworkVelocity"],"properties":{"automationUserAgent":{"type":"integer","format":"int64"},"honeypot":{"type":"integer","format":"int64"},"maxMaskedNetworkVelocity":{"type":"integer","format":"int64","description":"Максимум отклонённых попыток из одной маскированной сети в настроенном\nокне скорости регистраций."},"other":{"type":"integer","format":"int64"},"rateLimit":{"type":"integer","format":"int64"}}},"RegistrationActivationComparisonDto":{"type":"object","required":["days","current","baseline"],"properties":{"baseline":{"$ref":"#/components/schemas/RegistrationActivationWindowDto"},"current":{"$ref":"#/components/schemas/RegistrationActivationWindowDto"},"days":{"type":"integer","format":"int32","minimum":0}}},"RegistrationActivationCountersDto":{"type":"object","description":"ZOL-10254: судьба внешней регистрации без идентификаторов учётной записи.\n\nСамоназначенный признак внутренней регистрации (`claimed`) не считается\nдоверенным и остаётся в этом срезе. Исключаются только серверно проверенные\nвнутренние регистрации (`verified`).","required":["externalRegistrations","ssoCompleted","welcomeCompleted","firstUsefulAction","withoutUsefulAction"],"properties":{"externalRegistrations":{"type":"integer","format":"int64"},"firstUsefulAction":{"type":"integer","format":"int64"},"ssoCompleted":{"type":"integer","format":"int64"},"welcomeCompleted":{"type":"integer","format":"int64"},"withoutUsefulAction":{"type":"integer","format":"int64"}}},"RegistrationActivationWindowDto":{"type":"object","required":["windowStart","windowEnd","totals"],"properties":{"totals":{"$ref":"#/components/schemas/RegistrationActivationCountersDto"},"windowEnd":{"type":"string","format":"date-time"},"windowStart":{"type":"string","format":"date-time"}}},"RegistrationTelemetryCountersDto":{"type":"object","description":"ZOL-8236: «внутренних» регистраций больше нет одной корзиной.\n\n`internal_verified` — исключены из детекторов abuse (решение сервера).\n`internal_claimed` — назвали себя внутренними через `signup_*`-атрибуцию\nили угадываемый email, поэтому считаются наравне с внешними: попадают в\n`probable_automation` / `product` и в порог алерта. Инвариант суммы:\n`raw = internal_verified + probable_automation + product`, а\n`internal_claimed` — сквозной срез внутри двух последних корзин.","required":["raw","internalVerified","internalClaimed","probableAutomation","product"],"properties":{"internalClaimed":{"type":"integer","format":"int64"},"internalVerified":{"type":"integer","format":"int64"},"probableAutomation":{"type":"integer","format":"int64"},"product":{"type":"integer","format":"int64"},"raw":{"type":"integer","format":"int64"}}},"SalesOrderCreateRequest":{"type":"object","required":["customer_id","items"],"properties":{"created_date":{"type":["string","null"],"format":"date-time","description":"Дата документа. Не прислали — «сейчас»."},"currency":{"type":["string","null"]},"customer_id":{"type":"integer","format":"int64"},"delivery_date":{"type":["string","null"],"format":"date-time"},"items":{"type":"array","items":{"$ref":"#/components/schemas/SalesOrderItemWriteRequest"},"description":"Хотя бы одна строка. Заказ без строк не документ, а заготовка: завести\nего извне и оставить пустым значит положить в учёт бумагу без товара."},"notes":{"type":["string","null"]},"number":{"type":["string","null"],"description":"Номер документа. Не прислали — система выдаёт следующий сама, тем же\nсчётчиком, что и интерфейс."},"priority":{"type":["integer","null"],"format":"int32"}}},"SalesOrderCustomerDto":{"type":"object","required":["id"],"properties":{"country_code":{"type":["string","null"]},"id":{"type":"string","description":"id контрагента (строкой — на случай миграции на uuid в v2)."},"title":{"type":["string","null"]}}},"SalesOrderDetailResponse":{"allOf":[{"$ref":"#/components/schemas/SalesOrderDto"},{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SalesOrderItemDto"}}}}]},"SalesOrderDto":{"type":"object","required":["id","number","status","delivery_status","customer","created_date","priority","total_amount","tax_amount","total_amount_with_tax"],"properties":{"created_date":{"type":"string","format":"date-time"},"currency":{"type":["string","null"]},"customer":{"$ref":"#/components/schemas/SalesOrderCustomerDto"},"delivery_date":{"type":["string","null"],"format":"date-time"},"delivery_status":{"type":"string","description":"Отгрузка: `NOT_SHIPPED` | `PACKED` | `PARTIALLY_PACKED` |\n`PARTIALLY_SHIPPED` | `SHIPPED`."},"id":{"type":"string"},"notes":{"type":["string","null"]},"number":{"type":"string","description":"Человекочитаемый номер документа, например `SO-1001`."},"priority":{"type":"integer","format":"int32"},"shipped_at":{"type":["string","null"],"format":"date-time"},"status":{"type":"string","description":"`OPEN` | `DONE` | `CANCELLED`."},"tax_amount":{"type":"string","description":"НДС документа — сумма уже округлённых по строкам величин."},"total_amount":{"type":"string","description":"Сумма без НДС."},"total_amount_with_tax":{"type":"string","description":"Итого с НДС."}}},"SalesOrderItemDto":{"type":"object","required":["id","item_id","item_variant_id","title","quantity","price","line_amount","line_tax_amount","line_amount_with_tax"],"properties":{"id":{"type":"string"},"item_id":{"type":"string"},"item_variant_id":{"type":"string"},"line_amount":{"type":"string"},"line_amount_with_tax":{"type":"string"},"line_tax_amount":{"type":"string"},"price":{"type":"string","description":"Цена за единицу без НДС."},"quantity":{"type":"string"},"sku":{"type":["string","null"],"description":"`variant_code` варианта — тот же SKU, что отдаёт `/products`."},"storage_place_id":{"type":["string","null"]},"tax_rate":{"type":["string","null"],"description":"Ставка НДС в процентах; `null` и ноль означают «налога нет»."},"title":{"type":"string"}}},"SalesOrderItemWriteRequest":{"type":"object","description":"Строка заказа в запросе на запись. Публичный контракт: идентификаторы\nплоские и числовые, вложенных сущностей нет — интеграции незачем собирать\nвнутренний `ItemVariantDto` целиком, чтобы завести строку.","required":["item_variant_id","quantity","price"],"properties":{"item_variant_id":{"type":"integer","format":"int64"},"price":{"type":"string","description":"Цена за единицу без НДС."},"quantity":{"type":"string"},"storage_place_id":{"type":["integer","null"],"format":"int64"},"tax_rate":{"type":["string","null"],"description":"Ставка НДС в процентах; отсутствие поля и ноль означают «налога нет»."}}},"SalesOrderListResponse":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SalesOrderDto"}},"next_cursor":{"type":["string","null"]}}},"SalesOrderUpdateRequest":{"type":"object","description":"Частичное изменение. Присланное поле заменяет значение, отсутствующее —\nсохраняется как есть (гард класса ZOL-845: частичное тело не должно\nобнулять то, чего в нём нет).\n\nСнять уже заполненное поле этой ручкой нельзя: `null` и отсутствие поля\nздесь означают одно и то же — «не трогать». Отличать их пришлось бы третьим\nсостоянием на каждом поле, а цена ошибки несимметрична: молча потерянная\nдата отгрузки дороже, чем невозможность её стереть ключом.","properties":{"currency":{"type":["string","null"]},"customer_id":{"type":["integer","null"],"format":"int64"},"delivery_date":{"type":["string","null"],"format":"date-time"},"items":{"type":["array","null"],"items":{"$ref":"#/components/schemas/SalesOrderItemWriteRequest"},"description":"Прислали `items` — набор строк заказа заменяется присланным целиком:\nстроки, которых в нём нет, из заказа удаляются. Не прислали — строки не\nтрогаются вовсе."},"notes":{"type":["string","null"]},"priority":{"type":["integer","null"],"format":"int32"}}},"SecurityTelemetryBaselineDto":{"type":"object","required":["windowStart","windowEnd","days","totals"],"properties":{"days":{"type":"integer","format":"int32","minimum":0},"totals":{"$ref":"#/components/schemas/SecurityTelemetryCountersDto"},"windowEnd":{"type":"string","format":"date-time"},"windowStart":{"type":"string","format":"date-time"}}},"SecurityTelemetryCountersDto":{"type":"object","required":["registrations","registrationAbuseRejected","maxRegistrationsPerMinute","maxMaskedNetworkVelocity","asnCoverageAvailable","maxAsnRegistrationsPerMinute","distinctAsnCount","userAgentCategories","smtpOutcomes","passwordRecoveryOutcomes","emailSignals","duplicateProfiles","alertsTriggered"],"properties":{"alertsTriggered":{"type":"integer","format":"int64"},"asnCoverageAvailable":{"type":"boolean"},"distinctAsnCount":{"type":"integer","format":"int64"},"duplicateProfiles":{"$ref":"#/components/schemas/DuplicateProfileCountersDto"},"emailSignals":{"$ref":"#/components/schemas/EmailSignalCountersDto"},"maxAsnRegistrationsPerMinute":{"type":"integer","format":"int64"},"maxMaskedNetworkVelocity":{"type":"integer","format":"int64"},"maxRegistrationsPerMinute":{"type":"integer","format":"int64"},"passwordRecoveryOutcomes":{"$ref":"#/components/schemas/PasswordRecoveryOutcomeCountersDto"},"registrationAbuseRejected":{"$ref":"#/components/schemas/RegistrationAbuseCountersDto"},"registrations":{"$ref":"#/components/schemas/RegistrationTelemetryCountersDto"},"smtpOutcomes":{"$ref":"#/components/schemas/SmtpOutcomeCountersDto"},"userAgentCategories":{"$ref":"#/components/schemas/UserAgentCategoryCountersDto"}}},"SecurityTelemetryResponseDto":{"type":"object","required":["windowStart","windowEnd","disposableEmailDatasetVersion","current","baseline","registrationActivation"],"properties":{"baseline":{"$ref":"#/components/schemas/SecurityTelemetryBaselineDto"},"current":{"$ref":"#/components/schemas/SecurityTelemetryCountersDto"},"disposableEmailDatasetVersion":{"type":"string"},"registrationActivation":{"$ref":"#/components/schemas/RegistrationActivationComparisonDto"},"windowEnd":{"type":"string","format":"date-time"},"windowStart":{"type":"string","format":"date-time"}}},"SmtpOutcomeCountersDto":{"type":"object","required":["sent","failed"],"properties":{"failed":{"type":"integer","format":"int64"},"sent":{"type":"integer","format":"int64"}}},"StockAdjustmentCreateRequest":{"type":"object","required":["title","items"],"properties":{"date":{"type":["string","null"],"format":"date-time","description":"Дата документа. Не указана — текущий момент. Дата в закрытом учётном\nпериоде и дата в будущем отвергаются с `422`."},"items":{"type":"array","items":{"$ref":"#/components/schemas/StockAdjustmentLineRequest"}},"reason":{"type":["string","null"]},"title":{"type":"string"}}},"StockAdjustmentCreatedResponse":{"type":"object","required":["adjustment","items"],"properties":{"adjustment":{"$ref":"#/components/schemas/StockAdjustmentDto"},"items":{"type":"array","items":{"$ref":"#/components/schemas/StockAdjustmentLineDto"}}}},"StockAdjustmentDto":{"type":"object","required":["id","title","date"],"properties":{"date":{"type":"string","format":"date-time"},"id":{"type":"string"},"reason":{"type":["string","null"]},"title":{"type":"string"}}},"StockAdjustmentLineDto":{"type":"object","required":["item_variant_id","quantity_delta","amount_after"],"properties":{"amount_after":{"type":"string","description":"Остаток на этом месте хранения после применения корректировки — чтобы\nагенту не приходилось перечитывать `/stock` ради проверки."},"item_variant_id":{"type":"string"},"quantity_delta":{"type":"string"},"storage_place_id":{"type":["string","null"]}}},"StockAdjustmentLineRequest":{"type":"object","description":"Строка запроса: на сколько изменить остаток варианта в месте хранения.","required":["item_variant_id","quantity_delta"],"properties":{"item_variant_id":{"type":"integer","format":"int64"},"quantity_delta":{"type":"string","description":"Знаковая величина: недостача отрицательна, излишек положителен. Ноль\nотвергается — корректировка на ноль ничего не корректирует."},"storage_place_id":{"type":["integer","null"],"format":"int64","description":"Не указано — берётся место хранения клиента по умолчанию, ровно как у\nприхода по заказу поставщику без явного склада."}}},"StockEntryDto":{"type":"object","required":["id","item_id","amount"],"properties":{"amount":{"type":"string"},"id":{"type":"string"},"item_id":{"type":"string"},"item_variant_id":{"type":["string","null"]},"storage_place_id":{"type":["string","null"]}}},"StockListResponse":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/StockEntryDto"}},"next_cursor":{"type":["string","null"]}}},"StockMovementDto":{"type":"object","required":["id","stock_id","amount","date"],"properties":{"amount":{"type":"string","description":"Приход — положительное число, расход — отрицательное."},"date":{"type":"string","format":"date-time"},"entity_id":{"type":["string","null"],"description":"id документа-источника в терминах `entity_type`."},"entity_type":{"type":["string","null"],"description":"Документ-источник: `STOCK_ADJUSTMENT` | `PURCHASE_ORDER` |\n`PURCHASE_ORDER_RECEIPT` | `SHIPMENT` | `MANUFACTURING_ORDER` |\n`SALES_RETURN`. `null` — движение без привязки к документу."},"id":{"type":"string"},"item_id":{"type":["string","null"]},"item_variant_id":{"type":["string","null"]},"sku":{"type":["string","null"]},"stock_id":{"type":"string","description":"Строка остатка, по которой прошло движение."},"storage_place_id":{"type":["string","null"]}}},"StockMovementListResponse":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/StockMovementDto"}},"next_cursor":{"type":["string","null"]}}},"SupplierDto":{"type":"object","required":["id","name","created_at","updated_at"],"properties":{"address":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"currency":{"type":["string","null"],"description":"Валюта расчётов с контрагентом, трёхбуквенный код."},"email":{"type":["string","null"]},"id":{"type":"string"},"inn":{"type":["string","null"],"description":"ИНН — необязательный реквизит (`inn DROP NOT NULL` в baseline)."},"kpp":{"type":["string","null"]},"name":{"type":"string"},"notes":{"type":["string","null"]},"phone":{"type":["string","null"]},"updated_at":{"type":"string","format":"date-time"}}},"SupplierListResponse":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SupplierDto"}},"next_cursor":{"type":["string","null"]}}},"UserAgentCategoryCountersDto":{"type":"object","required":["browser","automation","crawler","other","missing"],"properties":{"automation":{"type":"integer","format":"int64"},"browser":{"type":"integer","format":"int64"},"crawler":{"type":"integer","format":"int64"},"missing":{"type":"integer","format":"int64"},"other":{"type":"integer","format":"int64"}}}},"securitySchemes":{"pat":{"type":"http","scheme":"bearer","bearerFormat":"zol_pat_live_<token>"}}}}