LegalStack

Автоматизации — процессы

Управление workflow-процессами.

Список workflows

GET
/api/v1/workflows
АвторизацияBearer <токен>

В: header

Параметры запроса

status?string

Фильтр по статусу процесса

assignee?string

Фильтр по ответственному

Тело ответа

application/json

curl -X GET "https://loading/api/v1/workflows"
[
  {
    "assignedTo": "string",
    "createdAt": "string",
    "createdBy": "string",
    "documentId": "string",
    "dueDate": "string",
    "id": "string",
    "name": "string",
    "status": "string",
    "steps": [
      {
        "property1": null,
        "property2": null
      }
    ],
    "type": "string",
    "property1": null,
    "property2": null
  }
]

Создать workflow

POST
/api/v1/workflows
АвторизацияBearer <токен>

В: header

Тело запроса

application/json

TypeScript-определения

Используйте тип request body в TypeScript.

Тело ответа

application/json

curl -X POST "https://loading/api/v1/workflows" \  -H "Content-Type: application/json" \  -d '{    "documentId": "string",    "name": "string",    "steps": [      {        "id": "string",        "type": "string"      }    ]  }'
{
  "assignedTo": "string",
  "createdAt": "string",
  "createdBy": "string",
  "documentId": "string",
  "dueDate": "string",
  "id": "string",
  "name": "string",
  "status": "string",
  "steps": [
    {
      "property1": null,
      "property2": null
    }
  ],
  "type": "string",
  "property1": null,
  "property2": null
}

Активные workflows

GET
/api/v1/workflows/active
АвторизацияBearer <токен>

В: header

Тело ответа

application/json

curl -X GET "https://loading/api/v1/workflows/active"
[
  {
    "assignedTo": "string",
    "createdAt": "string",
    "createdBy": "string",
    "documentId": "string",
    "dueDate": "string",
    "id": "string",
    "name": "string",
    "status": "string",
    "steps": [
      {
        "property1": null,
        "property2": null
      }
    ],
    "type": "string",
    "property1": null,
    "property2": null
  }
]

Workflows связанные с документом

GET
/api/v1/workflows/document/{documentId}
АвторизацияBearer <токен>

В: header

Параметры пути

documentId*string

Идентификатор документа

Тело ответа

application/json

curl -X GET "https://loading/api/v1/workflows/document/string"
[
  {
    "assignedTo": "string",
    "createdAt": "string",
    "createdBy": "string",
    "documentId": "string",
    "dueDate": "string",
    "id": "string",
    "name": "string",
    "status": "string",
    "steps": [
      {
        "property1": null,
        "property2": null
      }
    ],
    "type": "string",
    "property1": null,
    "property2": null
  }
]

Просроченные workflows

GET
/api/v1/workflows/overdue
АвторизацияBearer <токен>

В: header

Тело ответа

application/json

curl -X GET "https://loading/api/v1/workflows/overdue"
[
  {
    "assignedTo": "string",
    "createdAt": "string",
    "createdBy": "string",
    "documentId": "string",
    "dueDate": "string",
    "id": "string",
    "name": "string",
    "status": "string",
    "steps": [
      {
        "property1": null,
        "property2": null
      }
    ],
    "type": "string",
    "property1": null,
    "property2": null
  }
]

Шаблоны workflows

GET
/api/v1/workflows/templates/available
АвторизацияBearer <токен>

В: header

Тело ответа

application/json

curl -X GET "https://loading/api/v1/workflows/templates/available"
[
  {
    "description": "string",
    "name": "string",
    "property1": null,
    "property2": null
  }
]

Создать workflow из шаблона

POST
/api/v1/workflows/templates/{templateName}
АвторизацияBearer <токен>

В: header

Параметры пути

templateName*string

Имя шаблона (см. GET /templates/available)

Тело запроса

application/json

TypeScript-определения

Используйте тип request body в TypeScript.

Тело ответа

application/json

application/problem+json

curl -X POST "https://loading/api/v1/workflows/templates/string" \  -H "Content-Type: application/json" \  -d '{    "documentId": "string"  }'
{
  "assignedTo": "string",
  "createdAt": "string",
  "createdBy": "string",
  "documentId": "string",
  "dueDate": "string",
  "id": "string",
  "name": "string",
  "status": "string",
  "steps": [
    {
      "property1": null,
      "property2": null
    }
  ],
  "type": "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
}

Получить workflow

GET
/api/v1/workflows/{id}
АвторизацияBearer <токен>

В: header

Параметры пути

id*string

Идентификатор процесса

Тело ответа

application/json

curl -X GET "https://loading/api/v1/workflows/string"
{
  "assignedTo": "string",
  "createdAt": "string",
  "createdBy": "string",
  "documentId": "string",
  "dueDate": "string",
  "id": "string",
  "name": "string",
  "status": "string",
  "steps": [
    {
      "property1": null,
      "property2": null
    }
  ],
  "type": "string",
  "property1": null,
  "property2": null
}

Удалить workflow

DELETE
/api/v1/workflows/{id}
АвторизацияBearer <токен>

В: header

Параметры пути

id*string

Идентификатор процесса

Тело ответа

application/json

curl -X DELETE "https://loading/api/v1/workflows/string"
{
  "message": "string"
}

Обновить workflow

PUT
/api/v1/workflows/{id}
АвторизацияBearer <токен>

В: header

Параметры пути

id*string

Идентификатор процесса

Тело запроса

application/json

TypeScript-определения

Используйте тип request body в TypeScript.

Тело ответа

application/json

curl -X PUT "https://loading/api/v1/workflows/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "assignedTo": "string",
  "createdAt": "string",
  "createdBy": "string",
  "documentId": "string",
  "dueDate": "string",
  "id": "string",
  "name": "string",
  "status": "string",
  "steps": [
    {
      "property1": null,
      "property2": null
    }
  ],
  "type": "string",
  "property1": null,
  "property2": null
}

Отменить workflow

POST
/api/v1/workflows/{id}/cancel
АвторизацияBearer <токен>

В: header

Параметры пути

id*string

Идентификатор процесса

Тело запроса

application/json

TypeScript-определения

Используйте тип request body в TypeScript.

reason?string

Причина отмены

Тело ответа

application/json

curl -X POST "https://loading/api/v1/workflows/string/cancel" \  -H "Content-Type: application/json" \  -d '{}'
{
  "message": "string"
}

Приостановить workflow

POST
/api/v1/workflows/{id}/pause
АвторизацияBearer <токен>

В: header

Параметры пути

id*string

Идентификатор процесса

Тело запроса

application/json

TypeScript-определения

Используйте тип request body в TypeScript.

reason?string

Причина паузы

Тело ответа

application/json

curl -X POST "https://loading/api/v1/workflows/string/pause" \  -H "Content-Type: application/json" \  -d '{}'
{
  "message": "string"
}

Возобновить workflow

POST
/api/v1/workflows/{id}/resume
АвторизацияBearer <токен>

В: header

Параметры пути

id*string

Идентификатор процесса

Тело ответа

application/json

curl -X POST "https://loading/api/v1/workflows/string/resume"
{
  "message": "string"
}

Запустить workflow

POST
/api/v1/workflows/{id}/start
АвторизацияBearer <токен>

В: header

Параметры пути

id*string

Идентификатор процесса

Тело ответа

application/json

curl -X POST "https://loading/api/v1/workflows/string/start"
{
  "assignedTo": "string",
  "createdAt": "string",
  "createdBy": "string",
  "documentId": "string",
  "dueDate": "string",
  "id": "string",
  "name": "string",
  "status": "string",
  "steps": [
    {
      "property1": null,
      "property2": null
    }
  ],
  "type": "string",
  "property1": null,
  "property2": null
}