> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pachtify360.de/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a lease account by ID (with detail)



## OpenAPI

````yaml /openapi.yaml get /pachtkonten/{id}
openapi: 3.1.0
info:
  title: Api
  version: 2.1.4
  description: Pachtify360 API specification
servers:
  - url: /api
    description: Base API path
security:
  - cookieAuth: []
tags:
  - name: health
    description: Health operations
  - name: pachtkonten
    description: Lease account management
  - name: patchobjekte
    description: Patch object management
  - name: kontakte
    description: Contact management
  - name: abrechnung
    description: Billing and invoicing
  - name: audit
    description: Audit log management
  - name: dashboard
    description: Dashboard summary data
  - name: duplikate
    description: Duplicate detection and merge
  - name: einstellungen
    description: Application settings
paths:
  /pachtkonten/{id}:
    get:
      tags:
        - pachtkonten
      summary: Get a lease account by ID (with detail)
      operationId: getPachtkonto
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Lease account detail
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PachtkontoDetail'
        '404':
          description: Not found
components:
  schemas:
    PachtkontoDetail:
      allOf:
        - $ref: '#/components/schemas/Pachtkonto'
        - type: object
          properties:
            verpaechter:
              $ref: '#/components/schemas/Kontakt'
              nullable: true
            paechterKontakt:
              $ref: '#/components/schemas/Kontakt'
              nullable: true
            patchobjekte:
              type: array
              items:
                $ref: '#/components/schemas/Patchobjekt'
            positionen:
              type: array
              items:
                $ref: '#/components/schemas/PachtkontoPosition'
    Pachtkonto:
      type: object
      properties:
        id:
          type: integer
        kontonummer:
          type: string
        bezeichnung:
          type: string
        pachter:
          type: string
        pachtbeginn:
          type: string
          format: date
        pachtende:
          type: string
          format: date
          nullable: true
        geplanteSchlussabrechnung:
          type: string
          format: date
          nullable: true
          description: Datum bis zu dem abgerechnet werden soll (Schlussabrechnung)
        status:
          type: string
          enum:
            - aktiv
            - inaktiv
            - gekuendigt
            - ausgelaufen
        kontaktId:
          type: integer
          nullable: true
        verpachterId:
          type: integer
          nullable: true
        paechterKontaktId:
          type: integer
          nullable: true
        kategorie:
          type: string
          nullable: true
        kurzbezeichnung:
          type: string
          nullable: true
        zahlungsart:
          type: string
          nullable: true
        istVorauszahlend:
          type: boolean
          nullable: true
          description: >-
            Zahlungszeitpunkt des Pachtkontos; true = vorauszahlend, false oder
            null = nachzahlend
        hebungsMonate:
          type: string
          nullable: true
          description: JSON array of month names
        belegdruckVerpaechter:
          type: boolean
          nullable: true
        belegdruckPaechter:
          type: boolean
          nullable: true
        notizen:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - kontonummer
        - bezeichnung
        - pachter
        - pachtbeginn
        - status
        - createdAt
        - updatedAt
    Kontakt:
      type: object
      properties:
        id:
          type: integer
        vorname:
          type: string
        nachname:
          type: string
        anrede:
          type: string
          nullable: true
        kurzbezeichnung:
          type: string
          nullable: true
        firma:
          type: string
          nullable: true
        typ:
          type: string
          enum:
            - pachter
            - verpaechter
            - eigentuemer
            - behoerde
            - dienstleister
            - sonstige
        email:
          type: string
          nullable: true
        telefon:
          type: string
          nullable: true
        adresse:
          type: string
          nullable: true
        notizen:
          type: string
          nullable: true
        kreditorennummer:
          type: string
          nullable: true
        ustId:
          type: string
          nullable: true
        sepaMandatsart:
          type: string
          nullable: true
        sepaGlaeubigerId:
          type: string
          nullable: true
        sepaMandatsreferenz:
          type: string
          nullable: true
        sepaAusstellungsdatum:
          type: string
          nullable: true
        strasse:
          type: string
          nullable: true
        hausnummer:
          type: string
          nullable: true
        plz:
          type: string
          nullable: true
        ort:
          type: string
          nullable: true
        bundesland:
          type: string
          nullable: true
        land:
          type: string
          nullable: true
        kundennummer:
          type: string
          nullable: true
        zahlungsart:
          type: string
          nullable: true
        zahlungsmoral:
          type: integer
          nullable: true
        lastschrifteinzug:
          type: boolean
          nullable: true
        iban:
          type: string
          nullable: true
        bic:
          type: string
          nullable: true
        kontoinhaber:
          type: string
          nullable: true
        sevdeskId:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - vorname
        - nachname
        - typ
        - createdAt
        - updatedAt
    Patchobjekt:
      type: object
      properties:
        id:
          type: integer
        objektnummer:
          type: string
        bezeichnung:
          type: string
        typ:
          type: string
          enum:
            - gebaeude
            - flaeche
            - anlage
            - infrastruktur
            - sonstiges
        status:
          type: string
          enum:
            - aktuell
            - veraltet
            - kritisch
            - geplant
        pachtkontoId:
          type: integer
          nullable: true
        besitzerId:
          type: integer
          nullable: true
        betreuerId:
          type: integer
          nullable: true
        adresse:
          type: string
        strasse:
          type: string
          nullable: true
        hausnummer:
          type: string
          nullable: true
        plz:
          type: string
          nullable: true
        ort:
          type: string
          nullable: true
        bundesland:
          type: string
          nullable: true
        land:
          type: string
          nullable: true
        gemarkung:
          type: string
          nullable: true
        flur:
          type: string
          nullable: true
        flurstueck:
          type: string
          nullable: true
        flaeche:
          type: string
          nullable: true
        einheit:
          type: string
          nullable: true
        letzterPatch:
          type: string
          format: date
          nullable: true
        naechsterPatch:
          type: string
          format: date
          nullable: true
        version:
          type: string
          nullable: true
        beschreibung:
          type: string
          nullable: true
        _besitzerName:
          type: string
          nullable: true
        _pachtkontenCount:
          type: integer
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - objektnummer
        - bezeichnung
        - typ
        - status
        - adresse
        - createdAt
        - updatedAt
    PachtkontoPosition:
      type: object
      properties:
        id:
          type: integer
        pachtkontoId:
          type: integer
        positionsartId:
          type: integer
        positionsart:
          type: object
          properties:
            id:
              type: integer
            name:
              type: string
            istHebegebuehrpflichtig:
              type: boolean
          required:
            - id
            - name
            - istHebegebuehrpflichtig
        menge:
          type: number
          nullable: true
        einheit:
          type: string
          nullable: true
        preisEinheit:
          type: number
          nullable: true
        preisPauschal:
          type: number
          nullable: true
        flaeche:
          type: number
          nullable: true
        grundbetrag:
          type: number
          nullable: true
        rate:
          type: number
          nullable: true
        berechnung:
          type: string
          nullable: true
        betrag:
          type: number
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - pachtkontoId
        - positionsartId
        - positionsart
        - createdAt
        - updatedAt
  securitySchemes:
    cookieAuth:
      type: apiKey
      in: cookie
      name: pachtify360.sid
      description: Serverseitige Anwendungssitzung nach Microsoft-Anmeldung.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.