# Set the entity's IBAN

Source: https://amanucci.com/fr/docs/developers/api/settings/setEntityIban

## POST /v1/entities/{entityId}/iban

Set the entity's IBAN

Set (or clear) the entity's own payment IBAN — the seller's PaymentMeans on every invoice it finalizes: the organisation's owner or a firm accountant holding `settings.policy` (a member or a staffer meets 403 `authority-required`). A compare-and-set on one column: the write applies only while the stored value is `expectedIban` (409 `entity_iban_conflict` otherwise); the same `iban` again is duplicate-ok (200, `duplicate: true`). The shape and the ISO 7064 check digits are database CHECKs (422 `entity_iban_invalid`). Not a signed act.

Operation ID: `setEntityIban`

### Parameters

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

### Request body

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

### Responses

#### 200 The IBAN now stored (or already stored: `duplicate: true`).

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

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