フィールドの一覧取得 (List Fields)
GET/apiv2/pub/schema/fieldsdocuments_read
フィルタ可能なすべてのフィールド — ドキュメントのメタデータ列とカスタムフィールドテンプレートの列(Grid + GridLink)を返します。name の値を フィールド値の取得 のパスパラメータとして使用してください。
リクエスト
パラメータは不要です。
レスポンス
200 OK — フィールド定義の配列
| フィールド | 型 | 説明 |
|---|---|---|
name | string | フィールド識別子。Documents.<col> または customfields_grid_<id>.cfield_<id>。 |
label | string | 人が読める表示名。 |
source | string | "document" または "custom_field"。 |
operators | array | name と label を持つ、サポートされているフィルタ演算子。 |
valueEditorType | string | "text"、"number"、"date"、または "select"。 |
metadata | object | GridLink フィールドの場合のみ。template_id、field_own_id などを含みます。 |
演算子名
=, !=, >, <, >=, <=, contains, beginsWith, endsWith, doesNotContain, null, notNull
エラー
| ステータス | 理由 |
|---|---|
| 401 | トークンが無効または期限切れです |
| 403 | トークンに documents_read スコープがありません |
cURL
curl -i -X GET "https://portal.docwize.com/apiv2/pub/schema/fields" \
-H "Authorization: Bearer <ACCESS_TOKEN>"
[
{
"name": "Documents.doc_type",
"label": "Type",
"source": "document",
"operators": [
{"label": "Equals", "name": "="},
{"label": "Contains", "name": "contains"}
],
"valueEditorType": "text"
},
{
"name": "Documents.date",
"label": "Document Date",
"source": "document",
"operators": [
{"label": "After", "name": ">"},
{"label": "Before", "name": "<"}
],
"valueEditorType": "date"
},
{
"name": "customfields_grid_5.cfield_101",
"label": "Invoice Details - Amount",
"source": "custom_field",
"operators": [
{"label": "Equals", "name": "="},
{"label": "Greater Than", "name": ">"}
],
"valueEditorType": "number"
}
]