Update package status to DECLINED
Tuesday, November 6, 2018 at 07:21amAs 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."
}
Reply to: Update package status to DECLINED
Tuesday, November 6, 2018 at 07:54amPOST /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! DuoReply to: Update package status to DECLINED
Tuesday, November 6, 2018 at 08:21amReply to: Update package status to DECLINED
Tuesday, November 6, 2018 at 02:02pm