The Realcube API consists of three essential workflows:
Ask Uwe Forgber to create a user for you:
Afterwards set a password: PUT /v1/users/reset_password_instructions.
All API endpoints display if they need an authentication:
Furthermore, the application has three roles:
permittet_building_ids
within the organisation membership:
building_id
within the
permittet_building_ids
of the building itself
building_id
within the
permittet_building_ids
of the building itself or its successor in the hierarchy tree
permitted_building_ids
Locations and facilities are all scoped to an organisation. Even a user might have access to many organisations it is not possible combine the contents from two different organisations. Note the
organisation_id
param, which will always declare in which organisation context (scope) you execute the request.
curl 'https://api.realcube.com/api/v1/users/reset_password_instructions' -X PUT -H 'content-type: application/json' -H 'accept: application/json' --data-binary $'{"email": "user@example.com"}'
curl 'https://api.realcube.com/api/v1/users/log_in' -H 'content-type: application/json' -H 'accept: application/json' --data-binary $'{"email": "user@example.com","password": "secret-password"}'
curl 'https://api.realcube.com/api/v1/organisations' -H 'accept: application/json' -H 'x-api-key: secret-api-key'
curl 'https://api.realcube.com/api/v1/properties?current_organisation_id=3' -H 'accept: application/json' -H 'x-api-key: secret-api-key'
curl 'https://api.realcube.com/api/v1/properties?current_organisation_id=3' -H 'content-type: application/json' -H 'accept: application/json' -H 'x-api-key: secret-api-key' --data-binary $'{ "name": "Siemens Park", "country": "Deutschland", "zip_code": "86159", "city": "Augsburg", "custom_id": "Maybe an internal ID you can freely choose", "comment": "A comment you can freely choose", "property_type_id": 1}'
A location is a generic term for one of these domain models:
Many endpoints allow to specify a polymorphic relationship to a location. These require to submit a
location_type
and a
location_id
body param.
The locations itself have a hierarchically order, whereas a
lot
is the only optional location node in the hierarchy.
Facilities are located in exactly one location, but the upper location hierarchy is cached at the facility itself. E.g. if you locate a facility in a building, a facility will return beside the building the lot and property in the hierarchy, too.
Facilities can be linked belong each other in a tree structure. To set a link between two facilities, one of them have to specify the
parent_id
with the ID of the other facility.
To create or update a facility you need a valid JSON payload regarding the schema of the chosen facility type. Below there is an example for a JSON schema with a corresponding valid payload:
Schema{ "type": "object", "required": [ "Beschreibung", "Rohrnetz", "Pumpen", "Armaturen", "Schmutzfaenger", "Rohrleitungen" ], "properties": { "Pumpen": { "type": "array", "items": { "type": "object", "required": [ "Bauart", "Baujahr", "Beschreibung", "Durchfluss", "Foerderhoehe", "Hersteller", "LeistungElektrisch" ], "properties": { "Bauart": { "enum": [ "Einpumpenanlage", "Doppelpumpenanlage (parallel)", "Mehrpumpenanlage (parallel)", null ], "type": [ "string", "null" ], "description": "Bauart" }, "Baujahr": { "type": [ "string", "null" ], "description": "Baujahr" }, "Durchfluss": { "type": [ "string", "null" ], "description": "Durchfluss in Volumenstrom" }, "Hersteller": { "type": [ "string", "null" ], "description": "Hersteller" }, "Beschreibung": { "type": [ "string", "null" ], "description": "Beschreibung (Freitextfeld zur allgemeinen Beschreibung von Objektinformationen)" }, "Foerderhoehe": { "type": [ "string", "null" ], "description": "Förderhöhe in Meter" }, "LeistungElektrisch": { "type": [ "string", "null" ], "description": "Leistung elektrisch in Watt" } } }, "description": "422.81 Pumpen" }, "Rohrnetz": { "type": "array", "items": { "type": "object", "required": [ "Beschreibung" ], "properties": { "Beschreibung": { "type": [ "string", "null" ], "description": "Beschreibung (Freitextfeld zur allgemeinen Beschreibung von Objektinformationen)" } } }, "description": "422.80 Rohrnetz" }, "Armaturen": { "type": "array", "items": { "type": "object", "required": [ "Armaturentyp", "Baujahr", "Beschreibung", "Hersteller" ], "properties": { "Baujahr": { "type": [ "string", "null" ], "description": "Baujahr" }, "Hersteller": { "type": [ "string", "null" ], "description": "Hersteller" }, "Armaturentyp": { "enum": [ "Absperr- und Regelarmaturen", "Sicherungs- und Sicherheitsarmaturen", null ], "type": [ "string", "null" ], "description": "Armaturentyp" }, "Beschreibung": { "type": [ "string", "null" ], "description": "Beschreibung (Freitextfeld zur allgemeinen Beschreibung von Objektinformationen)" } } }, "description": "422.82 Armaturen" }, "Beschreibung": { "type": [ "string", "null" ], "description": "Beschreibung (Freitextfeld zur allgemeinen Beschreibung von Objektinformationen)" }, "Rohrleitungen": { "type": "array", "items": { "type": "object", "required": [ "Baujahr", "Begleitheizung", "Beschreibung", "Material" ], "properties": { "Baujahr": { "type": [ "string", "null" ], "description": "Baujahr" }, "Material": { "enum": [ "Grauguss", "Kupfer", "Kunststoff", "Glas", "Stahl", "Edelstahl (nicht rostender Stahl)", null ], "type": [ "string", "null" ], "description": "Material" }, "Beschreibung": { "type": [ "string", "null" ], "description": "Beschreibung (Freitextfeld zur allgemeinen Beschreibung von Objektinformationen)" }, "Begleitheizung": { "type": [ "string", "null" ], "description": "Begleitheizung" } } }, "description": "422.84 Rohrleitungen" }, "Schmutzfaenger": { "type": "array", "items": { "type": "object", "required": [ "Baujahr", "Beschreibung", "Hersteller" ], "properties": { "Baujahr": { "type": [ "string", "null" ], "description": "Baujahr" }, "Hersteller": { "type": [ "string", "null" ], "description": "Hersteller" }, "Beschreibung": { "type": [ "string", "null" ], "description": "Beschreibung (Freitextfeld zur allgemeinen Beschreibung von Objektinformationen)" } } }, "description": "422.83 Schmutzfänger (Schmutzfilter)" } } }Payload
{ "Beschreibung": "Verteiler für Warmwasser", "Rohrnetz": [], "Pumpen": [ { "Bauart": "Einpumpenanlage", "Baujahr": "2016", "Beschreibung": "Wilo Einzelpumpenanlage Comfort-N-Vario", "Durchfluss": "600 l/m", "Foerderhoehe": "10 m", "Hersteller": "Wilo", "LeistungElektrisch": null } ], "Armaturen": [], "Schmutzfaenger": [], "Rohrleitungen": [] }
Facility schemas can contain attributes on the first level or attributes on the second level (array of parts). For the example above we have:
Types are a way to categorize entities.
For facilities the type has an effect on the validation of the
type_dependent_attributes
body param. The suggested workflow is as follows:
facility_type_id
and the
schema
of the facility type with the
type_dependent_attributes
.
The files for attachments and images are encoded as Base64 strings. You need to encode them and attach the resulting string as a body param. Each library has its own tools for this encoding, but in case you have troubles please check if you get the same results as this Online tool.
Activities can not be deleted. This is by purpose as it should not be possible to undo any activity. In case an activity was created by accident it should be archived.
It is possible to archive properties, lots, buildings, levels, rooms, zones, facilities, building units, images, attachments and activities. Archiving e.g. a property will archive recursively all underlying entities. If an entity is archived it will still appear in the results, but has a timestamp
archived_at
set. Use the archive functionality if you want to exclude certain portfolios for e.g. reports when they are sold and only part of the organisation for burden of proof.
This data model contains an extract of the full application data model.