URL: v3/api/ticket-approval-status/{ticket-id}

Method: GET

Description : Gets the details of all the approval workflow applied to the ticket and their current status

Success Response:

{

"success": true,

  "data": [

    {

     "id": 224

     "approval_workflow_id": "194",

     "name": "test_workflow",

     "ticket_id": 417,

     "created_at": "2018-10-11 10:01:55",

     "updated_at": "2018-10-11 10:01:55",

     "approval_levels": [

{

         "id": 486

         "status": "PENDING",

         "is_active": 1,

   "name": "test_level_1",

         "approve_users": [

{

             "id": 1

             "status": "PENDING",

             "name": "Demo Admin",

           }

         ]

         "Approve_user_types": [

   {

             "id": 4

             "name": "department_manager",

             "status": "PENDING",

           }

{

             "id": 5

             "name": "team_lead",

             "status": "PENDING",

           }

         ]

       }

{

         "id": 487,

         "status": "PENDING",

         "is_active": 0,

   "name": "test_level_2",

         "Approve_users": [

{

             "id": 1,

             "status": "PENDING",

             "name": "Demo Admin"

           }

         ]

         "approve_user_types": [

{

             "id": 4,

             "name": "department_manager",

             "status": "PENDING"

           }

{

             "id": 5,

             "name": "team_lead",

             "status": "PENDING"

           }

         ]

       }

     ]

   }

 ]

}



Error Response:

{

"success":false,

"message":"No workflow applied to the given ticket"

}

 

Tagged: