Copy link to clipboard
Copied
I'm using the Adobe Sign REST API v5's POST /workflow/{workflowId}/agreements.
I'm trying to upload an attachment to a file attachment field. However, I can't seem to get it to pre-fill. Do you have any suggestions or possibly see the mistake I'm doing?
Sample Body:
{ documentCreationInfo: {
fileInfo: [{ name: "document", workflowLibraryDocumentId: "id"}],
mergeFieldInfo: [{ fieldName: "file.attachment", default: "data:image/png;base64, ..."}],
name: "name",
recipientsListInfo: [ { name: "Signer1", recipients: [{ email: "email@hotmail.com"}] }]
}
Alternatively, I tried importing as a file:
{ documentCreationInfo: {
fileInfo: [
{ name: "document1", workflowLibraryDocumentId: "id"},
{ name: "document2", documentURL: { url: "data:image/png;base64, ..." }
],
mergeFieldInfo: [],
name: "name",
recipientsListInfo: [ { name: "Signer1", recipients: [{ email: "email@hotmail.com"}] }]
}
I think I did, however this was 2 years ago, so I don't recall the exact solution but I remember it had to do something with changing a field to string despite what it asked for.
Copy link to clipboard
Copied
I have the same problem. You solved?
Copy link to clipboard
Copied
I think I did, however this was 2 years ago, so I don't recall the exact solution but I remember it had to do something with changing a field to string despite what it asked for.
Copy link to clipboard
Copied
I am trying in all ways but I can't. I can't find anything on the internet. I would be grateful if you would help me
Copy link to clipboard
Copied
I apologize I think I was mistaken about the string field. The string field was a solution to another problem I had.
As for the solution to uploading file attachments to the document, we did a workaround, rather than use the API. We essentially added an additional document to the workflow, without assigning it any files. We sent the attachment as that additional file.
Copy link to clipboard
Copied
To add the attachment as the additional document, we first uploaded it as an transientDocument, then referenced it in the workflow API.
Hence, if my memories serve me right, this was how we did it.
1. Add an empty additional document to the workflow.
2. Send an API to save the attachment as a transient document.
3. Send the workflow API with the additional document referencing the transient document.