predefined=sent vs query=sent
Wednesday, April 10, 2024 at 12:24pmUsing the packages endpoint to search for SENT packages using the below request call as per the Sandbox API.
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?
Reply to: predefined=sent vs query=sent
Wednesday, April 10, 2024 at 01:03pmHi 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
Reply to: predefined=sent vs query=sent
Wednesday, April 10, 2024 at 01:22pmThanks 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.
Reply to: predefined=sent vs query=sent
Wednesday, April 10, 2024 at 01:35pmHi 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
Reply to: predefined=sent vs query=sent
Wednesday, April 10, 2024 at 01:37pmWill do.