can we able to create the template in sandbox UI and send the created template through Rest Api.
January 3Created
January 21Last Updated
4 years agoLast Reply
9Replies
52Views
2Users
0Likes
0Links
Duo_Liang | Posts: 3776
Reply to: access a document which created in sandbox
Friday, January 3, 2020 at 06:12am
0
votes
Hi nareshishere,
Yes, you can create the template through UI and then clone a package from this template and send it, through REST API.
To do so, you'd
(1) get the template ID from the dashboard URL:
Few notes:
(1) you can clone and send the package within the same API call
(2) you can override package level settings by adding more attributes in the payload
(3) if you have placeholder signer (guide here) involved in your template, you need to replace the placeholder with actual signer information, in this payload
Check the Create Package From Template guide for more detailed instructions.
Duo
Duo LiangOneSpan Evangelism and Partner Integrations Developer
Reply to: access a document which created in sandbox
Friday, January 3, 2020 at 08:28am
0
votes
Hi nareshishere,
Placeholder/signer created from UI will be randomly given an ID, therefore you can either invoke an extra API to lookup the ID, or you can manually check the ID and hard code it, by below steps:
(1) log onto your web UI
(2) hit this link:
, the template related information should be returned in JSON
(3) format the JSON and find the "roles" array, check the role named "Signer1" and you will find the role ID there, which normally looks like below:
Reply to: access a document which created in sandbox
Friday, January 3, 2020 at 08:40am
0
votes
Thanks it worked now its saying {
"code": 400,
"messageKey": "error.validation.sendPackage.noApprovals",
"message": "Cannot send package without approvals.",
"name": "Validation Error"
}
It seems like i did not added signature field . How to inject the signature field through Rest api
Reply to: access a document which created in sandbox
Friday, January 3, 2020 at 08:57am
0
votes
Hi nareshishere,
Since you are using template and the placeholder signer, you can do the design through UI, and the cloned packages will inherit the layout from template.
Duo
Duo LiangOneSpan Evangelism and Partner Integrations Developer
Reply to: access a document which created in sandbox
Friday, January 3, 2020 at 10:26am
0
votes
Hi nareshishere,
If you were talking about the "Field Injection" feature -- use PDF forms as location and stamp values to the document before signing, it's not feasible by using template, because the field injection can only be performed once when the document first upload to the server.
Because of this limitation, you may want to upload the document(s) with injected field values every time you cloned a package, then apply the "Layout" to each document.
If you don't want to upload documents every time (store the documents in the template), you have to use the OneSpan Sign label field (because it's a type of OneSpan Sign field, unless you were using automatic extraction methods like text tags, you don't use the PDF form to map the field but through UI, label field will be stamped to the PDF after signing).
In this case, you have to clone a template, then update the label field values, and send the package, in different API calls.
Both workarounds include extra steps, so have a try on both approaches and let me know which path you want to follow. Tell me if I've misunderstood your use case.
Duo
Duo LiangOneSpan Evangelism and Partner Integrations Developer
Reply to: access a document which created in sandbox
Monday, January 6, 2020 at 04:21am
0
votes
The scenario is different . I already created a label field through sandbox . Just need to pass values from Rest api .
I need to understand how to pass values from Rest APi for the labels created through the sandbox .
Reply to: access a document which created in sandbox
Tuesday, January 7, 2020 at 06:11am
0
votes
Hi there,
To update the label field values, you need to:
(1)retrieve the package JSON, parse, loop through and find the field JSON of your interest:
GET /api/packages/{packages}
If you knew the specific document ID or approval ID, you can use below API instead:
GET /api/packages/{packages}/documents/{documentID}
GET /api/packages/{packages}/documents/{documentID}/approvals/{approvalID}
(2) Change the values of the fields.
(3.1) If you only have few fields to update, you can update them one by one by below API, with the updated field JSON as payload:
PUT /api/packages/{packageId}/documents/{documentId}/approvals/{signatureId}/fields/{fieldId}
(3.2) If you want to update fields under the same signature in bulk, you'd update the whole signature/approval:
PUT /api/packages/{packageId}/documents/{documentId}/approvals/{signatureId}/
Keep the signature JSON intact as the payload and only change the field value attribute.
Both 3.1 or 3.2 required to pass in the complete field/signature JSON, partial metadata will cause information lost.
Duo
Duo LiangOneSpan Evangelism and Partner Integrations Developer
Reply to: access a document which created in sandbox
Friday, January 3, 2020 at 06:12amDuo Liang OneSpan Evangelism and Partner Integrations Developer
Reply to: access a document which created in sandbox
Friday, January 3, 2020 at 08:10amReply to: access a document which created in sandbox
Friday, January 3, 2020 at 08:28amDuo Liang OneSpan Evangelism and Partner Integrations Developer
Reply to: access a document which created in sandbox
Friday, January 3, 2020 at 08:40amReply to: access a document which created in sandbox
Friday, January 3, 2020 at 08:57amDuo Liang OneSpan Evangelism and Partner Integrations Developer
Reply to: access a document which created in sandbox
Friday, January 3, 2020 at 09:12amReply to: access a document which created in sandbox
Friday, January 3, 2020 at 10:26amDuo Liang OneSpan Evangelism and Partner Integrations Developer
Reply to: access a document which created in sandbox
Monday, January 6, 2020 at 04:21amReply to: access a document which created in sandbox
Tuesday, January 7, 2020 at 06:11amDuo Liang OneSpan Evangelism and Partner Integrations Developer