ben | Posts: 4

predefined=sent vs query=sent

0 votes

Using the packages endpoint to search for SENT packages using the below request call as per the Sandbox API.

https://sandbox.esignlive.com/api/packages?search=<search_string>&predefined=sent&ownerEmail=<email_address>

This appears to be retrieving Sent, Completed, Drafts though. Changing 'predefined' to 'query' provides the expected results however. This does not coincide with the API documentation nor the Sandbox.

Am I doing something wrong?
 


Approved Answer
Duo_Liang | Posts: 3776

Reply to: predefined=sent vs query=sent

0 votes

Hi ben,

 

Thanks for your post!

From API's perspective, to retrieve transactions of a given status, you'd use parameter "query=SENT", the available values are:
ARCHIVED, COMPLETED, DRAFT, SENT, EXPIRED, AND DECLINED

An example looks like below with the most commonly used parameters:

https://sandbox.esignlive.com/api/packages?type=PACKAGE&query=SENT&from=1&to=100&startDate=2024-04-01&endDate=2024-04-10

 

For "predefined" parameter, it's more used by the UI portal, along with other parameters like "sort", "dir" and "query". A typical API the UI would use looks like below:
https://sandbox.esignlive.com/api/packages?type=PACKAGE&from=1&to=20&sort=updated&dir=desc&query=inbox&predefined=sent

 

Duo

 


ben | Posts: 4

Reply to: predefined=sent vs query=sent

0 votes

Thanks Duo. While I agree this is the behaviour, this doesn't align with the sandbox API documentation. In the documentation the 'query' parameter can be set to 'drafts', 'inbox', 'trashed' and controls which folder will be searched.
https://community.onespan.com/products/onespan-sign/sandbox#/Packages/api.packages.get:~:text=The%20folder%20to%20search%20for.%20If%20not%20set%2C%20it%20will%20search%20in%20all%20folders%20except%20trashed.


Duo_Liang | Posts: 3776

Reply to: predefined=sent vs query=sent

0 votes

Hi ben,

 

Yes, I agree that this doesn't align with the API swagger. Could you please also raise a support ticket ([email protected]) and report that the API swagger is inaccurate?

 

Duo


ben | Posts: 4

Reply to: predefined=sent vs query=sent

1 votes

Will do.


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off