Copy link to clipboard
Copied
Hi folks,
is it possible to pre-set / edit input field values of a agreement that is based on a document library template using the REST API?
My workflow could be like:
1. I create a document template with custom input fields (e.g. first name)
2. My own client calls the API method to create an agreement based on this template
3. My own client calls another API to prefill the first name input value
4. The agreement will be sent to the recipients.
For my understanding, the 3. point is only possible if I have a transient id which I only get if I upload a pdf file.
Is there anyway to achieve such a workflow that I described above?
Thanks for any helpful tip!
Kinds regards, Tobi
Hi Tobi!
You are close, the value you would use is "libraryDocumentId"
In the API documentation (in the application) you can explore all of the possible values by expanding the AgreementInfo object, and then clicking the links to the discrete sections (Sorry for the giant image, but in the interests of clarity, I thought this would be helpful)
Then, within the subsection (FileInfo in this case), you will see all of the possible (optional) options for that element of the call:
FileInfo allows five di
...Copy link to clipboard
Copied
Greetings!
If you have created a library template, then you want to call the library template ID, which would not be a transient ID.
The easiest way to get your template IDs would be to use Get /libraryDocuments
In the API documentation you can expose the template IDs readily by
In the response body, you will get a listing of all your library templates, complete with the ID:
Copy link to clipboard
Copied
Hi ScottCarter​,
thanks for your fast reply! Great!
I'm very new to this. That's why my follow up question for clarification:
Does your answer mean, that I could use the following API example call (How to send an agreement with merge fields using API | Adobe Sign ) but instead of
"fileInfos"
: [
{
"transientDocumentId"
:
"3AAABLxxx
}
],
I would use ...
"fileInfos"
: [
{
"templateDocumentId"
:
"<documentID>"
}
],
.. to prefill my custom input fields in this template?
Thanks for your great work!
Kinds regards,
- Tobi
Copy link to clipboard
Copied
Hi Tobi!
You are close, the value you would use is "libraryDocumentId"
In the API documentation (in the application) you can explore all of the possible values by expanding the AgreementInfo object, and then clicking the links to the discrete sections (Sorry for the giant image, but in the interests of clarity, I thought this would be helpful)
Then, within the subsection (FileInfo in this case), you will see all of the possible (optional) options for that element of the call:
FileInfo allows five different (all optional) methods to provide your document. Where some kind of doucment is required, how you deliver that document to the system is left pretty open.
In your specific example, you describe building a template (I assume in the Adobe Sign library), and that would require libraryDocumentId.
While you are getting familiar with the Adobe Sign objects and options, I would be careful of clicking the Minimal Model Schema link in the in-app documentation. That will produce an example schema, but omits the bulk of the options.
Look at the Complete Model Schema for now while you are ramping up. It will present you with all of the options, and you can pretty easily delete the parts you don't want to use to get to your refined call.
Hope this helps!
-Scott
Copy link to clipboard
Copied
Just as an extension for anyone that might reference this forum post in the future, the API documentation is in the Sign application under the Adobe Sign API tab:
Generally speaking, I would caution new developers to look at the full documentation first, and code samples or tactical knowledge base articles only after reviewing the full list of options (or side by side if you have nice wide monitors).
It is not uncommon for a dedicated article around an isolated feature (eg: how to map data into fields) to include ancillary code that will not be fully explained (to keep the article concise and on target).
Copy link to clipboard
Copied
Wow, thanks for your effort. I'll have a look and test it.
I'll return to this post if something is still unclear - I hope not.
Thanks a lot and kind regards,
- Tobi
Copy link to clipboard
Copied
Hello,
Can you please help how to use this API with the librarydocument? I have a template file, which I am using to sign the document. I would like to pass formfields and as per your documentation merge form fields is not an option if we use library document template. Please help!
Copy link to clipboard
Copied
I am trying to send an agreement with library template with complete model schema. I am getting error saying invalid transient document Id. How to resolve this issue? I am using v5. If i use V6 if I try to use complete model schema, it is saying invalid json.Please help me.
Copy link to clipboard
Copied
Hello,
If you encounter an "Invalid Transient Document ID" error while trying to send an agreement using the library template with the complete model schema in v5, it typically indicates an issue with the document ID you're passing. The "Invalid Transient Document ID" error could be due to several reasons, such as incorrect formatting or invalid data in your JSON schema.
for more details, you can refer to https://helpx.adobe.com/sign/kb/how-to-send-an-agreement-through-REST-API.html It worked for me.
Thanks