sethuramanraji

PAYLOAD for Create Package API

0 votes
Hi Team, Can anyone provide me the sample JSON for Create Package API which include below features: 1. Reminder Schedule. 2. Review Before Completion. 3. Templates. Thanks in Advance.

Reply to: PAYLOAD for Create Package API

2 votes
Hi sethuraman, To include all the three features, you'd use three API calls like below: 1. Clone a package from a Template, set "Review before Completion" and leave the status to "DRAFT".
HTTP Request
POST /api/packages/{packageId}/clone

HTTP Headers
Accept: application/json
Content-Type: application/json
Authorization: Basic api_key

Request Payload
{
   "name":"Package created from template through REST API",
   "autocomplete":false,
   "type":"PACKAGE",
   "language":"en",
   "status":"DRAFT",
   "roles":[
      {
         "id":"PlaceholderId1",
         "type":"SIGNER",
         "signers":[
            {
               "id":"PlaceholderId1",
               "firstName":"1.firstname",
               "lastName":"1.lastname",
               "email":"[email protected]"
            }
         ],
         "name":"PlaceholderId1"
      },
      {
         "id":"PlaceholderId2",
         "type":"SIGNER",
         "signers":[
            {
               "id":"PlaceholderId2",
               "firstName":"2.firstname",
               "lastName":"2.lastname",
               "email":"[email protected]"
            }
         ],
         "name":"PlaceholderId2"
      }
   ]
}
This is an example where your template contains two placeholder roles. Just replace the role id with your placeholder ID. 2. Set reminders with a different API call:
HTTP Request
POST /api/packages/{packageId}/reminders

HTTP Headers
Accept: application/json
Content-Type: application/json
Authorization: Basic api_key

Request Payload
{
  "startInDaysDelay": 1,
  "repetitionsCount": 5,
  "intervalInDays": 1,
  "packageId": "{packageId}"
}
From more information on this feature, you can refer to this guidance. 3. Sent your package.
HTTP Request
PUT /api/packages/{packageId}

HTTP Headers
Accept: application/json
Content-Type: application/json
Authorization: Basic api_key

Request Payload
{
 "status" : "SENT"
}
Hope this could help you! Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: PAYLOAD for Create Package API

0 votes
Hi Duo, Thank you, This helps me a lot..!!. But, Can I make use of all these feature within a single Create Package API call?.

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