Согласования
Маршруты и решения по согласованию.
Список согласований
В: header
Параметры запроса
Фильтр по статусу: in_progress, approved, rejected, revoked
Фильтр по инициатору
Фильтр по участнику
Тело ответа
application/json
curl -X GET "https://loading/api/v1/approvals"[
{
"comments": [
{
"createdAt": "string",
"id": "string",
"text": "string",
"userId": "string",
"userName": "string",
"property1": null,
"property2": null
}
],
"completedAt": "string",
"context": "string",
"createdAt": "string",
"currentStage": 0,
"documentId": "string",
"documentTitle": "string",
"history": [
{
"property1": null,
"property2": null
}
],
"historyChainValid": true,
"id": "string",
"initiatorId": "string",
"initiatorName": "string",
"participants": [
{
"action": "string",
"comment": "string",
"id": "string",
"stageNumber": 0,
"status": "string",
"userId": "string",
"userName": "string",
"property1": null,
"property2": null
}
],
"stages": [
{
"approvalMode": "string",
"id": "string",
"name": "string",
"participants": [
{
"action": "string",
"comment": "string",
"id": "string",
"stageNumber": 0,
"status": "string",
"userId": "string",
"userName": "string",
"property1": null,
"property2": null
}
],
"stageNumber": 0,
"status": "string",
"property1": null,
"property2": null
}
],
"status": "string",
"subjectKind": "string",
"teamId": "string",
"totalStages": 0,
"type": "string",
"updatedAt": "string",
"property1": null,
"property2": null
}
]Создать согласование
В: header
Тело запроса
application/json
TypeScript-определения
Используйте тип request body в TypeScript.
Тело ответа
application/json
curl -X POST "https://loading/api/v1/approvals" \ -H "Content-Type: application/json" \ -d '{ "documentTitle": "string", "stages": [ { "approvalMode": "sequential", "name": "string", "participants": [ { "action": "approve", "userId": "string", "userName": "string" } ] } ], "type": "string" }'{
"comments": [
{
"createdAt": "string",
"id": "string",
"text": "string",
"userId": "string",
"userName": "string",
"property1": null,
"property2": null
}
],
"completedAt": "string",
"context": "string",
"createdAt": "string",
"currentStage": 0,
"documentId": "string",
"documentTitle": "string",
"history": [
{
"property1": null,
"property2": null
}
],
"historyChainValid": true,
"id": "string",
"initiatorId": "string",
"initiatorName": "string",
"participants": [
{
"action": "string",
"comment": "string",
"id": "string",
"stageNumber": 0,
"status": "string",
"userId": "string",
"userName": "string",
"property1": null,
"property2": null
}
],
"stages": [
{
"approvalMode": "string",
"id": "string",
"name": "string",
"participants": [
{
"action": "string",
"comment": "string",
"id": "string",
"stageNumber": 0,
"status": "string",
"userId": "string",
"userName": "string",
"property1": null,
"property2": null
}
],
"stageNumber": 0,
"status": "string",
"property1": null,
"property2": null
}
],
"status": "string",
"subjectKind": "string",
"teamId": "string",
"totalStages": 0,
"type": "string",
"updatedAt": "string",
"property1": null,
"property2": null
}curl -X GET "https://loading/api/v1/approvals/inbox"[
{
"comments": [
{
"createdAt": "string",
"id": "string",
"text": "string",
"userId": "string",
"userName": "string",
"property1": null,
"property2": null
}
],
"completedAt": "string",
"context": "string",
"createdAt": "string",
"currentStage": 0,
"documentId": "string",
"documentTitle": "string",
"history": [
{
"property1": null,
"property2": null
}
],
"historyChainValid": true,
"id": "string",
"initiatorId": "string",
"initiatorName": "string",
"participants": [
{
"action": "string",
"comment": "string",
"id": "string",
"stageNumber": 0,
"status": "string",
"userId": "string",
"userName": "string",
"property1": null,
"property2": null
}
],
"stages": [
{
"approvalMode": "string",
"id": "string",
"name": "string",
"participants": [
{
"action": "string",
"comment": "string",
"id": "string",
"stageNumber": 0,
"status": "string",
"userId": "string",
"userName": "string",
"property1": null,
"property2": null
}
],
"stageNumber": 0,
"status": "string",
"property1": null,
"property2": null
}
],
"status": "string",
"subjectKind": "string",
"teamId": "string",
"totalStages": 0,
"type": "string",
"updatedAt": "string",
"property1": null,
"property2": null
}
]Получить согласование
В: header
Параметры пути
Идентификатор согласования
Тело ответа
application/json
curl -X GET "https://loading/api/v1/approvals/string"{
"comments": [
{
"createdAt": "string",
"id": "string",
"text": "string",
"userId": "string",
"userName": "string",
"property1": null,
"property2": null
}
],
"completedAt": "string",
"context": "string",
"createdAt": "string",
"currentStage": 0,
"documentId": "string",
"documentTitle": "string",
"history": [
{
"property1": null,
"property2": null
}
],
"historyChainValid": true,
"id": "string",
"initiatorId": "string",
"initiatorName": "string",
"participants": [
{
"action": "string",
"comment": "string",
"id": "string",
"stageNumber": 0,
"status": "string",
"userId": "string",
"userName": "string",
"property1": null,
"property2": null
}
],
"stages": [
{
"approvalMode": "string",
"id": "string",
"name": "string",
"participants": [
{
"action": "string",
"comment": "string",
"id": "string",
"stageNumber": 0,
"status": "string",
"userId": "string",
"userName": "string",
"property1": null,
"property2": null
}
],
"stageNumber": 0,
"status": "string",
"property1": null,
"property2": null
}
],
"status": "string",
"subjectKind": "string",
"teamId": "string",
"totalStages": 0,
"type": "string",
"updatedAt": "string",
"property1": null,
"property2": null
}Переименовать согласование
В: header
Параметры пути
Идентификатор согласования
Тело запроса
application/json
TypeScript-определения
Используйте тип request body в TypeScript.
Тело ответа
application/json
application/problem+json
application/problem+json
curl -X PATCH "https://loading/api/v1/approvals/string" \ -H "Content-Type: application/json" \ -d '{ "documentTitle": "string" }'{
"comments": [
{
"createdAt": "string",
"id": "string",
"text": "string",
"userId": "string",
"userName": "string",
"property1": null,
"property2": null
}
],
"completedAt": "string",
"context": "string",
"createdAt": "string",
"currentStage": 0,
"documentId": "string",
"documentTitle": "string",
"history": [
{
"property1": null,
"property2": null
}
],
"historyChainValid": true,
"id": "string",
"initiatorId": "string",
"initiatorName": "string",
"participants": [
{
"action": "string",
"comment": "string",
"id": "string",
"stageNumber": 0,
"status": "string",
"userId": "string",
"userName": "string",
"property1": null,
"property2": null
}
],
"stages": [
{
"approvalMode": "string",
"id": "string",
"name": "string",
"participants": [
{
"action": "string",
"comment": "string",
"id": "string",
"stageNumber": 0,
"status": "string",
"userId": "string",
"userName": "string",
"property1": null,
"property2": null
}
],
"stageNumber": 0,
"status": "string",
"property1": null,
"property2": null
}
],
"status": "string",
"subjectKind": "string",
"teamId": "string",
"totalStages": 0,
"type": "string",
"updatedAt": "string",
"property1": null,
"property2": null
}{
"code": "string",
"detail": "string",
"errors": [
{
"name": "string",
"pointer": "string",
"reason": "string",
"rule": "string"
}
],
"instance": "string",
"request_id": "string",
"status": 0,
"title": "string",
"trace_id": "string",
"type": "http://example.com",
"property1": null,
"property2": null
}{
"code": "string",
"detail": "string",
"errors": [
{
"name": "string",
"pointer": "string",
"reason": "string",
"rule": "string"
}
],
"instance": "string",
"request_id": "string",
"status": 0,
"title": "string",
"trace_id": "string",
"type": "http://example.com",
"property1": null,
"property2": null
}Отозвать согласование
В: header
Параметры пути
Идентификатор согласования
Тело запроса
application/json
TypeScript-определения
Используйте тип request body в TypeScript.
Причина отзыва
Тело ответа
application/json
curl -X DELETE "https://loading/api/v1/approvals/string" \ -H "Content-Type: application/json" \ -d '{}'{
"comments": [
{
"createdAt": "string",
"id": "string",
"text": "string",
"userId": "string",
"userName": "string",
"property1": null,
"property2": null
}
],
"completedAt": "string",
"context": "string",
"createdAt": "string",
"currentStage": 0,
"documentId": "string",
"documentTitle": "string",
"history": [
{
"property1": null,
"property2": null
}
],
"historyChainValid": true,
"id": "string",
"initiatorId": "string",
"initiatorName": "string",
"participants": [
{
"action": "string",
"comment": "string",
"id": "string",
"stageNumber": 0,
"status": "string",
"userId": "string",
"userName": "string",
"property1": null,
"property2": null
}
],
"stages": [
{
"approvalMode": "string",
"id": "string",
"name": "string",
"participants": [
{
"action": "string",
"comment": "string",
"id": "string",
"stageNumber": 0,
"status": "string",
"userId": "string",
"userName": "string",
"property1": null,
"property2": null
}
],
"stageNumber": 0,
"status": "string",
"property1": null,
"property2": null
}
],
"status": "string",
"subjectKind": "string",
"teamId": "string",
"totalStages": 0,
"type": "string",
"updatedAt": "string",
"property1": null,
"property2": null
}Комментарии согласования
В: header
Параметры пути
Идентификатор согласования
Тело ответа
application/json
curl -X GET "https://loading/api/v1/approvals/string/comments"[
{
"createdAt": "string",
"id": "string",
"text": "string",
"userId": "string",
"userName": "string",
"property1": null,
"property2": null
}
]Добавить комментарий к согласованию
В: header
Параметры пути
Идентификатор согласования
Тело запроса
application/json
TypeScript-определения
Используйте тип request body в TypeScript.
Текст комментария
Тело ответа
application/json
curl -X POST "https://loading/api/v1/approvals/string/comments" \ -H "Content-Type: application/json" \ -d '{ "text": "string" }'{
"createdAt": "string",
"id": "string",
"text": "string",
"userId": "string",
"userName": "string",
"property1": null,
"property2": null
}Документ, прикреплённый к согласованию
В: header
Параметры пути
Идентификатор согласования
Тело ответа
application/json
application/problem+json
application/problem+json
application/problem+json
curl -X GET "https://loading/api/v1/approvals/string/document"{
"blocks": [
{
"indentLevel": 0,
"label": "string",
"number": "string",
"text": "string",
"type": "string"
}
],
"source": "current",
"title": "string"
}{
"code": "string",
"detail": "string",
"errors": [
{
"name": "string",
"pointer": "string",
"reason": "string",
"rule": "string"
}
],
"instance": "string",
"request_id": "string",
"status": 0,
"title": "string",
"trace_id": "string",
"type": "http://example.com",
"property1": null,
"property2": null
}{
"code": "string",
"detail": "string",
"errors": [
{
"name": "string",
"pointer": "string",
"reason": "string",
"rule": "string"
}
],
"instance": "string",
"request_id": "string",
"status": 0,
"title": "string",
"trace_id": "string",
"type": "http://example.com",
"property1": null,
"property2": null
}{
"code": "string",
"detail": "string",
"errors": [
{
"name": "string",
"pointer": "string",
"reason": "string",
"rule": "string"
}
],
"instance": "string",
"request_id": "string",
"status": 0,
"title": "string",
"trace_id": "string",
"type": "http://example.com",
"property1": null,
"property2": null
}Окончательно удалить согласование
В: header
Параметры пути
Идентификатор согласования
Тело ответа
application/json
curl -X DELETE "https://loading/api/v1/approvals/string/permanent"{
"success": true
}Перезапустить согласование
В: header
Параметры пути
Идентификатор согласования
Тело ответа
application/json
curl -X POST "https://loading/api/v1/approvals/string/restart"{
"comments": [
{
"createdAt": "string",
"id": "string",
"text": "string",
"userId": "string",
"userName": "string",
"property1": null,
"property2": null
}
],
"completedAt": "string",
"context": "string",
"createdAt": "string",
"currentStage": 0,
"documentId": "string",
"documentTitle": "string",
"history": [
{
"property1": null,
"property2": null
}
],
"historyChainValid": true,
"id": "string",
"initiatorId": "string",
"initiatorName": "string",
"participants": [
{
"action": "string",
"comment": "string",
"id": "string",
"stageNumber": 0,
"status": "string",
"userId": "string",
"userName": "string",
"property1": null,
"property2": null
}
],
"stages": [
{
"approvalMode": "string",
"id": "string",
"name": "string",
"participants": [
{
"action": "string",
"comment": "string",
"id": "string",
"stageNumber": 0,
"status": "string",
"userId": "string",
"userName": "string",
"property1": null,
"property2": null
}
],
"stageNumber": 0,
"status": "string",
"property1": null,
"property2": null
}
],
"status": "string",
"subjectKind": "string",
"teamId": "string",
"totalStages": 0,
"type": "string",
"updatedAt": "string",
"property1": null,
"property2": null
}Решение участника по этапу
В: header
Параметры пути
Идентификатор согласования
Идентификатор этапа
Идентификатор участника
Тело запроса
application/json
TypeScript-определения
Используйте тип request body в TypeScript.
Тело ответа
application/json
curl -X PATCH "https://loading/api/v1/approvals/string/stages/string/participants/string" \ -H "Content-Type: application/json" \ -d '{ "action": "approve" }'{
"comments": [
{
"createdAt": "string",
"id": "string",
"text": "string",
"userId": "string",
"userName": "string",
"property1": null,
"property2": null
}
],
"completedAt": "string",
"context": "string",
"createdAt": "string",
"currentStage": 0,
"documentId": "string",
"documentTitle": "string",
"history": [
{
"property1": null,
"property2": null
}
],
"historyChainValid": true,
"id": "string",
"initiatorId": "string",
"initiatorName": "string",
"participants": [
{
"action": "string",
"comment": "string",
"id": "string",
"stageNumber": 0,
"status": "string",
"userId": "string",
"userName": "string",
"property1": null,
"property2": null
}
],
"stages": [
{
"approvalMode": "string",
"id": "string",
"name": "string",
"participants": [
{
"action": "string",
"comment": "string",
"id": "string",
"stageNumber": 0,
"status": "string",
"userId": "string",
"userName": "string",
"property1": null,
"property2": null
}
],
"stageNumber": 0,
"status": "string",
"property1": null,
"property2": null
}
],
"status": "string",
"subjectKind": "string",
"teamId": "string",
"totalStages": 0,
"type": "string",
"updatedAt": "string",
"property1": null,
"property2": null
}