Send Document
Launches a document into its route, transitioning it from DRAFT to ON_APPROVAL or ON_SIGN depending on the first step. Set a draft route with SetDocumentRoute first (or rely on the document type’s default policy route).
initial_action lets the owner act on the first step while sending: SEND_ONLY (default) just launches; APPROVE_FIRST_STEP approves the owner’s first approval step; SIGN_FIRST_STEP signs it and requires a signature — the same bring-your-own-signature contract as SignDocument.
Required scope: documents:write
Error Codes:
- DEVELOPER.SCOPE_INSUFFICIENT: The key lacks the documents:write scope.
- DOCUMENT_NOT_FOUND: No document with that id is accessible to the key.
- INVALID_ARGUMENT: The document has no route, is already sent, or the signature is missing/malformed for SIGN_FIRST_STEP.
Авторизации
Параметры пути
Document id (UUID).
Тело
Document id (UUID).
Defaults to SEND_ONLY.
SEND_INITIAL_ACTION_UNSPECIFIED, SEND_INITIAL_ACTION_SEND_ONLY, SEND_INITIAL_ACTION_APPROVE_FIRST_STEP, SEND_INITIAL_ACTION_SIGN_FIRST_STEP Required only for SIGN_FIRST_STEP.
SIGN_METHOD_UNSPECIFIED, SIGN_METHOD_NCALAYER, SIGN_METHOD_EGOV_MOBILE Base64-encoded CMS/ЭЦП signature — required only for SIGN_FIRST_STEP.
Ответ
OK
The document after launching into its route.