Places
Services

Add a service to a place

Attaches a service (heating, elevator, caretaker, …) to a building.

Two ways to call it:

  • omit service_id: a new service is created for this place and the identifier is generated server-side;
  • pass service_id: that identifier is used as-is, which is what you want when you mirror services that already have an id in your own system.

A service left without a name is stored as "Service par défaut".

Validation: when is_chargeable is true, default_distribution_key_id is required: a chargeable service with no distribution key could not be spread across the tenants at regularisation time, so the call is rejected with 400 rather than creating a service that would break the yearly charge run.

post/places/{id}/services

Request

  • Base URL: https://api.faireplace.com/api
  • URL: https://api.faireplace.com/api/places/{id}/services
  • Auth: HTTP bearer

Path parameters

idstring uuid required

Request body

service_idstring uuid nullable

Service ID (optional, automatically generated if not provided)

namestring nullable

Service name (e.g., Heating, Elevator)

is_chargeableboolean nullable

Indicates whether the service can be billed as charges. If true, default_distribution_key_id becomes required.

space_type'INDOOR_COMMON' | 'OUTDOOR_COMMON' | 'PRIVATE' | 'TECHNICAL' | 'GARDEN' | 'PARKING' | 'TELECOM_SERVICES'

Space type for place services

descriptionstring nullable

Detailed service description

default_distribution_key_idstring uuid nullable

Default distribution key for billing. Required if is_chargeable = true. Automatically used when creating a charge if distribution_key_id is not provided.

category_idstring uuid nullable

Charge category ID if the service is billable

Example request

{
  "space_type": "INDOOR_COMMON"
}

Response

Service added to the place

idstring uuid nullable
place_idstring uuid nullable
service_idstring uuid nullable
namestring nullable
descriptionstring nullable
is_chargeableboolean nullable
category_idstring uuid nullable
space_type'INDOOR_COMMON' | 'OUTDOOR_COMMON' | 'PRIVATE' | 'TECHNICAL' | 'GARDEN' | 'PARKING' | 'TELECOM_SERVICES'

Space type for place services

default_distribution_key_idstring uuid nullable
created_atstring date-time nullable

Example response

{
  "space_type": "INDOOR_COMMON"
}

Changes

No recorded changes to this operation across all 1 revision of this API.