メインコンテンツへスキップ
POST
/
api
/
app-api
/
sip
/
platform
/
v2
/
category
/
fields
/
add
単一ファイルカテゴリフィールドを追加
curl --request POST \
  --url https://docflow.textin.com/api/app-api/sip/platform/v2/category/fields/add \
  --header 'Content-Type: application/json' \
  --header 'x-ti-app-id: <api-key>' \
  --header 'x-ti-secret-code: <api-key>' \
  --data '
{
  "name": "インボイスコード",
  "workspace_id": "1234567890",
  "category_id": "1234567890",
  "description": "インボイスコードの説明",
  "prompt": "<string>",
  "use_prompt": true,
  "alias": [
    "インボイス No.",
    "請求書番号"
  ],
  "identity": "invoice_number",
  "multi_value": true,
  "duplicate_value_distinct": true,
  "transform_settings": {
    "datetime_settings": {
      "format": "yyyy-MM-dd"
    },
    "enumerate_settings": {
      "items": [
        "VAT 専用インボイス",
        "VAT 一般インボイス",
        "電子インボイス"
      ]
    },
    "regex_settings": {
      "match": "^(\\d{4})-(\\d{2})-(\\d{2})$",
      "replace": "$1/$2/$3"
    },
    "mismatch_action": {
      "default_value": "N/A"
    }
  },
  "table_id": "1234567890",
  "extract_model": "Model 1",
  "with_detail": true
}
'
{
  "code": 200,
  "msg": "<string>",
  "result": {
    "field_id": "1234567890",
    "name": "<string>",
    "description": "<string>",
    "prompt": "<string>",
    "use_prompt": true,
    "alias": [
      "<string>"
    ],
    "identity": "<string>",
    "multi_value": true,
    "duplicate_value_distinct": true,
    "transform_settings": {
      "datetime_settings": {
        "format": "yyyy-MM-dd"
      },
      "enumerate_settings": {
        "items": [
          "VAT 専用インボイス",
          "VAT 一般インボイス",
          "電子インボイス"
        ]
      },
      "regex_settings": {
        "match": "^(\\d{4})-(\\d{2})-(\\d{2})$",
        "replace": "$1/$2/$3"
      },
      "mismatch_action": {
        "default_value": "N/A"
      }
    },
    "extract_model": "<string>",
    "enabled": 123
  }
}

承認

x-ti-app-id
string
header
必須
x-ti-secret-code
string
header
必須

ボディ

application/json
name
string
必須

フィールド名

:

"インボイスコード"

workspace_id
string
必須

ワークスペース ID

:

"1234567890"

category_id
string
必須

ファイルカテゴリ ID

:

"1234567890"

description
string

フィールドの説明

:

"インボイスコードの説明"

prompt
string

意味抽出プロンプト

use_prompt
boolean

意味抽出プロンプトを使用するかどうか

alias
string[]

フィールド別名。更新時: 省略=変更なし、空配列 []=別名をクリア、空でない配列=上書き

:
["インボイス No.", "請求書番号"]
identity
string

エクスポート時のフィールド名。更新時: 省略=変更なし、空文字列 ""=クリア、空でない値=上書き

:

"invoice_number"

multi_value
boolean

複数値抽出を有効にするかどうか

duplicate_value_distinct
boolean

multi_value が true の場合のみ有効な重複値除去を行うかどうか

transform_settings
object

フィールド出力変換設定。抽出結果を出力前に整形します。

table_id
string

テーブル ID

  • 未指定または空の場合: 通常フィールドを作成し、結果は result.fields に表示されます
  • テーブル ID を指定した場合: 指定したテーブル配下にテーブルフィールドを作成し、結果は result.tables[].fields に表示されます
:

"1234567890"

extract_model
enum<string>

任意。フィールドレベルの抽出モデル。通常フィールド(テーブルフィールド以外)のみ対応し、デフォルトは Model 1 です

  • Model 1: 高速で安定した抽出結果
  • Model 2: 複雑な文書理解に適しています
  • Model 3: VLM。シンプルな抽出に適しています
利用可能なオプション:
Model 1,
Model 2,
Model 3
:

"Model 1"

with_detail
boolean

完全な詳細を返すかどうか。true の場合、レスポンスにフィールドの完全な情報が含まれます。 未設定または false の場合、field_id のみを返します。

レスポンス

200 - application/json

ファイルカテゴリフィールドの追加に成功

code
integer
必須

ステータスコード

:

200

msg
string
必須

ステータス説明

result
object