Ilya Tishonok
Ilya Tishonok

Reputation: 1

Is it possible to prefill values for the tabs from prefillTabs group in docusign?

I have problem with prefilling tabs from prefillTabs group while creating envelope using docusign api. It's impossible to assign values through templateRoles, since these tabs do not have any recipientId. Is it possible somehow to assign values to this kind of tabs?

enter image description here

Upvotes: 0

Views: 549

Answers (1)

Inbar Gazit
Inbar Gazit

Reputation: 14005

Yes, you can do that, here is how to do that from the C# SDK:

      EnvelopeSummary results = envelopesApi.CreateEnvelope(accountId, env);
        string envelopeId = results.EnvelopeId;

        PrefillTabs prefill = new PrefillTabs();
        prefill.TextTabs = new List<Text>();
        prefill.TextTabs.Add(new Text { PageNumber = "1", DocumentId = "1", Value = "!!!test-inbar!!!" });
        Tabs tabs = new Tabs();
        tabs.PrefillTabs = prefill;
        envelopesApi.CreateDocumentTabs(accountId, envelopeId, "1", tabs);

Or you can use raw JSON API call this way:

Endpoint:

/restapi/v2.1/accounts/[AccountId]/envelopes/[EnvelopeId]/documents/[DocumentId]/tabs

JSON body:

{"prefillTabs":{"textTabs":[{"value":"!!!test-inbar!!!","pageNumber":1,"documentId":"1","xPosition":316,"yPosition":97}]}}

Upvotes: 1

Related Questions