4

I want to update all the tabs for a document at once. The document's envelope was created from a template which already has the recipients and tabs defined, and I am calling this endpoint with the following payload to update the tabs:

{
  "textTabs": [
    {
        "validationPattern": "",
        "validationMessage": "",
        "shared": "false",
        "requireInitialOnSharedChange": "false",
        "requireAll": "false",
        "value": "Some value",
        "originalValue": "Original value",
        "required": "false",
        "locked": "true",
        "concealValueOnDocument": "false",
        "disableAutoSize": "false",
        "maxLength": "4000",
        "tabLabel": "Address",
        "font": "lucidaconsole",
        "fontColor": "black",
        "fontSize": "size12",
        "localePolicy": {},
        "documentId": "1",
        "recipientId": "18870af6-8c21-4e4c-934c-ac329b6f7374",
        "pageNumber": "1",
        "xPosition": "52",
        "yPosition": "94",
        "width": "132",
        "height": "18",
        "tabId": "032f2d80-7a93-4a7c-b969-aea2249fbd04",
        "templateRequired": "false",
        "tabType": "text"
    }
  ]
}

I get the following error in response:

{
  "errorCode": "INVALID_TAB_OPERATION",
  "message": "The Tab specified is not valid for the requested operation. Updated tabs must all be Strikethrough or SmartSection tabs if you're not specifying a valid recipient."
}

recipientId is set to the value I received from this endpoint, but I've also tried setting it to "1" which is the recipientId I pass when creating the template.

What is the correct way to call this endpoint?

Yulian
  • 85
  • 1
  • 6
  • this recipientId in there, where did you get this GUID value from? the envelope or the template? same question for the tabId – Inbar Gazit Jan 22 '20 at 18:19
  • That's covered under the error message. The `tabId` also came from the same endpoint. – Yulian Jan 23 '20 at 16:01
  • can you explain again, do you use an envelope or a template? – Inbar Gazit Jan 23 '20 at 16:13
  • I get the error message when creating an envelope from a template. I initially create a new envelope with a template id, then retrieve a list of the tabs on that envelope, then try to update them. – Yulian Jan 23 '20 at 22:24
  • yes, I understand. What I'm asking is this: the recipientId you have in the code above - is that the template's or the envelope's? – Inbar Gazit Jan 24 '20 at 01:29
  • Ah, ok. The recipient id came from the endpoint that returns envelope tabs, so I'm assuming it's from the envelope. – Yulian Jan 24 '20 at 15:07
  • please share all your code, how you create the envelope, how you get the envelope tabs etc. – Inbar Gazit Jan 24 '20 at 16:58
  • Here is the minimum code I could reproduce it with: [github](https://github.com/yulianovdey/docusign-update-tabs). – Yulian Jan 24 '20 at 21:56
  • well, if that's all your code, I know exactly what is your issue. You don't have a recipient with recipientId "18870af6-8c21-4e4c-934c-ac329b6f7374" – Inbar Gazit Jan 24 '20 at 22:02
  • To clarify, the payload in my original response is not related to the code. That code generates the same error I posted above when you give it a template with a text tab. I guess another way to ask my question is how would I change that code so that it doesn't throw an error and updates the tabs? – Yulian Jan 24 '20 at 22:11
  • you would have to dynamically find our what is the recipientID, it's different every time and inject it into the request to update the tab – Inbar Gazit Jan 24 '20 at 22:13
  • Do you happen to know if this behavior is documented somewhere? As far as I understand I _am_ dynamically finding out the `recipientId` because it's coming back with the tab. I also tried listing out the recipients, and injecting the `recipientIdGuid` as the `recipientId`, as well as using `1` for the value, and mixing and matching `recipientIdGuid` and `recipientId`. They all return the same error. – Yulian Jan 24 '20 at 22:29
  • Something else that is interesting is if I take the `recipientId` in the tab and pass it to [this](https://developers.docusign.com/esign-rest-api/reference/Envelopes/EnvelopeRecipientTabs/update) endpoint, updating tabs works fine. Doesn't that mean the recipient id is valid? – Yulian Jan 24 '20 at 22:57
  • what is the status of the envelope when you make the call? is it still in draft mode? – Inbar Gazit Jan 24 '20 at 23:40
  • Yes, it looks like the status is still `created`. – Yulian Jan 24 '20 at 23:53
  • can you tell me the envelopeId? – Inbar Gazit Jan 25 '20 at 01:00
  • `2ed63c86-6767-4915-892d-fc339bbaebbb`. Thank you for looking into it! – Yulian Jan 27 '20 at 15:00
  • that envelopeID does not match the recipientId and tabID you have below. Can you get me all three IDs that you used together and give you the error? – Inbar Gazit Jan 27 '20 at 16:39
  • Have you been able to reproduce this with the code I provided? Here is a set of IDs that matches: envelope id - 4c89912b-b98f-478d-ac48-78e437f54abb tab id - b9839188-1d7f-44f5-a9e0-e2cacf89f850 recipient id - 684512d5-8ce9-4b34-b70a-97e93d7ddfa7 – Yulian Jan 27 '20 at 17:02
  • thanks, I have someone looking into this, it may be a bug. However, they noticed that after the failed call, you made another call that did succeed. That was a call to update envelope tabs. Can this be a workaround? – Inbar Gazit Jan 27 '20 at 19:38
  • Yes, the example code then uses the same recipient id and [this endpoint](https://developers.docusign.com/esign-rest-api/reference/Envelopes/EnvelopeRecipientTabs/update) to successfully update the tabs, but if there is more than one recipient we would have to make that call for each one which would be slower and worse for our API quota. – Yulian Jan 27 '20 at 20:15

1 Answers1

-1

Yulian, It appears there's a bug in the UpdateDocumentTabs endpoint that is causing this issue and we're looking into it and hope to have an update soon.

As a workaround, you can use the UpdateRecipientTabs endpoint for now. I realize this would mean making additional API calls for the same purpose. If you need your API hourly quota increased - you can contact me and I can help with that.

Inbar Gazit
  • 12,566
  • 1
  • 16
  • 23
  • At this point there's no update, I'm sorry, is there any reason you cannot use the workaround? – Inbar Gazit Feb 28 '20 at 18:00
  • It has been almost a year, and the issue still remains... The only way I've found to update the tabs value was using EnvelopeRecipientTabs update endpoint, but this way I have to update the tabs per recipient. – Pedro Semeano Jan 12 '21 at 16:36
  • Seems to still be a problem - October 2021 – nevster Oct 25 '21 at 01:45
  • You mean that UpdateDocumentTabs doesn't work, but you can still use UpdateRecipientTabs, right? this is still the case, yes. – Inbar Gazit Oct 25 '21 at 15:46
  • 1
    This is still an issue @InbarGazit whats up with that ? Jul-2022 – Sahil Jul 14 '22 at 17:57