# Answer a question

Source: https://amanucci.com/fr/docs/developers/api/cases/answerClientRequest

## POST /v1/entities/{entityId}/client-requests/{requestId}/answer

Answer a question

Answer a question asked of you (the long road, ONE transaction): your answer becomes an immutable `user_note` artifact (the canonical envelope `{answeredAt, answeredBy, clientRequestId, text}`, hashed whole); for each typed fact the question named, your `fact_assertion` (`human:<you>`, 1.000, citing the note); then a NEW event version through the Assembler, and the case resolves `corrected` naming it — the re-decide trigger books it. A prose-only answer (`facts: []`) is evidence for the next step and re-opens the case. The client side only: the firm corrects, it does not answer for its client. The addressee answers, and any owner (owners stand behind every ask): a member is 403 `owner-required` on an ask addressed to `owner` and 403 `not-addressee` on one addressed to another member. A grant ask is answered through `answerGrantRequest` (422 `request_kind_invalid`). While a file of the invoice's document states another invoice, an answer 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: `answerClientRequest`

### Parameters

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

### Request body

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

### Responses

#### 200 The answer, taken down the long road.

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

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