# Set a party's national number

Source: https://amanucci.com/docs/developers/api/parties/setPartyNationalNumber

## POST /v1/entities/{entityId}/parties/{partyId}/national-number

Set a party's national number

Set or clear a natural person's national number (rijksregister or BIS), as one edit with the `seq` read. A person's own act, on their session in the app: no API key, MCP tool, `am` command or Ask turn reaches this operation (401), so no number a model read off a document is ever written. The number is held for the fiche 281.50 alone (art. 314 §3 5° WIB 92) and is read back by no route: the party answers `nationalNumberSet`. Its check digits, and that the party is `personKind: natural`, are the database's (422 `party_invalid` on `nationalNumber`); a head that has moved, or a merged party, is 409 `party_conflict`.

Operation ID: `setPartyNationalNumber`

### Parameters

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

### Request body

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

### Responses

#### 200 The party as edited.

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

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