sumantasaha | Posts: 11

Set Expiry Date For A Package

0 votes
Hi, I have a requirement to have an expiry date to be set during package creation or package update. I have read through the request and response related to packages and configuration and still could not figure out the procedure or field where the data should be set. I have configured the reminder notification using the API /api/packages/{{PACKAGE-ID}}/reminders. However, I am curious about there should be a certain max time when the notification will stop and the unsigned package will expire. Please help me with probable API (if any) or any other way it can be handled. Also a brief intro about the reminder notification would be helpful. Thanks, Suman

Duo_Liang | Posts: 3776

Reply to: Set Expiry Date For A Package

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