OnOffice

Consume OnOffice API

Actions12

Overview

This node integrates with the OnOffice API to manage relations between estates and addresses (contacts). Specifically, the "Create Relation" operation allows users to establish a new relationship linking an estate with an address, defining the type of relation such as owner, tenant, interested party, or contact.

Common scenarios include:

  • Real estate agencies linking properties (estates) to their owners or tenants.
  • Managing contacts related to specific estates for communication or record-keeping.
  • Tracking interested parties associated with a property.

Practical example: A user can create a relation indicating that a particular person (address/contact) is the owner of a given estate by providing the estate ID, address ID, and selecting "Owner" as the relation type.

Properties

Name Meaning
Relation Type Type of relation between estate and address. Options: Owner, Tenant, Interested Party, Contact
Estate ID The unique identifier of the estate involved in the relation
Address ID The unique identifier of the address (contact) involved in the relation

Output

The output JSON contains information about the success of the operation and details of the created relation. It includes:

  • success: Boolean indicating if the creation was successful.
  • resourceType: The resource affected, here always "relation".
  • operation: The operation performed, here "create".
  • data: The data returned from the API about the newly created relation.
  • message: A status message from the API confirming the action.

Example output structure:

{
  "success": true,
  "resourceType": "relation",
  "operation": "create",
  "data": {
    "id": "relation-id",
    "type": "owner",
    "estateid": "estate-id",
    "addressid": "address-id"
  },
  "message": "Relation created successfully"
}

No binary data output is produced by this operation.

Dependencies

  • Requires an active connection to the OnOffice API.
  • Needs valid API credentials including an API token and secret for authentication.
  • The node uses HMAC signature generation for secure API requests.
  • Network access to https://api.onoffice.de/api/v1 must be available.

Troubleshooting

  • Invalid JSON in input fields: When creating relations, ensure that any JSON inputs (if used elsewhere) are properly formatted. For this operation, the inputs are simple strings and options, so this is less likely an issue.
  • API Authentication Errors: If the API token or secret is invalid or expired, the node will throw errors indicating authentication failure. Verify credentials in n8n settings.
  • Missing Required Fields: Estate ID and Address ID are mandatory. Omitting these will cause errors.
  • Network Issues: Connectivity problems to the OnOffice API endpoint will result in network error messages.
  • API Error Messages: The node surfaces API error messages when the OnOffice API returns an error status. Review the message for details on what went wrong (e.g., invalid IDs, permission issues).

To resolve errors:

  • Double-check all required parameters.
  • Confirm API credentials are correct and have necessary permissions.
  • Ensure network connectivity.
  • Review API error messages for specific guidance.

Links and References

Discussion