Skip to main content
Use this endpoint to retrieve high-level portfolio metrics for all accounts under your business. The response provides counts of active and inactive accounts, the number of virtual accounts, total volume collected, and your combined business balance. You can apply optional filters to scope the metrics to a specific date range or account segment.

Endpoint

POST /api/v1/account/web/get_total_account_metrics

Authentication

Include your JWT access token in the Authorization header.
Authorization: Bearer <access_token>
Obtain a token via POST /auth/web/login.

Request body

All parameters are optional.
filters
object
Account-level and date-range filter criteria.
count
integer
Maximum number of records to include in the computation.
ignore_count
boolean
When true, skips counting the total number of matching records (faster response).

Example request

curl --request POST \
  --url https://baasapi.payrepmfb.com/api/v1/account/web/get_total_account_metrics \
  --header "Authorization: Bearer <access_token>" \
  --header "Content-Type: application/json" \
  --data '{
    "filters": {
      "start_date": "2026-01-01",
      "end_date": "2026-04-28"
    }
  }'

Response

A successful request returns aggregated account metrics.
status
boolean
true when the request succeeds.
response_code
string
"00" on success.
data
object
The metrics object.
{
  "status": true,
  "response_code": "00",
  "message": "Account metrics fetched successfully",
  "data": {
    "total_active_accounts": 12,
    "total_inactive_accounts": 3,
    "total_virtual_accounts": 8,
    "total_volume_collected": "9200000.00",
    "total_business_balance": "1750000.00"
  }
}

Error codes

Response codeMeaning
41Customer not found — your session credentials are invalid.