> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corsa.finance/llms.txt
> Use this file to discover all available pages before exploring further.

# Managing Sub-Dispositions

> Configure custom sub-dispositions for alerts and cases to give analysts granular resolution options beyond the standard statuses.

Sub-dispositions let you extend Corsa's standard alert and case statuses with custom resolution reasons. For example, a `RESOLVED` alert can carry a sub-disposition of `true_positive_filed_sar` or `false_positive_rule_tuning` so analysts capture the specific outcome without losing the normalized parent status.

Full API endpoint details are available in the [API Reference](https://api.corsa.finance/api-spec.json) (requires API credentials).

***

## Overview

Each sub-disposition belongs to:

* A **parent status** — the standard Corsa status it qualifies (`RESOLVED`, `ESCALATED`, `CLOSED_DISMISSED`, or `CLOSED_ESCALATION_TO_SAR`)
* An **entity type** — either `ALERT` or `CASE`

Sub-dispositions can be **preset** (system-defined, always available) or **custom** (created via API). Custom sub-dispositions can be toggled active/inactive without deletion, preserving historical audit data.

**Parent statuses:**

| Status                     | Applies to       |
| -------------------------- | ---------------- |
| `RESOLVED`                 | Alerts and Cases |
| `ESCALATED`                | Alerts and Cases |
| `CLOSED_DISMISSED`         | Cases            |
| `CLOSED_ESCALATION_TO_SAR` | Cases            |

***

## List Sub-Dispositions

**Endpoint:** `GET /v1/sub-dispositions`

Returns all sub-dispositions (preset and custom) for the platform.

<CodeGroup>
  ```json REST API theme={null}
  GET /v1/sub-dispositions
  ```

  ```typescript Javascript theme={null}
  const subDispositions = await corsa.subDispositions.listSubDispositions();
  ```

  ```python Python theme={null}
  from corsa_sdk.api.sub_dispositions.list_sub_dispositions import _get_kwargs

  resp = http.request(**_get_kwargs())
  sub_dispositions = resp.json()
  ```
</CodeGroup>

***

## Create a Sub-Disposition

**Endpoint:** `POST /v1/sub-dispositions`

<CodeGroup>
  ```json REST API theme={null}
  POST /v1/sub-dispositions
  Content-Type: application/json

  {
    "name": "false_positive_rule_tuning",
    "displayName": "False Positive — Rule Tuning",
    "parentStatus": "RESOLVED",
    "entityType": "ALERT"
  }
  ```

  ```typescript Javascript theme={null}
  const subDisposition = await corsa.subDispositions.createSubDisposition({
    name: "false_positive_rule_tuning",
    displayName: "False Positive — Rule Tuning",
    parentStatus: "RESOLVED",
    entityType: "ALERT",
  });
  ```

  ```python Python theme={null}
  from corsa_sdk.api.sub_dispositions.create_sub_disposition import _get_kwargs
  from corsa_sdk.models.create_sub_disposition_dto import CreateSubDispositionDto

  resp = http.request(**_get_kwargs(
      body=CreateSubDispositionDto(
          name="false_positive_rule_tuning",
          display_name="False Positive — Rule Tuning",
          parent_status="RESOLVED",
          entity_type="ALERT",
      ),
  ))
  sub_disposition = resp.json()
  ```
</CodeGroup>

### Request Fields

| Field          | Required | Description                                                                                                                  |
| -------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `name`         | Yes      | Internal key in `lower_snake_case` — used in API requests and exports                                                        |
| `parentStatus` | Yes      | The parent status this sub-disposition qualifies: `RESOLVED`, `ESCALATED`, `CLOSED_DISMISSED`, or `CLOSED_ESCALATION_TO_SAR` |
| `entityType`   | Yes      | Entity this applies to: `ALERT` or `CASE`                                                                                    |
| `displayName`  | No       | Human-readable label shown to analysts. Defaults to title-cased `name` if omitted                                            |

***

## Get a Sub-Disposition

**Endpoint:** `GET /v1/sub-dispositions/{id}`

<CodeGroup>
  ```json REST API theme={null}
  GET /v1/sub-dispositions/sd_abc123
  ```

  ```typescript Javascript theme={null}
  const subDisposition = await corsa.subDispositions.getSubDisposition("sd_abc123");
  ```

  ```python Python theme={null}
  from corsa_sdk.api.sub_dispositions.get_sub_disposition import _get_kwargs

  resp = http.request(**_get_kwargs(id="sd_abc123"))
  sub_disposition = resp.json()
  ```
</CodeGroup>

***

## Update a Sub-Disposition

**Endpoint:** `PATCH /v1/sub-dispositions/{id}`

You can update the display name or toggle the active state. Custom sub-dispositions cannot have their `name`, `parentStatus`, or `entityType` changed after creation.

<CodeGroup>
  ```json REST API theme={null}
  PATCH /v1/sub-dispositions/sd_abc123
  Content-Type: application/json

  {
    "displayName": "False Positive — Rule Needs Tuning",
    "isActive": true
  }
  ```

  ```typescript Javascript theme={null}
  const updated = await corsa.subDispositions.updateSubDisposition("sd_abc123", {
    displayName: "False Positive — Rule Needs Tuning",
    isActive: true,
  });
  ```

  ```python Python theme={null}
  from corsa_sdk.api.sub_dispositions.update_sub_disposition import _get_kwargs
  from corsa_sdk.models.update_sub_disposition_dto import UpdateSubDispositionDto

  resp = http.request(**_get_kwargs(
      id="sd_abc123",
      body=UpdateSubDispositionDto(
          display_name="False Positive — Rule Needs Tuning",
          is_active=True,
      ),
  ))
  updated = resp.json()
  ```
</CodeGroup>

***

## Delete a Sub-Disposition

**Endpoint:** `DELETE /v1/sub-dispositions/{id}`

Soft-deletes the sub-disposition. Only custom sub-dispositions can be deleted — preset sub-dispositions cannot be removed.

<CodeGroup>
  ```json REST API theme={null}
  DELETE /v1/sub-dispositions/sd_abc123
  ```

  ```typescript Javascript theme={null}
  await corsa.subDispositions.deleteSubDisposition("sd_abc123");
  ```

  ```python Python theme={null}
  from corsa_sdk.api.sub_dispositions.delete_sub_disposition import _get_kwargs

  http.request(**_get_kwargs(id="sd_abc123"))
  ```
</CodeGroup>

***

## Sub-Disposition Response Object

```json theme={null}
{
  "id": "sd_abc123",
  "platformId": "platform_xyz",
  "name": "false_positive_rule_tuning",
  "displayName": "False Positive — Rule Tuning",
  "parentStatus": "RESOLVED",
  "entityType": "ALERT",
  "isPreset": false,
  "isActive": true,
  "createdAt": "2024-01-15T10:00:00Z",
  "updatedAt": "2024-01-15T10:00:00Z"
}
```
