openapi: 3.0.3
info:
title: 'Сервис Интеграции 1C c Odinn'
description: ''
version: 1.0.0
servers:
-
url: 'https://1c.stage.odinn.cloud'
tags:
-
name: Endpoints
description: ''
components:
securitySchemes:
default:
type: http
scheme: bearer
description: 'Вы можете получить токен, обратившись к администратору.'
security:
-
default: []
paths:
/api/v1/operations/create:
post:
summary: 'Создать Процессы на основе ProductionOperation'
operationId: ProductionOperation
description: "Создает процессы на основе данных из Document.ProductionOperation.\nНа каждый материал(Document.Materials) создается отдельный процесс.\n\nЕсли передается Информация о назначенном работнике - маппинг на пользователя/бригаду должен быть сделан заранее.\n\nВ случае успеха - вернет массив ИД созданных Процессов.\n\nВ случае ошибки (status != 200) вернет в поле `message` описание ошибки.\n\nНиже приведено описание структуры принимаемого JSON массива."
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: array
items:
type: object
example:
-
Header_ID: df78a394-92c8-11f0-aa91-10e7c6f1a4a0
Process_ID: a00e53eb-cc72-46bb-9ff1-84b328dda0c5
Material_ID: 17acca40-58b0-11f0-8746-a81e84160fdf
process:
template_id: a00e4e09-c220-46e0-b7d8-7dd945ebfd82
object_id: a00e53eb-bc6d-4dca-8c61-d45823c0aa5c
loco_id: null
is_urgent: false
start_at: null
notes: 'Создан через сервис интеграции с 1C. ProductionOperation: df78a394-92c8-11f0-aa91-10e7c6f1a4a0'
company_id: 00000000-0000-0000-0004-000000000001
owner_id: 2
manual_assign_brigade_id: 9ff8163a-cd20-449b-b198-b4b6353a1867
manual_assign_user_id: null
status: created
event_id: null
exclusive_or: true
id: a00e53eb-cc72-46bb-9ff1-84b328dda0c5
author_id: 2
updated_at: '2025-10-07T10:46:19.000000Z'
created_at: '2025-10-07T10:46:19.000000Z'
is_rating_available: false
name_dynamic: 'СВЕРЛИЛЬНАЯ С ЧПУ ( МУФТА )'
notes_dynamic: null
template:
id: a00e4e09-c220-46e0-b7d8-7dd945ebfd82
name: 'Задание на производство из 1С'
notes: null
name_template: '{object.fields.operation} ( {object.fields.material} )'
notes_template: null
is_sequential: true
is_assigned_manually: false
is_stopped_if_rejected: false
color: null
company_id: 00000000-0000-0000-0004-000000000001
author_id: 2
revision: 4
usage_count: 1
last_used_at: '2025-10-07T10:46:19.000000Z'
created_at: '2025-10-07T10:29:52.000000Z'
updated_at: '2025-10-07T10:46:19.000000Z'
close_event_template_id: null
is_rejected_if_command_rejected: false
reject_event_template_id: null
is_rateable: false
exclusive_or: true
is_single: false
estimated_time: null
files: []
object:
id: a00e53eb-bc6d-4dca-8c61-d45823c0aa5c
template_id: 9ff81410-15e1-46ef-a375-9ac62500f8e6
name: 'МУФТА ГФ2171ФРЕЗЕРНЫЙ С ЧПУ (19857) 951445'
takes: projects
fields:
count: '0'
work_center: 'ГФ2171ФРЕЗЕРНЫЙ С ЧПУ (19857)'
defect_count: '0'
name: 'МУФТА ГФ2171ФРЕЗЕРНЫЙ С ЧПУ (19857) 951445'
operation: 'СВЕРЛИЛЬНАЯ С ЧПУ'
material: МУФТА
otk_count: '0'
otk_defect_count: '0'
targets:
count: '10'
defect_count: '10'
otk_count: '10'
otk_defect_count: '10'
parent_id: null
root_id: null
company_id: 00000000-0000-0000-0004-000000000001
author_id: 2
created_at: '2025-10-07T10:46:19.000000Z'
updated_at: '2025-10-07T10:46:19.000000Z'
params: null
template:
id: 9ff81410-15e1-46ef-a375-9ac62500f8e6
name: 'Задание на производство из 1С'
name_plural: 'Задание на производство из 1С'
slug: null
takes: projects
notes: null
fields:
-
key: name
type: line
title: Название
logged: false
required: true
isKey: true
maxLength: 128
-
key: work_center
type: line
title: РабочийЦентр
logged: false
required: false
isKey: false
maxLength: 255
-
key: operation
type: line
title: Операция
logged: false
required: false
isKey: false
maxLength: 255
-
key: material
type: line
title: Материал
logged: true
required: true
isKey: false
maxLength: 255
-
key: count
type: int
title: 'Факт. Количество'
operator: '>='
target: '100'
logged: true
required: true
isKey: false
min: 0
max: 10000000
-
key: defect_count
type: int
title: 'Количество Брака'
operator: '>='
target: '100'
logged: true
required: true
isKey: false
min: 0
max: 10000000
-
key: otk_count
type: int
title: 'ОТК: Факт. Количество'
operator: '>='
target: '100'
logged: true
required: true
isKey: false
min: 0
max: 10000000
-
key: otk_defect_count
type: int
title: 'ОТК: Количество Брака'
operator: '>='
target: '100'
logged: true
required: true
isKey: false
min: 0
max: 10000000
parent_id: null
root_id: null
company_id: null
author_id: 2
revision: 2
usage_count: 82
last_used_at: '2025-10-07T10:46:19.000000Z'
created_at: '2025-09-26T09:19:33.000000Z'
updated_at: '2025-10-07T10:46:19.000000Z'
params: null
template_twin_id: null
twin_id: null
loco: null
tasks:
-
id: a00e53eb-ce0b-4ece-bf03-d92b101f4951
template_id: a00e4e17-247f-4839-a097-4f46d56f1815
project_id: a00e53eb-cc72-46bb-9ff1-84b328dda0c5
object_id: a00e53eb-bc6d-4dca-8c61-d45823c0aa5c
notes: null
status: created
order: 0
company_id: 00000000-0000-0000-0004-000000000001
responsible_id: null
owner_id: 2
author_id: 2
created_at: '2025-10-07T10:46:19.000000Z'
updated_at: '2025-10-07T10:46:19.000000Z'
rating: null
started_at: null
is_rating_available: false
name_dynamic: Производство
notes_dynamic: null
template:
id: a00e4e17-247f-4839-a097-4f46d56f1815
name: Производство
notes: null
name_template: null
type: 1
notes_template: null
has_section_a: true
has_section_b: true
has_section_c: true
has_section_d: true
has_section_e: false
has_section_f: false
company_id: 00000000-0000-0000-0004-000000000001
author_id: 2
revision: 3
usage_count: 1
last_used_at: '2025-10-07T10:46:19.000000Z'
created_at: '2025-10-07T10:30:01.000000Z'
updated_at: '2025-10-07T10:46:19.000000Z'
is_sequential: false
is_rateable: false
is_single: false
estimated_time: null
next_tasks:
-
id: a00e53eb-d741-4437-8ceb-f41cd4b83292
template_id: a00e50d9-e3d4-4567-b0cc-01b13de5cb3a
project_id: a00e53eb-cc72-46bb-9ff1-84b328dda0c5
object_id: a00e53eb-bc6d-4dca-8c61-d45823c0aa5c
notes: null
status: created
order: 0
company_id: 00000000-0000-0000-0004-000000000001
responsible_id: null
owner_id: 2
author_id: 2
created_at: '2025-10-07T10:46:19.000000Z'
updated_at: '2025-10-07T10:46:19.000000Z'
rating: null
started_at: null
is_rating_available: false
pivot:
next_entity_type: task
task_id: a00e53eb-ce0b-4ece-bf03-d92b101f4951
next_entity_id: a00e53eb-d741-4437-8ceb-f41cd4b83292
next_condition_entities: []
-
id: a00e53eb-d741-4437-8ceb-f41cd4b83292
template_id: a00e50d9-e3d4-4567-b0cc-01b13de5cb3a
project_id: a00e53eb-cc72-46bb-9ff1-84b328dda0c5
object_id: a00e53eb-bc6d-4dca-8c61-d45823c0aa5c
notes: null
status: created
order: 0
company_id: 00000000-0000-0000-0004-000000000001
responsible_id: null
owner_id: 2
author_id: 2
created_at: '2025-10-07T10:46:19.000000Z'
updated_at: '2025-10-07T10:46:19.000000Z'
rating: null
started_at: null
is_rating_available: false
name_dynamic: ОТК
notes_dynamic: null
template:
id: a00e50d9-e3d4-4567-b0cc-01b13de5cb3a
name: ОТК
notes: null
name_template: null
type: 1
notes_template: null
has_section_a: true
has_section_b: true
has_section_c: true
has_section_d: true
has_section_e: false
has_section_f: false
company_id: 00000000-0000-0000-0004-000000000001
author_id: 2
revision: 2
usage_count: 1
last_used_at: '2025-10-07T10:46:19.000000Z'
created_at: '2025-10-07T10:37:44.000000Z'
updated_at: '2025-10-07T10:46:19.000000Z'
is_sequential: false
is_rateable: false
is_single: false
estimated_time: null
next_tasks: []
next_condition_entities:
-
id: a00e53eb-dfe3-404e-b591-a2956dadd7a0
type: end
project_id: a00e53eb-cc72-46bb-9ff1-84b328dda0c5
template_id: 00000000-0000-1110-0005-000000000002
company_id: 00000000-0000-0000-0004-000000000001
author_id: 2
status: false
created_at: '2025-10-07T10:46:19.000000Z'
updated_at: '2025-10-07T10:46:19.000000Z'
object_id: a00e53eb-bc6d-4dca-8c61-d45823c0aa5c
data: null
pivot:
next_entity_type: conditional-entity
task_id: a00e53eb-d741-4437-8ceb-f41cd4b83292
next_entity_id: a00e53eb-dfe3-404e-b591-a2956dadd7a0
conditional_entities:
-
id: a00e53eb-cd72-4a85-8133-45aabf823c55
type: start
project_id: a00e53eb-cc72-46bb-9ff1-84b328dda0c5
template_id: 00000000-0000-1110-0005-000000000001
company_id: 00000000-0000-0000-0004-000000000001
author_id: 2
status: true
created_at: '2025-10-07T10:46:19.000000Z'
updated_at: '2025-10-07T10:46:19.000000Z'
object_id: a00e53eb-bc6d-4dca-8c61-d45823c0aa5c
data: null
template:
id: 00000000-0000-1110-0005-000000000001
type: start
company_id: null
author_id: 1
created_at: null
updated_at: null
data: null
next_tasks:
-
id: a00e53eb-ce0b-4ece-bf03-d92b101f4951
template_id: a00e4e17-247f-4839-a097-4f46d56f1815
project_id: a00e53eb-cc72-46bb-9ff1-84b328dda0c5
object_id: a00e53eb-bc6d-4dca-8c61-d45823c0aa5c
notes: null
status: created
order: 0
company_id: 00000000-0000-0000-0004-000000000001
responsible_id: null
owner_id: 2
author_id: 2
created_at: '2025-10-07T10:46:19.000000Z'
updated_at: '2025-10-07T10:46:19.000000Z'
rating: null
started_at: null
is_rating_available: false
pivot:
next_entity_type: task
conditional_entity_id: a00e53eb-cd72-4a85-8133-45aabf823c55
next_entity_id: a00e53eb-ce0b-4ece-bf03-d92b101f4951
next_condition_entities: []
-
id: a00e53eb-dfe3-404e-b591-a2956dadd7a0
type: end
project_id: a00e53eb-cc72-46bb-9ff1-84b328dda0c5
template_id: 00000000-0000-1110-0005-000000000002
company_id: 00000000-0000-0000-0004-000000000001
author_id: 2
status: false
created_at: '2025-10-07T10:46:19.000000Z'
updated_at: '2025-10-07T10:46:19.000000Z'
object_id: a00e53eb-bc6d-4dca-8c61-d45823c0aa5c
data: null
template:
id: 00000000-0000-1110-0005-000000000002
type: end
company_id: null
author_id: 1
created_at: null
updated_at: null
data: null
next_tasks: []
next_condition_entities: []
tags:
- Endpoints
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
Document:
type: object
description: ''
example:
Metadata:
ObjectType: Document.ProductionOperation
Synonym: 'Производственная операция'
Purpose: 'Регистрация факта выпуска продукции и списания материалов в рамках производственного заказа'
Header:
id: df78a394-92c8-11f0-aa91-10e7c6f1a4a0
name: 'СВЕРЛИЛЬНАЯ С ЧПУ'
Organisation:
Ref: 103ab072-24c6-11f0-876a-10bf481c11b7
Description: 'ФОРСЕТИ ООО'
Department:
Ref: 103ab099-24c6-11f0-876a-10bf481c11b7
Description: 'Цех №4 (Металлообработка)'
WorkCenter:
Ref: 17acca35-58b0-11f0-8746-a81e84160fdf
Description: 'ГФ2171ФРЕЗЕРНЫЙ С ЧПУ (19857)'
GrupWorkCenter:
Ref: 17acca31-58b0-11f0-8746-a81e84160fdf
Description: 'ГФ2171 ФРЕЗЕРНЫЙ С ЧПУ '
Worker:
Ref: 4eba13c9-6ed0-11f0-aa41-10e7c6f1a4a0
Description: 'Бригада Смена 3'
TypeWorker: Бригады
DepartmentUchactok: null
quantityPlan: 10
quantityBrak: 0
quantityFact: 0
DateStat: ''
DateEnd: ''
SmenaWork: 'Сменное задание 00-00000094 от 16.09.2025 00:30'
Date: '2025-09-16T09:57:04'
Number: 0000-2.1.1.1
Comment: ''
Products:
-
Product:
Ref: 17acca40-58b0-11f0-8746-a81e84160fdf
Description: МУФТА
Characteristic:
Ref: 17acca42-58b0-11f0-8746-a81e84160fdf
Description: 162.60.128А/МО11
Series: null
Quantity: 10
Unit: null
Materials:
-
Material:
Ref: 17acca40-58b0-11f0-8746-a81e84160fdf
Description: МУФТА
Characteristic:
Ref: d31d568d-572c-11f0-8744-a81e84160fdf
Description: Заготовка
Series: null
Quantity: 10
Unit: null
laborСosts:
-
Performer:
Ref: 4eba13c9-6ed0-11f0-aa41-10e7c6f1a4a0
Description: 'Бригада Смена 3'
TimeType:
Ref: df78a384-92c8-11f0-aa91-10e7c6f1a4a0
Description: Сверление
Quantity: 20
AssignmentWorks: 'Выполнить сверление'
nullable: false
properties:
Metadata:
type: object
description: ''
example: []
nullable: false
properties: { }
Header:
type: object
description: ''
example: []
nullable: false
properties:
id:
type: string
description: 'Значение поля value должно быть корректным UUID.'
example: 3218257b-cf30-3377-88ab-193f252814a5
nullable: false
name:
type: string
description: ''
example: sit
nullable: false
WorkCenter:
type: object
description: ''
example: []
nullable: false
properties:
Ref:
type: string
description: 'Значение поля value должно быть корректным UUID.'
example: ca706e8d-9b33-37a9-91a1-4f72e8b254fa
nullable: false
Description:
type: string
description: ''
example: 'Aut facilis enim ut numquam quam ut est.'
nullable: false
required:
- Ref
- Description
TypeWorker:
type: string
description: 'This field is required when Document.Header.Ref is present.'
example: Сотрудники
nullable: false
enum:
- Бригады
- ФизическиеЛица
- Сотрудники
Worker:
type: object
description: ''
example: []
nullable: false
properties:
Ref:
type: string
description: 'This field is required when Document.Header.TypeWorker is present. Значение поля value должно быть корректным UUID.'
example: 8f1c80ad-3041-3268-bfd1-c6fa6b977cca
nullable: false
required:
- id
- name
Materials:
type: array
description: ''
example: null
items:
type: object
properties:
Material:
type: object
description: ''
example: []
nullable: false
properties:
Description:
type: string
description: ''
example: 'Omnis id officiis consequatur consectetur non.'
nullable: false
Ref:
type: string
description: 'Значение поля value должно быть корректным UUID.'
example: bfa3ced0-e431-336a-9b56-777315670d06
nullable: false
required:
- Description
- Ref
Quantity:
type: integer
description: ''
example: 2
nullable: false
required:
- Quantity
required:
- Metadata
- Header
required:
- Document
'/api/v1/commands/{id}':
get:
summary: 'Получить информацию о команде'
operationId: ''
description: 'Метод-прокси `api/v1/commands/{id}`'
parameters: []
responses:
401:
description: ''
content:
application/json:
schema:
type: object
example:
message: Unauthorized
properties:
message:
type: string
example: Unauthorized
tags:
- Endpoints
parameters:
-
in: path
name: id
description: 'Идентификатор (UUID)'
example: 2c143f1a-a23b-3d30-b573-288dd265f490
required: true
schema:
type: uuid
'/api/v1/processes/{id}':
get:
summary: 'Получить информацию о процессе'
operationId: ''
description: 'Метод-прокси `api/v2/projects/{id}`'
parameters: []
responses:
401:
description: ''
content:
application/json:
schema:
type: object
example:
message: Unauthorized
properties:
message:
type: string
example: Unauthorized
tags:
- Endpoints
parameters:
-
in: path
name: id
description: 'Идентификатор (UUID)'
example: c619c09c-cf58-37be-ad79-9d6af3b4ffdf
required: true
schema:
type: uuid