Перейти к содержимому
LegalStack

Сохранить шаблон целиком

POST/api/v1/smartdoc/documents/{id}/save

Авторизация

AuthorizationBearer <токен>

Access token, привязанный к ключу клиента по RFC 9449: заголовок Authorization: DPoP <token> и заголовок DPoP с доказательством для каждого запроса. Сервер выдаёт DPoP-Nonce, который клиент включает в доказательство.

Передаётся в: header

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

id*string

Идентификатор шаблона

Форматuuid

Тело запроса

application/json

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

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

Тело ответа

application/json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/api/v1/smartdoc/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08/save" \  -H "Authorization: Bearer <access_token>" \  -H "Content-Type: application/json" \  -d '{    "blocks": [      {        "depth": 0,        "label": "string",        "order": 0,        "template": "string",        "type": "string",        "variables": {}      }    ],    "title": "string"  }'
{  "blocks": [    {      "depth": 0,      "id": "string",      "label": "string",      "order": 0,      "template": "string",      "type": "string",      "variables": {}    }  ],  "createdAt": "string",  "folderId": "string",  "id": "string",  "status": "string",  "title": "string",  "updatedAt": "string",  "userId": "string"}