Skip to content

Get hierarchical team-category-subcategory expense report

Request

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

Security
oauth2ClientCredentials(Required scopes: expenses:write)
Headers
org_wallet_refstring

Organization wallet reference, defaults to "1" if not provided

business_idstringrequired

Business identifier for the request

Bodyapplication/jsonrequired
periodnumber or stringrequired
Example:5
One of:

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

[ 1 .. 8 ]
number
accountrefstring

Account reference (org_wallet_ref). Defaults to "1" if not provided.

Example:"1"
teamcodestring

Team code for filtering to a specific team. Use "all" or omit to get all teams.

Example:"T0012T"
categorystring

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"
curl -i -X POST \
  https://developer.boyahq.com/_mock/v2/openapi/expenses/team-category-report \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'business_id: string' \
  -H 'org_wallet_ref: string' \
  -d '{
    "period": 5,
    "accountref": "1",
    "teamcode": "T0012T",
    "category": "Transport"
  }'

Responses

Hierarchical expense report generated successfully

Bodyapplication/json
dataTeamModeDataDto (object) or CategoryModeDataDto (object) or SubcategoryModeDataDto (object)required
Example:
{}
One of:

Object shape not yet published by the upstream spec.

statusnumberrequired

Status code

Example:0
messagestringrequired

Response message

Example:"success"
Response
{ "data": {}, "status": 0, "message": "success" }