OnOffice

Consume OnOffice API

Actions12

Overview

This node integrates with the OnOffice API to manage real estate data. Specifically, for the Estate resource and the Get Many operation, it retrieves multiple estate records from the OnOffice system based on specified criteria.

Common scenarios where this node is beneficial include:

  • Fetching a list of estates with selected fields for display or further processing.
  • Querying estates with filters such as location, price range, or other custom criteria.
  • Paginating through large sets of estate data by using limit and offset parameters.

Practical example:

  • A real estate agency wants to pull the latest 50 estate listings with their IDs, titles, and external numbers to update their website database daily.

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 50).
- Offset Number of records 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 "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 in the backend (useful for pagination).

Example output structure:

{
  "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 credential 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.
  • Proper configuration of these credentials within n8n is necessary for successful operation.

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 is incorrect or missing, the node will fail with an authentication error from the OnOffice API.
  • Network Issues: Network errors during the HTTP request will cause the node to throw a "Network error" message.
  • Unsupported Resource or Operation: Attempting to use unsupported resources or operations will result in explicit errors indicating the unsupported action.
  • Empty or Incorrect Fields: Providing empty or incorrect field names may result in incomplete or empty data arrays.

To resolve these issues:

  • Validate JSON inputs carefully.
  • Verify API credentials are correct and active.
  • Check network connectivity.
  • Use only supported resource-operation combinations.
  • Confirm field names match those expected by the OnOffice API.

Links and References

Discussion