# 查看点数记录

Endpoint: GET /s2s/v1.0/client/credit/history
Security: BearerAuthentication

## Security:

  - `BearerAuthentication` (unknown)
    http bearer

## Query parameters:

  - `page_size` (integer)
    每页返回的条目数量，取值 1 到 30，默认 20。

  - `starting_token` (string)
    本页的起始 token。第一页传 `null`， 之后用上一次响应里的 `next_token` 作为下一页的起点

## Response 200:

  - `200` (unknown)
    成功获取点数使用记录

## Response 200 fields (application/json):

  - `status` (integer)
    响应状态
    Example: 200

  - `result` (object)

  - `result.next_token` (string)
    用于查询下一页的 token。
    Example: 73a3c9e69b89

  - `result.history` (array)

  - `result.history.id` (integer)
    该条记录的唯一标识
    Example: 38173479337460984

  - `result.history.timestamp` (integer)
    该条记录的时间（Unix 时间戳，毫秒）
    Example: 1703146067000

  - `result.history.action` (string)
    该条记录对应的操作
    Enum: "photo_enhance", "api_photo_enhance", "object_removal", "api_object_removal", "background_removal", "api_background_removal", "colorize", "api_colorize", "text_to_image", "api_text_to_image", "hair_style", "api_hair_style", "blur_background", "change_background", "wig", "trial_gift_text_to_image", "sign_up_gift", "subscription_credits", "subscriber_gift", "permanent_credits", "compensation_from_customer_service", "renew", "expire"

  - `result.history.target_id` (string)
    该笔点数对应的对象 ID。例如运行 AI 照片优化任务时， 这条记录的 `target_id` 就是该 AI 照片优化任务的 `task_id`； 购买点数时，这条记录的 `target_id` 是 `order_id`。
    Example: 7TWFkuE2Z9uR0NOxSmQ1rh4PJ5Zx7YJ5U9SAz51q0QHVwMP+Jb1XbjPsf7ZgUgLY

  - `result.history.info` (object)

  - `result.history.info.credits` (array)
    每一项点数的详细信息
    Example: [{"id":24409059381740548,"amount":-2},{"id":27297116883780870,"amount":0}]

  - `result.history.info.credits.id` (integer)
    点数 ID

  - `result.history.info.credits.amount` (integer)
    此参数已弃用，请改用 amount_dec。该项点数的变动总量。

  - `result.history.info.credits.amount_dec` (number)
    本次记录的点数净变化，以两位小数显示。

  - `result.history.info.dst_actions` (array)
    AI 肤质分析要输出的项目（dst_actions）
    Example: [ "hd_wrinkle", "hd_pore", "hd_texture" ]

## Response 400:

  - `400` (unknown)
    请求参数无效

## Response 400 fields (application/json):

  - `status` (integer)
    响应状态
    Example: 400

  - `error` (string)
    Example: Invalid parameter value

  - `error_code` (string)
    Example: InvalidParameters

## Response 401:

  - `401` (unknown)
    访问令牌无效

## Response 401 fields (application/json):

  - `status` (integer)
    响应状态
    Example: 401

  - `error_code` (string)
    错误码：
* InvalidAccessToken - 未提供 access token，或 token 无效
    Enum: "InvalidAccessToken"

