OnOffice

Consume OnOffice API

Actions12

Overview

This node interacts with the OnOffice API to manage "Relation" resources, which represent relationships between estates and addresses (contacts). The "Get" operation retrieves a specific relation by its ID, allowing users to fetch detailed information about how an estate is related to a contact.

Common scenarios include:

  • Fetching details of a particular relation to display or process in workflows.
  • Integrating OnOffice data into other systems by retrieving relation records.
  • Automating real estate management tasks that depend on relation data.

Example: Retrieve a relation by its ID to check the type of relationship (e.g., owner, tenant) between a property and a contact.

Properties

Name Meaning
Relation ID The unique identifier of the relation record to retrieve or delete.
Fields Comma-separated list of fields to return for the relation, e.g., id,type,estateid,addressid.

Output

The node outputs JSON data structured as follows:

  • success: Boolean indicating if the operation was successful.
  • resourceType: The resource involved, here always "relation".
  • operation: The operation performed, here "get".
  • data: An array of relation records matching the query. For the "Get" operation, this typically contains one relation object with the requested fields.
  • total (optional): Total number of records returned (mainly relevant for "getMany" operations).
  • message (optional): Status message from the API.

No binary data output is produced by this node.

Example output JSON snippet:

{
  "success": true,
  "resourceType": "relation",
  "operation": "get",
  "data": [
    {
      "id": "12345",
      "type": "owner",
      "estateid": "67890",
      "addressid": "54321"
    }
  ]
}

Dependencies

  • Requires an API token and secret credential for authenticating with the OnOffice API.
  • The node uses HTTP POST requests to the OnOffice API endpoint https://api.onoffice.de/api/v1.
  • HMAC signature generation is used for request authentication.
  • No additional external dependencies beyond the OnOffice API and n8n's credential system.

Troubleshooting

  • Invalid JSON in Fields or Filter: If the "Fields" or "Filter" input is not valid JSON (where applicable), the node throws an error. Ensure these inputs are correctly formatted.
  • Missing or Invalid Relation ID: The "Relation ID" property is required. Omitting it or providing an invalid ID will cause the API call to fail.
  • API Authentication Errors: Incorrect or missing API credentials will result in authentication errors. Verify that the API token and secret are correctly configured.
  • Network Issues: Network connectivity problems will cause the node to throw network errors.
  • API Errors: If the OnOffice API returns an error status, the node surfaces the error message. Check the message for details and verify the request parameters.

Links and References

Discussion