OnOffice

Consume OnOffice API

Actions12

Overview

This node integrates with the OnOffice API to manage real estate-related data, specifically focusing on the "Relation" resource in this context. The "Get Many" operation retrieves multiple relation records from the OnOffice system based on specified criteria.

Typical use cases include:

  • Fetching a list of relations (e.g., owners, tenants, contacts) associated with estates and addresses.
  • Filtering relations by custom criteria to analyze or process subsets of data.
  • Paginating through large sets of relation records using limit and offset parameters.

For example, a user might retrieve all tenant relations linked to certain estates or fetch a paginated list of contacts for reporting purposes.

Properties

Name Meaning
Fields Comma-separated list of fields to return for each relation record. Default: id,type,estateid,addressid
Additional Fields Collection of optional parameters:
- Filter: JSON object defining filter criteria for the query.
- Limit: Maximum number of results to return (default 50).
- Offset: Number of results to skip before starting to collect the result set (default 0).

Output

The node outputs JSON data structured as follows:

  • success: Boolean indicating if the API call was successful.
  • resourceType: The resource involved, here always "relation".
  • operation: The operation performed, here "getMany".
  • data: An array of relation records matching the query, each containing the requested fields.
  • total (optional): Total count of available records matching the query, if provided by the API metadata.

Example output snippet:

{
  "success": true,
  "resourceType": "relation",
  "operation": "getMany",
  "data": [
    {
      "id": "123",
      "type": "owner",
      "estateid": "456",
      "addressid": "789"
    },
    ...
  ],
  "total": 150
}

No binary data is produced by this node.

Dependencies

  • Requires an active connection to the OnOffice API via an API token and secret.
  • The node expects these credentials to be configured in n8n prior to execution.
  • Network access to https://api.onoffice.de/api/latest/api.php is necessary.

Troubleshooting

  • Invalid JSON in Filter: If the filter field contains invalid JSON, the node throws an error stating "Filter must be a valid JSON". Ensure the filter input is correctly formatted JSON.
  • API Errors: Errors returned by the OnOffice API are surfaced with messages prefixed by "OnOffice API error". These may indicate issues such as invalid credentials, malformed requests, or server-side problems.
  • Network Issues: Network connectivity problems result in errors prefixed by "Network error". Verify internet connectivity and API endpoint accessibility.
  • Unsupported Resource or Operation: Attempting to use unsupported resources or operations will cause explicit errors indicating the unsupported action.
  • Data Field Parsing: For other operations (not applicable here), invalid JSON in data fields causes errors; ensure JSON inputs are valid.

Links and References

Discussion