Updates existing custom document fields in an existing template document.

Request

HTTP request

PUT /v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields

Parameters

Parameter NameValueDescription
Path Parameters
accountIdstring

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

documentIdstring

Integer that identifies the document in the envelope.

templateIdstring

The id of the template.

Responses

CodeDescriptionReference
200

Successful response.

TemplateDocumentFields
400

Error encountered.

errorDetails

SDK Method

Templates::updateDocumentFields

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

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.

TemplateDocumentFields

Template document fields

documentFields[nameValue]

The array of name/value custom data strings to add to a document. Custom document field information is returned in the status, but otherwise is not used by DocuSign. The array contains the following 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 Request/Response

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

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