# Accept Amanucci's proposal

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

## POST /v1/entities/{entityId}/cases/{caseId}/accept-proposal

Accept Amanucci's proposal

Accept Amanucci's proposal as it stands: you state the agent's claims (`proposedTreatment.agent.assertionIds`, read whole in `readCase`'s `agentClaims`) as yours — `human:<you>` at 1.000, each claim's fact and value — with the proposal's own words as the reason (`treatment`, else `summary`). The claims take a correction's road: on a `provisional_review` case, `correctEvent`'s on the entry's event (a `low_confidence_material` case opened and closed `corrected`, version n+1, the re-decide; the entry's reversal then closes the review case, and a correction that waits is confirmed through `confirmCase`); on any other case, `correctCase`'s (the case closes `corrected`). The body names the proposal you read (`turn`): a newer one is 409 `case_proposal_changed`, and a retry of the same one answers 200 with the stored result. Only the proposing turn's own claims are stated. 409 `case_proposal_not_acceptable`: no proposal, one with no claims, or a `ready` verdict, which `markEntriesReviewed` accepts. 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: `acceptCaseProposal`

### 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/AcceptCaseProposal"
      }
    }
  }
}
```

### Responses

#### 200 A retry: the stored result, nothing written.

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

#### 201 The proposal, accepted.

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

#### 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"
    }
  }
}
```
