# Get a leaver case

Returns one leaver case with its reconciled summary.

`GET /jml/offboarding/cases/{caseId}`

Scope `jml:read` | Plan **Seed+**

Returns one leaver case with its reconciled summary. Items are read with the case items operation.

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `caseId` | string | yes | Leaver case id (lfc_...). An unknown, foreign or malformed id returns the same 404. pattern `^lfc_[A-Za-z0-9_-]{1,59}$` |

## Returns

The `data` field of the standard `{ data, error, meta }` envelope:

- `caseId`: string
- `employee`: object Identity block of a case. Only employeeId is guaranteed; the other fields are absent when unknown or not disclosed.
  - `employeeId`: string Internal employee id.
  - `emailMasked`: optional string Masked email address, safe to display.
  - `name`: optional string Full name. Present only for tokens holding both jml:read and pii:read; without pii:read the key is absent.
  - `email`: optional string Email address. Present only for tokens holding both jml:read and pii:read; without pii:read the key is absent.
  - `department`: optional string
  - `jobTitle`: optional string
  - `employmentType`: optional string
  - `employeeStatus`: optional string
  - `startDate`: optional string (date) Calendar date YYYY-MM-DD.
  - `endDate`: optional string (date) Calendar date YYYY-MM-DD.
- `status`: string Case status, returned as stored; it is not derived from the item statuses. A COMPLETED case that still shows a DISCREPANCY is exactly the signal this API exists for.
  - `OPEN`
  - `IN_PROGRESS`
  - `COMPLETED`
  - `CANCELLED`
- `openedAt`: string (date-time)
- `dueAt`: string (date-time) or null
- `summary`: object Counts of leaver items per reconciled status. total is the sum of the four.
  - `total`: integer minimum 0
  - `revoked`: integer minimum 0
  - `outstanding`: integer minimum 0
  - `discrepancy`: integer minimum 0
  - `attested`: integer minimum 0
- `clean`: boolean True when no item is outstanding or in discrepancy.

The `meta` field:

- `accessDataAsOf`: string (date-time) or null Latest access detection time used for this response.

## Errors

| Status | Code | Retry | Meaning |
|---|---|---|---|
| 400 | `VALIDATION_FAILED` | no | Invalid query parameter. code VALIDATION_FAILED; args.parameter names the parameter, args.reason the rule, args.allowed the permitted values of an enum. |
| 401 | `INVALID_TOKEN` | no | Missing (UNAUTHORIZED) or invalid, expired or revoked (INVALID_TOKEN) token. |
| 402 | `FEATURE_GATED` | no | The tenant plan does not include lifecycle workflows. code FEATURE_GATED; args.feature, args.minTier, args.minTierName. |
| 403 | `INSUFFICIENT_SCOPE` | no | The token lacks the jml:read scope (INSUFFICIENT_SCOPE; a token holding pii:read alone reaches no endpoint here), or the request is refused (FORBIDDEN). A token holding pii:read is also refused with INSUFFICIENT_SCOPE when personal data cannot be disclosed to it (personal-data disclosure is disabled for the tenant, or the token has no creator); it is never silently downgraded to the masked shape. |
| 404 | `NOT_FOUND` | no | Unknown, foreign-tenant, wrong-type or malformed case id. Always the same body. |
| 429 | `RATE_LIMITED` | yes | Rate limit exceeded. code RATE_LIMITED; wait Retry-After seconds. Applies to the personal-data (pii:read) request window on case endpoints, where Retry-After is the time until the window ends. That window is shared by all calls of the token, over REST and MCP; a request that fails with 503 AUDIT_UNAVAILABLE is not refunded, so retrying spends more of it. Do not build a design that depends on an exact number of requests. It also applies to concurrent feed requests on the items feeds, where Retry-After is 1. The body carries no meta. |
| 500 | `INTERNAL_ERROR` | no | Unexpected server error. code INTERNAL_ERROR; quote error.id to support. |
| 503 | `BILLING_UNAVAILABLE` | yes | A dependency is temporarily unavailable (BILLING_UNAVAILABLE), or a response containing name or email could not be audited and was withheld (AUDIT_UNAVAILABLE). Retry later. |

## Example

### curl

```bash
curl "https://api.autociso.io/api/v1/jml/offboarding/cases/<caseId>" \
  -H "Authorization: Bearer <your-api-token>"
```

### Python

```python
import requests

response = requests.get(
    "https://api.autociso.io/api/v1/jml/offboarding/cases/<caseId>",
    headers={"Authorization": "Bearer <your-api-token>"},
)
print(response.json())
```

### JavaScript

```javascript
const response = await fetch("https://api.autociso.io/api/v1/jml/offboarding/cases/<caseId>", {
  method: "GET",
  headers: { "Authorization": "Bearer <your-api-token>" },
});
console.log(await response.json());
```

## Response (200)

```json
{
  "data": {
    "caseId": "lfc_example000001",
    "employee": {
      "employeeId": "empl_example000001",
      "emailMasked": "j***@example.com"
    },
    "status": "COMPLETED",
    "openedAt": "2026-09-15T08:00:00Z",
    "dueAt": null,
    "summary": {
      "total": 1,
      "revoked": 1,
      "outstanding": 0,
      "discrepancy": 0,
      "attested": 0
    },
    "clean": true
  },
  "error": null,
  "meta": {
    "accessDataAsOf": "2026-09-29T02:00:00Z"
  }
}
```
