Aller au contenu

🏢 Properties API

Übersicht

Verwaltet Immobilien und deren Einheiten.

Endpoints

GET /api/properties

Alle Immobilien für einen Tenant.

Headers:

X-Tenant-ID: your-tenant-id (required)

Response:

[
  {
    "id": "prop-123",
    "tenantId": "tenant-abc",
    "name": "Musterhaus",
    "address": "Musterstraße 1, 12345 Berlin",
    "type": "RESIDENTIAL"
  }
]

GET /api/properties/:id

Einzelne Immobilie abrufen.

GET /api/properties/:id/units

Einheiten einer Immobilie.

Response:

[
  {
    "id": "unit-123",
    "propertyId": "prop-123",
    "name": "Wohnung 1 OG",
    "size": 85.5,
    "rent": 1200.00
  }
]

POST /api/properties

Neue Immobilie erstellen.

Body:

{
  "name": "Musterhaus",
  "address": "Musterstraße 1, 12345 Berlin",
  "type": "RESIDENTIAL"
}

POST /api/properties/:id/units

Neue Einheit erstellen.

Body:

{
  "name": "Wohnung 2 OG",
  "size": 72.0,
  "rent": 950.00
}

Property Types

Type Description
RESIDENTIAL Wohnimmobilie
COMMERCIAL Gewerbeimmobilie
MIXED Mischnutzung