Get account overview¶
Get available Credit, reservations, overdraft, and recent spending for an account.
GET https://billing.moi.matrixorigin.cn/api/v1/billing/accounts/$ACCOUNT_ID/overview
Before you begin¶
Prepare a valid personal access token for the account owner.
Call List current accounts 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.
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¶
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Target account ID from |
Successful response¶
Returns HTTP 200 with the account’s Credit balances, available Credit, and recent spending.
{
"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"
}
Field |
Type |
Description |
|---|---|---|
|
string |
Billing account ID. |
|
string |
Credit balance. |
|
string |
Available Credit. |
|
string |
Reserved Credit. |
|
string |
Cash Credit balance. |
|
string |
Granted Credit balance. |
|
string |
Overdraft wallet balance. |
|
string |
Outstanding overdraft in Credit. |
|
string |
Charged Credit for today in the billing time zone. |
|
string |
Charged Credit for this month in the billing time zone. |
|
string |
Charged Credit for last month in the billing time zone. |
|
string |
Estimated days remaining from the average spend over the last 7 days; 0 when available Credit or spend cannot support the estimate. |
|
string |
IANA time zone used for daily and monthly spending. |
Error response¶
Missing authentication returns HTTP 401; provide a valid personal access token.
{
"code": "unauthenticated",
"message": "missing bearer token",
"error": "missing bearer token"
}
Field |
Type |
Description |
|---|---|---|
|
string |
Error code. |
|
string |
Error message. |
|
string |
Compatibility error message, with the same content as message. |