sumantasaha | Posts: 11

Set package Expiry Date In Rest API

0 votes
Hi, I have a requirement to set the package expiry date during creation of the package itself. The problem is I cannot identify the suitable Json field where the expiry date can be set so that Onespan can automatically take the necessary actions on it. The java sdk has the solution. But we are using Rest API for our integration. I have gone through the request and response of the API but could not identify the field. API: https://sandbox.e-signlive.com/api/packages/ Need help in resolving the issue. Thanks, Suman

Duo_Liang | Posts: 3776

Reply to: Set package Expiry Date In Rest API

0 votes
Hi Suman, Expiry setting is a package level attribute named “due”. Below is the expected format you can update a package with:
PUT /api/packages/{packageId}
{
"due": "2019-04-05T10:18:00Z"
}
It’s in a format of {yyyy}-{MM}-{dd}T{HH}:{mm}:{ss}Z which is in GMT timezone. So if you want to set the timezone, you’d first convert your target local expiry time to GMT time then format it accordingly. Or simply if you are not sensitive to the exact time, yyyy-MM-dd would work. Hope this could help! Duo

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