OnOffice icon

OnOffice

Consume OnOffice API

Overview

This node integrates with the OnOffice API to perform CRUD (Create, Read, Update, Delete) operations on various resources related to real estate management. Specifically, for the "IDs From Relation" resource with the "Delete" operation, it deletes a record identified by its ID from the OnOffice system.

Common scenarios where this node is useful include automating data cleanup or synchronization tasks in real estate workflows, such as removing outdated or incorrect relation IDs from the system. For example, if a relation record representing a client or contact is no longer valid, this node can be used to delete that record programmatically.

Properties

Name Meaning
ID The unique identifier of the record to delete.
Include Debug Info Whether to include detailed debug information in the output. Set to true to get raw API responses and request details for troubleshooting.

Output

The node outputs a JSON object containing the result of the delete operation:

  • If successful, the output includes:

    • success: true
    • resourceType: the resource name ("idsfromrelation")
    • operation: the operation performed ("delete")
    • data: an empty array (no additional data returned on delete)
  • If "Include Debug Info" is enabled, the output also contains:

    • debug: true
    • rawResponse: the full raw response from the OnOffice API
    • requestSent: the exact request payload sent to the API
    • url: the API endpoint URL used
  • In case of failure, the output includes:

    • success: false
    • error: error message describing what went wrong
    • resourceType and operation for context

The node does not output binary data.

Dependencies

  • Requires an API token and secret credential for authenticating with the OnOffice API.
  • Uses the OnOffice API endpoints:
    • Stable API: https://api.onoffice.de/api/stable/api.php (used only for "relation" resource with "getMany" operation)
    • Latest API: https://api.onoffice.de/api/latest/api.php (used for all other cases including "idsfromrelation" resource)
  • The node internally generates HMAC signatures for secure API requests using the provided credentials.

Troubleshooting

  • Common issues:

    • Invalid or missing API credentials will cause authentication failures.
    • Providing an incorrect or non-existent ID will result in an API error indicating the record cannot be found.
    • Network connectivity problems may prevent reaching the OnOffice API endpoint.
  • Error messages:

    • "OnOffice API error: <message>" indicates the API responded with an error. Check the error message for details.
    • If the node throws errors about missing parameters, ensure the required "ID" property is set.
    • Enabling "Include Debug Info" helps diagnose issues by showing raw API responses and request payloads.
  • Resolution tips:

    • Verify API credentials are correct and have necessary permissions.
    • Confirm the ID exists in the OnOffice system before attempting deletion.
    • Use debug info to inspect request/response details and adjust parameters accordingly.

Links and References

Discussion