OnOffice

Consume OnOffice API

Actions12

Relation → Get Many

AI-generated

Overview

This node interacts with the OnOffice API to manage "Relation" resources, specifically supporting 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 real estate properties.

Practical examples include:

  • Retrieving all relations of a certain type (e.g., all tenants linked to estates).
  • Fetching relations with specific filtering criteria, such as only active relations or those related to particular estates.
  • Paginating through large sets of relations using limit and offset parameters.

Properties

Name Meaning
Fields Comma-separated list of fields to return for each relation record (default: id,type,estateid,addressid). Example: id,type,estateid
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 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 on the server (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 output is produced by this operation.

Dependencies

  • Requires an API token and secret credential 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.

Troubleshooting

  • Invalid JSON in Filter: If the filter field contains invalid JSON, the node throws an error "Filter must be a valid JSON". Ensure the filter input is properly formatted JSON.
  • API Authentication Errors: Errors from the OnOffice API may indicate invalid or expired credentials. Verify the API token and secret are correct and have sufficient permissions.
  • Network Errors: Connectivity issues will cause network errors. Check internet connection and firewall settings.
  • Unsupported Resource or Operation: If the resource or operation is not supported, the node throws descriptive errors. Confirm that "relation" resource and "getMany" operation are selected.
  • Limit and Offset Usage: Using very high limits or offsets might lead to performance issues or empty results if out of range.

Links and References

Discussion