# Get account overview

```{raw} html
<div class="mo-api-page-show-toc" aria-hidden="true"></div>
```

Get available Credit, reservations, overdraft, and recent spending for an account.

```text
GET https://billing.moi.matrixorigin.cn/api/v1/billing/accounts/$ACCOUNT_ID/overview
```

## Before you begin

1. Prepare a valid [personal access token](../../../../../guides/billing/credentials.md#personal-access-token) for the account owner.
2. Call [List current accounts](current.md) to obtain the target account’s ID.

## Request example

Replace `$MOI_PERSONAL_ACCESS_TOKEN` and `$ACCOUNT_ID` in the example with your personal access token and the selected account’s ID.

```bash
curl -X GET \
  "https://billing.moi.matrixorigin.cn/api/v1/billing/accounts/$ACCOUNT_ID/overview" \
  -H "X-API-Key: $MOI_PERSONAL_ACCESS_TOKEN"
```

## Path parameters

::::{div} mo-api-parameter-table

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `accountID` | string | Yes | Target account ID from `items[].billing_account_id` in the List current accounts response. |

::::

## Successful response

Returns HTTP `200` with the account’s Credit balances, available Credit, and recent spending.

:::::::{div} mo-api-tabs mo-api-response-tabs
::::::{tab-set}
:::::{tab-item} Response example

```json
{
  "billing_account_id": "billing_account_example",
  "credit_balance": "100.000000000000",
  "credit_available": "90.000000000000",
  "credit_reserved": "10.000000000000",
  "credit_cash_balance": "80.000000000000",
  "credit_grant_balance": "20.000000000000",
  "credit_overdraft_balance": "0.000000000000",
  "outstanding_credit": "0.000000000000",
  "today_spend_credit": "1.000000000000",
  "month_spend_credit": "5.000000000000",
  "last_month_spend_credit": "20.000000000000",
  "estimated_days_remaining": "90",
  "billing_timezone": "Asia/Shanghai"
}
```

:::::
:::::{tab-item} Fields

| Field | Type | Description |
| --- | --- | --- |
| `billing_account_id` | string | Billing account ID. |
| `credit_balance` | string | Credit balance. |
| `credit_available` | string | Available Credit. |
| `credit_reserved` | string | Reserved Credit. |
| `credit_cash_balance` | string | Cash Credit balance. |
| `credit_grant_balance` | string | Granted Credit balance. |
| `credit_overdraft_balance` | string | Overdraft wallet balance. |
| `outstanding_credit` | string | Outstanding overdraft in Credit. |
| `today_spend_credit` | string | Charged Credit for today in the billing time zone. |
| `month_spend_credit` | string | Charged Credit for this month in the billing time zone. |
| `last_month_spend_credit` | string | Charged Credit for last month in the billing time zone. |
| `estimated_days_remaining` | string | Estimated days remaining from the average spend over the last 7 days; 0 when available Credit or spend cannot support the estimate. |
| `billing_timezone` | string | IANA time zone used for daily and monthly spending. |

:::::
::::::
:::::::

## Error response

Missing authentication returns HTTP `401`; provide a valid personal access token.

:::::::{div} mo-api-tabs mo-api-response-tabs
::::::{tab-set}
:::::{tab-item} Response example

```json
{
  "code": "unauthenticated",
  "message": "missing bearer token",
  "error": "missing bearer token"
}
```

:::::
:::::{tab-item} Fields

| Field | Type | Description |
| --- | --- | --- |
| `code` | string | Error code. |
| `message` | string | Error message. |
| `error` | string | Compatibility error message, with the same content as message. |

:::::
::::::
:::::::
