# Case List

## Get case list

<mark style="color:blue;">`GET`</mark> `https://{{account_id}}.acquire.io/api/v1/crm/objects/case`

Retrieve a list of cases.&#x20;

#### Query Parameters

| Name      | Type   | Description                                                                                                                                                                                        |    |                                   |             |    |           |          |         |       |             |        |              |           |            |            |         |      |              |
| --------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -- | --------------------------------- | ----------- | -- | --------- | -------- | ------- | ----- | ----------- | ------ | ------------ | --------- | ---------- | ---------- | ------- | ---- | ------------ |
| where     | string | <p>Specifies the condition to filter. Set condition with the column name followed by the expression and its value e.g., status                                                                     | eq | active<br>Filters:<br>dateCreated | dateUpdated | id | contactId | closedBy | visitId | title | description | status | closingState | dateQueue | dateActive | dateClosed | queueId | meta | parentId</p> |
| relations | string | You can pass multiple relations along with the case. Available relations : contact\|messages\|cases\|users \|fields\|tags\|feedbacks\|timeline\|parent\| datePending\|queueOrder\|userId\|waitTime |    |                                   |             |    |           |          |         |       |             |        |              |           |            |            |         |      |              |

#### Headers

| Name                                            | Type   | Description         |
| ----------------------------------------------- | ------ | ------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | Bearer {{API\_KEY}} |

{% tabs %}
{% tab title="200 " %}

```
{
    "data": {
        "page": 0,
        "offset": 0,
        "limit": 2,
        "count": 72,
        "data": [
            {
                "id": 1,
                "channel": "chat",
                "contact": {
                    "dateCreated": "2020-08-11T07:25:59.000Z",
                    "dateUpdated": "2020-08-11T07:27:14.000Z",
                    "id": 1,
                    "clientType": "web",
                    "clientName": "Chrome",
                    "clientVersion": "84.0",
                    "clientOsName": "Windows",
                    "clientOsVersion": "10",
                    "clientDeviceType": null,
                    "clientDeviceVendor": null,
                    "clientDeviceModel": null,
                    "clientDetails": {
                        "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36",
                        "engine": {
                            "name": "Blink",
                            "version": "84.0.4147.105"
                        },
                        "network": {
                            "type": "3g",
                            "speed": "2.52"
                        }
                    },
                    "archive": "no",
                    "companyId": 1
                },
                "threadId": 1
            },
            {
                "id": 2,
                "channel": "chat",
                "contact": {
                    "dateCreated": "2020-08-11T07:25:59.000Z",
                    "dateUpdated": "2020-08-11T07:27:14.000Z",
                    "id": 1,
                    "clientType": "web",
                    "clientName": "Chrome",
                    "clientVersion": "84.0",
                    "clientOsName": "Windows",
                    "clientOsVersion": "10",
                    "clientDeviceType": null,
                    "clientDeviceVendor": null,
                    "clientDeviceModel": null,
                    "clientDetails": {
                        "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36",
                        "engine": {
                            "name": "Blink",
                            "version": "84.0.4147.105"
                        },
                        "network": {
                            "type": "3g",
                            "speed": "2.52"
                        }
                    },
                    "archive": "no",
                    "companyId": 1
                },
                "threadId": 2
            }
        ]
    }
}
```

{% endtab %}
{% endtabs %}

## Get case list by date

<mark style="color:blue;">`GET`</mark> `https://{{account_id}}.acquire.io/api/v1/crm/objects/case?where={{dateSelector}}|{{gt or lt}}|{{unix}}`

Retrieve a list of cases by date. Dates must be converted into their [unix timestamp.](https://www.unixtimestamp.com/index.php)

#### Query Parameters

| Name                                           | Type    | Description                        |
| ---------------------------------------------- | ------- | ---------------------------------- |
| where<mark style="color:red;">\*</mark>        | string  | where query parameter              |
| dateSelector<mark style="color:red;">\*</mark> | string  | dateQueue\|dateActive\|dateClosed  |
| gt or lt<mark style="color:red;">\*</mark>     | string  | gt\|lt (greater than or less than) |
| unix<mark style="color:red;">\*</mark>         | integer | the date's unix timestamp          |

#### Headers

| Name                                            | Type   | Description        |
| ----------------------------------------------- | ------ | ------------------ |
| Authorization<mark style="color:red;">\*</mark> | string | Bearer{{API\_KEY}} |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    "data": {
        "page": 0,
        "offset": 0,
        "limit": 20,
        "count": 281,
        "data": [
            {
                "dateCreated": "2021-05-17T19:50:40.000Z",
                "dateUpdated": "2021-05-26T22:01:30.000Z",
                "id": 1,
                "contactId": 1,
                "closedBy": 1,
                "visitId": 1,
                "messageSeen": null,
                "title": "this is test chat",
                "description": "The thread has been closed by {username}.",
                "channel": "chat",
                "status": "closed",
                "closingState": "handled",
                "dateQueue": "2021-05-17T19:50:40.000Z",
                "datePending": "2021-05-17T19:50:40.000Z",
                "dateActive": "2021-05-17T19:50:40.000Z",
                "dateClosed": "2021-05-26T22:01:30.000Z",
                "queueId": null,
                "queueOrder": null,
                "meta": {},
                "parentId": null,
                "userId": null,
                "waitTime": 0,
                "threadId": 1
            }
        [...]
}
```

{% endtab %}
{% endtabs %}


---

# 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://developer.acquire.io/rest-apis/conversation/conversation-or-cases/list.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.
