# 檢視點數紀錄

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)
    目前頁面的令牌。第一頁以 `null` 開始，並使用上一個回應中的 `next_token` 開始下一頁

## Response 200:

  - `200` (unknown)
    成功取得點數使用紀錄

## Response 200 fields (application/json):

  - `status` (integer)
    回應狀態
    Example: 200

  - `result` (object)

  - `result.next_token` (string)
    查詢下一頁的令牌。
    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)
    肌膚檢測的 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)
    Access token 無效

## Response 401 fields (application/json):

  - `status` (integer)
    回應狀態
    Example: 401

  - `error_code` (string)
    錯誤代碼：
* InvalidAccessToken - 未提供 access token 或無效
    Enum: "InvalidAccessToken"

