DocuSign REST api取消分组选项卡 [英] DocuSign REST api un-group tabs

查看:72
本文介绍了DocuSign REST api取消分组选项卡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要取消以草稿状态创建的信封中的标签的分组,这样,如果我在一页上移动一个SignHere标签位置,则其他所有SignHe都不会移动。我先执行GET请求以获取选项卡,然后执行PUT来更新选项卡,通信成功,但选项卡未取消分组。

I need to ungroup the tabs in envelope which is created in 'draft' status so that if I move one SignHere tab position on one page, all other SignHere don't move. I did a GET request to get tabs and then a PUT to update the tabs, the communication is success, but the tabs are not ungrouped.

遵循的步骤:

获取收件人标签

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

响应返回:

{
  "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"
}




  • 遍历SignHereTab,将anchorString更新为空字符串

    • Iterate through the SignHereTabs, Update the anchorString to empty string

      使用更新标签作为请求正文,将ReceivedId和EnvelopeId设置为PUT请求参数。

      Make PUT request using the updates tabs as request body and the recipientId and EnvelopeId as params.


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

      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]

      I get back success response System.HttpResponse[Status=OK, StatusCode=200]

      • After this I make POST request to view the envelope in SalesForce application POST https://demo.docusign.net/restapi/v2/accounts/accountId/envelopes/envelopeId/views/sender

      但是在打开的发件人视图中,我看到SignHere选项卡,所有选项卡仅在第二页而不是所有页面上都是联合国分组的。在GET请求中,我看到响应得到的页码为 2,这是16页文档中首次出现 SignHere。我删除了PUT请求正文中的pageNumber属性,但没有帮助。有什么办法可以对所有页面取消组合?还是如何获取适用于文档中所有页面的signhere选项卡响应?

      But in the sender view opened I see SignHere tabs all tabs are UN-Grouped only on second page and not all the pages. In the GET request I see that I get pagenumber "2" in response which is the first occurrence of 'SignHere' in a 16 page document. I removed the pageNumber attribute in PUT request body, that did not help. Is there any way to apply ungroup to all the pages? Or how to GET the signhere tabs response which is for all the pages in document?

      推荐答案

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

      You are only updating a single instance of the tab. So only one Tab is being ungrouped. Instead you should update all the Tab instances

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

      Use the listRecipientTabs api to retrieve the tabs for the recipient. Specify the query string parameter include_anchor_tab_locations=true to retrieve all the anchor tab locations.


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




      第二步:更新所有锚点标签实例以取消分组


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


      Step II : Update all anchor tab instances to ungroup

      Use the updateRecipientTabs api to set anchorString='' for all tab instances. Other tab properties can be excluded in the PUT call.


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

      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取消对标签的分组。

      See this answer for ungrouping tabs using the C# sdk.

      这篇关于DocuSign REST api取消分组选项卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆