Overview
This article shows how to use the Turbo360 Partner API to retrieve a holistic view of all child accounts from a parent account — including the full list of managed accounts and aggregate usage data across all of them. The sample uses the VS Code REST Client extension.
Business value
Parent account holders can surface consolidated usage and account inventory without accessing each child account individually, making it easier to monitor consumption and manage billing across the entire customer base.
Prerequisites
A Turbo360 Parent Account with Partner API access enabled.
A Microsoft Entra App Registration configured with the Turbo360 Partner API permission scope (
api://3ff33167-ae34-4bb3-b86d-109c22d28fc8/.default).The tenant ID, client ID, and client secret for your App Registration.
VS Code with the REST Client extension installed.
How it works
The sample performs three operations from the parent account scope:
Authenticate — Acquire a Bearer token using the client credentials flow.
List child accounts — Retrieve all managed accounts associated with the parent account.
Get aggregate usage — Retrieve consumption data across all child accounts in a single call, without needing to iterate per account.
The get-accounts-usage endpoint differs from the per-account usage endpoint in the child accounts sample — it returns a summary across all managed accounts rather than data for a single account.
Steps
Copy the following into a .http file in VS Code and run each request in sequence. This code is written in plain text:
# ==============================================================
# Authentication Variables
# ==============================================================
@tenantId = [API Authentication - Tenant ID]
@clientId = [API Authentication - Client ID]
@clientSecret = [API Authentication - Client Secret]
@host = portal.turbo360.com
# ==============================================================
# Step 1 - Get Authentication Token
# ==============================================================
# @name getToken
POST https://login.microsoftonline.com/[tenantId]/oauth2/v2.0/token
Content-Type: application/x-www-form-urlencoded
grant_type=client_credentials
&client_id=[clientId]
&client_secret=[clientSecret]
&scope=api://3ff33167-ae34-4bb3-b86d-109c22d28fc8/.default
###
# ==============================================================
# Step 2 - Get the Child Accounts
# ==============================================================
GET https://[host]/partner/api/account-management/get-managed-accounts
Accept: */*
Content-Type: application/json-patch+json
Authorization: Bearer [getToken.response.body.access_token]
###
# ==============================================================
# Step 3 - Get the Child Accounts Usage
# ==============================================================
GET https://[host]/partner/api/account-management/get-accounts-usage
Accept: */*
Content-Type: application/json-patch+json
Authorization: Bearer [getToken.response.body.access_token]
###Note: Replace bracketed placeholders above with your actual variable values when using the REST Client extension.