# Case Type

## Filter by case type (integer).

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

#### Query Parameters

| Name                                   | Type    | Description                                                           |
| -------------------------------------- | ------- | --------------------------------------------------------------------- |
| type<mark style="color:red;">\*</mark> | integer | case type (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 List of 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 case types (case\_type\_id):

| **5033** | Mental Health (Facility)             |
| -------- | ------------------------------------ |
| **5034** | Prison Conditions                    |
| **5035** | Nursing Home Conditions              |
| **5036** | Child Welfare                        |
| **5038** | Intellectual Disability (Facility)   |
| **5039** | Policing                             |
| **5041** | School Desegregation                 |
| **5042** | Election/Voting Rights               |
| **5043** | Immigration and/or the Border        |
| **5044** | Disability Rights                    |
| **5045** | Equal Employment                     |
| **5046** | Criminal Justice (Other)             |
| **5047** | Indigent Defense                     |
| **5048** | Fair Housing/Lending/Insurance       |
| **5049** | Education                            |
| **5050** | Speech and Religious Freedom         |
| **5051** | Public Benefits/Government Services  |
| **5052** | Public Accommodations/Contracting    |
| **5053** | National Security                    |
| **5054** | Presidential/Gubernatorial Authority |
| **5055** | Environmental Justice                |
| **5056** | Jail Conditions                      |
| **5057** | Public Housing                       |
| **5058** | Juvenile Institution                 |
| **7811** | Reproductive Issues                  |

For more about case types, see [#case\_types](https://api.clearinghouse.net/objects/case/case-details#case_types "mention").

## **Example**

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

```
https://clearinghouse.net/api/v2p1/cases?case_type=5044
```

{% endtab %}

{% tab title="python" %}

```
import requests

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

print(response.text)
```

{% endtab %}
{% endtabs %}

##
