DocuSign REST api 取消分组标签

DocuSign REST api un-group tabs

我需要取消在 'draft' 状态下创建的信封中的标签,这样如果我在一页上移动一个 SignHere 标签位置,所有其他 SignHere 都不会移动。我做了一个 GET 请求来获取选项卡,然后一个 PUT 请求来更新选项卡,通信成功,但选项卡没有取消分组。

遵循的步骤:

获取收件人的选项卡

GET restapi/v2/accounts/{accountId}/envelopes/envelopeId/recipients/1/tabs

响应returns:

{
  "anchorString": "SIGNHERE",
  "anchorUnits": "pixels",
  "anchorXOffset": "0",
  "anchorYoffset": "0",
  "DocumentId": "1",
  "Name": "SignHere",
  "optional": "false",
  "pageNumber": "2",
  "RecipientId": "1",
  "TabLabel": "Sign Here",
  "xPosition": "63",
  "yPosition": "260"
}

PUT /v2/accounts/accountId/envelopes/envelopeId/recipients/recipientId/tabs

请求正文:

{
  "signHereTabs": [
    {
      "yPosition": "260",
      "xPosition": "63",
      "width": null,
      "TabLabel": "Sign Here",
      "tabid": "37dac2a5-c5fa-4726-b28a-3ec7af7e4189",
      "ScaleValue": "1.0",
      "required": null,
      "RecipientId": "1",
      "optional": "false",
      "Name": "SignHere",
      "fontSize": null,
      "font": null,
      "DocumentId": "1",
      "anchorYoffset": "0",
      "anchorXOffset": "0",
      "anchorUnits": "pixels",
      "anchorString": "",
      "anchorIgnoreIfNotPresent": null
    }
  ]
}

我收到成功响应 System.HttpResponse[Status=OK, StatusCode=200]

但在打开的发件人视图中,我看到 SignHere 选项卡所有选项卡仅在第二页而非所有页面上都是未分组的。在 GET 请求中,我看到我得到页码“2”作为响应,这是 'SignHere' 在 16 页文档中的第一次出现。我删除了 PUT 请求正文中的 pageNumber 属性,但没有帮助。有没有办法将取消分组应用于所有页面?或者如何获取文档中所有页面的 signhere 选项卡响应?

您只更新了选项卡的一个实例。所以只有一个标签被取消分组。相反,您应该更新所有 Tab 实例


第 I 步:检索所有锚选项卡位置

使用 listRecipientTabs api 检索收件人的标签。指定查询字符串参数 include_anchor_tab_locations=true 以检索所有锚选项卡位置。

GET /v2/accounts/{accId}/envelopes/{envId}/recipients/{recipId}/tabs?include_anchor_tab_locations=true


第 II 步:更新所有锚选项卡实例以取消分组

使用 updateRecipientTabs api 为所有选项卡实例设置 anchorString=''。可以在 PUT 调用中排除其他选项卡属性。

PUT /v2/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/tabs

{
  "signHereTabs": [
    {
      "anchorString": "",
      "tabid": "37dac2a5-c5fa-4726-b28a-3ec7af7e4189"
    },
    {
      "anchorString": "",
      "tabid": "<Specify Tab Id here>"
    },
    {
      "anchorString": "",
      "tabid": "<Specify Tab Id here>"
    } 
  ]
}

有关使用 C# sdk 取消分组选项卡的信息,请参阅此