create_nk_letter
Generate a tenant Nebenkostenabrechnung (utility cost statement) PDF from recoverable line items, handling mid-year tenant changes via occupancy periods.
Instructions
Compile a tenant Nebenkostenabrechnung PDF on the Achi server (no browser pdf.js). Pass recoverable line items only. Do not invent amounts, Anschrift, or IBAN. Do not include Eigentümerkosten leftovers or Quellenangabe — the server strips them. If tenants changed mid-year, pass occupancyId + periodFrom + periodTo so this letter does not overwrite the other stay. Returns a PDF. Also files the unit trail and a settlement (x-achi-nk-settlement-id).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"unitId": "<unitId>",
"year": "<year>",
"items": "<items>"
},
"name": "create_nk_letter"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| year | Yes | ||
| items | Yes | ||
| notes | No | ||
| title | No | ||
| unitId | Yes | ||
| greeting | No | ||
| periodTo | No | YYYY-MM-DD stay end in this settlement year | |
| periodFrom | No | YYYY-MM-DD stay start in this settlement year | |
| occupancyId | No | ||
| prepaidEuros | No | ||
| createSettlement | No |