OnOffice icon

OnOffice

Consume OnOffice API

Overview

This node integrates with the OnOffice API to manage various resources such as estates, addresses, relations, tasks, and agent logs. Specifically, for the Address resource with the Update operation, it updates an existing address record identified by its ID.

Typical use cases include:

  • Updating address details in a real estate management system.
  • Synchronizing address information from external sources into OnOffice.
  • Automating corrections or enhancements of address data based on business rules.

For example, you might use this node to update the street name or postal code of an address record after receiving updated information from a client or another system.

Properties

Name Meaning
ID The unique identifier of the address record to update. Required for update operations.
Include Debug Info Whether to include detailed debug information (raw API response and request data) in output.

Output

The node outputs JSON data structured as follows:

  • On success without debug info:

    {
      "success": true,
      "resourceType": "address",
      "operation": "update",
      "data": []
    }
    
    • success: Indicates the operation succeeded.
    • resourceType: The resource acted upon ("address").
    • operation: The performed operation ("update").
    • data: An array intended to hold returned data; empty here as the API response does not return updated object details.
  • If "Include Debug Info" is enabled, the output includes:

    {
      "debug": true,
      "rawResponse": { /* full API response object */ },
      "requestSent": { /* full request payload sent to API */ },
      "url": "https://api.onoffice.de/api/latest/api.php"
    }
    

    This helps in troubleshooting by showing raw communication with the API.

  • On failure (if "Continue On Fail" is enabled), the output contains:

    {
      "success": false,
      "error": "Error message",
      "resourceType": "address",
      "operation": "update"
    }
    

The node does not output binary data.

Dependencies

  • Requires an API key credential for authenticating with the OnOffice API, including an API token and secret.
  • Uses the OnOffice API endpoint: https://api.onoffice.de/api/latest/api.php for most resources including Address.
  • Relies on HMAC signature generation for secure API requests.
  • Requires n8n HTTP Request helper for making POST requests.

Troubleshooting

  • Common issues:

    • Invalid or missing ID: The node requires a valid record ID to update; omitting or providing an incorrect ID will cause errors.
    • Authentication failures: Incorrect API token or secret will result in authorization errors.
    • API errors: The API may return error messages if the update data is invalid or incomplete.
  • Error messages:

    • "OnOffice API error: <message>": Indicates an error response from the API. Check the message for details.
    • Network or timeout errors: Ensure network connectivity and that the API endpoint is reachable.
  • Resolutions:

    • Verify the ID corresponds to an existing address record.
    • Confirm API credentials are correct and have necessary permissions.
    • Enable "Include Debug Info" to get detailed request/response data for diagnosing issues.
    • Use "Continue On Fail" option to handle errors gracefully in workflows.

Links and References

Discussion