# List Active Cases

Lists the user's active cases (cases being served by the user) in the user's current unit.

{% hint style="info" %}
This endpoint requires the **Agent Impersonator** rol&#x65;**.**
{% endhint %}

## URL

```
GET: https://[base-url]/{applicationId}/agents/{userId}/activeCases
```

## Headers

```
Authorization: Bearer <accessToken>
```

## Request Body

N/A

## Response

#### Success -> 200

Returns an array of `Case` objects.

Note that this API does not return the case's fields and tags. The `fields`and `tags` properties are always null.

Sample response:

```json
[
    {
        "caseId": "10a36a3c-ffd8-42db-9eb0-...",
        "ticket": {
            "prefix": "A",
            "suffix": null,
            "number": 119
        },
        "serviceCategoryId": "72406b29-b8c7-4358-8ac1-...",
        "serviceCategoryName": "Inquiry",
        "serviceTypeId": "0a526645-8401-4df6-a060-...",
        "serviceTypeName": "Special Inquiry",
        "status": "Active",
        "statusDate": "2024-04-11T11:13:38.008222Z",
        "referenceDate": "2024-02-29T14:20:27.330563Z",
        "dateOpened": "2024-02-29T14:20:27.330563Z",
        "dateClosed": null,
        "assignedTo": null,
        "lockedBy": {
            "userId": "accef80a-0491-4865-8f1b-...",
            "displayName": "John Doe",
            "initials": "JD",
            "picture": "https://.../public/profiles/f1af71e8-3ba4-4034-b4f2-..."
        },
        "channel": "FaceToFace",
        "rank": 3.7090777E+37,
        "unitId": "37da50e0-ba32-4718-bf3f-261f7e1c6a02",
        "unitName": "Jerusalem",
        "inboxId": "d4afcd15-3b94-4b86-82f8-e2525cc0ac06",
        "inboxName": "Reception",
        "inboxColorCode": "#03a9f4",
        "caseTimestamp": "2024-04-11T11:13:53.404068Z",
        "workstationId": null,
        "workstationName": null,
        "customer": {
            "dataTableId": "8ab4307c-5f1c-4537-b0d5-...",
            "recordId": "51c0d69d-9d23-46af-9bc0-...",
            "displayName": "Bruce Springsteen"
        },
        "onlineMeeting": null,
        "printedTicket": true,
        "contactPhoneNumber": "+12221234567",
        "contactEmail": null,
        "entryMode": "WalkIn",
        "fields": null,
        "tags": null
    }
    //...
]
```

#### No current unit was selected for the user -> 403 (Forbidden)

#### No current workspaces -> 409, errorCode: 1011


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cubu.com/guides/s2s-api-guide/agent-impersonation-api/list-active-cases.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
