This topic contains 3 replies, has 2 voices, and was last updated by  Duo_Liang 6 days, 16 hours ago.

  • Author
    Posts
  • Participant
    tatternutz
    Member
    Member since: 08.03.2017
    Number of posts: 24

    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."
    }
    
    Keymaster
    Duo_Liang
    Guru
    Member since: 14.06.2018
    Number of posts: 469
    Approved answer

    Score

    1

    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 Junior Technical Evangelist
    Participant
    tatternutz
    Member
    Member since: 08.03.2017
    Number of posts: 24

    Score

    0

    Thank you Duo_Liang!

    Keymaster
    Duo_Liang
    Guru
    Member since: 14.06.2018
    Number of posts: 469

    Score

    0

    Glad to help! Just let us know if you have any other questions. 🙂

    Duo


    Duo Liang
    OneSpan Junior Technical Evangelist

You must be logged in to reply to this topic.