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.

Typical use cases include:

  • Automating updates to property listings in a real estate management system.
  • Synchronizing estate information from other systems or user inputs.
  • Bulk updating multiple estates in workflows where estate details change frequently.

For example, you might update the price, description, or status of a property by providing the estate's ID and 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. For example, {"price": 350000, "status": "available"}. Must be valid JSON.

Output

The node outputs a JSON array where each item corresponds to an input item processed. For the Update operation on Estate, the output JSON structure includes:

  • success: Boolean indicating if the update was successful.
  • resourceType: The resource affected, here always "estate".
  • operation: The operation performed, here "update".
  • data: The response data from the API representing the updated estate record.
  • message: A message from the API about the update operation.

Example output JSON snippet:

{
  "success": true,
  "resourceType": "estate",
  "operation": "update",
  "data": {
    "Id": "12345",
    "price": 350000,
    "status": "available",
    ...
  },
  "message": "Record updated successfully"
}

If the API returns an error or the update fails, the node throws an error unless configured to continue on failure, in which case the output will contain an error message.

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: https://api.onoffice.de/api/latest/api.php.
  • Proper configuration of these credentials in n8n is necessary for the node to function.

Troubleshooting

  • Invalid JSON in Data property: If the JSON provided in the Data field is malformed, the node will throw an error stating "Data must be a valid JSON". Ensure the JSON syntax is correct.
  • API errors: Errors returned by the OnOffice API are surfaced with messages like "OnOffice API error: ". Check that the API credentials are valid and have sufficient permissions.
  • Network issues: Network connectivity problems result in errors like "Network error: ". Verify internet access and API endpoint availability.
  • Missing or incorrect ID: The ID property is required. Omitting it or providing an invalid ID will cause the API to reject the request.
  • Continue on Fail: If enabled, the node will not stop execution on errors but instead output error details per item, allowing partial workflow continuation.

Links and References

Discussion