资源

事件

事件 的每一个端点,附带它强制要求的作用域、它接受的请求体、一份可读的响应,以及它可能返回的拒绝。

读取该组织的事件流。

get/organizations/{organization}/events
作用域
events:read
Idempotency-Key
不接受
返回
200

路径参数

organizationstring必填

本次请求代为操作的组织。密钥必须已获得该组织的授权。

查询参数

limitstring可选

返回多少条记录。服务端返回的条数可能更少。

cursorstring可选

上一页返回的 next_cursor。游标会编码签发时所用的筛选条件,改用其他筛选条件发送会被 cursor_invalid 拒绝。

typestring, repeatable可选

可重复传入以按多个事件类型筛选。省略则涵盖全部类型。

错误

该端点可能返回的全部拒绝,以及它们所带的 HTTP 状态码。

请求
curl "https://passportcraft.com/api/v1/organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/events?type=passport.published&limit=25" \
  -H "Authorization: Bearer $PASSPORTCRAFT_API_KEY"
响应 · 200
{
  "object": "list",
  "data": [
    {
      "object": "event",
      "id": "e3b0c442-98fc-4c14-9afb-f4c8996fb924",
      "name": "organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/events/e3b0c442-98fc-4c14-9afb-f4c8996fb924",
      "organization_id": "8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2",
      "type": "passport.published",
      "livemode": true,
      "created_at": "2026-08-01T14:03:22.501Z",
      "related": {
        "object": "passport",
        "id": "2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41",
        "name": "organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41",
        "category": "textile",
        "status": "published",
        "previous_status": "draft",
        "version": 4
      }
    }
  ],
  "has_more": false,
  "next_cursor": "eyJjIjoiMjAyNi0wOC0wMVQxNDowMzoyMi41MDFaIn0"
}

GET /organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/events?type=passport.published&limit=25

事件 — PassportCraft API 参考 | PassportCraft