> ## Documentation Index
> Fetch the complete documentation index at: https://docs-docflow.textin.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# ファイルカテゴリのフィールドを更新

> 指定したファイルカテゴリ配下の複数フィールドを更新します。全件成功または全件失敗のセマンティクスを採用しています。



## OpenAPI

````yaml /docflow-global/ja/rest-api/openapi.bundle.yaml post /api/app-api/sip/platform/v2/category/fields/batch_update
openapi: 3.0.0
info:
  title: DocFlow API
  description: DocFlow REST API。ファイルアップロードとファイル処理結果の取得機能を提供します。
  version: 2.8.4
  contact:
    name: TextIn
    url: https://www.textin.ai/contact?type=27&sub_type=1
servers:
  - url: https://docflow.textin.ai
security:
  - ApiId: []
    SecretCode: []
tags:
  - name: ワークスペース管理
    description: ワークスペース関連 API
  - name: ファイルカテゴリ
    description: ファイルカテゴリ関連 API
  - name: ファイルカテゴリサンプル
    description: ファイルカテゴリサンプル関連 API
  - name: スマートレビュー
    description: スマートレビュー関連 API
  - name: 廃止済み
    description: 廃止済み API
paths:
  /api/app-api/sip/platform/v2/category/fields/batch_update:
    post:
      tags:
        - ファイルカテゴリ
      summary: ファイルカテゴリのフィールドを更新
      description: 指定したファイルカテゴリ配下の複数フィールドを更新します。全件成功または全件失敗のセマンティクスを採用しています。
      operationId: batchUpdateCategoryFields
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                workspace_id:
                  type: string
                  description: ワークスペース ID
                  example: '1234567890'
                category_id:
                  type: string
                  description: ファイルカテゴリ ID
                  example: '1234567890'
                fields:
                  type: array
                  description: 更新するフィールドのリスト
                  items:
                    $ref: '#/components/schemas/CategoryFieldUpdateItem'
                  minItems: 1
                with_detail:
                  type: boolean
                  description: 更新後の各フィールドの完全な詳細を返すかどうか
              required:
                - workspace_id
                - category_id
                - fields
      responses:
        '200':
          description: フィールドの更新に成功
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/CodeMessage'
                  - type: object
                    properties:
                      result:
                        type: array
                        description: with_detail=true の場合は更新後のフィールドリスト、それ以外は null
                        items:
                          type: object
                          properties:
                            field_id:
                              type: string
                            name:
                              type: string
                            description:
                              type: string
                            prompt:
                              type: string
                            use_prompt:
                              type: boolean
                            alias:
                              type: array
                              items:
                                type: string
                            identity:
                              type: string
                            multi_value:
                              type: boolean
                            duplicate_value_distinct:
                              type: boolean
                            transform_settings:
                              $ref: '#/components/schemas/TransformSettings'
                            extract_model:
                              type: string
                            enabled:
                              type: integer
components:
  schemas:
    CategoryFieldUpdateItem:
      type: object
      description: フィールド更新項目（multi_value/duplicate_value_distinct はこのエンドポイントでは変更できません）
      properties:
        field_id:
          type: string
          description: フィールド ID
          example: '1234567890'
        name:
          type: string
          description: フィールド名
        description:
          type: string
          description: フィールドの説明
        prompt:
          type: string
          description: 意味抽出プロンプト
        use_prompt:
          type: boolean
          description: 意味抽出プロンプトを使用するかどうか
        alias:
          type: array
          description: フィールド別名。省略=変更なし、空配列 []=クリア、空でない配列=上書き
          items:
            type: string
          example:
            - インボイス No.
            - 請求書番号
        identity:
          type: string
          description: エクスポート時のフィールド名。省略=変更なし、空文字列 ""=クリア、空でない値=上書き
          example: invoice_number
        multi_value:
          type: boolean
          description: 複数値抽出を有効にするかどうか。省略=変更なし
        duplicate_value_distinct:
          type: boolean
          description: 値を重複排除するかどうか。multi_value が true の場合のみ有効です。省略=変更なし
        transform_settings:
          $ref: '#/components/schemas/TransformSettings'
        extract_model:
          type: string
          description: |
            フィールド単位の抽出モデル。通常フィールドのみ個別に設定でき、テーブルフィールドは設定できません。
            省略すると既存設定を保持します。
            - Auto: 抽出モデルを自動でマッチング
            - Acgpt: 高速で安定した抽出結果
            - Acgpt-VL: VLM。シンプルな抽出に適しています（≤10 ページ）
            - DF-M1: 複雑な文書理解に適しています
          example: Acgpt
          enum:
            - Auto
            - Acgpt
            - Acgpt-VL
            - DF-M1
      required:
        - field_id
    CodeMessage:
      type: object
      properties:
        code:
          type: integer
          description: ステータスコード
          example: 200
        msg:
          type: string
          description: ステータス説明
      required:
        - code
        - msg
    TransformSettings:
      type: object
      description: フィールド出力変換設定。抽出結果を出力前に整形します。
      properties:
        type:
          type: string
          description: |
            変換タイプ。適用する変換ルールを決定します:
            - `datetime`: 抽出結果を指定した日付形式に正規化します
            - `enumerate`: 抽出結果を事前設定された列挙値のいずれかに制限します
            - `regex`: 正規表現で抽出結果をマッチングして置換します
          enum:
            - datetime
            - enumerate
            - regex
        datetime_settings:
          type: object
          description: 日時フォーマット設定。type=datetime の場合は必須です。
          properties:
            format:
              type: string
              description: 対象の日付形式。抽出結果はこの形式に正規化されます。
              example: yyyy-MM-dd
        enumerate_settings:
          type: object
          description: 列挙制約設定。type=enumerate の場合は必須です。
          properties:
            items:
              type: array
              description: 許可される列挙値。抽出結果がこのリストに含まれない場合は mismatch_action が適用されます。
              items:
                type: string
              example:
                - VAT 専用インボイス
                - VAT 一般インボイス
                - 電子インボイス
        regex_settings:
          type: object
          description: 正規表現変換設定。type=regex の場合は必須です。
          properties:
            match:
              type: string
              description: 抽出結果をマッチングまたはキャプチャする正規表現パターン
              example: ^(\d{4})-(\d{2})-(\d{2})$
            replace:
              type: string
              description: 置換式。$1、$2 などのキャプチャグループ参照をサポートします
              example: $1/$2/$3
        mismatch_action:
          type: object
          description: 変換ルールに一致しない抽出結果の処理方法（すべてのタイプに適用、任意）。
          properties:
            mode:
              type: string
              description: |
                処理モード:
                - `default`: 指定したデフォルト値を出力します（default_value が必要）
                - `warning`: 元の抽出結果を保持し、手動レビュー用の警告を付けます
              enum:
                - default
                - warning
            default_value:
              type: string
              description: mode=default の場合の出力値
              example: N/A
  securitySchemes:
    ApiId:
      type: apiKey
      in: header
      name: x-ti-app-id
    SecretCode:
      type: apiKey
      in: header
      name: x-ti-secret-code

````