tatternutz

Update package status to DECLINED

0 votes
As the remote agent I want to programatically update a SENT package to DECLINED. I have tried to send the request when the package is in a DRAFT and SENT status. Request
{"status": "DECLINED"}
Response when package is in DRAFT status
{
    "messageKey": "error.validation.cannotChangePackageStatus",
    "code": 400,
    "name": "Validation Error",
    "message": "Cannot change package status."
}
Response when package is in SENT status
{
    "messageKey": "error.validation.optOut.invalidComment",
    "code": 400,
    "name": "Validation Error",
    "message": "Invalid comment provided. Please provide a valid comment."
}

Approved Answer

Reply to: Update package status to DECLINED

1 votes
Hi there, The Decline/Opt_out status is triggered during Signing Ceremony, so this can't be modified by this API, you can use following one instead:
POST /api/packages/{packageId}

sample payload:
{
   "id":"{packageId}",
   "messages":[
      {
         "from":{
            "id":"{sender Role ID}"
         },
         "content":"{decline reason}",
         "documents":[
            {
               "id":"default-consent"   //the document you want to decline
            }
         ]
      }
   ],
   "status":"DECLINED"   //DECLINED/OPTED_OUT
}
Hope this could help! Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: Update package status to DECLINED

0 votes
Thank you Duo_Liang!

Reply to: Update package status to DECLINED

0 votes
Glad to help! Just let us know if you have any other questions. :) Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


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