OnOffice

Consume OnOffice API

Actions12

Overview

This node integrates with the OnOffice API to manage real estate-related data. Specifically, for the Estate resource and the Update operation, it updates an existing estate record by its ID with new data provided in JSON format.

Common scenarios where this node is useful include:

  • Synchronizing updated property details from external systems into OnOffice.
  • Automating bulk updates of estate information based on changes in your CRM or database.
  • Correcting or enriching estate records programmatically without manual entry.

For example, you might update an estate's title, description, or status by specifying the estate's unique ID and providing the updated fields as JSON.

Properties

Name Meaning
ID The unique identifier of the estate record to update. This is required to specify which estate to modify.
Data A JSON object containing the fields and values to update on the estate record. Must be valid JSON representing the new data.

Output

The node outputs a JSON object with the following structure:

  • success: Boolean indicating if the update was successful (true).
  • resourceType: The resource affected, here always "estate".
  • operation: The operation performed, here "update".
  • data: Contains the response data from the OnOffice API about the updated estate.
  • message: A message string from the API confirming the update.

Example output JSON snippet:

{
  "success": true,
  "resourceType": "estate",
  "operation": "update",
  "data": { /* updated estate record data */ },
  "message": "Record updated successfully"
}

No binary data output is produced by this node.

Dependencies

  • Requires an API token and secret credential for authenticating with the OnOffice API.
  • The node sends HTTP POST requests to the OnOffice API endpoint at https://api.onoffice.de/api/stable/api.php.
  • Proper configuration of the API credentials in n8n is necessary before use.

Troubleshooting

  • Invalid JSON in Data field: If the JSON provided in the Data property is malformed, the node will throw an error stating "Data must be a valid JSON". Ensure the JSON syntax is correct.
  • Invalid or missing ID: The ID property is required. Omitting it or providing an incorrect ID will cause the API call to fail.
  • API errors: If the OnOffice API returns an error, the node will report it with the message prefixed by "OnOffice API error:". Check the API message for details.
  • Network issues: Network connectivity problems will result in a "Network error" message. Verify internet access and API endpoint availability.
  • Unsupported operations or resources: Attempting to use unsupported combinations will raise errors indicating the resource or operation is not supported.

To resolve these issues, verify input parameters, ensure valid JSON formatting, confirm API credentials, and check network connectivity.

Links and References

Discussion