# Elect the entity's VAT deduction method for a year

Source: https://amanucci.com/nl/docs/developers/api/settings/appendVatProrata

## POST /v1/entities/{entityId}/vat-prorata/{year}

Elect the entity's VAT deduction method for a year

Append the next version of the year's VAT deduction method. The organisation's owner or a firm accountant holding `ledger.manage` (a member or a staffer meets 403 `authority-required`). `expectedSeq` is the pinned-row idempotency key: identical retry 200, stale head 409. The database judges the election (422 `prorata_invalid`, each refusal by name): the method's shape, a definitive ratio final and applying in the next year's first quarter, the waiver's five years, real use's binding term, a special ratio's basis and definitive figure. A version that first sets a year's definitive GENERAL ratio, or the year's own figure of a special ratio, also mints, in the same transaction, the year-end revision event the ADE decides under the entity's pack, one per ratio.

Operation ID: `appendVatProrata`

### Parameters

```json
[
  {
    "schema": {
      "type": "string",
      "format": "uuid"
    },
    "required": true,
    "name": "entityId",
    "in": "path"
  },
  {
    "schema": {
      "type": "integer",
      "minimum": 1971,
      "maximum": 9999,
      "description": "The calendar year."
    },
    "required": true,
    "description": "The calendar year.",
    "name": "year",
    "in": "path"
  }
]
```

### Request body

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

### Responses

#### 200 Duplicate-ok: this exact version was already the head.

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

#### 201 The new head.

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

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