> ## 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.

# 単一カテゴリサンプルをアップロード

> 指定したファイルカテゴリにサンプルファイルをアップロードします

> ⚠️ このエンドポイントは現在も利用できますが、今後メンテナンスされません。代わりに [カテゴリサンプルをアップロード](/api-reference/%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%AB%E3%83%86%E3%82%B4%E3%83%AA%E3%82%B5%E3%83%B3%E3%83%97%E3%83%AB/%E3%82%AB%E3%83%86%E3%82%B4%E3%83%AA%E3%82%B5%E3%83%B3%E3%83%97%E3%83%AB%E3%82%92%E3%82%A2%E3%83%83%E3%83%97%E3%83%AD%E3%83%BC%E3%83%89) を使用してください。




## OpenAPI

````yaml /docflow-global/ja/rest-api/openapi.bundle.yaml post /api/app-api/sip/platform/v2/category/sample/upload
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/sample/upload:
    post:
      tags:
        - 廃止済み
      summary: 単一カテゴリサンプルをアップロード
      description: >
        指定したファイルカテゴリにサンプルファイルをアップロードします


        > ⚠️ このエンドポイントは現在も利用できますが、今後メンテナンスされません。代わりに
        [カテゴリサンプルをアップロード](/api-reference/%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%AB%E3%83%86%E3%82%B4%E3%83%AA%E3%82%B5%E3%83%B3%E3%83%97%E3%83%AB/%E3%82%AB%E3%83%86%E3%82%B4%E3%83%AA%E3%82%B5%E3%83%B3%E3%83%97%E3%83%AB%E3%82%92%E3%82%A2%E3%83%83%E3%83%97%E3%83%AD%E3%83%BC%E3%83%89)
        を使用してください。
      operationId: uploadCategorySample
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                workspace_id:
                  type: string
                  description: ワークスペース ID
                  example: '1234567890'
                category_id:
                  type: string
                  description: ファイルカテゴリ ID
                  example: '1234567890'
                file:
                  type: string
                  format: binary
                  description: サンプルファイル
                with_detail:
                  type: boolean
                  description: |
                    完全な詳細を返すかどうか。true の場合、レスポンスにこのカテゴリの完全なサンプルリストも返します。
                    未設定または false の場合、sample_id のみを返します。
              required:
                - workspace_id
                - category_id
                - file
      responses:
        '200':
          description: カテゴリサンプルのアップロードに成功
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/CodeMessage'
                  - type: object
                    properties:
                      result:
                        type: object
                        properties:
                          sample_id:
                            type: string
                            description: サンプル ID
                            example: '1234567890'
                          samples:
                            type: array
                            description: このカテゴリの完全なサンプルリスト（with_detail=true の場合に返却）
                            items:
                              $ref: '#/components/schemas/CategorySample'
                        required:
                          - sample_id
components:
  schemas:
    CodeMessage:
      type: object
      properties:
        code:
          type: integer
          description: ステータスコード
          example: 200
        msg:
          type: string
          description: ステータス説明
      required:
        - code
        - msg
    CategorySample:
      type: object
      description: ファイルカテゴリサンプル
      properties:
        sample_id:
          type: string
          description: サンプル ID
          example: '1234567890'
        file_name:
          type: string
          description: ファイル名
          example: invoice_sample.pdf
      required:
        - sample_id
        - file_name
  securitySchemes:
    ApiId:
      type: apiKey
      in: header
      name: x-ti-app-id
    SecretCode:
      type: apiKey
      in: header
      name: x-ti-secret-code

````