Retrieves the custom document field information from an existing envelope document.

Request

HTTP request

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

Parameters

Parameter NameValueDescription
Path Parameters
accountIdstring

The external account number (int) or account ID GUID.

documentIdstring

The documentId is set by the API client. It is an integer that falls between 1 and 2,147,483,647. The value is encoded as a string without commas. The values 1, 2, 3, and so on are typically used to identify the first few documents in an envelope. Tab definitions include a documentId property that specifies the document on which to place the tab.

envelopeIdstring

The envelope's GUID.

Example: 93be49ab-afa0-4adf-933c-f752070d71ec

Responses

CodeDescriptionReference
200

Successful response.

EnvelopeDocumentFields
400

Error encountered.

errorDetails

SDK Method

Envelopes::listDocumentFields

Definitions

errorDetails

This object describes errors that occur. It is only valid for responses and ignored in requests.

errorCodestring

The code associated with the error condition.

messagestring

A brief message describing the error condition.

nameValue

A name-value pair that describes an item and provides a value for the item.

errorDetailserrorDetails

This object describes errors that occur. It is only valid for responses and ignored in requests.

namestring

The name of the item.

originalValuestring

The initial value of the item.

valuestring

The current value of the item.

EnvelopeDocumentFields

Envelope document fields

documentFields[nameValue]

The 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. The array contains the elements:

  • name - A string that can be a maximum of 50 characters.
  • value - A string that can be a maximum of 200 characters.

IMPORTANT: If you are using xml, the name/value pair is contained in a nameValue element.

Examples

Generic JSON Response

Response
{
  "documentFields": [
    {}
  ]
}
Generic XML Response

Response
<documentFieldsInformation xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.com/restapi">
  <documentFields>
    <nameValue />
  </documentFields>
</documentFieldsInformation> 
}} />