Get Estate Statistics

Resource type: estateStatistics

With this API call, external applications (such as owner portals or third-party reporting tools) can retrieve calculated statistics for a specific property as structured JSON data.

The API call uses the exact same underlying logic and widget configuration as the property statistics view inside onOffice enterprise (Properties > Statistics tab) and the _objektstatistik macro. This ensures that key metrics – such as inquiries, viewings, exposé requests, and sent exposés – remain 100% consistent across onOffice enterprise and external portals without requiring external calculation logic.

Prerequisites & Rights

To execute this API call successfully, the API user must satisfy the following permission checks:

  • Property-level access: Visibility right for the property’s statistics tab.
  • Module-level access: Module permission for reporting.

If these permission requirements are not met, the request will be rejected.

Parameters

  • estateId  INTEGER. MANDATORY. The unique internal ID of the main property (> 0). Sub-estate or multi-language IDs are automatically normalized to the main property ID.
  • language STRING. OPTIONAL. Language code (e.g., DEU, ENG) to control the output language of titles and column labels (title, groupByLabel, targetLabel, sumLabel). If this parameter is omitted, the default language setting of the enterprise client is used.

Request Example

{
  "actionid": "urn:onoffice-de-ns:smart:2.5:smartml:action:get",
  "resourcetype": "estateStatistics",
  "parameters": {
    "estateId": 1261,
    "language":"DEU"
  }
}

Response Parameters

Each entry in results contains a data element with the following structure:

  • meta OBJECT. Overarching information about the result set.
    • cntabsolute INTEGER. Total number of records returned.
    • records ARRAY. One entry per statistics widget configured for the property.
      • id INTEGER. ID of the record. Identical to elements.widgetId.
      • type STRING. Resource type of the record. Always estateStatistics.
      • elements OBJECT. The statistics data of the widget (see below).

In detail, the elements element of a successful response contains the following fields:

  • estateId INTEGER. ID of the property the statistics refer to.
  • widgetId INTEGER. Technical ID of the statistics widget.
  • widgetType STRING. Technical identifier of the widget type.
  • title STRING. Display title of the statistics section.
  • groupByLabel STRING. Header label for the category or grouping column.
  • targetLabel STRING. Header label for the value or target metric column.
  • showSumRow BOOLEAN. true if a summary/total row is configured for this widget, otherwise false.
  • rows ARRAY. List of statistic data rows.
  • sumLabel STRING. Label of the summary row. Only present if showSumRow is true.
  • sumValue STRING. Calculated total value of the summary row as a string. Only present if showSumRow is true.

Structure of items inside rows:

  • label STRING. Label of the data row (e.g., “Immobilienscout24”).
  • value STRING. Calculated value of the data row (e.g., count or formatted currency value).

Response Example

Example: Standard Key Figure Statistics (e.g. Inquiries / Portal requests / Activities)
{
  "status": {
    "code": 200,
    "errorcode": 0,
    "message": "OK"
  },
  "response": {
    "results": [
      {
        "actionid": "urn:onoffice-de-ns:smart:2.5:smartml:action:get",
        "resourceid": "undefined",
        "resourcetype": "estateStatistics",
        "cacheable": false,
        "identifier": "undefined",
        "data": {
          "meta": {
            "cntabsolute": 3
          },
          "records": [
            {
              "id": 81,
              "type": "estateStatistics",
              "elements": {
                "estateId": 1261,
                "widgetId": 81,
                "widgetType": "statisticDetailReportingActivities",
                "title": "Portalanfragen",
                "groupByLabel": "Herkunft/Kontakt der Aktivität",
                "targetLabel": "Anzahl Aktivitäten",
                "showSumRow": false,
                "rows": [
                  {
                    "label": "TEST AFM",
                    "value": "52"
                  }
                ]
              }
            },
            {
              "id": 83,
              "type": "estateStatistics",
              "elements": {
                "estateId": 1261,
                "widgetId": 83,
                "widgetType": "statisticDetailReportingActivities",
                "title": "Übersicht Aktivitäten",
                "groupByLabel": "Aktionsart",
                "targetLabel": "Anzahl Aktivitäten",
                "showSumRow": true,
                "rows": [
                  {
                    "label": "AGB bestätigt",
                    "value": "2"
                  },
                  {
                    "label": "Beleg",
                    "value": "2"
                  },
                  {
                    "label": "Bestätigung",
                    "value": "12"
                  },
                  {
                    "label": "Download",
                    "value": "2"
                  },
                  {
                    "label": "Email",
                    "value": "141"
                  },
                  {
                    "label": "Immofeedback / Terminnachbereitung",
                    "value": "1"
                  },
                  {
                    "label": "Meine eigene wichtige Aktionsart",
                    "value": "2"
                  },
                  {
                    "label": "PDF",
                    "value": "27"
                  },
                  {
                    "label": "Preisänderung",
                    "value": "5"
                  },
                  {
                    "label": "Sonstige",
                    "value": "2"
                  },
                  {
                    "label": "Statusänderung",
                    "value": "4"
                  },
                  {
                    "label": "Telefonat",
                    "value": "1"
                  },
                  {
                    "label": "Termin",
                    "value": "10"
                  },
                  {
                    "label": "Web-Exposé aufgerufen",
                    "value": "1"
                  },
                  {
                    "label": "Widerruf bestätigt",
                    "value": "4"
                  }
                ],
                "sumLabel": "Summe",
                "sumValue": "216"
              }
            },
            {
              "id": 281,
              "type": "estateStatistics",
              "elements": {
                "estateId": 1261,
                "widgetId": 281,
                "widgetType": "statisticDetailReportingActivities",
                "title": "Absagegründe",
                "groupByLabel": "Absagegrund",
                "targetLabel": "Anzahl verknüpfte Adressen",
                "showSumRow": true,
                "rows": [
                  {
                    "label": "Lage",
                    "value": "1"
                  },
                  {
                    "label": "Preis",
                    "value": "2"
                  }
                ],
                "sumLabel": "Summe",
                "sumValue": "3"
              }
            }
          ]
        },
        "status": {
          "errorcode": 0,
          "message": "OK"
        }
      }
    ]
  }
}