跳转到内容

积分流水

按时间倒序返回每笔余额变动记录。charge 记录的 ref_id 为对应的 query_id。

GEThttps://geo-api.geoeval.com/v1/credits/transactions

需在 Authorization 请求头中传入 API Key。 前往下方在线调试

查询参数

  • limitinteger可选

    每页条数,默认 50,最大 200。

  • beforestring可选

    只返回早于该 ID 的记录,传入上页的 next。

请求示例

curl "https://geo-api.geoeval.com/v1/credits/transactions?limit=20" \
-H "Authorization: Bearer $GEOEVAL_API_KEY"

响应 200

  • transactionsobject[]

    余额变动记录,按时间倒序排列。

    子字段: transactions
    • idstring

      流水 ID。

    • kindstring

      变动类型:topup (充值)、charge (query 扣费) 或 adjust (人工调整)。

    • amountnumber

      带正负号的积分变动值。

    • balance_afternumber

      变动后的账户余额。

    • ref_idstring | null

      charge 对应 query_id,topup 对应充值单 ID,adjust 为 null。

    • notestring

      adjust 的备注说明,其余情况为空字符串。

    • created_atinteger (ms)

      变动发生时间。

  • nextstring | null

    下页游标,传给 before 参数获取下页;末页为 null。

响应示例

{
"transactions": [
{
"id": "01a22525-1a2b-7c3d-8e4f-5a6b7c8d9e0f",
"kind": "charge",
"amount": -3,
"balance_after": 97,
"ref_id": "01a22524-9c1e-7a3b-8f21-6b0d4c9e1a27",
"note": "",
"created_at": 1798000095000
}
],
"next": null
}

错误

所有接口还可能返回 400、401、403 或 500,详见错误.