ドキュメント

ドキュメント

生成済みドキュメントの一覧

GET/generations

ワークスペースの生成済みドキュメントを新しい順に返します。フィルターは AND で組み合わされます。

パラメータ

名前型説明
templateuuidこのテンプレートから生成されたドキュメントのみ。
created_byuuidこのユーザーが生成したドキュメントのみ。
sourceapp | apiPaperClerk 内で生成されたドキュメントは app、API と MCP コネクタによるものは api。
fromdate-timeこの時刻以降(含む)に作成されたドキュメントのみ。ISO 8601 で、日付だけの場合は UTC の午前 0 時を意味します。
todate-timeこの時刻より前に作成されたドキュメントのみ。範囲は半開区間で、from は含まれ、to は含まれません。
searchstringタイトルにこのテキストを含むドキュメントのみ。
limitintegerページサイズ、1〜200。
cursorstring前のページの next_cursor。

リクエスト

curl "https://usepaperclerk.com/api/v1/generations?template=4d1f0c2e-7b3a-4c1e-9d2f-1a2b3c4d5e6f&from=2026-09-01&limit=2" \
  -H "Authorization: Bearer pc_YOUR_TOKEN"

レスポンス

JSON
{
  "generations": [
    {
      "id": "9b8e2f10-5c4d-4e3f-8a7b-6c5d4e3f2a1b",
      "template_id": "4d1f0c2e-7b3a-4c1e-9d2f-1a2b3c4d5e6f",
      "template_title": "Consulting invoice",
      "title": "Invoice — Maple & Fern, September",
      "generation_number": 13,
      "source": "api",
      "source_version": 3,
      "created_by": "7e6d5c4b-3a2f-4e1d-9c8b-7a6f5e4d3c2b",
      "created_by_name": "Mara Novak",
      "created_at": "2026-09-12T14:02:11.480Z",
      "pdf_status": "ready",
      "pdf_url": "https://usepaperclerk.com/api/v1/generations/9b8e2f10-5c4d-4e3f-8a7b-6c5d4e3f2a1b/pdf",
      "url": "https://usepaperclerk.com/app/generated/9b8e2f10-5c4d-4e3f-8a7b-6c5d4e3f2a1b"
    },
    { "…": "…" }
  ],
  "total": 27,
  "has_more": true,
  "next_cursor": "MjAyNi0wOS0xMlQxNDowMDowNS4wMDBafDliOGUyZjEw…"
}
  • テンプレートが削除されると template_id は null になりますが、ドキュメントと template_title は残ります。
  • テンプレート内でのドキュメントの番号。source_version は生成元となった保存済みバージョンです。
  • 最後のページでは next_cursor は null です。
  • total はページサイズに関係なく、フィルターに一致するすべての文書を数えます。
  • created_by_name はその人の表示名です。ワークスペースで共有されなくなると null になります。