Update the status of a case

The status of an Action Management Case is a link between the case and an item from the Action Management program’s Status list. These list items each represent an available status that can be assigned to a case. To update the status on a case, replace the existing status item with a different one.

Get the status list

To get a list of available statuses for an Action Management program, query the Get Lists endpoint with the hub ID. The list with the type of "status" is the Status list.

Request
GET  https://<host>/v1/actionmanagement/hubs/6435/lists
Accept: application/json
Authorization: Bearer <access_token>
Response
{
    "itemType": "ProgramList",
    "itemCount": 2,
    "totalCount": 2,
    "items": [ {
        "id": 9423,
        "name": "Status",
        "type": "status",
        "lastUpdated": "2021-03-10T00:00:00-08:00",
        "defaultItem": 11001,
        "items": [ {
            "listId": 9423,
            "id": 986,
            "name": "Not Started",
            "type": "status",
            "isOpen": true
        },
        {
            "listId": 9423,
            "id": 987,
            "name": "In Progress",
            "type": "status",
            "isOpen": true
        },
        {
            "listId": 9423,
            "id": 988,
            "name": "Completed",
            "type": "status",
            "isOpen": false
        } ],
        "links": {}
    },
    {
        "id": 9424,
        "name": "Severity",
        "type": "severity",
        "lastUpdated": "2021-03-10T00:00:00-08:00",
        "defaultItem": 11010,
        "items": [
        {
            "listId": 9424,
            "id": 11010,
            "name": "Normal",
            "type": "severity",
            "isHigh": false
        },
        {
            "listId": 9424,
            "id": 11011,
            "name": "Escalated",
            "type": "severity",
            "isHigh": true
        },
        {
            "listId": 9424,
            "id": 11012,
            "name": "Low priority",
            "type": "severity",
            "isHigh": false
        } ],
        "links": {}
    } ],
    "links": {}
}

Each of the items on the Status List is a status that can be assigned to a case.

Setting the status of a case

To start, get an existing case via the GET Case endpoint.

Request
GET  https://<host>/v1/actionmanagement/hubs/6435/cases/2009631
Accept: application/json
Authorization: Bearer <access_token>
Response
{
    "id" : 2009631,
    "name" : "Example case",
    "workflowId" : 3536,
    "cost" : 250,
    "triggerId" : 7315,
    "triggerName" : "Example trigger",
    "dateCreated" : "2021-10-01T00:00:00-07:00",
    "dateModified" : "2021-10-04T00:00:00-07:00",
    "listValues" : [ {
        "listId" : 9423,
        "id" : 987,
        "name" : "In Progress",
        "type" : "status",
        "isOpen" : true
    },
    {
      "listId" : 9424,
      "id" : 11011,
      "name" : "Escalated",
      "type" : "severity",
      "isHigh" : true
    } ],
    "roles" : [ {
        "id" : 3456,
        "caseId" : 2009631,
        "name": "Case Manager",
        "users" : [ {
            "id" : 8790,
            "userName" : "exampleUser8790",
            "isActive" : true,
            "links" : {
                    "self": "https://<host>/v1/hubs/6435/enduserlists/201/users/8790"
                }
            } ]
        } ]
    },
    {
        "id" : 3457,
        "caseId" : 2009631,
        "name": "Watcher",
        "users" : []
    } ],
    "source" : {
        "responseId" : "452651",
        "surveyId" : "p41560",
        "sourceId" : "s3"
    },
    "links" : {
        "self" : "http://<host>/v1/actionmanagement/hubs/96/cases/2009631",
        "notes" : "http://<host>/v1/actionmanagement/hubs/96/cases/2009631/notes"
    }
}

The case’s existing status can be seen in the listValues collection. In the above example, the existing status is item 987: "In Progress".

To change the case’s status, replace the existing status item with a different one from the Status List, and submit the full case via the Case Update endpoint.

Request
PUT  https://<host>/v1/actionmanagement/hubs/6435/cases/2009631
{
    "id" : 2009631,
    "name" : "Example case",
    "workflowId" : 3536,
    "cost" : 250,
    "triggerId" : 7315,
    "triggerName" : "Example trigger",
    "dateCreated" : "2021-10-01T00:00:00-07:00",
    "dateModified" : "2021-10-04T00:00:00-07:00",
    "listValues" : [ {
        "listId" : 9423,
        "id" : 988,
        "name" : "Completed",
        "type" : "status",
        "isOpen" : false
    },
    {
      "listId" : 9424,
      "id" : 11011,
      "name" : "Escalated",
      "type" : "severity",
      "isHigh" : true
    } ],
    "roles" : [ {
        "id" : 3456,
        "caseId" : 2009631,
        "name": "Case Manager",
        "users" : [ {
            "id" : 8790,
            "userName" : "exampleUser8790",
            "isActive" : true,
            "links" : {
                    "self": "https://<host>/v1/hubs/6435/enduserlists/201/users/8790"
                }
            } ]
        } ]
    },
    {
        "id" : 3457,
        "caseId" : 2009631,
        "name": "Watcher",
        "users" : []
    } ],
    "source" : {
        "responseId" : "452651",
        "surveyId" : "p41560",
        "sourceId" : "s3"
    }
}
Accept: application/json
Authorization: Bearer <access_token>
Response
{
    "id" : 2009631,
    "name" : "Example case",
    "workflowId" : 3536,
    "cost" : 250,
    "triggerId" : 7315,
    "triggerName" : "Example trigger",
    "dateCreated" : "2021-10-01T00:00:00-07:00",
    "dateModified" : "2021-10-04T00:00:00-07:00",
    "listValues" : [ {
        "listId" : 9423,
        "id" : 988,
        "name" : "Completed",
        "type" : "status",
        "isOpen" : false
    },
    {
      "listId" : 9424,
      "id" : 11011,
      "name" : "Escalated",
      "type" : "severity",
      "isHigh" : true
    } ],
    "roles" : [ {
        "id" : 3456,
        "caseId" : 2009631,
        "name": "Case Manager",
        "users" : [ {
            "id" : 8790,
            "userName" : "exampleUser8790",
            "isActive" : true,
            "links" : {
                    "self": "https://<host>/v1/hubs/6435/enduserlists/201/users/8790"
                }
            } ]
        } ]
    },
    {
        "id" : 3457,
        "caseId" : 2009631,
        "name": "Watcher",
        "users" : []
    } ],
    "source" : {
        "responseId" : "452651",
        "surveyId" : "p41560",
        "sourceId" : "s3"
    },
    "links" : {
        "self" : "http://<host>/v1/actionmanagement/hubs/96/cases/2009631",
        "notes" : "http://<host>/v1/actionmanagement/hubs/96/cases/2009631/notes"
    }
}

The response of the PUT request is the full case with the updated Status.