LegalStack

Документы — блоки и роли

Схемы и шаблоны документов.

Типы блоков SmartDoc

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

В: header

Тело ответа

application/json

curl -X GET "https://loading/api/v1/smartdoc/schemas/blocks"
{
  "blockTypes": [
    {
      "label": "string",
      "type": "string",
      "variableCount": 0
    }
  ],
  "count": 0
}

Детали типа блока

GET
/api/v1/smartdoc/schemas/blocks/{type}
АвторизацияBearer <токен>

В: header

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

type*string

Ключ типа блока

Тело ответа

application/json

application/problem+json

curl -X GET "https://loading/api/v1/smartdoc/schemas/blocks/string"
{
  "label": "string",
  "template": "string",
  "type": "string",
  "variables": [
    {
      "key": "string",
      "label": "string",
      "options": null,
      "type": "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
}

Карта ролей сторон по типам договоров

GET
/api/v1/smartdoc/schemas/contract-roles

Тело ответа

application/json

curl -X GET "https://loading/api/v1/smartdoc/schemas/contract-roles"
{
  "count": 0,
  "roles": {
    "property1": [
      "string"
    ],
    "property2": [
      "string"
    ]
  }
}

Роли сторон для типа договора

GET
/api/v1/smartdoc/schemas/contract-roles/{contractType}

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

contractType*string

Тип договора

Тело ответа

application/json

curl -X GET "https://loading/api/v1/smartdoc/schemas/contract-roles/string"
{
  "contractType": "string",
  "isDefault": true,
  "roles": [
    "string"
  ]
}