Reputation: 382
I am trying to convert form fields with name signature_1
and pre-filled value of signature_1
.
I have been following this guide: https://www.docusign.com/developer-center/explore/features/stick-etabs
Here is the issue that i have already written up on the problem: https://github.com/karmaradio/karma/issues/440
Docusign is creating signHere tabs on the contract, but always at the top left, so it isn't recognising the signature_1
form field.
The object i send to docusign:
{
emailBlurb: "Please sign the document using link provided.",
emailSubject: "Karma document sign",
documents: [
{
documentBase64: "encoded",
documentId: 1,
name: "jackum-mur-PAYE-1.pdf",
transformPdfFields: "true"
}
],
recipients: {
signers: [
{
email: "jmurphy+c@gmail.com",
name: "jackum mur",
recipientId: 1,
routingOrder: 1,
tabs: {
signHereTabs: [
{
documentId: "1",
pageNumber: "1",
tabLabel: "signature_1"
}
]
}
},
{
email: "jmurphy+first@gmail.com",
name: "first signee",
recipientId: 2,
routingOrder: 2,
tabs: {
signHereTabs: [
{
documentId: "1",
pageNumber: "1",
tabLabel: "signature_2"
}
]
}
},
{
email: "jmurphy+second@gmail.com",
name: "second signee",
recipientId: 3,
routingOrder: 3,
tabs: {
signHereTabs: [
{
documentId: "1",
pageNumber: "1",
tabLabel: "signature_3"
}
]
}
},
status: "sent"
}
Upvotes: 1
Views: 188
Reputation: 7393
After examining the document you have shared, the following json should covert the form fields appropriately. Looking at the convention of your Tab labels, it is not clear which tabs apply to a particular recipient. So I have manually mapped each tabLabel to a recipient. From my example you can move the tabs based on the correct recipient.
If you want similar tab types to automatically populate with the same data then see here
Here is the CreateEnvelope request.
POST /v2/accounts/{accountId}/envelopes
{
"emailSubject": "Document with Form fields",
"status": "sent",
"compositeTemplates": [
{
"document": {
"documentBase64": "<Add the bas64 encoded document bytes here>",
"documentId": "1",
"name": "p60-form.pdf",
"transformPdfFields": "true"
},
"inlineTemplates": [
{
"sequence": "1",
"recipients": {
"signers": [
{
"email": "jmurphy+c@gmail.com",
"name": "jackum mur",
"recipientId": "1",
"routingOrder": "1",
"tabs": {
"signHereTabs": [
{
"tabLabel": "signature_1"
},
{
"tabLabel": "signature_1DocuSignSignHere"
}
],
"textTabs": [
{
"tabLabel": "signature_1 Student Loan deductions",
"value" : "<Pre-Fill Tab Value here>"
},
{
"tabLabel": "Student Loan deductions",
"value" : "<Pre-Fill Tab Value here>"
},
{
"tabLabel": "PAYE reference",
"value" : "<Pre-Fill Tab Value here>"
},
{
"tabLabel": "Your employer's full name and address (including postcode",
"value" : "<Pre-Fill Tab Value here>"
}
]
}
},
{
"email": "jmurphy+first@gmail.com",
"name": "first signee",
"recipientId": "2",
"routingOrder": "2",
"tabs": {
"signHereTabs": [
{
"tabLabel": "signature_2"
},
{
"tabLabel": "signature_2 DocuSignSignHere"
}
],
"textTabs": [
{
"tabLabel": "signature_2",
"value" : "<Pre-Fill Tab Value here>"
},
{
"tabLabel": "signature_2 Your employers full name and address including postcode",
"value" : "<Pre-Fill Tab Value here>"
}
]
}
},
{
"email": "jmurphy+second@gmail.com",
"name": "second signee",
"recipientId": "3",
"routingOrder": "3",
"tabs": {
"signHereTabs": [
{
"tabLabel": "signature_3"
},
{
"tabLabel": "signature_3 DocuSignSignHere"
}
],
"textTabs": [
{
"tabLabel": "signature_3 PAYE reference",
"value" : "<Pre-Fill Tab Value here>"
}
]
}
}
]
}
}
]
}
]
}
Upvotes: 2