Reputation: 1
Our application creates a draft envelope from a template using the API with 2 roles.
rolename: "signer1" "recipientId":"1", "roleName":"signer1", "routingOrder":"1", "email":"email1", "name":"name1"
rolename: "signer2" "recipientId":"2", "roleName":"signer2", "routingOrder":"2", "email":"email2", "name":"name2"
The draft creates properly and I can send this out as is.
The question is, if I want to update one of the recipients via API before sending, what field does docusign use to know which recipient you are trying to update?
e.g. I want to change the email address of signer1
I hope the question is clear enough.
Upvotes: 0
Views: 431
Reputation: 51
To modify an existing recipient from a Draft envelop, you need to use the "recipeintId" to refer to a specific Recipient and then enter the details you wish to modify in your PUT call. Below you will find an example when I modifying recipientId 1 and I am giving him a new name and email address.
Note: I am using the X-DocuSign-Authentication header in the example for simplicity instead for security measure the bearer token should be used.
Doc: Link to DocuSign Documentation
PUT https://{server}/restapi/{apiVersion}/accounts/{accountId}/envelopes/{envelopeId}/recipients
X-DocuSign-Authentication: <DocuSignCredentials><Username>{name}</Username><Password>{password}</Password><IntegratorKey>{integrator_key}</IntegratorKey></DocuSignCredentials>
Accept: application/json
Content-Type: application/json
{
"signers" :
[
{
"email": "[email protected]",
"name": "John Doe",
"recipientId": "1"
}
]
}
To collect the recipiendId of your envelop you can use. The GET request with the similar URL
GET https://{server}/restapi/{apiVersion}/accounts/{accountId}/envelopes/{envelopeId}/recipients
Upvotes: 1