Platform Admin API
The Platform Admin API provides account balance queries, real-name status queries, call log queries, product list queries, sales price queries, online purchase and order queries. All endpoints share a single entry point and are authenticated with global application credentials. Restricted to sales/admin roles.
API info
| Item | Value |
|---|
| Endpoint | POST /api.php |
| Authentication | Global APP ID / APP KEY |
| Role restriction | Sales / admin only |
| Request format | application/json |
| Response format | application/json |
Common request parameters
| Parameter | Type | Required | Description |
|---|
action | string | Yes | Endpoint action, see the list below |
app_id | string | Yes | Global APP ID |
app_key | string | Yes | Global APP KEY |
Sample global credentials (for documentation only — replace with your own):
app_id: 68B0FA47FEC9E7EBC4BF80F8
app_key: 2b901515a427b6c0b68f866eece70e0d2ecf687146022412
Supported actions
| action | Feature | Description |
|---|
balance | Balance | Returns the current account balance |
realname_status | Real-name status | Returns whether the account is verified |
products | Product list | Returns all enabled products |
sales_prices | Sales prices | Returns original and sales prices |
orders | Orders | Returns purchase records (with dedicated APP credentials) |
call_logs | Call logs | Returns API call logs |
buy | Buy | Purchases a package per-call, returns order and credentials |
Common response structure
| Field | Type | Description |
|---|
code | int | Status code, 0 means success |
msg | string | Message |
data | mixed | Response data, structure varies by endpoint |
Error codes
| Code | Description |
|---|
| 0 | Success |
| 1001 | Invalid parameters |
| 1002 | Authentication failed |
| 1003 | No permission (not sales/admin) |
| 1004 | Resource not found |
| 1005 | Insufficient balance |
| 1006 | Internal error |
Notes
All requests must use POST with Content-Type: application/json
Global credentials are created in the "Applications" section of the console and are limited to sales/admin roles
The buy endpoint supports package-priced APIs only; buyout APIs cannot be purchased per-call
Order and call log queries support pagination; limit max is 50
All amount fields use 4-decimal precision
Dedicated APP IDs/KEYS are used for sub-application login and API calls — keep them safe
When code is not 0, debug based on the msg field