全部產品
Search
文件中心

Qoder CN 系列:列出 Templates

更新時間:Jul 15, 2026

分頁列出當前帳號下的 Forward Template。

GET /api/v1/forward/templates

返回 Template 基準列表;歸檔 Template 僅在按狀態請求時返回。

要求標頭

Header

是否必填

說明

Authorization

Bearer <PAT>

查詢參數

參數

類型

是否必填

預設值

說明

status

string

-

activearchived 過濾。

limit

integer

20

分頁大小,最大 100。

after_id

string

-

向後翻頁遊標,不能與 before_id 同用。

before_id

string

-

向前翻頁遊標,不能與 after_id 同用。

樣本請求

curl -s -X GET 'https://api.qoder.com.cn/api/v1/forward/templates' \
  -H "Authorization: Bearer $QODER_PAT"

樣本響應

HTTP 200 OK

{
  "data": [
    {
      "type": "template",
      "id": "tmpl_support",
      "name": "Support assistant",
      "description": "Handles customer support requests",
      "status": "active",
      "created_at": "2026-06-18T10:00:00Z",
      "updated_at": "2026-06-18T10:00:00Z"
    }
  ],
  "first_id": "tmpl_support",
  "last_id": "tmpl_support",
  "has_more": false
}

響應欄位

欄位

類型

說明

data

array

當前頁的 Template 摘要列表。

first_id

string|null

當前頁第一條記錄 ID。

last_id

string|null

當前頁最後一條記錄 ID。

has_more

boolean

是否還有更多記錄。

錯誤

HTTP

Type

Code

觸發條件

400

invalid_request_error

-

分頁參數不合法或 limit 超過上限。

401

authentication_error

authentication_required

PAT 無效或已到期。

403

permission_error

-

當前調用方無權訪問該資源。

注意事項

  • 結果只包含當前鑒權帳號可見的 Template。

  • after_idbefore_id 不能同時傳入。

相關