资源
自定义字段
自定义字段 的每一个端点,附带它强制要求的作用域、它接受的请求体、一份可读的响应,以及它可能返回的拒绝。
列出工作区的自定义字段,包括已归档的字段。
get
/organizations/{organization}/custom-fields- 作用域
- passports:read
Idempotency-Key- 不接受
- 返回
- 200
路径参数
organization字符串必填本次请求代为操作的组织。密钥必须已获得该组织的授权。
错误
该端点可能返回的全部拒绝,以及它们所带的 HTTP 状态码。
请求
curl "https://passportcraft.com/api/v1/organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/custom-fields" \
-H "Authorization: Bearer $PASSPORTCRAFT_API_KEY"响应 · 200
{
"object": "list",
"data": [
{
"object": "custom_field",
"key": "guarantee",
"label": "Guarantee",
"label_lang": "en",
"help": "Years of manufacturer guarantee",
"type": "number",
"unit": "ANN",
"options": null,
"environmental": false,
"status": "active",
"position": 0,
"created_at": "2026-08-01T09:12:44.918Z",
"updated_at": "2026-08-01T09:12:44.918Z"
},
{
"object": "custom_field",
"key": "old_care_notes",
"label": "Old care notes",
"label_lang": "en",
"help": null,
"type": "text",
"unit": null,
"options": null,
"environmental": false,
"status": "archived",
"position": 1,
"created_at": "2026-08-01T09:12:44.918Z",
"updated_at": "2026-08-02T10:30:00.000Z"
}
],
"has_more": false,
"next_cursor": null
}GET /organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/custom-fields