Skip to main content

Hi,

I’ve created a template and added a few custom fields on the template. I’ve applied a template on an empty envelope but I can’t seem to to able to update the custom fields on the envelope.

When I pull a list of custom fields on the envelope, all I’m getting is this. 

{
"textCustomFields": F
{
"fieldId": "11074686122",
"name": "templateUsageRestriction",
"show": "false",
"required": "false",
"value": "allOptions"
}
],
"listCustomFields": F]
}

Is it possible to update there custom fields before sending it to the end user?

 

Best regards,

Matt

@ShopBack - Yes, you can update the custom fields on an envelope before sending it to the end user.

You would use a PUT request to update the custom fields. Here is an example request:

PUT /v2.1/accounts/{accountId}/envelopes/{envelopeId}/custom_fieldsContent-Type: application/json{  "textCustomFields": "    {      "fieldId": "11074686122",      "name": "templateUsageRestriction",      "show": "false",      "required": "false",      "value": "newValue"    }  ],  "listCustomFields": ,]}

Let me know if this addresses your question.

 


Hi @JohnSantos thanks for the reply.

An example is as below. I created a template with 3 custom fields on the top and apply the template to an empty envelope. When I try to get a list of custom fields on the envelope, its only returning a single textCustomField not 3. Am I supposed to add the custom fields in?

{
"textCustomFields":
{
"fieldId": "11074686122",
"name": "templateUsageRestriction",
"show": "false",
"required": "false",
"value": "allOptions"
}
],
"listCustomFields": ]
}


 

 


Forgot to mention I also tried EnvelopeDocumentFields:list and its also returning ]


@ShopBack - You either create your envelope from a template or just use the API to create the envelope.  I think you are trying to do both on the same call.    Can you try something like this on your PUT request?

PUT /v2.1/accounts/{accountId}/envelopes/{envelopeId}/custom_fields
Content-Type: application/json

{
  "textCustomFields": d
    {
      "name": "CustomField1",
      "show": "false",
      "required": "false",
      "value": "Value1"
    },
    {
      "name": "CustomField2",
      "show": "false",
      "required": "false",
      "value": "Value2"
    },
    {
      "name": "CustomField3",
      "show": "false",
      "required": "false",
      "value": "Value3"
    }
  ]
}
 

 


Reply