如何从现有模板发送文档?

谁可以使用此功能?

Available on all Developer API plans.

所有成员

This article will guide you through the process of sending a document for signature using a template with the Sign.Plus eSignature API.

通过遵循这些步骤,您将从模板创建一个信封,设置收件人的详细信息,并发送信封供签名。

必备条件

第 1 步:从模板创建信封

  1. Use the POST /v2/envelope/from_template/{template_id} endpoint to create a new envelope from a template.
  2. Replace {template_id} with the ID of your existing template.
    Where can I find my template ID?
  3. Send a POST request to POST /v2/envelope/from_template/{template_id} with the following JSON body:
    {
    "name": "My wonderful envelope from template"
    }
  4. 将您的 API 密钥包含在 授权 头中。
  5. On success, you will receive an Envelopeobject. {
    "id": "66eb7d0467d2d549b89fcb6d",
    // ...
    "signing_steps": [
    {
    "recipients": [
    {
    "id": "66eb7d0467d2d549b89fcb70",
    "uid": null,
    "name": "",
    "email": "",
    "role": "SIGNER",
    "verification": null
    }
    ]
    },
    {
    "recipients": [
    {
    "id": "66eb7d0467d2d549b89fcb71",
    "uid": null,
    "name": "",
    "email": "",
    "role": "RECEIVES_COPY",
    "verification": null
    },
    {
    "id": "66eb7d0467d2d549b89fcb72",
    "uid": null,
    "name": "",
    "email": "",
    "role": "SIGNER",
    "verification": null
    }
    ]
    }
    ],
    "documents": [
    // ...
    ],
    "notification": {
    // ...
    }
    }
  6. 将返回的 id 另存为 信封_id 用于未来的 API 调用。
  7. Record the idof each recipient for later use in the signing process.
    Examples:
    • 66eb7d0467d2d549b89fcb71: First SIGNER(Step 1)
    • 66eb7d0467d2d549b89fcb71: RECEIVES_A_COPY(Step 1)
    • 66eb7d0467d2d549b89fcb72: Second SIGNER(Step 2)

第 2 步:设置收件人详细信息

如果您的模板没有固定收件人,您需要设置或更新收件人详细信息:

  1. Use the POST /v2/envelope/{envelope_id}/signing_steps endpoint to update recipient information.
  2. Replace {envelope_id} with the ID you received in Step 1.
  3. Send a POST request with the following JSON body:
    {
    "signing_steps": [
    {
    "recipients": [
    {
    "id": "66eb7d0467d2d549b89fcb70",
    "name": "John Doe",
    "email": "john.doe@example.com",
    "role": "SIGNER"
    }
    ]
    },
    {
    "recipients": [
    {
    "id": "66eb7d0467d2d549b89fcb71",
    "name": "Mark Twain",
    "email": "m.twain@example.com",
    "role": "RECEIVES_COPY"
    },
    {
    "id": "66eb7d0467d2d549b89fcb72",
    "name": "Jane Smith",
    "email": "j.smith@example.com",
    "role": "SIGNER"
    }
    ]
    }
    ]
    }
  4. 成功后,您将收到一组 签名步骤对象。

第 3 步:发送您的信封以便签名

  1. Use the POST /v2/envelope/{envelope_id}/send endpoint to send the envelope.
  2. Replace {envelope_id} with your envelope ID from Step 1.
  3. Send a POST request to this endpoint.
  4. 一旦成功,信封将送交收件人签署。

五. 结论

您现在已经成功地发送了一个使用 Sign.Plus eSignature API模板的文档供签名。 收件人将收到一封包含签名文档链接的电子邮件通知。

使用模板可以大大简化您的文档签名工作流程,尤其是对于经常使用的、布局一致和签名要求的文档。

这篇文章有帮助吗?
0 人中有 0 人觉得有帮助
More Articles in this section