OnOffice

Consume OnOffice API

Actions12

Overview

This node interacts with the OnOffice API to manage "Relation" resources, specifically supporting the "Get Many" operation in this context. It retrieves multiple relation records that link estates and addresses (contacts) within the OnOffice system. This is useful when you want to fetch a list of relations with specific fields and optional filtering, pagination, or offsetting.

Practical examples include:

  • Retrieving all relations of a certain type between estates and contacts.
  • Fetching relations with specific attributes for reporting or synchronization purposes.
  • Applying filters to get only relations matching certain criteria, such as those linked to a particular estate or address.

Properties

Name Meaning
Fields Comma-separated list of fields to return for each relation record (e.g., id,type,estateid,addressid).
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 an object with the following structure:

  • success: Boolean indicating if the operation 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 snippet:

{
  "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 valid credentials for the OnOffice API, including an API token and secret.
  • The node uses HMAC signature authentication for API requests.
  • 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 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 API error message. Verify that the API credentials are properly configured.
  • Network Issues: Network errors during the HTTP request will cause the node to throw a "Network error" message. Check internet connectivity and API endpoint availability.
  • Unsupported Operation or Resource: If an unsupported operation or resource is selected, the node throws an error indicating the unsupported combination.
  • Empty or Incorrect Fields: Specifying fields that do not exist may result in incomplete or empty data arrays. Use valid field names as per the OnOffice API documentation.

Links and References

Discussion