Place Services API
Link chargeable building services to places — elevators, heating systems, water supply, telecom infrastructure, and more. Place services define what is available at a property; charges define how tenants pay for them.
Quick Example
Code
ServicePlace Model
| Field | Type | Required | Description |
|---|---|---|---|
id | UUID | auto | Unique identifier |
place_id | UUID | yes | The place this service belongs to |
name | string | yes | Human-readable service name |
description | string | no | Detailed description |
is_chargeable | boolean | yes | Whether this service generates charges billed to tenants |
category_id | UUID | conditional | Charge category (required when is_chargeable = true) |
space_type | SpaceType | yes | Where the service operates — see enum below |
default_distribution_key_id | UUID | conditional | Default cost-splitting method (required when is_chargeable = true) |
created_at | datetime | auto | Creation timestamp |
updated_at | datetime | auto | Last update timestamp |
Business Rules
- If
is_chargeable = true, bothcategory_idanddefault_distribution_key_idare mandatory. The API returns400 Bad Requestif either is missing. - If
is_chargeable = false,category_idanddefault_distribution_key_idare ignored even if provided. - A place can have multiple services of the same
space_type.
SpaceType Enum
| Value | Description | Example Services |
|---|---|---|
INDOOR_COMMON | Indoor shared areas | Heating, lighting of hallways, staircase cleaning |
OUTDOOR_COMMON | Outdoor shared areas | Garden maintenance, parking lot lighting |
PRIVATE | Tenant-specific services | Individual water meter, private heating |
TECHNICAL | Technical infrastructure | Elevator maintenance, boiler room |
GARDEN | Green spaces | Landscaping, irrigation |
PARKING | Parking facilities | Garage door, parking lighting |
TELECOM_SERVICES | Telecommunications | Fiber optic, intercom, collective antenna |
Endpoints
List Services for a Place
GET /api/places/{place_id}/services
Returns all services linked to a place.
Path Parameters:
place_id(UUID): The place ID
Response: 200 OK
Code
Add a Service to a Place
POST /api/places/{place_id}/services
Path Parameters:
place_id(UUID): The place ID
Request Body:
Code
Response: 201 Created
Returns the created service object.
Remove a Service from a Place
DELETE /api/places/{place_id}/services/{service_id}
Removes a service from a place. Fails with 409 Conflict if the service is referenced by active lease charges.
Path Parameters:
place_id(UUID): The place IDservice_id(UUID): The service ID
Response: 204 No Content
Error Responses
| Status | Condition |
|---|---|
400 Bad Request | is_chargeable = true but default_distribution_key_id or category_id is missing |
404 Not Found | Place or service not found |
409 Conflict | Cannot delete — service is referenced by active lease charges |
Common Workflows
Set up building services after creating a place
- Create the place (
POST /api/places) - Create or select distribution keys for cost splitting
- Add services to the place (
POST /api/places/{id}/services) - When creating a lease, link services to lease charges
Non-chargeable services
Some services exist for documentation but are not billed to tenants (e.g., a security camera system maintained by the owner). Set is_chargeable = false — no category or distribution key is needed.
Related
- Distribution Keys — Define how shared costs are split among tenants
- Charges — Billing modes, calculation bases, and lease charge management
- Places API — Full endpoint reference for places
- Property Overview — Property hierarchy and structure