# GET /v2/category/{id}/dashboard

Kategorieübersicht mit Buchungsstatistik abrufen

Liefert die Kategorie, Angebots-/Buchungszahlen und Umsatzsummen je Währung für ihren Teilbaum sowie Promotiondaten. chart_line enthält fest vorgegebene Buchungs-/Gutscheinmetriken der letzten vier Wochen. Die Aggregation trennt archivierte und aktive Teilbäume; fields, metrics und Listenpaginierung ändern den Dashboardumfang nicht.

- Operation-ID: get_v2_category_id_dashboard
- Dokumentation: /docs/api/v2/operations/get-v2-category-id-dashboard-bb81c88ea00d/
- OpenAPI-Version: 3.2.1
- Vollständige Spezifikation: /docs/api/v2/openapi.json
- Dokumentationsstatus: reviewed
- Ändert Zustand: nein, gemäss Annotation
- Für Automation freigegeben: ja, siehe Voraussetzungen

## Server

Serverwerte stammen unverändert aus der Datei. Eine lokale Entwicklungsadresse ist keine bestätigte Produktionsadresse. `API_ORIGIN` muss auf die passende Instanz gesetzt werden.

```json
[
  {
    "url": "https://app2.edoobox.com",
    "description": "edoobox API"
  }
]
```

## Authentifizierung

Eine der folgenden Alternativen genügt (ODER). Innerhalb einer Alternative müssen alle Verfahren gemeinsam erfüllt sein (UND).

1. **bearerAuth** (HTTP bearer) — Existing edoobox v2 access token. Never substitute API key/secret headers. **UND** **accountContext** (header: edid) — Selected login/account context from the JWT, not a database primary key. Required even for a JWT with one account.
2. **sessionCookie** (cookie: _edlogin) — Existing browser login session, with the same permission checks as Bearer authentication. **UND** **accountContext** (header: edid) — Selected login/account context from the JWT, not a database primary key. Required even for a JWT with one account.

### Wirksame Security Requirements und vollständige Verfahren

```json
{
  "security": [
    {
      "bearerAuth": [],
      "accountContext": []
    },
    {
      "sessionCookie": [],
      "accountContext": []
    }
  ],
  "securitySchemes": {
    "bearerAuth": {
      "type": "http",
      "scheme": "bearer",
      "bearerFormat": "JWT",
      "description": "Existing edoobox v2 access token. Never substitute API key/secret headers."
    },
    "accountContext": {
      "type": "apiKey",
      "in": "header",
      "name": "edid",
      "description": "Selected login/account context from the JWT, not a database primary key. Required even for a JWT with one account."
    },
    "sessionCookie": {
      "type": "apiKey",
      "in": "cookie",
      "name": "_edlogin",
      "description": "Existing browser login session, with the same permission checks as Bearer authentication."
    }
  }
}
```

## Parameter

| Name | Ort | Pflicht | Beschreibung |
| --- | --- | --- | --- |
| id | path | ja | v2 object identifier in the selected account. |
| language | header | nein | Account language code, where the resource supports setLanguage(). |

### Vollständige wirksame Parameterdefinitionen

```json
[
  {
    "name": "id",
    "in": "path",
    "required": true,
    "description": "v2 object identifier in the selected account.",
    "schema": {
      "type": "string",
      "pattern": "^[a-z0-9]+_[a-f0-9]{12}_-?[0-9]+$",
      "description": "Opaque edoobox v2 object ID returned by this account. Never send a raw database ID. The synthetic example is illustrative and is not a real record.",
      "examples": [
        "category_012345abcdef_123456"
      ]
    }
  },
  {
    "name": "language",
    "in": "header",
    "required": false,
    "description": "Account language code, where the resource supports setLanguage().",
    "schema": {
      "type": "string",
      "examples": [
        "de"
      ]
    }
  }
]
```

## Anfrage

Kein Request Body deklariert.

## Antworten

HTTP-Status und Antwortinhalt gemeinsam auswerten. Die folgenden Beschreibungen und Schemata sind die Angaben der Quelldatei.

```json
{
  "200": {
    "description": "Daten des beschriebenen Ergebnisses im JSON-data-Feld; error und Ergebniskennzeichen beachten.",
    "content": {
      "application/json": {
        "example": {
          "success": true,
          "error": false,
          "data": {
            "category_id": "category_012345abcdef_123456",
            "category": {
              "id": "category_012345abcdef_123456",
              "name": "Beispielkategorie"
            },
            "category_stats": {
              "count_offer": 1,
              "count_booking": 8,
              "sum_amount": [
                {
                  "total": 240,
                  "currency_iso": "CHF"
                }
              ],
              "chart_line": {}
            },
            "promotions": false,
            "performing_promotion": []
          }
        },
        "schema": {
          "type": "object",
          "properties": {
            "success": {
              "type": "boolean"
            },
            "error": {
              "type": [
                "boolean",
                "string"
              ]
            },
            "error_code": {
              "type": "string"
            },
            "data": {
              "type": "object",
              "properties": {
                "category_id": {
                  "type": "string",
                  "pattern": "^category_[a-f0-9]{12}_-?[0-9]+$",
                  "description": "Öffentliche v2-ID im gewählten Konto; Beispiel ist synthetisch.",
                  "examples": [
                    "category_012345abcdef_123456"
                  ]
                },
                "category": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^[a-z0-9]+_[a-f0-9]{12}_-?[0-9]+$",
                          "description": "Opaque edoobox v2 object ID returned by this account. Never send a raw database ID. The synthetic example is illustrative and is not a real record.",
                          "examples": [
                            "category_012345abcdef_123456"
                          ]
                        },
                        "name": {
                          "description": "Response field from the resource Structure; dynamic values remain unconstrained.",
                          "x-edoobox-sourceLine": 30,
                          "type": "string"
                        },
                        "row_lft": {
                          "description": "Response field from the resource Structure; dynamic values remain unconstrained.",
                          "x-edoobox-sourceLine": 58,
                          "type": "integer"
                        },
                        "row_rgt": {
                          "description": "Response field from the resource Structure; dynamic values remain unconstrained.",
                          "x-edoobox-sourceLine": 68,
                          "type": "integer"
                        },
                        "order": {
                          "description": "Response field from the resource Structure; dynamic values remain unconstrained.",
                          "x-edoobox-sourceLine": 78,
                          "type": "integer"
                        },
                        "image": {
                          "anyOf": [
                            {
                              "const": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "const": "file"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "url": {
                                  "type": "string"
                                },
                                "url300": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "type",
                                "name",
                                "url",
                                "url300"
                              ],
                              "additionalProperties": false
                            }
                          ],
                          "x-edoobox-contractSource": [
                            {
                              "file": "application/models/v2/Category.php",
                              "line": 95,
                              "lineStart": 95,
                              "lineEnd": 112,
                              "sha256": "43e78dafbef58fdc0de2a46c4a9831d7615225c221164d9c5a0f6fabc7fc9e45",
                              "spanSha256": "1232dab7d815f052901c5335ecf83df35dc6063e4fded1a864d8de16b8aee621",
                              "reason": "Structure getter, output setter and field flags."
                            },
                            {
                              "file": "application/models/v2/Category.php",
                              "line": 268,
                              "lineStart": 268,
                              "lineEnd": 303,
                              "sha256": "43e78dafbef58fdc0de2a46c4a9831d7615225c221164d9c5a0f6fabc7fc9e45",
                              "spanSha256": "3b64150dba0beb6abedf5061f2b9e11f36159e56028ca8e00171a15d93302784",
                              "reason": "Actual resource dispatch and generic writer reachability; action branches are distinct."
                            },
                            {
                              "file": "application/models/v2/Category.php",
                              "line": 373,
                              "lineStart": 373,
                              "lineEnd": 394,
                              "sha256": "43e78dafbef58fdc0de2a46c4a9831d7615225c221164d9c5a0f6fabc7fc9e45",
                              "spanSha256": "6ed1a2030b3f277a83ece5878a285d06b4a16597da58e1ae03fb27fe5f35f27c",
                              "reason": "Actual resource dispatch and generic writer reachability; action branches are distinct."
                            },
                            {
                              "file": "docs/openapi/reviews/domain-fields.json",
                              "line": 1,
                              "reason": "Independent field-level source review, direction applicability, examples and explicit runtime limitations.",
                              "sha256": "0da1cbbf108a5871b54204c3c76aaf59dabf85a6886bfb38210136885cfc1667"
                            }
                          ]
                        },
                        "category": {
                          "description": "Response field from the resource Structure; dynamic values remain unconstrained.",
                          "x-edoobox-sourceLine": 113,
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^[a-z0-9]+_[a-f0-9]{12}_-?[0-9]+$",
                              "description": "Opaque edoobox v2 object ID returned by this account. Never send a raw database ID. The synthetic example is illustrative and is not a real record.",
                              "examples": [
                                "category_012345abcdef_123456"
                              ]
                            },
                            {
                              "const": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "type": {
                          "enum": [
                            "offer",
                            "folder",
                            "root",
                            "archive",
                            "trash"
                          ]
                        },
                        "design": {
                          "description": "Response field from the resource Structure; dynamic values remain unconstrained.",
                          "x-edoobox-sourceLine": 172,
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^[a-z0-9]+_[a-f0-9]{12}_-?[0-9]+$",
                              "description": "Opaque edoobox v2 object ID returned by this account. Never send a raw database ID. The synthetic example is illustrative and is not a real record.",
                              "examples": [
                                "design_012345abcdef_123456"
                              ]
                            },
                            {
                              "const": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "internal_code": {
                          "type": "string",
                          "x-edoobox-contractSource": [
                            {
                              "file": "application/models/v2/Category.php",
                              "line": 188,
                              "lineStart": 188,
                              "lineEnd": 197,
                              "sha256": "43e78dafbef58fdc0de2a46c4a9831d7615225c221164d9c5a0f6fabc7fc9e45",
                              "spanSha256": "b9cc8df6ed7c8b88c9502b24e5a2d80c31b50d6c8c147413d3017e2fcce84c4d",
                              "reason": "Structure getter, output setter and field flags."
                            },
                            {
                              "file": "application/models/v2/Categoryfunc.php",
                              "line": 19,
                              "lineStart": 19,
                              "lineEnd": 77,
                              "sha256": "dd87dd957aef94579c4884c9fc846477cfb33cdac923a22a4885ad995871751c",
                              "spanSha256": "71831f2331b841d77fd50063ba1b55109814f8917f9b1fb9e39a81165b4d2c1c",
                              "reason": "func delegates to _internal_code"
                            },
                            {
                              "file": "application/helpers/edooboxhelp_helper.php",
                              "line": 11560,
                              "lineStart": 11560,
                              "lineEnd": 11577,
                              "sha256": "090d351b5bde81813c7a829bedf2f1f9f978fce5765f246989779f996198934e",
                              "spanSha256": "47b45db25b5ed86673fe43c17c7d716427b0d86011b1ba918d19eebc39907fd1",
                              "reason": "Actual aP normalization; no rejecting maxLength. Reviewed aP update preserves legacy encoded storage and aQ read semantics. Truncation removes a dangling final escape backslash rather than creating a broken SQL literal; it remains normalization, not a rejecting raw input maxLength."
                            },
                            {
                              "file": "application/models/v2/Edsubscription/Edsubscriptionverification.php",
                              "line": 45,
                              "lineStart": 45,
                              "lineEnd": 71,
                              "sha256": "723114d7051c7917de61d4cc28f26acef144a985b6077ccaefb0052f4c4b78dd",
                              "spanSha256": "c9425ad19c85e68c6bc57eacc00cebd71d4e624b76013e116afd1cadcd87b7e8",
                              "reason": "Runtime subscription feature rejection."
                            },
                            {
                              "file": "application/models/v2/Category.php",
                              "line": 268,
                              "lineStart": 268,
                              "lineEnd": 303,
                              "sha256": "43e78dafbef58fdc0de2a46c4a9831d7615225c221164d9c5a0f6fabc7fc9e45",
                              "spanSha256": "3b64150dba0beb6abedf5061f2b9e11f36159e56028ca8e00171a15d93302784",
                              "reason": "Actual resource dispatch and generic writer reachability; action branches are distinct."
                            },
                            {
                              "file": "application/models/v2/Category.php",
                              "line": 373,
                              "lineStart": 373,
                              "lineEnd": 394,
                              "sha256": "43e78dafbef58fdc0de2a46c4a9831d7615225c221164d9c5a0f6fabc7fc9e45",
                              "spanSha256": "6ed1a2030b3f277a83ece5878a285d06b4a16597da58e1ae03fb27fe5f35f27c",
                              "reason": "Actual resource dispatch and generic writer reachability; action branches are distinct."
                            },
                            {
                              "file": "docs/openapi/reviews/domain-fields.json",
                              "line": 1,
                              "reason": "Independent field-level source review, direction applicability, examples and explicit runtime limitations.",
                              "sha256": "0da1cbbf108a5871b54204c3c76aaf59dabf85a6886bfb38210136885cfc1667"
                            }
                          ]
                        },
                        "prevent_multiple_bookings": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "status",
                                "gender",
                                "first_name",
                                "last_name",
                                "street",
                                "postcode",
                                "location",
                                "country",
                                "language",
                                "phone_number",
                                "email",
                                "company",
                                "data_1",
                                "data_2",
                                "data_3",
                                "data_4",
                                "data_5",
                                "data_6",
                                "data_7",
                                "data_8",
                                "data_9",
                                "data_10",
                                "data_11",
                                "data_12",
                                "data_13",
                                "data_14",
                                "data_15",
                                "data_16",
                                "data_17",
                                "data_18",
                                "data_19",
                                "data_20",
                                "data_21",
                                "data_22",
                                "data_23",
                                "data_24",
                                "data_25",
                                "data_26",
                                "data_27",
                                "data_28",
                                "data_29",
                                "data_30"
                              ]
                            },
                            {
                              "const": false
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "x-edoobox-contractSource": [
                            {
                              "file": "application/models/v2/Category.php",
                              "line": 198,
                              "lineStart": 198,
                              "lineEnd": 220,
                              "sha256": "43e78dafbef58fdc0de2a46c4a9831d7615225c221164d9c5a0f6fabc7fc9e45",
                              "spanSha256": "101039fe8703832f5080f0af566ed7113ce1b2584974b72c122f070794ea90c6",
                              "reason": "Structure getter, output setter and field flags."
                            },
                            {
                              "file": "application/models/v2/Datastructure.php",
                              "line": 20,
                              "lineStart": 20,
                              "lineEnd": 126,
                              "sha256": "256cfd2c1002e4708b342b6649fa6bfda780273306c30ae2a43d424fd0e2e6a8",
                              "spanSha256": "e0b745f0330dae128c01bcc320aa6dc4429d391260fee2e2d6964a611041e2a9",
                              "reason": "Known participant keys plus data_1..data_30 generation and returnStructure."
                            },
                            {
                              "file": "application/models/v2/Category.php",
                              "line": 268,
                              "lineStart": 268,
                              "lineEnd": 303,
                              "sha256": "43e78dafbef58fdc0de2a46c4a9831d7615225c221164d9c5a0f6fabc7fc9e45",
                              "spanSha256": "3b64150dba0beb6abedf5061f2b9e11f36159e56028ca8e00171a15d93302784",
                              "reason": "Actual resource dispatch and generic writer reachability; action branches are distinct."
                            },
                            {
                              "file": "application/models/v2/Category.php",
                              "line": 373,
                              "lineStart": 373,
                              "lineEnd": 394,
                              "sha256": "43e78dafbef58fdc0de2a46c4a9831d7615225c221164d9c5a0f6fabc7fc9e45",
                              "spanSha256": "6ed1a2030b3f277a83ece5878a285d06b4a16597da58e1ae03fb27fe5f35f27c",
                              "reason": "Actual resource dispatch and generic writer reachability; action branches are distinct."
                            },
                            {
                              "file": "docs/openapi/reviews/domain-fields.json",
                              "line": 1,
                              "reason": "Independent field-level source review, direction applicability, examples and explicit runtime limitations.",
                              "sha256": "0da1cbbf108a5871b54204c3c76aaf59dabf85a6886bfb38210136885cfc1667"
                            }
                          ]
                        },
                        "archive": {
                          "description": "Response field from the resource Structure; dynamic values remain unconstrained.",
                          "x-edoobox-sourceLine": 221,
                          "type": "boolean"
                        },
                        "trash": {
                          "description": "Response field from the resource Structure; dynamic values remain unconstrained.",
                          "x-edoobox-sourceLine": 233,
                          "type": "boolean"
                        }
                      },
                      "additionalProperties": true
                    },
                    {
                      "const": false
                    }
                  ]
                },
                "category_stats": {
                  "type": "object",
                  "properties": {
                    "count_offer": {
                      "type": "integer"
                    },
                    "count_booking": {
                      "type": "integer"
                    },
                    "sum_amount": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "total": {
                            "type": "number"
                          },
                          "currency_iso": {
                            "type": "string"
                          }
                        },
                        "additionalProperties": true,
                        "required": [
                          "total",
                          "currency_iso"
                        ]
                      }
                    },
                    "chart_line": {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": true,
                  "required": [
                    "count_offer",
                    "count_booking",
                    "sum_amount",
                    "chart_line"
                  ]
                },
                "promotions": {
                  "anyOf": [
                    {
                      "anyOf": [
                        {
                          "type": "object",
                          "additionalProperties": {
                            "type": "object",
                            "properties": {},
                            "additionalProperties": true
                          }
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {},
                            "additionalProperties": true
                          }
                        }
                      ],
                      "description": "Nach öffentlichen IDs indiziertes Objekt oder (bei response_type=array) Liste. Leere Sammlungen können [] sein."
                    },
                    {
                      "const": false
                    }
                  ]
                },
                "performing_promotion": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "promotion_id": {
                        "type": "string",
                        "pattern": "^promotion_[a-f0-9]{12}_-?[0-9]+$",
                        "examples": [
                          "promotion_012345abcdef_123456"
                        ],
                        "description": "Öffentliche v2-ID im gewählten Konto; Beispiel ist synthetisch."
                      },
                      "assigned": {
                        "type": "integer"
                      }
                    },
                    "additionalProperties": true,
                    "required": [
                      "promotion_id",
                      "assigned"
                    ]
                  }
                }
              },
              "additionalProperties": true
            },
            "type": {
              "type": "string"
            }
          },
          "additionalProperties": true
        }
      }
    }
  },
  "400": {
    "description": "Invalid request.",
    "content": {
      "application/json": {
        "example": {
          "success": false,
          "error": "ED40006"
        }
      }
    }
  },
  "401": {
    "description": "Missing/expired token, missing account context, account paused or model-specific authorization failure.",
    "content": {
      "application/json": {
        "example": {
          "success": false,
          "error": "ED40103"
        }
      }
    }
  },
  "402": {
    "description": "Missing/invalid action data or subscription/operation restriction.",
    "content": {
      "application/json": {
        "example": {
          "success": false,
          "error": "ED80100"
        }
      }
    }
  },
  "403": {
    "description": "Permission denied. Browser CORS rejection may have an empty body.",
    "content": {
      "application/json": {
        "example": {
          "success": false,
          "error": "ED40340"
        }
      }
    }
  },
  "404": {
    "description": "Unknown resource/action or unsupported method.",
    "content": {
      "application/json": {
        "example": {
          "success": false,
          "error": "ED80019"
        }
      }
    }
  },
  "422": {
    "description": "Validation failed.",
    "content": {
      "application/json": {
        "example": {
          "success": false,
          "error": "ED80020"
        }
      }
    }
  },
  "429": {
    "description": "Request/login rate limit exceeded. Honor Retry-After when supplied; legacy rate-limit paths may omit it. Retry only proven reads within a bounded deadline; a mutation is never automatically replayed after an ambiguous response.",
    "content": {
      "application/json": {
        "example": {
          "success": false,
          "error": "ED42902"
        }
      }
    },
    "headers": {
      "Retry-After": {
        "description": "Optional server delay in whole seconds or an HTTP date. Absence is not permission for an immediate retry.",
        "schema": {
          "type": "string",
          "examples": [
            "30"
          ]
        }
      }
    }
  },
  "502": {
    "description": "Server-side operation failed.",
    "content": {
      "application/json": {
        "example": {
          "success": false,
          "error": "ED50201"
        }
      }
    }
  }
}
```

## Aufrufbeispiele

Anpassen vor dem Ausführen. Platzhalter und veröffentlichte Beispiele sind synthetisch. Die Beispiele senden hier keine Anfrage; sie ergänzen keine unbekannten Pflichtfelder.

### cURL

```sh
# Zeigt Authentifizierungsalternative 1; alle Verfahren dieser Alternative sind gemeinsam erforderlich.
# cURL: PATH_* bereits URL-kodiert setzen. JavaScript/Python kodieren die unveränderten Pfadwerte selbst.
: "${API_ORIGIN:?API_ORIGIN setzen}"
: "${AUTH_BEARERAUTH:?AUTH_BEARERAUTH setzen}"
: "${AUTH_ACCOUNTCONTEXT:?AUTH_ACCOUNTCONTEXT setzen}"
: "${PATH_ID:?PATH_ID setzen}"
curl --request 'GET' \
  --url "${API_ORIGIN%/}"'/v2/category/'"${PATH_ID}"'/dashboard' \
  --header 'Authorization: Bearer '"${AUTH_BEARERAUTH}" \
  --header 'edid: '"${AUTH_ACCOUNTCONTEXT}"
```

### JavaScript (Node.js)

```javascript
// Zeigt Authentifizierungsalternative 1; alle Verfahren dieser Alternative sind gemeinsam erforderlich.
const required = (name) => {
  const value = process.env[name];
  if (!value) throw new Error(`Set ${name}`);
  return value;
};
let path = "/v2/category/{id}/dashboard";
path = path.replaceAll("{id}", encodeURIComponent(required("PATH_ID")));
const origin = required('API_ORIGIN');
const url = new URL((origin.endsWith('/') ? origin.slice(0, -1) : origin) + path);
const headers = {};
headers["Authorization"] = "Bearer " + required("AUTH_BEARERAUTH");
headers["edid"] = "" + required("AUTH_ACCOUNTCONTEXT");
const response = await fetch(url, { method: "GET", headers, redirect: 'manual' });
const text = await response.text();
console.log(response.status, text);
// HTTP-Status und dokumentierte error/success-Felder gemeinsam prüfen.
```

### Python

```python
# Zeigt Authentifizierungsalternative 1; alle Verfahren dieser Alternative sind gemeinsam erforderlich.
import os
import urllib.parse
import urllib.request
import urllib.error

path = "/v2/category/{id}/dashboard"
path = path.replace("{id}", urllib.parse.quote(os.environ["PATH_ID"], safe=""))
url = os.environ["API_ORIGIN"].rstrip("/") + path
headers = {}
headers["Authorization"] = "Bearer " + os.environ["AUTH_BEARERAUTH"]
headers["edid"] = "" + os.environ["AUTH_ACCOUNTCONTEXT"]

# Redirects nicht automatisch verfolgen.
class NoRedirect(urllib.request.HTTPRedirectHandler):
    def redirect_request(self, req, fp, code, msg, headers, newurl):
        return None
request = urllib.request.Request(url, headers=headers, method="GET")
try:
    response = urllib.request.build_opener(NoRedirect).open(request, timeout=30)
except urllib.error.HTTPError as error:
    response = error
print(response.status, response.read().decode("utf-8", errors="replace"))
# HTTP-Status und dokumentierte error/success-Felder gemeinsam prüfen.
```

## Vollständige Operationsdefinition und edoobox-Hinweise

Alle Originalfelder einschliesslich `x-edoobox-*`, requestBody und responses bleiben erhalten. Teilweise dokumentierte Schemata sind kein vollständiger Validierungsvertrag.

```json
{
  "operationId": "get_v2_category_id_dashboard",
  "summary": "Kategorieübersicht mit Buchungsstatistik abrufen",
  "description": "Liefert die Kategorie, Angebots-/Buchungszahlen und Umsatzsummen je Währung für ihren Teilbaum sowie Promotiondaten. chart_line enthält fest vorgegebene Buchungs-/Gutscheinmetriken der letzten vier Wochen. Die Aggregation trennt archivierte und aktive Teilbäume; fields, metrics und Listenpaginierung ändern den Dashboardumfang nicht.",
  "tags": [
    "category"
  ],
  "security": [
    {
      "bearerAuth": [],
      "accountContext": []
    },
    {
      "sessionCookie": [],
      "accountContext": []
    }
  ],
  "parameters": [
    {
      "name": "id",
      "in": "path",
      "required": true,
      "description": "v2 object identifier in the selected account.",
      "schema": {
        "type": "string",
        "pattern": "^[a-z0-9]+_[a-f0-9]{12}_-?[0-9]+$",
        "description": "Opaque edoobox v2 object ID returned by this account. Never send a raw database ID. The synthetic example is illustrative and is not a real record.",
        "examples": [
          "category_012345abcdef_123456"
        ]
      }
    },
    {
      "name": "language",
      "in": "header",
      "required": false,
      "description": "Account language code, where the resource supports setLanguage().",
      "schema": {
        "type": "string",
        "examples": [
          "de"
        ]
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Daten des beschriebenen Ergebnisses im JSON-data-Feld; error und Ergebniskennzeichen beachten.",
      "content": {
        "application/json": {
          "example": {
            "success": true,
            "error": false,
            "data": {
              "category_id": "category_012345abcdef_123456",
              "category": {
                "id": "category_012345abcdef_123456",
                "name": "Beispielkategorie"
              },
              "category_stats": {
                "count_offer": 1,
                "count_booking": 8,
                "sum_amount": [
                  {
                    "total": 240,
                    "currency_iso": "CHF"
                  }
                ],
                "chart_line": {}
              },
              "promotions": false,
              "performing_promotion": []
            }
          },
          "schema": {
            "type": "object",
            "properties": {
              "success": {
                "type": "boolean"
              },
              "error": {
                "type": [
                  "boolean",
                  "string"
                ]
              },
              "error_code": {
                "type": "string"
              },
              "data": {
                "type": "object",
                "properties": {
                  "category_id": {
                    "type": "string",
                    "pattern": "^category_[a-f0-9]{12}_-?[0-9]+$",
                    "description": "Öffentliche v2-ID im gewählten Konto; Beispiel ist synthetisch.",
                    "examples": [
                      "category_012345abcdef_123456"
                    ]
                  },
                  "category": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-z0-9]+_[a-f0-9]{12}_-?[0-9]+$",
                            "description": "Opaque edoobox v2 object ID returned by this account. Never send a raw database ID. The synthetic example is illustrative and is not a real record.",
                            "examples": [
                              "category_012345abcdef_123456"
                            ]
                          },
                          "name": {
                            "description": "Response field from the resource Structure; dynamic values remain unconstrained.",
                            "x-edoobox-sourceLine": 30,
                            "type": "string"
                          },
                          "row_lft": {
                            "description": "Response field from the resource Structure; dynamic values remain unconstrained.",
                            "x-edoobox-sourceLine": 58,
                            "type": "integer"
                          },
                          "row_rgt": {
                            "description": "Response field from the resource Structure; dynamic values remain unconstrained.",
                            "x-edoobox-sourceLine": 68,
                            "type": "integer"
                          },
                          "order": {
                            "description": "Response field from the resource Structure; dynamic values remain unconstrained.",
                            "x-edoobox-sourceLine": 78,
                            "type": "integer"
                          },
                          "image": {
                            "anyOf": [
                              {
                                "const": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "const": "file"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "url": {
                                    "type": "string"
                                  },
                                  "url300": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "name",
                                  "url",
                                  "url300"
                                ],
                                "additionalProperties": false
                              }
                            ],
                            "x-edoobox-contractSource": [
                              {
                                "file": "application/models/v2/Category.php",
                                "line": 95,
                                "lineStart": 95,
                                "lineEnd": 112,
                                "sha256": "43e78dafbef58fdc0de2a46c4a9831d7615225c221164d9c5a0f6fabc7fc9e45",
                                "spanSha256": "1232dab7d815f052901c5335ecf83df35dc6063e4fded1a864d8de16b8aee621",
                                "reason": "Structure getter, output setter and field flags."
                              },
                              {
                                "file": "application/models/v2/Category.php",
                                "line": 268,
                                "lineStart": 268,
                                "lineEnd": 303,
                                "sha256": "43e78dafbef58fdc0de2a46c4a9831d7615225c221164d9c5a0f6fabc7fc9e45",
                                "spanSha256": "3b64150dba0beb6abedf5061f2b9e11f36159e56028ca8e00171a15d93302784",
                                "reason": "Actual resource dispatch and generic writer reachability; action branches are distinct."
                              },
                              {
                                "file": "application/models/v2/Category.php",
                                "line": 373,
                                "lineStart": 373,
                                "lineEnd": 394,
                                "sha256": "43e78dafbef58fdc0de2a46c4a9831d7615225c221164d9c5a0f6fabc7fc9e45",
                                "spanSha256": "6ed1a2030b3f277a83ece5878a285d06b4a16597da58e1ae03fb27fe5f35f27c",
                                "reason": "Actual resource dispatch and generic writer reachability; action branches are distinct."
                              },
                              {
                                "file": "docs/openapi/reviews/domain-fields.json",
                                "line": 1,
                                "reason": "Independent field-level source review, direction applicability, examples and explicit runtime limitations.",
                                "sha256": "0da1cbbf108a5871b54204c3c76aaf59dabf85a6886bfb38210136885cfc1667"
                              }
                            ]
                          },
                          "category": {
                            "description": "Response field from the resource Structure; dynamic values remain unconstrained.",
                            "x-edoobox-sourceLine": 113,
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^[a-z0-9]+_[a-f0-9]{12}_-?[0-9]+$",
                                "description": "Opaque edoobox v2 object ID returned by this account. Never send a raw database ID. The synthetic example is illustrative and is not a real record.",
                                "examples": [
                                  "category_012345abcdef_123456"
                                ]
                              },
                              {
                                "const": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "type": {
                            "enum": [
                              "offer",
                              "folder",
                              "root",
                              "archive",
                              "trash"
                            ]
                          },
                          "design": {
                            "description": "Response field from the resource Structure; dynamic values remain unconstrained.",
                            "x-edoobox-sourceLine": 172,
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^[a-z0-9]+_[a-f0-9]{12}_-?[0-9]+$",
                                "description": "Opaque edoobox v2 object ID returned by this account. Never send a raw database ID. The synthetic example is illustrative and is not a real record.",
                                "examples": [
                                  "design_012345abcdef_123456"
                                ]
                              },
                              {
                                "const": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "internal_code": {
                            "type": "string",
                            "x-edoobox-contractSource": [
                              {
                                "file": "application/models/v2/Category.php",
                                "line": 188,
                                "lineStart": 188,
                                "lineEnd": 197,
                                "sha256": "43e78dafbef58fdc0de2a46c4a9831d7615225c221164d9c5a0f6fabc7fc9e45",
                                "spanSha256": "b9cc8df6ed7c8b88c9502b24e5a2d80c31b50d6c8c147413d3017e2fcce84c4d",
                                "reason": "Structure getter, output setter and field flags."
                              },
                              {
                                "file": "application/models/v2/Categoryfunc.php",
                                "line": 19,
                                "lineStart": 19,
                                "lineEnd": 77,
                                "sha256": "dd87dd957aef94579c4884c9fc846477cfb33cdac923a22a4885ad995871751c",
                                "spanSha256": "71831f2331b841d77fd50063ba1b55109814f8917f9b1fb9e39a81165b4d2c1c",
                                "reason": "func delegates to _internal_code"
                              },
                              {
                                "file": "application/helpers/edooboxhelp_helper.php",
                                "line": 11560,
                                "lineStart": 11560,
                                "lineEnd": 11577,
                                "sha256": "090d351b5bde81813c7a829bedf2f1f9f978fce5765f246989779f996198934e",
                                "spanSha256": "47b45db25b5ed86673fe43c17c7d716427b0d86011b1ba918d19eebc39907fd1",
                                "reason": "Actual aP normalization; no rejecting maxLength. Reviewed aP update preserves legacy encoded storage and aQ read semantics. Truncation removes a dangling final escape backslash rather than creating a broken SQL literal; it remains normalization, not a rejecting raw input maxLength."
                              },
                              {
                                "file": "application/models/v2/Edsubscription/Edsubscriptionverification.php",
                                "line": 45,
                                "lineStart": 45,
                                "lineEnd": 71,
                                "sha256": "723114d7051c7917de61d4cc28f26acef144a985b6077ccaefb0052f4c4b78dd",
                                "spanSha256": "c9425ad19c85e68c6bc57eacc00cebd71d4e624b76013e116afd1cadcd87b7e8",
                                "reason": "Runtime subscription feature rejection."
                              },
                              {
                                "file": "application/models/v2/Category.php",
                                "line": 268,
                                "lineStart": 268,
                                "lineEnd": 303,
                                "sha256": "43e78dafbef58fdc0de2a46c4a9831d7615225c221164d9c5a0f6fabc7fc9e45",
                                "spanSha256": "3b64150dba0beb6abedf5061f2b9e11f36159e56028ca8e00171a15d93302784",
                                "reason": "Actual resource dispatch and generic writer reachability; action branches are distinct."
                              },
                              {
                                "file": "application/models/v2/Category.php",
                                "line": 373,
                                "lineStart": 373,
                                "lineEnd": 394,
                                "sha256": "43e78dafbef58fdc0de2a46c4a9831d7615225c221164d9c5a0f6fabc7fc9e45",
                                "spanSha256": "6ed1a2030b3f277a83ece5878a285d06b4a16597da58e1ae03fb27fe5f35f27c",
                                "reason": "Actual resource dispatch and generic writer reachability; action branches are distinct."
                              },
                              {
                                "file": "docs/openapi/reviews/domain-fields.json",
                                "line": 1,
                                "reason": "Independent field-level source review, direction applicability, examples and explicit runtime limitations.",
                                "sha256": "0da1cbbf108a5871b54204c3c76aaf59dabf85a6886bfb38210136885cfc1667"
                              }
                            ]
                          },
                          "prevent_multiple_bookings": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "status",
                                  "gender",
                                  "first_name",
                                  "last_name",
                                  "street",
                                  "postcode",
                                  "location",
                                  "country",
                                  "language",
                                  "phone_number",
                                  "email",
                                  "company",
                                  "data_1",
                                  "data_2",
                                  "data_3",
                                  "data_4",
                                  "data_5",
                                  "data_6",
                                  "data_7",
                                  "data_8",
                                  "data_9",
                                  "data_10",
                                  "data_11",
                                  "data_12",
                                  "data_13",
                                  "data_14",
                                  "data_15",
                                  "data_16",
                                  "data_17",
                                  "data_18",
                                  "data_19",
                                  "data_20",
                                  "data_21",
                                  "data_22",
                                  "data_23",
                                  "data_24",
                                  "data_25",
                                  "data_26",
                                  "data_27",
                                  "data_28",
                                  "data_29",
                                  "data_30"
                                ]
                              },
                              {
                                "const": false
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "x-edoobox-contractSource": [
                              {
                                "file": "application/models/v2/Category.php",
                                "line": 198,
                                "lineStart": 198,
                                "lineEnd": 220,
                                "sha256": "43e78dafbef58fdc0de2a46c4a9831d7615225c221164d9c5a0f6fabc7fc9e45",
                                "spanSha256": "101039fe8703832f5080f0af566ed7113ce1b2584974b72c122f070794ea90c6",
                                "reason": "Structure getter, output setter and field flags."
                              },
                              {
                                "file": "application/models/v2/Datastructure.php",
                                "line": 20,
                                "lineStart": 20,
                                "lineEnd": 126,
                                "sha256": "256cfd2c1002e4708b342b6649fa6bfda780273306c30ae2a43d424fd0e2e6a8",
                                "spanSha256": "e0b745f0330dae128c01bcc320aa6dc4429d391260fee2e2d6964a611041e2a9",
                                "reason": "Known participant keys plus data_1..data_30 generation and returnStructure."
                              },
                              {
                                "file": "application/models/v2/Category.php",
                                "line": 268,
                                "lineStart": 268,
                                "lineEnd": 303,
                                "sha256": "43e78dafbef58fdc0de2a46c4a9831d7615225c221164d9c5a0f6fabc7fc9e45",
                                "spanSha256": "3b64150dba0beb6abedf5061f2b9e11f36159e56028ca8e00171a15d93302784",
                                "reason": "Actual resource dispatch and generic writer reachability; action branches are distinct."
                              },
                              {
                                "file": "application/models/v2/Category.php",
                                "line": 373,
                                "lineStart": 373,
                                "lineEnd": 394,
                                "sha256": "43e78dafbef58fdc0de2a46c4a9831d7615225c221164d9c5a0f6fabc7fc9e45",
                                "spanSha256": "6ed1a2030b3f277a83ece5878a285d06b4a16597da58e1ae03fb27fe5f35f27c",
                                "reason": "Actual resource dispatch and generic writer reachability; action branches are distinct."
                              },
                              {
                                "file": "docs/openapi/reviews/domain-fields.json",
                                "line": 1,
                                "reason": "Independent field-level source review, direction applicability, examples and explicit runtime limitations.",
                                "sha256": "0da1cbbf108a5871b54204c3c76aaf59dabf85a6886bfb38210136885cfc1667"
                              }
                            ]
                          },
                          "archive": {
                            "description": "Response field from the resource Structure; dynamic values remain unconstrained.",
                            "x-edoobox-sourceLine": 221,
                            "type": "boolean"
                          },
                          "trash": {
                            "description": "Response field from the resource Structure; dynamic values remain unconstrained.",
                            "x-edoobox-sourceLine": 233,
                            "type": "boolean"
                          }
                        },
                        "additionalProperties": true
                      },
                      {
                        "const": false
                      }
                    ]
                  },
                  "category_stats": {
                    "type": "object",
                    "properties": {
                      "count_offer": {
                        "type": "integer"
                      },
                      "count_booking": {
                        "type": "integer"
                      },
                      "sum_amount": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "total": {
                              "type": "number"
                            },
                            "currency_iso": {
                              "type": "string"
                            }
                          },
                          "additionalProperties": true,
                          "required": [
                            "total",
                            "currency_iso"
                          ]
                        }
                      },
                      "chart_line": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": true
                      }
                    },
                    "additionalProperties": true,
                    "required": [
                      "count_offer",
                      "count_booking",
                      "sum_amount",
                      "chart_line"
                    ]
                  },
                  "promotions": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "object",
                            "additionalProperties": {
                              "type": "object",
                              "properties": {},
                              "additionalProperties": true
                            }
                          },
                          {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {},
                              "additionalProperties": true
                            }
                          }
                        ],
                        "description": "Nach öffentlichen IDs indiziertes Objekt oder (bei response_type=array) Liste. Leere Sammlungen können [] sein."
                      },
                      {
                        "const": false
                      }
                    ]
                  },
                  "performing_promotion": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "promotion_id": {
                          "type": "string",
                          "pattern": "^promotion_[a-f0-9]{12}_-?[0-9]+$",
                          "examples": [
                            "promotion_012345abcdef_123456"
                          ],
                          "description": "Öffentliche v2-ID im gewählten Konto; Beispiel ist synthetisch."
                        },
                        "assigned": {
                          "type": "integer"
                        }
                      },
                      "additionalProperties": true,
                      "required": [
                        "promotion_id",
                        "assigned"
                      ]
                    }
                  }
                },
                "additionalProperties": true
              },
              "type": {
                "type": "string"
              }
            },
            "additionalProperties": true
          }
        }
      }
    },
    "400": {
      "description": "Invalid request.",
      "content": {
        "application/json": {
          "example": {
            "success": false,
            "error": "ED40006"
          }
        }
      }
    },
    "401": {
      "description": "Missing/expired token, missing account context, account paused or model-specific authorization failure.",
      "content": {
        "application/json": {
          "example": {
            "success": false,
            "error": "ED40103"
          }
        }
      }
    },
    "402": {
      "description": "Missing/invalid action data or subscription/operation restriction.",
      "content": {
        "application/json": {
          "example": {
            "success": false,
            "error": "ED80100"
          }
        }
      }
    },
    "403": {
      "description": "Permission denied. Browser CORS rejection may have an empty body.",
      "content": {
        "application/json": {
          "example": {
            "success": false,
            "error": "ED40340"
          }
        }
      }
    },
    "404": {
      "description": "Unknown resource/action or unsupported method.",
      "content": {
        "application/json": {
          "example": {
            "success": false,
            "error": "ED80019"
          }
        }
      }
    },
    "422": {
      "description": "Validation failed.",
      "content": {
        "application/json": {
          "example": {
            "success": false,
            "error": "ED80020"
          }
        }
      }
    },
    "429": {
      "description": "Request/login rate limit exceeded. Honor Retry-After when supplied; legacy rate-limit paths may omit it. Retry only proven reads within a bounded deadline; a mutation is never automatically replayed after an ambiguous response.",
      "content": {
        "application/json": {
          "example": {
            "success": false,
            "error": "ED42902"
          }
        }
      },
      "headers": {
        "Retry-After": {
          "description": "Optional server delay in whole seconds or an HTTP date. Absence is not permission for an immediate retry.",
          "schema": {
            "type": "string",
            "examples": [
              "30"
            ]
          }
        }
      }
    },
    "502": {
      "description": "Server-side operation failed.",
      "content": {
        "application/json": {
          "example": {
            "success": false,
            "error": "ED50201"
          }
        }
      }
    }
  },
  "x-edoobox-mutates-state": false,
  "x-edoobox-mutationReview": {
    "source": {
      "file": "application/models/v2/dashboard/Categorydashboard.php",
      "line": 11
    },
    "reason": "Complete reachable dashboard graph reviewed: SELECT aggregations, existing links, request-local formatting and serializers. Nested Eddata reads clear action segments and do not reach tree repair or other mutation branches. Derived read caches are not domain changes."
  },
  "x-edoobox-runtimeMutationGuard": false,
  "x-edoobox-get-effect": "read",
  "x-edoobox-documentationReview": {
    "file": "docs/openapi/operation-contracts/03-offers-places.json",
    "notes": []
  },
  "x-edoobox-source": {
    "file": "application/models/v2/Category.php",
    "method": "getCategory",
    "line": 550,
    "branch": {
      "file": "application/models/v2/Category.php",
      "line": 568
    }
  },
  "x-edoobox-documentationStatus": "reviewed",
  "x-edoobox-readOnly": true,
  "x-edoobox-safeForAutomation": true,
  "x-edoobox-permission": {
    "resource": "category",
    "short": "ctgy",
    "checkedByDispatcher": true,
    "levels": [
      1,
      3,
      4
    ],
    "description": "Resource permission mapping from APIPermissions(), Authfunc::_getCheckJWT. Additional model/admin/plugin checks may apply; resources absent from api_permission do not acquire a fictitious scope."
  }
}
```
