OnOffice icon

OnOffice

Consume OnOffice API

Actions15

Overview

This node integrates with the OnOffice API to manage real estate-related data. Specifically, for the Address - Get operation, it retrieves detailed information about a single address record by its unique ID. This is useful when you need to fetch contact details or customer information stored in the OnOffice system.

Common scenarios include:

  • Retrieving full contact details of a client or customer by their ID.
  • Fetching specific fields of an address record for display or further processing.
  • Integrating OnOffice address data into workflows that require up-to-date contact information.

Example: You have an address ID from a previous step and want to get the customer's name, email, and phone number to send a personalized email.

Properties

Name Meaning
ID The unique identifier of the address record to retrieve (required).
Fields The list of fields to return for the address. Options include:
- Customer Number, Form of Address, First Name, Last Name, Email, Phone 1, Phone 2, Mobile, Street, Postal Code, City, Country, User, Creation Date, Last Change Date

The "Fields" property allows selecting which parts of the address record to fetch, enabling efficient data retrieval tailored to your needs.

Output

The node outputs a JSON object containing the requested address data. The structure includes:

  • success: Boolean indicating if the request was successful.
  • resourceType: The resource type, here always "address".
  • operation: The operation performed, here "get".
  • data: An array of address records matching the query (for "get" this will be a single record).
  • total: (optional) Total number of records returned (mainly relevant for multi-record queries).
  • status / message: Status messages from the API.

Example output snippet:

{
  "success": true,
  "resourceType": "address",
  "operation": "get",
  "data": [
    {
      "KdNr": "12345",
      "Anrede": "Herr",
      "Vorname": "Max",
      "Name": "Mustermann",
      "Email": "max.mustermann@example.com",
      "Telefon1": "+49 123 456789",
      "Strasse": "Musterstraße",
      "Plz": "12345",
      "Ort": "Musterstadt"
    }
  ]
}

No binary data is output by this operation.

Dependencies

  • Requires valid credentials for the OnOffice API, specifically an API token and secret.
  • The node makes HTTP POST requests to the OnOffice API endpoint at https://api.onoffice.de/api/latest/api.php.
  • Proper configuration of the API credentials in n8n is necessary before use.

Troubleshooting

  • Invalid JSON in Data Property: If you provide JSON data for create/update operations, ensure it is valid JSON; otherwise, the node throws a validation error.
  • API Request Failed: Network issues or invalid credentials can cause request failures. Check your API token and secret.
  • Unsupported Resource or Operation: Using unsupported combinations will throw errors. Make sure to select "Address" as resource and "Get" as operation.
  • Empty or Incorrect ID: The "ID" field is required and must be correct; otherwise, the API will return an error or no data.
  • Partial Field Selection: Selecting no fields or invalid fields may result in incomplete or empty data.

If the node encounters an API error, it surfaces the message returned by OnOffice, helping diagnose issues like permission problems or invalid parameters.

Links and References

Discussion