Query Enterprise Account Balance
Endpoint Path
http
GET /api/open/enterprise/:id/balanceBalance Calculation
Amounts in CNY:
Recharge Balance (¥) = balance ÷ quota_per_unit × usd_exchange_rate
Voucher Balance (¥) = voucher_quota ÷ quota_per_unit × usd_exchange_rate
Historical Usage (¥) = used_quota ÷ quota_per_unit × usd_exchange_rate
Total Top-up (¥) = top_up_quota ÷ quota_per_unit × usd_exchange_ratequota_per_unit, usd_exchange_rate, and quota_display_type come from System Status (GET /api/open/status).
If quota_display_type = USD, omit × usd_exchange_rate.
Request Parameters
| Field | Type | Required | Description | Constraints | Remarks |
|---|---|---|---|---|---|
| id | int | Yes | Enterprise ID | Path parameter | Example: 1001 |
Request Example
json
GET 'https://neolink.com/backend/api/open/enterprise/1001/balance'Return Information
| Field | Type | Required | Description | Remarks |
|---|---|---|---|---|
| success | bool | Yes | Whether the request succeeded | Fixed |
| message | string | Yes | Error message (empty on success) | Fixed |
| data | object | Yes | Enterprise account balance object | See table below |
Data Fields
| Field | Type | Required | Description | Remarks |
|---|---|---|---|---|
| balance | int64 | Yes | Current available balance | Quota units; includes recharge and voucher |
| used_quota | int64 | Yes | Cumulative consumed quota | Total usage since enterprise creation |
| top_up_quota | int64 | Yes | Cumulative top-up total | Quota converted from paid top-ups |
| voucher_quota | int64 | Yes | Total voucher quota | From redemption codes, promotions, etc. |
Response Example
json
Success response
{
"success": true,
"message": "",
"data": {
"balance": 9000000,
"used_quota": 1200000,
"top_up_quota": 10000000,
"voucher_quota": 800000
}
}
Error response
{
"success": false,
"message": "Insufficient permission to view this enterprise balance"
}
{
"success": false,
"message": "Enterprise does not exist or has been deleted"
}
{
"success": false,
"message": "Enterprise is disabled, operation not allowed"
}