Retrieves the custom document fields for an existing template document.

Request

HTTP request

GET /v2/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields

Parameters

Parameter name Value Description
Path parameters
accountId string

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

documentId string

The ID of the document being accessed.

templateId string

The ID of the template being accessed.

Responses

Code Description Reference
200 OK Successful response.
400 Bad Request Error encountered.

SDK Method

Templates::listDocumentFields

Definitions Expand All | Collapse All

TemplateDocumentFields

Template 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.

errorDetails

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

errorCode string

An error code associated with the error.

message string

A short error message.

nameValue

errorDetails errorDetails
name string

The name or key of a name/value pair.

originalValue string

The initial value of the tab when it was sent to the recipient.

value string

The value field of a name/value pair.

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>