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 when performing the "Get Many" operation. It retrieves multiple relation records that link estates and addresses (contacts) in the OnOffice system. This is useful for scenarios where you need to fetch lists of relations, such as owners, tenants, or contacts associated with properties, enabling workflows that require bulk data retrieval for reporting, synchronization, or further processing.

For example, a user might want to get all tenant relations linked to certain estates to send targeted communications or analyze occupancy.

Properties

Name Meaning
Fields Comma-separated list of fields to return from each relation record. Default: id,type,estateid,addressid
Additional Fields Collection of optional parameters:
- Filter: JSON object to filter query results.
- 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 output is a JSON array where each item contains:

  • success: Boolean indicating if the request 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 matching records available (if provided by the API).

Example output structure:

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

No binary data is returned by this operation.

Dependencies

  • Requires an API token credential and secret for authenticating with the OnOffice API.
  • The node makes HTTP POST requests to the OnOffice API endpoint at https://api.onoffice.de/api/latest/api.php.
  • HMAC signature generation is used for request authentication.
  • Proper configuration of the API credentials within n8n 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 Authentication Errors: If the API token or secret are incorrect or missing, the node will fail with an authentication error. Verify credentials are correctly set up.
  • Network Issues: Network errors during the HTTP request will cause the node to throw a network error message.
  • Unsupported Resource or Operation: If the resource or operation parameters are incorrect or unsupported, the node throws an error indicating the unsupported resource or operation.
  • Empty or Incorrect Fields Parameter: Providing an empty or malformed fields string may result in incomplete or no data returned. Use comma-separated field names as expected by the API.

Links and References

Discussion