Brad
Brad

Reputation: 15

Docusign API, "Correct Document" or just change fields

Using the Docusign API, I am trying to change the fields that exist on a document. When I first create the document, I am able to change field values using "tabs." I get how to do that.

When I am trying to edit, or in Docusign's terms "correct," a document after it has been sent out, but before being signed, I am having trouble figuring out how to access those fields again to change the values.

I have tried using the API avenue described here ( PUT /v2/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/fields ), but even after successful calls, the values of the fields aren't changing, and I believe it is because I should be trying to access the tabs, as I did when first changing the tab values as I created the document, instead of targeting the fields, since the two seem to be different. Any thoughts? Thank you in advance for your answers.

Upvotes: 0

Views: 536

Answers (2)

Praveen Reddy
Praveen Reddy

Reputation: 7393

To update Tab values you should use the putRecipientTabs api.

Once a signer completes the Signing process, the tab values cannot be updated.

Also not all Tab values can be updated. See this answer for more information.


The putEnvelopeDocumentFields api is for a different purpose. Document fields are different from Tabs. Document fields are an array of name-value custom data strings to be added to a document. Custom document field information is returned in the status, but otherwise is not used by DocuSign.

Upvotes: 1

Brad
Brad

Reputation: 15

I figured it out.

The "fields" we are seeing on documents are "tabs," and they are children of the recipients.

The hierarchy goes envelope > recipients > tabs, which tabs we were trying to change. Not envelope > document > fields, which refers to something else--just familiarizing with the language of the api.

Here is a link to the reference for how to change "fields" aka "tabs", and that link includes sample requests.

One thing that helped me target my actual fields, since I kept on getting an error that the field didn't exist for the recipient, is to do a get request of all available tabs and use that response body as the request body for the update call (where we change the field values). Then you know the field information will be accurate, paring the body down to exactly the "fields" aka "tabs" you are interested in targeting.

Upvotes: 0

Related Questions