How to add image in a documents in DocuSign - docusignapi

Am trying to add image in my docusign documents via Curl.
I think i have to use signerAttachment parameter.
Assuming my image is http://sample.com/myphoto.png. Where do I add it as per code below. Or what is the best solution to achieve that
"signerAttachmentTabs": [
{
"name": "sample string 1",
"tabLabel": "sample string 2",
"scaleValue": 1.1,
"optional": "sample string 3",
"documentId": "sample string 4",
"recipientId": "sample string 5",
"pageNumber": "sample string 6",
"xPosition": "sample string 7",
"yPosition": "sample string 8",
"anchorString": "sample string 9",
"anchorXOffset": "sample string 10",
"anchorYOffset": "sample string 11",
"anchorUnits": "sample string 12",
"anchorIgnoreIfNotPresent": "sample string 13",
"anchorCaseSensitive": "sample string 14",
"anchorMatchWholeWord": "sample string 15",
"anchorHorizontalAlignment": "sample string 16",
"tabId": "sample string 17",
"templateLocked": "sample string 18",
"templateRequired": "sample string 19",
"conditionalParentLabel": "sample string 20",
"conditionalParentValue": "sample string 21",
"customTabId": "sample string 22",
"mergeField": {},
"tooltip": "sample string 23",
"tabOrder": "sample string 24",
"tabGroupLabels": [
"sample string 1"
]
}
],

So, you can add an image just like you add any other document, be it a PDF or HTML or anything. The image will be in its own page, not embedded in some other doc.
Looking at the image you posted, you may be trying to embed this inside an existing document, and that cannot be done using attachments.
You could use a special type of tab called drawing tab, which allows for embedding drawings, graphics, images etc. inside a document.
Right now the content of the drawing tab cannot be set via the API

Related

Docusign | Can we add custom field in to the document at specific position through API?

I am trying to add a custom field when I create an envelope and pass the one custom field. Is there any way to add a custom field in the document?
Is there any API Endpoint which we need to use?
Here's some helpful documentation for adding Custom fields to an envelope via the DocuSign API:
https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopecustomfields/
For example you can POST to this URL:
/restapi/v2.1/accounts/{accountId}/envelopes/{envelopeId}/custom_fields
And here's an example Body depending on if you want to use a text custom field or a list:
{
"textCustomFields": [
{
"fieldId": "sample string 1",
"name": "sample string 2",
"show": "sample string 3",
"required": "sample string 4",
"value": "sample string 5",
"configurationType": "sample string 6"
}
],
"listCustomFields": [
{
"listItems": [
"sample string 1"
],
"fieldId": "sample string 1",
"name": "sample string 2",
"show": "sample string 3",
"required": "sample string 4",
"value": "sample string 5",
"configurationType": "sample string 6"
}
]
}

How do I set Signed Date with the last Signer without Routing Order?

I'm facing a problem and to me is very hard to understand why something so simple is so hard to find a solution. Basically I want so set a Signed Date in each document (contained in the envelope) when the last signer complete the process.
I have this documents and signers
Documents: Doc A, Doc B, Doc C
Signers: Signer 1, Signer 2, Signer 3
Now the combination
Signers by documents:
Doc A: Signer 1, Signer 2 and Signer 3
Doc B: Signer 1 and Signer 2
Doc C: Signer 2 and Signer 3
So, the idea is create an envelope with all this information and without setting the Routing Order I would like to set a Signed Date in each document when the last signer (I don't know which one was) make the sign.
There is some magical way to do that?
I will appreciate any tip/help :)
PS: This is my first question, so sorry if i'm doing something wrong.
{
"recipients": {
"signers": [
{
"email": "signer1#yopmail.com",
"name": "Signer 1",
"recipientId": 1,
"tabs": {
"dateSignedTabs": [
{
"font": "Calibri",
"fontSize": "Size9",
"bold": "true",
"anchorString": "Signer1 Signed Date",
"anchorUnits": "pixels",
"anchorYOffset": "-2",
"anchorXOffset": "-5"
}
],
"signHereTabs": [
{
"anchorString": "Signer 1",
"anchorUnits": "pixels",
"anchorYOffset": "10",
"anchorXOffset": "-40"
}
]
}
},
{
"email": "signer2#yopmail.com",
"name": "Signer 2",
"recipientId": 2,
"tabs": {
"dateSignedTabs": [
{
"font": "Calibri",
"fontSize": "Size9",
"bold": "true",
"anchorString": "Signer2 Signed Date",
"anchorUnits": "pixels",
"anchorYOffset": "-2",
"anchorXOffset": "-5"
}
],
"signHereTabs": [
{
"anchorString": "Signer 2",
"anchorUnits": "pixels",
"anchorYOffset": "10",
"anchorXOffset": "-40"
}
]
}
},
{
"email": "signer3#yopmail.com",
"name": "Signer 3",
"recipientId": 3,
"tabs": {
"dateSignedTabs": [
{
"font": "Calibri",
"fontSize": "Size9",
"bold": "true",
"anchorString": "Signer3 Signed Date",
"anchorUnits": "pixels",
"anchorYOffset": "-2",
"anchorXOffset": "-5"
}
],
"signHereTabs": [
{
"anchorString": "Signer 3",
"anchorUnits": "pixels",
"anchorYOffset": "10",
"anchorXOffset": "-40"
}
]
}
}
]
},
"emailSubject": "DocuSign API - Signature Request on Document Call",
"documents": [
{
"documentId": "1",
"name": "Doc A.pdf",
"documentBase64": <Document1_Base64>
},
{
"documentId": "2",
"name": "Doc B.pdf",
"documentBase64": <Document2_Base64>
},
{
"documentId": "3",
"name": "Doc C.pdf",
"documentBase64": <Document3_Base64>
}
],
"status": "sent"
}
POST /restapi/v2.1/accounts/{accountId}/envelopes
Using REST API v2.1 I create an envelope with the payload code as example.
As you can see I don't want to use Routing Order, so, each signers has its own dateSignedTabs witch for mi is OK, but I want so get the date of the last signer to put it at the begin of the Document, thats is my real deal.
Each dateSigned tab belongs to a specific signer recipient. So you have a couple of options:
Use a routing order. Then the dateSigned of the last person will be the date of the last signer.
On the signing page of the document add verbiage such as "This agreement was finalized on the date of the last signature" -- followed by the three signatures and three dateSigned tabs. Consult a lawyer, I'm sure your goal can be accomplished by contract language. Here is an example by a contract writer.
You can add more programming to add an "effective date" field with the date the last person signed. See below.
To add an "effective date" of the last signer
Set all of your signers to routing order 1. Since they're all the same routing order, this is the same as no routing order for the enveloper signers.
Add a fake embedded signer as routing order 2. Something like "System" with email address "system_signer#example.com". Since this is an embedded signer, they will not be sent any email.
Add a webhook either at the account (Connect) or envelope (eventNotification) level. You can receive the webhook behind the firewall with no firewall changes by using an intermediate PaaS system. See my blog post
The webhook notifies your app when the envelope has been "sent" to the system signer. Correct the envelope: set the value of your "effective date" tab (a text tab) to the current date. And delete the "system" signer. The envelope will now proceed to completion.
Success.

Tooltips not being passed through REST API to docusign

I'm having trouble getting tooltips to be populated in Docusign when making a create envelope request. I am using the REST API and am able to successfully send fairly complex documents. I have a text tab that looks like this
{
"anchorString": "The proposed draw down date is",
"anchorIgnoreIfNotPresent": "true",
"anchorUnits": "mms",
"required": "false",
"tabLabel": "settlementDrawdownDate",
"anchorXOffset": "60",
"anchorYOffset": "-10",
"fontSize": "Size12",
"tooltip": "DD/MM/YYYY",
"validationPattern": "^[0-3][0-9]\/[0-1][0-9]\/2\d{3}$",
"validationMessage": "Date must in format DD/MM/YYYY"
}
When I look at the envelope as it is in the Docusign portal the tooltip field is not populated, and it certainly isn't there in the actual signing screens. I have also attempted to add a tooltip to a number tab with the same result.
try this, instead of "tooltip" use "name":
{
"anchorString": "The proposed draw down date is",
"anchorIgnoreIfNotPresent": "true",
"anchorUnits": "mms",
"required": "false",
"tabLabel": "settlementDrawdownDate",
"anchorXOffset": "60",
"anchorYOffset": "-10",
"fontSize": "Size12",
"name": "DD/MM/YYYY",
"validationPattern": "^[0-3][0-9]\/[0-1][0-9]\/2\d{3}$",
"validationMessage": "Date must in format DD/MM/YYYY"
}

How can I format a JSON with MongoDB to be use with Highcharts?

This is my end-point:
I have a JSON that look like this:
{
"_id": "5d30c48e5fb507250bb5",
"user": "5d2f594180064d82c47c",
"department_director": "Director 1",
"account_manager": "Account Manager 1",
"fronter": "Fronter 2",
"closer": "Closer 1",
"order_number": "EDVRV20202020202",
"business_name": "Business Name 3",
"business_website": "www.businessname3.com",
"client_name": "Client 3",
"client_phone": 9090909090,
"client_email": "email1#company.com",
"type_of_service": "Other",
"management_fee": 599, //I will use this objects
"sales_date": "2017-04-23T00:00:00.000Z",
"cancellation_date": "2018-04-23T00:00:00.000Z", // I will use this object,
"country": "USA",
"state": "Florida",
"cancellation_reason": "Business Closed",
},
And, I want to plot the following graph using type_of_service as a legend, cancellation_date as a x-axis and management_fee and a y_axi.

There is any way to add custom fields (checkbox) to a PDF contract dynamically using the Docusign REST API?

We are generating a PDF contract in out custom code, and then we are sending this PDF file to be signed by the end customer through Docusign REST API.
Thanks works fine. Now we need the customer to fill (or not) some checkboxes inside the PDF file at the same time they are signin the document.
We need to add this checkboxes dynamically from our code, because they are not always the same ones.
I attach an image with an example, we want to do the same we do when we create mannualy a template, but in this case is not inside the template, is inside the document already created outside Docusign.enter image description here
You could look into the auto-place feature.
If you set a specific string of text in your pdf document it will place a tab every time that it finds that text in the document. If you want that text to be hidden from the end user you could use white text on white background.
Here is some info in how this works in the DocuSign UI.
https://support.docusign.com/en/guides/AutoPlace-New-DocuSign-Experience
On the API side they refer to this feature as anchor tabs.
If you want to specify this via the API whenever you create a tab just specify that anchorString value and DocuSign will create a tab for you at each location that it finds the string.
There are a few more properties that allow you to move the anchor tab based on the anchor string so you can define the offsets if you want the tab to be move a specific amount of pixels in the x or y direction.
I hope this helps!
"checkboxTabs": [
{
"name": "sample string 1",
"tabLabel": "sample string 2",
"selected": "sample string 3",
"shared": "sample string 4",
"requireInitialOnSharedChange": "sample string 5",
"required": "sample string 6",
"locked": "sample string 7",
"documentId": "sample string 8",
"recipientId": "sample string 9",
"pageNumber": "sample string 10",
"xPosition": "sample string 11",
"yPosition": "sample string 12",
"anchorString": "sample string 13",
"anchorXOffset": "sample string 14",
"anchorYOffset": "sample string 15",
"anchorUnits": "sample string 16",
"anchorIgnoreIfNotPresent": "sample string 17",
"anchorCaseSensitive": "sample string 18",
"anchorMatchWholeWord": "sample string 19",
"anchorHorizontalAlignment": "sample string 20",
"tabId": "sample string 21",
"templateLocked": "sample string 22",
"templateRequired": "sample string 23",
"conditionalParentLabel": "sample string 24",
"conditionalParentValue": "sample string 25",
"customTabId": "sample string 26",
"mergeField": {},
"status": "sample string 27",
"tooltip": "sample string 28",
"errorDetails": {
"errorCode": "SUCCESS",
"message": ""
},
"tabOrder": "sample string 29",
"tabGroupLabels": [
"sample string 1"
]
}
],

Resources