Reputation: 3969
Have a template with 5 recipients and a signing order. One of the recipients in the template has a role Scientist and a signing order of 4. The name and email of all recipients are provided by the template. For the recipient in the Scientist role, "Albert Einstein" is the name and "[email protected]" is the email.
To create and send the envelope, the client application makes an API call to ${base_path}/v2.1/accounts/${account_id}/envelopes
with the following JSON payload:
{
"status": "sent",
"templateId": "...",
"templateRoles": [
{
"email": "...",
"name": "...",
"roleName": "...."
},
{
"email": "[email protected]",
"name": "Isaac Newton",
"roleName": "Scientist"
}
]
}
Expected: an override - name/email of Scientist from the API call replaces name/email defined by the template on the created envelope
Observed: a merge - the Scientist from the API call is added to the envelope as a new recipient, its signing order is set to 1. The template-provided Scientist does not change.
Is the observed behavior intentional?
Upvotes: 1
Views: 322
Reputation: 14050
This is by design. Let me explain why. There are two types of recipients in template:
This is an either/or situation. You either specify the recipient in the template or you leave it as a placeholder to be specified later. Which one did you want?
If you want it fixed, but later you want to override, you'll need a different API call. You'll need to change the recipients and in essence set a new set of recipients. You want to remove Albert Einstein and add someone else (though your code seems to have the same scientist so it makes no sense).
Regardless of all this, I recommend you consider using the Composite Template model for these types of advanced scenarios.
Upvotes: 1