Hi,
1) Is there any API to retrieve list of Layouts for a given sender
2) is there any API to retrieve list of package Ids for a given sender
thanks
Neel
July 25Created
January 21Last Updated
6 years agoLast Reply
5Replies
18Views
2Users
0Likes
0Links
Duo_Liang | Posts: 3776
Reply to: retrieve list of layouts using API
Wednesday, July 25, 2018 at 11:24am
0
votes
Hi Neel,
To retrieve these information, you need to get your sender's api key, and use this api key to call apis just like what you did with your main owner account. Following are the detailed steps:
1. Retrieve sender's api key:
First you'd retrieve the sender id by:
GET https://sandbox.esignlive.com/api/account/senders
Then, once you have the sender id of each, you can use api below to retrieve the api key of the current sender.
GET https://sandbox.esignlive.com/api/account/senders/{senderId}/apiKey
2.Retrieve list of layouts:
GET /api/layouts?from={fromPage}&to={toPage}
3. Retrieve list of package ids:
You can use completion report feature to retrieve all senders' package ids (in this way you don't necessary to get the sender's api key)
GET /api/reports/completion?status={status}&from={fromPage}&to={toPage}
Or, you can retrieve packages for this specific sender:
GET /api/packages?query={status}&from={fromPage}&to={toPage}
Thanks Duo.
Is there a way to retrieve the layout using Layout Name instead of from & to?
Searching through the list will be time consuming and adds to the over API SLAs
Can we do the same for Package & Templates as well?
please let us know.
Hi Neel,
Yes, OneSpan Sign gives you the capability to filter retrieved results.
You can add a &search={keyword} parameter to your API call, but I believe you have to keep the from&to, because otherwise you won't retrieve the actually list.(You can only retrieve one package/layout from my test) Following are detailed API calls I suggest to use:
For Retrieve Packages:
GET /api/packages?search={keyword}&from={fromPage}&to={toPage}
For Retrieve Templates:
GET /api/packages?type=TEMPLATE&search={keyword}&from={fromPage}&to={toPage}
For Retrieve Layouts:
GET /api/layouts?search={keyword}&from={fromPage}&to={toPage}
As you may noticed:
1. Template is a kind of package with type of "template"
2.in url, {keyword} and {type}(template here) are not case sensitive. Unlike status of the package for example "DRAFT" or "SENT", these must be upper case.
Hope this could help you!
Duo
Thanks Duo.
So, will it search for shared layouts or just the layouts owned by the sender / apikey?
/api/layouts?search="Sample for contract"&from=1&to=100
Hi Neel,
I believe all APIs above are all apikey based except the following one. If you want to retrieve packages/layouts for your senders, you need to retrieve their apikeys first.
GET /api/reports/completion?status={status}&from={fromPage}&to={toPage}
But unfortunately, we don't provide "search" or "type" parameter in Retrieve Completion Report API, which means you can't add a filter for name or retrieve templates by calling this API.
And BTW, in "search" parameter, you don't need to use double quotation marks./api/layouts?search=Sample for contract&from=1&to=100 is fine.
Hope this could help you!
Duo
Reply to: retrieve list of layouts using API
Wednesday, July 25, 2018 at 11:24amReply to: retrieve list of layouts using API
Thursday, July 26, 2018 at 03:01amReply to: retrieve list of layouts using API
Thursday, July 26, 2018 at 06:02am&search={keyword}
parameter to your API call, but I believe you have to keep the from&to, because otherwise you won't retrieve the actually list.(You can only retrieve one package/layout from my test) Following are detailed API calls I suggest to use: For Retrieve Packages: For Retrieve Templates: For Retrieve Layouts: As you may noticed: 1. Template is a kind of package with type of "template" 2.in url, {keyword} and {type}(template here) are not case sensitive. Unlike status of the package for example "DRAFT" or "SENT", these must be upper case. Hope this could help you! DuoReply to: retrieve list of layouts using API
Thursday, July 26, 2018 at 06:17amReply to: retrieve list of layouts using API
Thursday, July 26, 2018 at 06:39am/api/layouts?search=Sample for contract&from=1&to=100
is fine. Hope this could help you! Duo