単一ファイルカテゴリフィールドを追加
curl --request POST \
--url https://docflow.textin.ai/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": "Acgpt",
"with_detail": true
}
'import requests
url = "https://docflow.textin.ai/api/app-api/sip/platform/v2/category/fields/add"
payload = {
"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": "Acgpt",
"with_detail": True
}
headers = {
"x-ti-app-id": "<api-key>",
"x-ti-secret-code": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-ti-app-id': '<api-key>',
'x-ti-secret-code': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
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: 'Acgpt',
with_detail: true
})
};
fetch('https://docflow.textin.ai/api/app-api/sip/platform/v2/category/fields/add', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://docflow.textin.ai/api/app-api/sip/platform/v2/category/fields/add",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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' => 'Acgpt',
'with_detail' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-ti-app-id: <api-key>",
"x-ti-secret-code: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://docflow.textin.ai/api/app-api/sip/platform/v2/category/fields/add"
payload := strings.NewReader("{\n \"name\": \"インボイスコード\",\n \"workspace_id\": \"1234567890\",\n \"category_id\": \"1234567890\",\n \"description\": \"インボイスコードの説明\",\n \"prompt\": \"<string>\",\n \"use_prompt\": true,\n \"alias\": [\n \"インボイス No.\",\n \"請求書番号\"\n ],\n \"identity\": \"invoice_number\",\n \"multi_value\": true,\n \"duplicate_value_distinct\": true,\n \"transform_settings\": {\n \"datetime_settings\": {\n \"format\": \"yyyy-MM-dd\"\n },\n \"enumerate_settings\": {\n \"items\": [\n \"VAT 専用インボイス\",\n \"VAT 一般インボイス\",\n \"電子インボイス\"\n ]\n },\n \"regex_settings\": {\n \"match\": \"^(\\\\d{4})-(\\\\d{2})-(\\\\d{2})$\",\n \"replace\": \"$1/$2/$3\"\n },\n \"mismatch_action\": {\n \"default_value\": \"N/A\"\n }\n },\n \"table_id\": \"1234567890\",\n \"extract_model\": \"Acgpt\",\n \"with_detail\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-ti-app-id", "<api-key>")
req.Header.Add("x-ti-secret-code", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://docflow.textin.ai/api/app-api/sip/platform/v2/category/fields/add")
.header("x-ti-app-id", "<api-key>")
.header("x-ti-secret-code", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"インボイスコード\",\n \"workspace_id\": \"1234567890\",\n \"category_id\": \"1234567890\",\n \"description\": \"インボイスコードの説明\",\n \"prompt\": \"<string>\",\n \"use_prompt\": true,\n \"alias\": [\n \"インボイス No.\",\n \"請求書番号\"\n ],\n \"identity\": \"invoice_number\",\n \"multi_value\": true,\n \"duplicate_value_distinct\": true,\n \"transform_settings\": {\n \"datetime_settings\": {\n \"format\": \"yyyy-MM-dd\"\n },\n \"enumerate_settings\": {\n \"items\": [\n \"VAT 専用インボイス\",\n \"VAT 一般インボイス\",\n \"電子インボイス\"\n ]\n },\n \"regex_settings\": {\n \"match\": \"^(\\\\d{4})-(\\\\d{2})-(\\\\d{2})$\",\n \"replace\": \"$1/$2/$3\"\n },\n \"mismatch_action\": {\n \"default_value\": \"N/A\"\n }\n },\n \"table_id\": \"1234567890\",\n \"extract_model\": \"Acgpt\",\n \"with_detail\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://docflow.textin.ai/api/app-api/sip/platform/v2/category/fields/add")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-ti-app-id"] = '<api-key>'
request["x-ti-secret-code"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"インボイスコード\",\n \"workspace_id\": \"1234567890\",\n \"category_id\": \"1234567890\",\n \"description\": \"インボイスコードの説明\",\n \"prompt\": \"<string>\",\n \"use_prompt\": true,\n \"alias\": [\n \"インボイス No.\",\n \"請求書番号\"\n ],\n \"identity\": \"invoice_number\",\n \"multi_value\": true,\n \"duplicate_value_distinct\": true,\n \"transform_settings\": {\n \"datetime_settings\": {\n \"format\": \"yyyy-MM-dd\"\n },\n \"enumerate_settings\": {\n \"items\": [\n \"VAT 専用インボイス\",\n \"VAT 一般インボイス\",\n \"電子インボイス\"\n ]\n },\n \"regex_settings\": {\n \"match\": \"^(\\\\d{4})-(\\\\d{2})-(\\\\d{2})$\",\n \"replace\": \"$1/$2/$3\"\n },\n \"mismatch_action\": {\n \"default_value\": \"N/A\"\n }\n },\n \"table_id\": \"1234567890\",\n \"extract_model\": \"Acgpt\",\n \"with_detail\": true\n}"
response = http.request(request)
puts response.read_body{
"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
}
}廃止済み
単一ファイルカテゴリフィールドを追加
指定したファイルカテゴリ配下に新しいフィールドを追加します。通常フィールドとテーブルフィールドの両方に対応しています
⚠️ このエンドポイントは現在も利用できますが、今後メンテナンスされません。代わりに ファイルカテゴリのフィールドを追加 を使用してください。
POST
/
api
/
app-api
/
sip
/
platform
/
v2
/
category
/
fields
/
add
単一ファイルカテゴリフィールドを追加
curl --request POST \
--url https://docflow.textin.ai/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": "Acgpt",
"with_detail": true
}
'import requests
url = "https://docflow.textin.ai/api/app-api/sip/platform/v2/category/fields/add"
payload = {
"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": "Acgpt",
"with_detail": True
}
headers = {
"x-ti-app-id": "<api-key>",
"x-ti-secret-code": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-ti-app-id': '<api-key>',
'x-ti-secret-code': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
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: 'Acgpt',
with_detail: true
})
};
fetch('https://docflow.textin.ai/api/app-api/sip/platform/v2/category/fields/add', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://docflow.textin.ai/api/app-api/sip/platform/v2/category/fields/add",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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' => 'Acgpt',
'with_detail' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-ti-app-id: <api-key>",
"x-ti-secret-code: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://docflow.textin.ai/api/app-api/sip/platform/v2/category/fields/add"
payload := strings.NewReader("{\n \"name\": \"インボイスコード\",\n \"workspace_id\": \"1234567890\",\n \"category_id\": \"1234567890\",\n \"description\": \"インボイスコードの説明\",\n \"prompt\": \"<string>\",\n \"use_prompt\": true,\n \"alias\": [\n \"インボイス No.\",\n \"請求書番号\"\n ],\n \"identity\": \"invoice_number\",\n \"multi_value\": true,\n \"duplicate_value_distinct\": true,\n \"transform_settings\": {\n \"datetime_settings\": {\n \"format\": \"yyyy-MM-dd\"\n },\n \"enumerate_settings\": {\n \"items\": [\n \"VAT 専用インボイス\",\n \"VAT 一般インボイス\",\n \"電子インボイス\"\n ]\n },\n \"regex_settings\": {\n \"match\": \"^(\\\\d{4})-(\\\\d{2})-(\\\\d{2})$\",\n \"replace\": \"$1/$2/$3\"\n },\n \"mismatch_action\": {\n \"default_value\": \"N/A\"\n }\n },\n \"table_id\": \"1234567890\",\n \"extract_model\": \"Acgpt\",\n \"with_detail\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-ti-app-id", "<api-key>")
req.Header.Add("x-ti-secret-code", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://docflow.textin.ai/api/app-api/sip/platform/v2/category/fields/add")
.header("x-ti-app-id", "<api-key>")
.header("x-ti-secret-code", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"インボイスコード\",\n \"workspace_id\": \"1234567890\",\n \"category_id\": \"1234567890\",\n \"description\": \"インボイスコードの説明\",\n \"prompt\": \"<string>\",\n \"use_prompt\": true,\n \"alias\": [\n \"インボイス No.\",\n \"請求書番号\"\n ],\n \"identity\": \"invoice_number\",\n \"multi_value\": true,\n \"duplicate_value_distinct\": true,\n \"transform_settings\": {\n \"datetime_settings\": {\n \"format\": \"yyyy-MM-dd\"\n },\n \"enumerate_settings\": {\n \"items\": [\n \"VAT 専用インボイス\",\n \"VAT 一般インボイス\",\n \"電子インボイス\"\n ]\n },\n \"regex_settings\": {\n \"match\": \"^(\\\\d{4})-(\\\\d{2})-(\\\\d{2})$\",\n \"replace\": \"$1/$2/$3\"\n },\n \"mismatch_action\": {\n \"default_value\": \"N/A\"\n }\n },\n \"table_id\": \"1234567890\",\n \"extract_model\": \"Acgpt\",\n \"with_detail\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://docflow.textin.ai/api/app-api/sip/platform/v2/category/fields/add")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-ti-app-id"] = '<api-key>'
request["x-ti-secret-code"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"インボイスコード\",\n \"workspace_id\": \"1234567890\",\n \"category_id\": \"1234567890\",\n \"description\": \"インボイスコードの説明\",\n \"prompt\": \"<string>\",\n \"use_prompt\": true,\n \"alias\": [\n \"インボイス No.\",\n \"請求書番号\"\n ],\n \"identity\": \"invoice_number\",\n \"multi_value\": true,\n \"duplicate_value_distinct\": true,\n \"transform_settings\": {\n \"datetime_settings\": {\n \"format\": \"yyyy-MM-dd\"\n },\n \"enumerate_settings\": {\n \"items\": [\n \"VAT 専用インボイス\",\n \"VAT 一般インボイス\",\n \"電子インボイス\"\n ]\n },\n \"regex_settings\": {\n \"match\": \"^(\\\\d{4})-(\\\\d{2})-(\\\\d{2})$\",\n \"replace\": \"$1/$2/$3\"\n },\n \"mismatch_action\": {\n \"default_value\": \"N/A\"\n }\n },\n \"table_id\": \"1234567890\",\n \"extract_model\": \"Acgpt\",\n \"with_detail\": true\n}"
response = http.request(request)
puts response.read_body{
"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
}
}ボディ
application/json
フィールド名
例:
"インボイスコード"
ワークスペース ID
例:
"1234567890"
ファイルカテゴリ ID
例:
"1234567890"
フィールドの説明
例:
"インボイスコードの説明"
意味抽出プロンプト
意味抽出プロンプトを使用するかどうか
フィールド別名。更新時: 省略=変更なし、空配列 []=別名をクリア、空でない配列=上書き
例:
["インボイス No.", "請求書番号"]
エクスポート時のフィールド名。更新時: 省略=変更なし、空文字列 ""=クリア、空でない値=上書き
例:
"invoice_number"
複数値抽出を有効にするかどうか
multi_value が true の場合のみ有効な重複値除去を行うかどうか
フィールド出力変換設定。抽出結果を出力前に整形します。
Show child attributes
Show child attributes
テーブル ID
- 未指定または空の場合: 通常フィールドを作成し、結果は result.fields に表示されます
- テーブル ID を指定した場合: 指定したテーブル配下にテーブルフィールドを作成し、結果は result.tables[].fields に表示されます
例:
"1234567890"
任意。フィールドレベルの抽出モデル。通常フィールド(テーブルフィールド以外)のみ対応し、未指定の場合は分類レベルの設定に従います(分類レベルが mixed または null の場合は Auto がデフォルト)
- Auto: 抽出モデルを自動でマッチング
- Acgpt: 高速で安定した抽出結果
- Acgpt-VL: VLM。シンプルな抽出に適しています(≤10 ページ)
- DF-M1: 複雑な文書理解に適しています
利用可能なオプション:
Auto, Acgpt, Acgpt-VL, DF-M1 例:
"Acgpt"
完全な詳細を返すかどうか。true の場合、レスポンスにフィールドの完全な情報が含まれます。 未設定または false の場合、field_id のみを返します。
⌘I

