Reputation: 3
As per "get" envelope or "listStatusChange" API documentation, both of them supports the query param "include" to fetch additional information ( not only the envelope name, status & email subject). Ex: Specifies additional information to return about the envelopes. Enter a comma-separated list, such as tabs, recipients. Valid values are: tabs,recipients, documents, custom_fields, attachments, extensions etc.
But I did try this query params with above keywords on REST API explorer provided by DocuSign (https://apiexplorer.docusign.com/#/esign/restapi?categories=Envelopes&tags=Envelopes&operations=listStatusChanges)
but I didn't get any additional information in the response as detailed out in example JSON response (https://developers.docusign.com/esign-rest-api/reference/Envelopes/Envelopes/listStatusChanges#examples)
I have a requirement to fetch most of the envelope fields with like name, subject, recipients with signers, carbonCopies, EnvelopeTabs, routing order, attachments etc.
I did try below 3 APIs.. but none of them works as stated in API documentation with respect to "include" query param. Please let me know what should be appropriate API to get complete envelope definition (without having internal URI which refers to nested objects )
expecting results as stated in the example JSON response https://developers.docusign.com/esign-rest-api/reference/Envelopes/Envelopes/listStatusChanges#examples
Upvotes: 0
Views: 693
Reputation: 31
Just did some testing and it seems that setting the include parameter to tabs
is ignored in the listStatusChanges
and the listTemplates
call, irrespective of API version. This was confirmed to me by DS Support as an error in the API documentation and will be corrected in the future.
Upvotes: 3
Reputation: 6818
https://{{EnvironmentVal}}/restapi/v2/accounts/{{AccountIdVal}}/envelopes/{{envelopeId}}?include=custom_fields,recipients,tabs&advanced_update=true
is the endpoint to get CustomFields, Recipients and its tabs with V2 API version, if you notice above endpoint you need to pass advanced_update=true
as well to return the response. Also documents reference are not returned in this version of API call.
but with V2.1 API version,
https://{{EnvironmentVal}}/restapi/v2.1/accounts/{{AccountIdVal}}/envelopes/{{envelopeId}}?include=custom_fields,recipients,tabs,documents
You get document reference as well, and you do not need to pass advanced_update=true
in the API call. So if you are doing new integration it is recommended to use V2.1 API version.
Upvotes: 1
Reputation: 5029
Unfortunately, API Explorer is limited to support of version v2
of the API, while the Include parameters you're looking for are in v2.1
.
You'll need to make the 2.1 calls yourself through a tool like Postman to check them out.
For reference, you can view the v2 API docs by accessing the dropdown at the top of the page:
Upvotes: 1