# Correct a case

Source: https://amanucci.com/nl/docs/developers/api/cases/correctCase

## POST /v1/entities/{entityId}/cases/{caseId}/correct

Correct a case

"Facts changed": the human's claims — `human:<you>` at 1.000, citing this case — then a NEW event version through the Assembler, and the case resolves `corrected` naming it; the re-decide trigger runs the ADE under the same automation policy. A fact about the law (`account.*`, `vat.*`, `tag.*`) is refused: a correction states the world; a treatment within law is a precedent. Not a signed act: it posts nothing itself. While a file of the invoice's document states another invoice, a client seat stating its total, currency or payee account is 403 `correction_needs_keep` ( (q)): the firm keeps one first. A case the Assembler closed because its document was booked from another of its files (a scan's gate case its e-invoice booked) is 409 `case_booked_from_file`, in words naming the kind of file it was booked from.

Operation ID: `correctCase`

### Parameters

```json
[
  {
    "schema": {
      "type": "string",
      "format": "uuid"
    },
    "required": true,
    "name": "caseId",
    "in": "path"
  },
  {
    "schema": {
      "type": "string",
      "format": "uuid"
    },
    "required": true,
    "name": "entityId",
    "in": "path"
  }
]
```

### Request body

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/CorrectCase"
      }
    }
  }
}
```

### Responses

#### 200 The claims landed.

```json
{
  "application/json": {
    "schema": {
      "$ref": "#/components/schemas/CorrectCaseResult"
    }
  }
}
```

#### 401 Dead or absent credential (`unauthenticated`).

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 403 Authenticated, present, and refused: a missing grant, a missing seat, or a missing step-up.

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 404 Absent, or hidden from this asker — the two are indistinguishable (`not-found`).

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 409 The world is not in the state the request assumed: a stale `expectedSeq`, or a transition already made.

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 422 The request did not satisfy the schema (`invalid-input`).

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 429 Too many requests on this door's bucket (`rate-limited`); refused before any handler ran, `Retry-After` says when to come back.

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 503 Temporarily unavailable; `Retry-After` says when to come back.

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```
