I'm using DocuSign REST API CreateEnvelope.
I have a PDF with form fields that I have to upload to DocuSign.
I'm using the PDF form field transformation to transform the PDF fields in to DocuSign tabs and assign them to different signers.
This works fine for Signature and Initial fields but I don't see any DateSigned tab in the document.
Note the names of the PDF form fields match exactly the tabLabel values of the corresponding DocuSign tabs.
Here is the JSON payload:
{
"attachments": [],
"compositeTemplates": [
{
"document": {
"documentBase64": "...",
"documentFields": [],
"documentId": "1",
"matchBoxes": [],
"name": "E54.000003631.000009458.0000001.pdf",
"transformPdfFields": "true"
},
"inlineTemplates": [
{
"documents": [],
"recipients": {
"agents": [],
"carbonCopies": [],
"certifiedDeliveries": [],
"editors": [],
"inPersonSigners": [],
"intermediaries": [],
"signers": [
{
"customFields": [],
"documentVisibility": [],
"email": "[replace this with a valid email]",
"excludedDocuments": [],
"name": "Recip_2",
"recipientAttachments": [],
"recipientId": "2",
"recipientSignatureProviders": [],
"routingOrder": "1",
"signingGroupUsers": [],
"socialAuthentications": [],
"tabs": {
"approveTabs": [],
"checkboxTabs": [],
"companyTabs": [],
"dateSignedTabs": [
{
"documentId": "1",
"recipientId": "2",
"tabLabel": "S2_DocuSignDateSigned"
}
],
"dateTabs": [],
"declineTabs": [],
"emailAddressTabs": [],
"emailTabs": [],
"envelopeIdTabs": [],
"firstNameTabs": [],
"formulaTabs": [],
"fullNameTabs": [],
"initialHereTabs": [
{
"documentId": "1",
"recipientId": "2",
"tabLabel": "S2_DocuSignInitialHere"
}
],
"lastNameTabs": [],
"listTabs": [],
"noteTabs": [],
"numberTabs": [],
"radioGroupTabs": [],
"signerAttachmentTabs": [],
"signHereTabs": [
{
"documentId": "1",
"recipientId": "2",
"tabLabel": "PdfField_5"
}
],
"ssnTabs": [],
"textTabs": [],
"titleTabs": [],
"viewTabs": [],
"zipTabs": []
}
},
{
"customFields": [],
"documentVisibility": [],
"email": "[replace this with a valid email]",
"excludedDocuments": [],
"name": "Recip_1",
"recipientAttachments": [],
"recipientId": "1",
"recipientSignatureProviders": [],
"signingGroupUsers": [],
"socialAuthentications": [],
"tabs": {
"approveTabs": [],
"checkboxTabs": [],
"companyTabs": [],
"dateSignedTabs": [
{
"documentId": "1",
"recipientId": "1",
"tabLabel": "PdfField_3_DocuSignDateSigned"
}
],
"dateTabs": [],
"declineTabs": [],
"emailAddressTabs": [],
"emailTabs": [],
"envelopeIdTabs": [],
"firstNameTabs": [],
"formulaTabs": [],
"fullNameTabs": [],
"initialHereTabs": [
{
"documentId": "1",
"recipientId": "1",
"tabLabel": "PdfField_2_DocuSignInitialHere"
}
],
"lastNameTabs": [],
"listTabs": [],
"noteTabs": [],
"numberTabs": [],
"radioGroupTabs": [],
"signerAttachmentTabs": [],
"signHereTabs": [
{
"documentId": "1",
"recipientId": "1",
"tabLabel": "PdfField_1"
}
],
"ssnTabs": [],
"textTabs": [
{
"documentId": "1",
"recipientId": "1",
"tabLabel": "PdfField_4"
}
],
"titleTabs": [],
"viewTabs": [],
"zipTabs": []
}
}
]
},
"sequence": "1"
}
],
"serverTemplates": []
}
],
"documents": [],
"emailBlurb": "Please review attached document(s) for electronic signature.",
"emailSubject": "Please review attached document for electronic signature",
"recipients": {
"agents": [],
"carbonCopies": [],
"certifiedDeliveries": [],
"editors": [],
"inPersonSigners": [],
"intermediaries": [],
"signers": []
},
"status": "sent",
"templateRoles": []
}
What am I missing?
Thanks for your help!
I found what was wrong.
The initial PDF (generated by our produced) contained only PDF fields of type Signature.
We have updated the PDF generation to have:
PDF fields of type Signature for the SignHere and InitialHere DocuSign tabs
PDF fields of type Text for the DateSigned and Text DocuSign tabs
Now all PDF Fields are correctly converted and the corresponding DocuSign tab is added to the document.
Related
I am using PHP as language using Raw API.
When Creating envelope i m posting following JSON Code.
{
"compositeTemplates": [
{
"compositeTemplateId": "b55d12e6-d82b-445c-910e-7e04a4480a82",
"serverTemplates": [
{
"templateId": "b55d12e6-d82b-445c-910e-7e04a4480a82",
"sequence": "1"
}
]
}
],
"recipients": {
"signers": [
{
"clientUserId": "1001",
"email": "dev#gmail.com",
"tabs": {
"emailTabs": [
{
"anchorXOffset": "429",
"anchorYOffset": "309",
"value": "dev#gmail.com",
"recipientId": "1"
}
],
"textTabs": [
{
"anchorXOffset": "429",
"anchorYOffset": "309",
"name": "Job Title",
"value": "JobTitleValue",
"recipientId": "1"
}
],
"fullNameTabs": [
{
"anchorXOffset": "37",
"anchorYOffset": "165",
"recipientId": "1",
"value": "Signer One"
}
]
},
"name": "Signer One",
"recipientId": "1",
"routingOrder": "1",
"roleName": "WebUser"
}
]
},
"sender": {
"accountId": "-------"
},
"status": "sent"
}
But when i m calling recipient view API i m getting this "UNKNOWN_ENVELOPE_RECIPIENT" ERROR.
JSON data when calling API.
{
"authenticationMethod": "email",
"clientUserId": "1001",
"email": "dev#gmail.com",
"recipientId": "1",
"returnUrl": "-----",
"userName": "Signer One"
}
Also When i m calling get list on envelope recipient list
"signers": [
{
"creationReason": "sender",
"canSignOffline": "true",
"isBulkRecipient": "false",
"recipientSuppliesTabs": "true",
"requireUploadSignature": "false",
"name": "Rakesh Jangid",
"firstName": "",
"lastName": "",
"email": "rakesh#crystaltechesolutions.com",
"recipientId": "1",
"routingOrder": "1",
"note": "",
"roleName": "Owner",
"status": "delivered",
"completedCount": "0",
"deliveredDateTime": "2021-06-23T09:22:23.3800000Z",
"deliveryMethod": "email",
"recipientType": "signer"
}
],
"agents": [],
"editors": [],
"intermediaries": [],
"carbonCopies": [],
"certifiedDeliveries": [],
"inPersonSigners": [],
"seals": [],
"witnesses": [],
"notaries": [],
"recipientCount": "1",
"currentRoutingOrder": "1"
}
can any one help me to get Receipent View links from API.
"clientUserId": "1001"
This line has to also be on the recipient/signer, not just when requesting the recipient view.
So add this:
"name": "Signer One",
"recipientId": "1",
"routingOrder": "1",
"roleName": "WebUser",
"clientUserId": "1001"
While calling the create envilope API we are getting the error
{
"errorCode": "ACCOUNT_MISSING_ENTITLEMENT_CREATE_EMBEDDEDRECIPIENTSTARTURL",
"message": "The sender does not have required entitlement and is not allowed to set EmbeddedRecipientStartURL for the user"
}
Request url
/v2/accounts/8017620c-2355-481c-a7b2-50b645d40a52/envelopes
Request body (envelope)
{
"documents": [
{
"documentId": "1864177648",
"name": "powerpoint press.pptx",
"fileExtension": "pptx",
"matchBoxes": [],
"documentFields": [],
"documentBase64": ""
}
],
"recipients": {
"signers": [
{
"excludedDocuments": [],
"name": "Mehraj",
"email": "mehraj#mydomain.com",
"signingGroupUsers": [],
"recipientId": "cbd343d7-a735-4846-8138-243ec7b31348",
"socialAuthentications": [],
"clientUserId": "0e670c86-aa1a-4149-9ce6-9c27dd76d3b0",
"embeddedRecipientStartURL": "SIGN_AT_DOCUSIGN",
"customFields": [],
"routingOrder": "1",
"recipientAttachments": []
}
],
"agents": [],
"editors": [],
"intermediaries": [],
"carbonCopies": [],
"certifiedDeliveries": [],
"inPersonSigners": []
},
"eventNotification": {
"url": "https://mysite.mydomain.com/root/api/docusign/webhook/eventnotification",
"loggingEnabled": "true",
"requireAcknowledgment": "true",
"envelopeEvents": [
{
"envelopeEventStatusCode": "sent"
},
{
"envelopeEventStatusCode": "delivered"
},
{
"envelopeEventStatusCode": "completed"
},
{
"envelopeEventStatusCode": "declined"
},
{
"envelopeEventStatusCode": "voided"
}
],
"recipientEvents": [
{
"recipientEventStatusCode": "Sent"
},
{
"recipientEventStatusCode": "Completed"
},
{
"recipientEventStatusCode": "Declined"
},
{
"recipientEventStatusCode": "AuthenticationFailed"
},
{
"recipientEventStatusCode": "AutoResponded"
}
],
"useSoapInterface": "false",
"includeCertificateWithSoap": "false",
"signMessageWithX509Cert": "false",
"includeDocuments": "false",
"includeEnvelopeVoidReason": "true",
"includeTimeZone": "true",
"includeSenderAccountAsCustomField": "true",
"includeDocumentFields": "true",
"includeCertificateOfCompletion": "false"
},
"templateRoles": [],
"compositeTemplates": [],
"status": "created",
"emailSubject": "powerpoint press",
"recipientsLock": "true"
}
** I have removed the documentBase64 contennts to make the post shorter **
In demo environment everything works fine, but in the production environment we are getting the specified error.
Setting the embedded start URL is a paid add-on feature. Your production account probably didn't include this feature.
Need to see your envelope before I can give you a complete answer but this page will likely shed light on what you maybe missing:
https://developers.docusign.com/docs/esign-soap-api/reference/sending-group/rules-for-createandsendenvelope-and-createenvelope/
Let me know if this helps.
Everything is working well when using the demo API. I followed the "go live" procedure, the API key is now 'live' and I updated all the settings for production.
When creating the envelope I receive this error message :
{"errorCode"=>"ACCOUNT_LACKS_PERMISSIONS", "message"=>"This Account lacks sufficient permissions."}
I tried to set embedded argument to false on the json but apparently it's not doing anything different.
{:embedded => false,:name => "XXX yyy",:email => "XXX#yyy.com",:role_name => "PropriƩtaire", :sign_here_tabs => ... }
Any idea on how to solve this ? Thanks !
EDIT : here is the JSON request :
{
"emailBlurb": "deijzed",
"emailSubject": "dzeidjezij",
"documents": [
{
"documentId": "1",
"name": "2017-11-09_21h_50m_52s.pdf"
}
],
"recipients": {
"signers": [
{
"accessCode": "",
"addAccessCodeToEmail": false,
"customFields": null,
"idCheckConfigurationName": null,
"idCheckInformationInput": null,
"inheritEmailNotificationConfiguration": false,
"note": null,
"phoneAuthentication": null,
"recipientAttachment": null,
"requireIdLookup": null,
"roleName": "Propri\u00c3\u00a9taire",
"routingOrder": 1,
"socialAuthentications": null,
"recipientId": 1,
"email": "xxx#company.com",
"name": "xxx yyy",
"autoNavigation": false,
"defaultRecipient": false,
"signatureInfo": null,
"tabs": {
"approveTabs": null,
"checkboxTabs": [
{
}
],
"companyTabs": null,
"dateSignedTabs": [
],
"dateTabs": null,
"declineTabs": null,
"emailTabs": [
],
"envelopeIdTabs": null,
"fullNameTabs": [
],
"listTabs": [
],
"noteTabs": null,
"numberTabs": [
],
"radioGroupTabs": [
{
}
],
"initialHereTabs": [
{
}
],
"signHereTabs": [
{
}
],
"signerAttachmentTabs": null,
"ssnTabs": null,
"textTabs": [
{
}],
"titleTabs": [
],
"zipTabs": null
}
},
{
"accessCode": "",
"addAccessCodeToEmail": false,
"customFields": null,
"idCheckConfigurationName": null,
"idCheckInformationInput": null,
"inheritEmailNotificationConfiguration": false,
"note": null,
"phoneAuthentication": null,
"recipientAttachment": null,
"requireIdLookup": null,
"roleName": "company",
"routingOrder": 2,
"socialAuthentications": null,
"recipientId": 2,
"email": "xxx#yyy.com",
"name": "xxx yyy",
"autoNavigation": false,
"defaultRecipient": false,
"signatureInfo": null,
"tabs": {
"approveTabs": null,
"checkboxTabs": [
],
"companyTabs": null,
"dateSignedTabs": [
{
}
],
"dateTabs": null,
"declineTabs": null,
"emailTabs": [
],
"envelopeIdTabs": null,
"fullNameTabs": [
],
"listTabs": [
],
"noteTabs": null,
"numberTabs": [
],
"radioGroupTabs": [
],
"initialHereTabs": [
{
}
],
"signHereTabs": [
{
}
],
"signerAttachmentTabs": null,
"ssnTabs": null,
"textTabs": [
],
"titleTabs": [
],
"zipTabs": null
}
}
],
"carbonCopies": [
]
},
"eventNotification": {
"useSoapInterface": false,
"includeCertificateWithSoap": false,
"url": "xxxxx",
"loggingEnabled": true,
"envelopeEvents": [
],
"recipientEvents": [
{
"includeDocuments": true,
"recipientEventStatusCode": "Completed"
}
]
},
"status": "sent",
"customFields": null
}
I can see you are using "eventNotification", so can you please check if DocuSign connect is supported in your subscription/plan which you bought with DocuSign. If its not available then you need to contact your DocuSign Account Manager for enabling this feature.
The issue was on my side : the API endpoint to be used for European accounts is not www.docusign but eu.docusign
Thanks again for your help
I have an envelope with 6 documents. The sequence is: Canyonlands-ViewOnly.docx is 1, EightDocument.docx is 2, FifthDocument.docx is 3, FirstDocument.docx is 4, screenshots.docx is 5 and
Obama-ViewOnly.docx is 6. Here is the envelope definition
"compositeTemplates": [
{
"compositeTemplateId": "1",
"serverTemplates": [
{
"sequence": "1",
"templateId": "61323293-7f78-4e2b-a296-0c084db16f19"
}
],
"inlineTemplates": [
{
"sequence": "2",
"documents": [],
"recipients": {
"signers": [
{
"name": "Kathy Lori",
"email": "kathylori#xxx.com",
"recipientId": "1",
"accessCode": "12345",
"customFields": [],
"routingOrder": "1",
"note": "",
"roleName": "Customer_SellerName",
}
],
"certifiedDeliveries": []
},
"customFields": {
"textCustomFields": [
{
"name": "EnvelopeInfo",
"value": "my data"
}
]
}
}
],
"document": {
"documentId": "4",
"name": "C:\\Temp\\Docusign\\Package\\Canyonlands-ViewOnly.docx",
"fileExtension": ".docx",
"order": "1",
"documentFields": [
{
"name": "DMSID",
"value": "1"
}
],
"documentBase64": "[Document:Base64Array]"
}
},
{
"compositeTemplateId": "2",
"inlineTemplates": [
{
"sequence": "3",
"documents": [
{
"documentId": "5",
"name": "C:\\Temp\\Docusign\\Package\\EightDocument.docx",
"fileExtension": ".docx",
"order": "2",
"documentFields": [
{
"name": "DMSID",
"value": "2"
}
],
"documentBase64": "[Document:Base64Array]"
},
{
"documentId": "6",
"name": "C:\\Temp\\Docusign\\Package\\FifthDocument.docx",
"fileExtension": ".docx",
"order": "3",
"documentFields": [
{
"name": "DMSID",
"value": "3"
}
],
"documentBase64": "[Document:Base64Array]"
},
{
"documentId": "7",
"name": "C:\\Temp\\Docusign\\Package\\FirstDocument.docx",
"fileExtension": ".docx",
"order": "4",
"documentFields": [
{
"name": "DMSID",
"value": "4"
}
],
"documentBase64": "[Document:Base64Array]"
},
{
"documentId": "9",
"name": "C:\\Temp\\Docusign\\Package\\Obama-ViewOnly.docx",
"fileExtension": ".docx",
"order": "6",
"documentFields": [
{
"name": "DMSID",
"value": "6"
}
],
"documentBase64": "[Document:Base64Array]"
}
],
"recipients": {
"signers": [
{
"name": "Kathy Lori",
"email": "kathylori#hotmail.com",
"recipientId": "1",
"accessCode": "12345",
"customFields": [],
"routingOrder": "1",
"note": "",
"roleName": "Customer_SellerName",
}
],
"certifiedDeliveries": []
},
"customFields": {
"textCustomFields": [
{
"name": "EnvelopeInfo",
"value": "my data"
}
]
}
}
]
},
{
"compositeTemplateId": "2",
"serverTemplates": [
{
"sequence": "2",
"templateId": "f0f1832a-9595-40ef-b40d-c5f384f299e3"
}
],
"inlineTemplates": [
{
"sequence": "3",
"documents": [],
"recipients": {
"signers": [
{
"name": "Kathy Lori",
"email": "kathylori#xxx.com",
"recipientId": "1",
"accessCode": "12345",
"customFields": [],
"routingOrder": "1",
"note": "",
"roleName": "Customer_SellerName",
}
],
"certifiedDeliveries": []
},
"customFields": {
"textCustomFields": [
{
"name": "EnvelopeInfo",
"value": "my data"
}
]
}
}
],
"document": {
"documentId": "10837977",
"name": "C:\\Temp\\Docusign\\Package\\screenshots.docx",
"fileExtension": ".docx",
"order": "5",
"documentFields": [
{
"name": "DMSID",
"value": "5"
}
],
"documentBase64": "[Document:Base64Array]"
}
}
],
"status": "sent",
"emailSubject": "Here is the subject"
}
The last two documents have appeared out of order. How can this be corrected?
Use the listEnvelopeDocuments to retrieve the exact document ID's in the envelope
Once you have the documentID's use the putEnvelopeDocuments api
to update the order of the documents.
{
"documents": [
{
"documentId": "4567899",
"order": "1",
},
{
"documentId": "3245678",
"order": "2",
}
]
}
Right now when creating an envelope, I am unable to designate any other Company Users as signers.
Is there a way to create an envelope via the API and make one of the Signers the an Company user?
This is the signers enclosed in the inline template
"recipients":{
"signers":[
{
"name":"MoCkVotEr testpass",
"email":"kevin+2#joinmosaic.com",
"accessCode":null,
"roleName":"Recipient",
"clientUserId":"a499e405-1385-46fe-9742-b338c2a5d3b2",
"recipientId":"1",
"tabs":{
"textTabs":[
{
"tabLabel":"\\*loanAgreementId",
"value":"3",
"tabId":null
},
{
"tabLabel":"\\*borrowerName",
"value":"MoCkVotEr testpass",
"tabId":null
},
{
"tabLabel":"\\*accountHolderName",
"value":"Account Holder",
"tabId":null
},
{
"tabLabel":"\\*accountNumber",
"value":"11111111111111111",
"tabId":null
},
{
"tabLabel":"\\*routingNumber",
"value":"111111111",
"tabId":null
},
{
"tabLabel":"\\*bankName",
"value":"asdf",
"tabId":null
}
],
"checkboxTabs":[
{
"tabLabel":"\\*isCheckingAccount",
"selected":true,
"tabId":null
},
{
"tabLabel":"\\*isSavingsAccount",
"selected":false,
"tabId":null
}
],
"titleTabs":[
]
},
"routingOrder":null
},
{
"name":"Kevin",
"email":"kevin#joinmosaic.com",
"accessCode":null,
"roleName":"Mosaic",
"clientUserId":"MosaicSignator",
"userId":"3103274b-89ac-4f0c-8f4a-c92a9d2f3749",
"status":"created",
"recipientId":"2",
"tabs":{
"textTabs":[
],
"checkboxTabs":[
],
"titleTabs":[
]
},
"routingOrder":null
}
]
}
This is the result when requesting recipients from the envelope
{
"signers": [
{
"name": "Kevin",
"email": "kevin#joinmosaic.com",
"recipientId": "2",
"recipientIdGuid": "818293ec-ba4a-4adf-941d-3119740e62eb",
"requireIdLookup": "false",
"userId": "**3da53563-5c29-488f-8527-aa5913b004c0**",
"clientUserId": "MosaicSignator",
"routingOrder": "3",
"note": "",
"roleName": "Mosaic",
"status": "created",
"templateLocked": "false",
"templateRequired": "false"
},
{
"name": "MoCkVotEr testpass",
"email": "kevin+2#joinmosaic.com",
"recipientId": "1",
"recipientIdGuid": "ebb98be0-b1bd-446d-ac79-b7b38b63199c",
"requireIdLookup": "false",
"userId": "12f73115-5cb2-4a51-84b3-640a89915b61",
"clientUserId": "a499e405-1385-46fe-9742-b338c2a5d3b2",
"routingOrder": "1",
"note": "",
"roleName": "Recipient",
"status": "sent",
"templateLocked": "false",
"templateRequired": "false"
}
],
"agents": [],
"editors": [],
"intermediaries": [],
"carbonCopies": [],
"certifiedDeliveries": [],
"inPersonSigners": [],
"recipientCount": "3",
"currentRoutingOrder": "1"
}
This is my user from the /account/{}/users api call
{
"userName": "Kevin xxxxx",
"userId": "**3103274b-89ac-4f0c-8f4a-c92a9d2f3749**",
"userType": "CompanyUser",
"userStatus": "Active",
"uri": "/users/3103274b-89ac-4f0c-8f4a-c92a9d2f3749"
}
As you can see the two UserIds do not match. However when going through the GUIConsole They do match.
The DocuSign system will only recognize recipients and match them to their existing DS accounts if all their info is the same as the account user. This definitely includes their email, name, and userId, but might contain other aspects too such as a clientUserId (if you are using Embedded functionality).
To figure out what is different with these users you can make the Get Envelope Recipient Status API call, which will return the above info (plus more) for each recipient. You can then go through and make sure all the IDs, emails, etc. are what you expect.
Check out this API Walkthrough for making the call:
http://iodocs.docusign.com/APIWalkthrough/getEnvelopeRecipientStatus