Сервис Интеграции 1C c Odinn

Postman collection → OpenAPI spec →

Введение

Документация предоставляет всю информацию, необходимую вам для работы с нашим API.

Аутентификация запросов

Для аутентификации запросов передайте Authorization заголовок со значением "Bearer {YOUR_AUTH_KEY}".

Все аутентифицированные конечные точки помечены как requires authentication в документации ниже.

Вы можете получить токен, обратившись к администратору.

Endpoints

Создать Процессы на основе ProductionOperation

POST
https://1c.stage.odinn.cloud
/api/v1/operations/create
requires authentication

Создает процессы на основе данных из Document.ProductionOperation. На каждый материал(Document.Materials) создается отдельный процесс.

Если передается Информация о назначенном работнике - маппинг на пользователя/бригаду должен быть сделан заранее.

В случае успеха - вернет массив ИД созданных Процессов.

В случае ошибки (status != 200) вернет в поле message описание ошибки.

Ниже приведено описание структуры принимаемого JSON массива.

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request POST \
    "https://1c.stage.odinn.cloud/api/v1/operations/create" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"Document\": {
        \"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\": \"Выполнить сверление\"
            }
        ]
    }
}"
Example response:
[
    {
        "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": []
                }
            ]
        }
    }
]

Получить информацию о команде

GET
https://1c.stage.odinn.cloud
/api/v1/commands/{id}
requires authentication

Метод-прокси api/v1/commands/{id}

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
uuid
required

Идентификатор (UUID)

Example:
2c143f1a-a23b-3d30-b573-288dd265f490
Example request:
curl --request GET \
    --get "https://1c.stage.odinn.cloud/api/v1/commands/2c143f1a-a23b-3d30-b573-288dd265f490" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    access-control-allow-origin
                                                            : *
                                                         
{
    "message": "Unauthorized"
}

Получить информацию о процессе

GET
https://1c.stage.odinn.cloud
/api/v1/processes/{id}
requires authentication

Метод-прокси api/v2/projects/{id}

Headers

Authorization
Example:
Bearer {YOUR_AUTH_KEY}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
uuid
required

Идентификатор (UUID)

Example:
c619c09c-cf58-37be-ad79-9d6af3b4ffdf
Example request:
curl --request GET \
    --get "https://1c.stage.odinn.cloud/api/v1/processes/c619c09c-cf58-37be-ad79-9d6af3b4ffdf" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
Headers
                                                            cache-control
                                                            : no-cache, private
                                                                                                                    content-type
                                                            : application/json
                                                                                                                    access-control-allow-origin
                                                            : *
                                                         
{
    "message": "Unauthorized"
}