Search code examples
scalaplayframeworkdocusignapi

How to get name of checked checkbox docusign rest api


hopefully someone has run into this before. I have a checkbox group on my docusign form to select a bank account type. Options are checking, savings and other. I have configured docusign to use the webhook functionality, so when the form is completed, it fires the data off to my consumption endpoint. I then call the envelopes api to get the form data back using the envelope id. This works fine for standard fields, but it doesn't appear to work properly for checkboxes and select menus. Consider the following response:

class FormDataItem {
    errorDetails: null
    listSelectedValue: null
    name: Bank Account Type | tabGroups: ["Checkbox Group 04fd57dc-b788-42cb-948c-c3f8afdf2d79"]
    originalValue: null
    value:
}
class FormDataItem {
    errorDetails: null
    listSelectedValue: null
    name: Bank Account Type 4205ef5e-bfc6-4e97-a8b6-0b52926f894c | tabGroups: ["Checkbox Group 04fd57dc-b788-42cb-948c-c3f8afdf2d79"]
    originalValue: null
    value:
}
class FormDataItem {
    errorDetails: null
    listSelectedValue: null
    name: Bank Account Type f6d9108b-aa43-4fc1-a3c9-397576cb7e3c | tabGroups: ["Checkbox Group 04fd57dc-b788-42cb-948c-c3f8afdf2d79"]
    originalValue: null
    value: X
}
class FormDataItem {
    errorDetails: null
    listSelectedValue: null
    name: Checkbox Group 04fd57dc-b788-42cb-948c-c3f8afdf2d79
    originalValue: null
    value: Bank Account Type:;Bank Account Type 4205ef5e-bfc6-4e97-a8b6-0b52926f894c:;Bank Account Type f6d9108b-aa43-4fc1-a3c9-397576cb7e3c:X
}

Now you can visibly see that one of them is checked by the value: X. Problem is I have no idea which one that is: checking, saving or other. i have tried calling getPageTabs, but it doesn't appear to be returning the types. I have looked all over their api for this, but can't seem to find anything that will return those names. I am using the envelopes API and scala(play framework) to get these values. Anyone know how to get these fields? It's quite frustrating it wouldn't return them in the FormDataItem name field. It could be that they're misconfigured in docusign as well(I didn't have a hand in configuring them, so not sure). Any help is appreciated!


Solution

  • You need to know the accountId, envelopeId and documentId and then you do:

    GET /restapi/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/tabs