# Get hierarchical team-category-subcategory expense report

Returns a hierarchical report of expenses grouped by team, category, and subcategory. Supports filtering by period, account reference, team code, and category.

Endpoint: POST /expenses/team-category-report
Version: 2.0.0
Security: oauth2ClientCredentials

## Header parameters:

  - `org_wallet_ref` (string)
    Organization wallet reference, defaults to "1" if not provided

  - `business_id` (string, required)
    Business identifier for the request

## Request fields (application/json):

  - `period` (any, required)
    Period for the report. Can be a number (1-8) or string name. 1=TODAY, 2=YESTERDAY, 3=THISWEEK, 4=LASTWEEK, 5=THISMONTH, 6=LASTMONTH, 7=THISYEAR, 8=LASTYEAR
    Example: 5

  - `accountref` (string)
    Account reference (org_wallet_ref). Defaults to "1" if not provided.
    Example: 1

  - `teamcode` (string)
    Team code for filtering to a specific team. Use "all" or omit to get all teams.
    Example: T0012T

  - `category` (string)
    Category name for filtering to a specific category. If not provided, returns all categories. Note: Invalid category names are ignored and all categories are returned.
    Example: Transport

## Response 200 fields (application/json):

  - `data` (any, required)
    Report data - structure varies based on parameters

  - `status` (number, required)
    Status code
    Example: 0

  - `message` (string, required)
    Response message
    Example: success

