如何发送文件供签署?

谁可以使用此功能?

Available on all Developer API plans.

所有成员

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

按照这些步骤,您将创建一个信封,添加一个文档,设置一个收件人,插入一个签名注释,最后发送信封供签署。

必备条件

第 1 步:创建信封

信封是一个由收件人签名的容器。

  1. POST /v2/信封 端点发送请求以创建一个新信封。 {
    "name": "My wonderful envelope",
    "flow_type": "REQUEST_SIGNATURE",
    "legality_level": "SES",
    "expires_at": 1831280113,
    "sandbox": true
    }
  2. 将您的 API 密钥包含在 授权 头中。
  3. 一旦成功,您将收到一个 信封 对象。

    { "id": "<string>" ... }
  4. 保存 id信封_id

第 2 步:将文档添加到您的信封

  1. Use the POST /v2/envelope/{envelope_id}/document endpoint to add a document.

  2. Replace {envelope_id} with the ID you received in Step 1.

  3. Send a POST request with the document file in the request body as multipart/form-data.
  4. On success, you'll receive a Document object as a response.
    { "id": "<string>" ... }

  5. id 另存为 文档_id 以供以后使用。

第 3 步:为您的信封设置收件人

  1. Use the POST /v2/envelope/{envelope_id}/signing_steps endpoint to add a recipient.

  2. Replace {envelope_id} with your envelope ID.

  3. Send a POST request with the following JSON body:

    {
    "signing_steps": [
    {
    "recipients": [
    {
    "name": "John Doe", "email": "john.doe@example.com", "role": "SIGNER"
    } ] } ] }
  4. 成功后,您将收到一组 签名步骤

  5. 浏览数组并拿起您想要添加签名框架的收件人的 id 名称。 将此 id 另存为 收件人_id

第 4 步:在您的文档中插入签名注释

Before adding a signature annotation, make sure you've defined your signature in the Sign.Plus platform.

  1. Use the POST /v2/envelope/{envelope_id}/annotation endpoint to add a signature annotation.
  2. Replace {envelope_id} with your envelope ID. 
  3. Send a POST request with the following JSON body:
    {
    "recipient_id": "<recipient_id>",
    "document_id": "<document_id>",
    "page": 1,
    "x": 50,
    "y": 20,
    "width": 20,
    "height": 60,
    "required": true,
    "type": "SIGNATURE",
    }

    用适当的值替换 <recipient_id><document_id>

步骤 5:发送您的信封以便签名

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

五. 结论

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

For more detailed information on each API endpoint used in this process, please refer to our API documentation.

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