# Case State

## Filter by state (integer).

<mark style="color:blue;">`GET`</mark> `https://clearinghouse.net/api/v2p1/cases?state=state_id`

#### Query Parameters

| Name                                    | Type    | Description                                                          |
| --------------------------------------- | ------- | -------------------------------------------------------------------- |
| state<mark style="color:red;">\*</mark> | integer | state id (see list below for list of integers and its mapped values) |

#### Headers

| Name                                            | Type   | Description                                                                                                                    |
| ----------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------ |
| Authorization<mark style="color:red;">\*</mark> | String | <p>Authorization</p><p><code>Token XXXXXXXXXXX</code></p><p>where</p><p><code>XXXXXXXXXXX</code></p><p>is the token string</p> |

{% tabs %}
{% tab title="200 Cases successfully retrieved" %}

{% endtab %}

{% tab title="400: Bad Request No results, key not found, or invalid parameter" %}

```
\\ Examples of:
\\ No results, key not found, or invalid parameter

\\ No results
\\ Example query endpoint: /api/v2p1/cases/?case_id=1&case_ongoing=1
["No results for {'case_id': '1', 'case_ongoing': '1'}"]

\\ Key not found
\\ Example query endpoint: /api/v2p1/cases?test_key=1
["API Error: Key: test_key, Value: 1 not found."]

\\ Example query endpoint: /api/v2p1/cases/?case_id=xyz
["API Error: xyz is not an integer."]
```

{% endtab %}

{% tab title="401 Permission denied" %}

```javascript
{
    "detail":"Authentication credentials were not provided."
}
```

{% endtab %}
{% endtabs %}

Supported states (state\_id):

| **5853** | Puerto Rico                    |
| -------- | ------------------------------ |
| **5860** | Utah                           |
| **5863** | Vermont                        |
| **5865** | Wisconsin                      |
| **5810** | California                     |
| **5836** | Minnesota                      |
| **5806** | Alabama                        |
| **5805** | Alaska                         |
| **5838** | Northern Mariana Islands       |
| **5844** | New Hampshire                  |
| **5808** | American Samoa                 |
| **5828** | Kansas                         |
| **5818** | Wyoming                        |
| **5847** | Nevada                         |
| **5809** | Arizona                        |
| **5854** | Palau                          |
| **5822** | Guam                           |
| **5846** | New Mexico                     |
| **5840** | Montana                        |
| **5842** | North Dakota                   |
| **5807** | Arkansas                       |
| **5812** | Connecticut                    |
| **5832** | Maryland                       |
| **5821** | - International -              |
| **5835** | Michigan                       |
| **5837** | Missouri                       |
| **5856** | South Carolina                 |
| **5841** | North Carolina                 |
| **5831** | Massachusetts                  |
| **5849** | Ohio                           |
| **5845** | New Jersey                     |
| **5814** | Delaware                       |
| **5839** | Mississippi                    |
| **5843** | Nebraska                       |
| **5851** | Oregon                         |
| **5813** | District of Columbia           |
| **5823** | Hawaii                         |
| **5826** | Illinois                       |
| **5825** | Idaho                          |
| **5848** | New York                       |
| **5855** | Rhode Island                   |
| **5827** | Indiana                        |
| **5829** | Kentucky                       |
| **5858** | Tennessee                      |
| **5830** | Louisiana                      |
| **5833** | Maine                          |
| **5852** | Pennsylvania                   |
| **5857** | South Dakota                   |
| **5820** | - United States (national) -   |
| **5817** | West Virginia                  |
| **5816** | Federated States of Micronesia |
| **5804** | Georgia                        |
| **5859** | Texas                          |
| **5862** | Virgin Islands                 |
| **5864** | Washington                     |
| **5861** | Virginia                       |
| **5815** | Florida                        |
| **5824** | Iowa                           |
| **5850** | Oklahoma                       |
| **5811** | Colorado                       |
| **5834** | Marshall Islands               |
| **7697** | Other                          |

For more information about case states, see [Case Details](/api-reference-v2p1/objects/case/case-details.md#state).

## **Example** <a href="#example" id="example"></a>

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

```
https://clearinghouse.net/api/v2p1/cases?state=5810
```

{% endtab %}

{% tab title="Untitled" %}

```
import requests

url = "https://clearinghouse.net/api/v2p1/cases?state=5810"
headers = { 'Authorization': 'Token XXXXXXXXXX',
'User-Agent': 'Chrome v22.2 Linux Ubuntu'
}
response = requests.request("GET", url, headers=headers, data={})

print(response.text)
```

{% 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://api.clearinghouse.net/api-reference-v2p1/endpoints/case-state.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.
