OnOffice

Consume OnOffice API

Actions12

Overview

This node integrates with the OnOffice API to manage real estate data, specifically focusing on the "Estate" resource for the "Get Many" operation. It allows users to retrieve multiple estate records from the OnOffice system based on specified criteria such as selected fields, filters, limits, and offsets.

Common scenarios where this node is beneficial include:

  • Fetching a list of estates with specific details for reporting or display.
  • Retrieving filtered estate data based on custom criteria (e.g., location, price range).
  • Paginating through large sets of estate records by using limit and offset parameters.

Practical example:

  • A real estate agency wants to pull the first 50 estates that match certain filter conditions (like only active listings) and display their IDs, titles, and external numbers in a dashboard.

Properties

Name Meaning
Fields Comma-separated list of estate fields to return, e.g., Id,objekttitel,objektnr_extern.
Additional Fields Collection of optional parameters:
- Filter JSON object defining filter criteria to narrow down the query results.
- Limit Maximum number of estate records to return (default is 50).
- Offset Number of records to skip before starting to return results (default is 0).

Output

The output is a JSON array containing objects with the following structure:

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

Example output snippet:

[
  {
    "success": true,
    "resourceType": "estate",
    "operation": "getMany",
    "data": [
      {
        "Id": "123",
        "objekttitel": "Beautiful Family Home",
        "objektnr_extern": "EXT456"
      },
      ...
    ],
    "total": 150
  }
]

No binary data output is produced by this operation.

Dependencies

  • Requires an API token and secret for authenticating with the OnOffice API.
  • The node uses HMAC signature generation for request authentication.
  • Network access to https://api.onoffice.de/api/v1 is required.
  • Proper configuration of credentials within n8n is necessary to provide the API token and secret securely.

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: Errors related to authentication may occur if the API token or secret are incorrect or expired. Verify credentials in n8n settings.
  • Network Issues: Network errors will be reported if the API endpoint is unreachable. Check internet connectivity and firewall settings.
  • Unexpected API Responses: If the API returns an error status, the node surfaces the message from the API response. Review the message for clues and verify request parameters.
  • Limit and Offset Usage: Using very high offset values without corresponding limits may result in empty responses; adjust these parameters carefully.

Links and References

Discussion