Skip to main content
  • API 参考
  • 账户状态查询

账户状态查询

该接口用于查询当前凭证所属账户基础信息,可获取账户余额、运行状态、Webhook 回调地址等数据。接口依托当前登录身份校验,调用时无需额外传入业务参数。

#接口基础信息

项目 详情
请求方法 GET
接口路径 /api/v2/account/status
访问认证 请求头携带 X-API-KeyX-API-Secret,参考 API 认证
头部参数 Content-Type: application/json

#请求示例

#cURL 请求

shell
curl -X GET "http://api.globfax.com/api/v2/account/status" \
  -H "X-API-Key: your_api_key_here" \
  -H "X-API-Secret: your_api_secret_here"

#原生 HTTP 请求

code
GET /api/v2/account/status HTTP/1.1
Host: api.globfax.com
X-API-Key: your_api_key_here
X-API-Secret: your_api_secret_here

#响应结果

#调用成功

json
{
  "success": true,
  "message": "Account details retrieved",
  "data": {
    "uid": "TENANT123456",
    "name": "张三科技有限公司",
    "balance": 1500.50,
    "webhook_url": "https://example.com/api/webhook",
    "status": "active",
    "created_at": "2024-01-15 10:30:00",
    "updated_at": "2025-02-20 14:25:30"
  }
}

#调用失败

json
{
  "success": false,
  "message": "缺少API密钥或秘钥",
  "errors": ""
}

#返回字段说明

字段名 数据类型 字段说明 示例值
uid string 租户唯一标识 ID TENANT123456
name string 账户主体名称 张三科技有限公司
balance float 账户可用余额,单位:元 1500.50
webhook_url string 已配置的回调通知地址 https://example.com/api/notify
status string 账户运行状态:active = 正常、suspended = 暂停、inactive = 未激活 active
created_at string 账户创建时间 2025-01-15 10:30:00
updated_at string 账户信息最后修改时间 2026-02-20 14:25:30

#常见问题

  1. 无法正常查询账户余额
    核对当前使用的 API 凭证归属账户,确认账户状态为正常活跃;新注册账户完成充值后即可正常展示余额数据。